SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.03158 · 2024

CSS: Contrastive Semantic Similarity for Uncertainty Quantification of LLMs

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 7 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2406.03158.json · badge: /api/ran/2406.03158.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
aoshuang92/css_uq_llms canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
area_under_accuracy_coverage_curve Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aoshuang92/css_uq_llms/UQ-CSS/pipeline/eval_uq.py
pointer only (licence: NONE) · get_code("b2800ffbe076300f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aoshuang92/css_uq_llms when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_D_mat Ran
ran, honoured the contract we drafted
aoshuang92/css_uq_llms/UQ-CSS/pipeline/clustering.py
pointer only (licence: NONE); the stored copy get_code serves, from tian-bai/optcs, is pointer only (licence: NONE) · get_code("8d0c51ce26ff6e51")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aoshuang92/css_uq_llms when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_L_mat Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aoshuang92/css_uq_llms/UQ-CSS/pipeline/clustering.py
pointer only (licence: NONE); the stored copy get_code serves, from tian-bai/optcs, is pointer only (licence: NONE) · get_code("cf36dbb016c0d562")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aoshuang92/css_uq_llms when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_affinity_mat Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aoshuang92/css_uq_llms/UQ-CSS/pipeline/clustering.py
pointer only (licence: NONE) · get_code("c36588258a092d01")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aoshuang92/css_uq_llms when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_key_from_generated_strings_path_new Ran
ran; our contract draft was wrong, not the code
aoshuang92/css_uq_llms/UQ-CSS/dataeval/load.py
pointer only (licence: NONE) · get_code("e6fdbc463ce2485d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aoshuang92/css_uq_llms when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

process_data_to_model_inputs Ran
ran; our contract draft was wrong, not the code
aoshuang92/css_uq_llms/UQ-CSS/dataeval/triviaqa.py
pointer only (licence: NONE) · get_code("55a1526dbd125e56")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aoshuang92/css_uq_llms when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

recover_sim_mat_new Ran
ran; our contract draft was wrong, not the code
aoshuang92/css_uq_llms/UQ-CSS/pipeline/uq_bb.py
pointer only (licence: NONE) · get_code("f87b66b5cc6d6c6f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aoshuang92/css_uq_llms when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

sample_to_prompt Ran
ran on a synthesized input
aoshuang92/css_uq_llms/UQ-CSS/dataeval/nq_open.py
pointer only (licence: NONE) · get_code("07b6dace596d7818")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aoshuang92/css_uq_llms when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

sample_to_prompt Ran
ran; our contract draft was wrong, not the code
aoshuang92/css_uq_llms/UQ-CSS/dataeval/triviaqa.py
pointer only (licence: NONE) · get_code("0da895b25f424e3d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aoshuang92/css_uq_llms when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
aoshuang92/css_uq_llms/UQ-CSS/dataeval/nq_open.py
pointer only (licence: NONE) · get_code("4046d4dc3282ea6c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aoshuang92/css_uq_llms when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
aoshuang92/css_uq_llms/UQ-CSS/dataeval/triviaqa.py
pointer only (licence: NONE) · get_code("ded65a0007a6b079")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aoshuang92/css_uq_llms when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 3 the same month, 2 later) and 8 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
area_under_accuracy_coverage_curve 2 other papers
1 dated earlier, 1 the same month
2305.19187 (2023-05)
Generating with Confidence: Uncertainty Quantification for Black-box Large Language Models
2406.01806 (2024-06)
Contextualized Sequence Likelihood: Enhanced Confidence Scores for Natural Language Generation
get_D_mat 2 other papers
1 the same month, 1 later
2406.01806 (2024-06)
Contextualized Sequence Likelihood: Enhanced Confidence Scores for Natural Language Generation
2411.17983 (2024-11)
Optimized Conformal Selection: Powerful Selective Inference After Conformity Score Optimization
get_L_mat 2 other papers
1 the same month, 1 later
2406.01806 (2024-06)
Contextualized Sequence Likelihood: Enhanced Confidence Scores for Natural Language Generation
2411.17983 (2024-11)
Optimized Conformal Selection: Powerful Selective Inference After Conformity Score Optimization

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Despite the impressive capability of large language models (LLMs), knowing when to trust their generations remains an open challenge. The recent literature on uncertainty quantification of natural language generation (NLG) utilises a conventional natural language inference (NLI) classifier to measure the semantic dispersion of LLMs responses. These studies employ logits of NLI classifier for semantic clustering to estimate uncertainty. However, logits represent the probability of the predicted class and barely contain feature information for potential clustering. Alternatively, CLIP (Contrastive Language-Image Pre-training) performs impressively in extracting image-text pair features and measuring their similarity. To extend its usability, we propose Contrastive Semantic Similarity, the CLIP-based feature extraction module to obtain similarity features for measuring uncertainty for text pairs. We apply this method to selective NLG, which detects and rejects unreliable generations for better trustworthiness of LLMs. We conduct extensive experiments with three LLMs on several benchmark question-answering datasets with comprehensive evaluation metrics. Results show that our proposed method performs better in estimating reliable responses of LLMs than comparable baselines. Results show that our proposed method performs better in estimating reliable responses of LLMs than comparable baselines. The code are available at \url{https://github.com/AoShuang92/css_uq_llms}.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2406.03158")
get_code_for_paper("2406.03158")
have("2406.03158")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2406.03158.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2406.03158.svg)](https://syntology.ai/paper/2406.03158)

Connect an agent — have() is free.