SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.03870 · ICML · 2026

Evaluating LLM Uncertainty in Long-Form Generation Using Deterministic Ground Truth

Ran El-Yaniv, Ido Galil, Ido Amit

arXiv · PDF · Open in the Atlas

Code that ran

22 of 23 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; 4 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 17 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2607.03870.json · badge: /api/ran/2607.03870.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
IdoAmit198/SALT canonical (classifier label)
classifier basis: census
22 ran · 1 no recorded run
FunctionStatusWhere it lives
AUROC Ran
ran, honoured the contract we drafted
IdoAmit198/SALT/salt_benchmark/evaluation/uncertainty.py
code served (permissive licence) · get_code("509f81726cf35ad6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct valid arguments for AUROC function
# The function expects:
# - confidence: Sequence[float] - confidence scores
# - ground_truth: Sequence[int | bool] - binary labels (0 or 1)
# - sort: bool - whether to sort (default True)

# Create sample confidence scores (floats)
confidence = [0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2]

# Create sample ground truth labels (binary: 0 or 1)
ground_truth = [1, 1, 0, 1, 0, 0, 1, 0]

# Verify they have the same length
assert len(confidence) == len(ground_truth)

# Verify we have both positive and negative samples
assert sum(ground_truth) > 0 and len(ground_truth) - sum(ground_truth) > 0

ARGS = {
    "confidence": confidence,
    "ground_truth": ground_truth,
    "sort": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ECE_calc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
IdoAmit198/SALT/salt_benchmark/evaluation/uncertainty.py
code served (permissive licence) · get_code("d79ff27a84ba3ac3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math

ARGS = {
    "confidence": [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9],
    "ground_truth": [0, 0, 1, 1, 0, 1, 1, 0, 1],
    "num_bins": 15,
    "bin_boundaries_scheme": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
auroc_score Ran
ran, honoured the contract we drafted
IdoAmit198/SALT/salt_benchmark/evaluation/uncertainty.py
code served (permissive licence) · get_code("9c2f6a853fa8a7e3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function takes sequences of floats and ints/bools
# Let's create simple test data

confidence = [0.9, 0.7, 0.8, 0.6, 0.95, 0.5]
ground_truth = [1, 0, 1, 0, 1, 0]

ARGS = {
    "confidence": confidence,
    "ground_truth": ground_truth,
    "sort": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
clip Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/tutorial_utils.py
code served (permissive licence) · get_code("5dd343d0b9c8d107")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes a text object and an optional max_chars parameter
# It converts text to string, checks its length, and clips if necessary
# No special attributes or methods are called on the text object beyond str()

ARGS = {
    "text": "This is a sample text that will be used to test the clip function. It should work with any object that can be converted to a string representation.",
    "max_chars": 1200
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
complementary_dna Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/tasks/dna.py
code served (permissive licence) · get_code("3af8740fbbbe18dd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

ARGS = {
    'seq': 'ATG TAA GGC',
    'delimiter': ' '
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_confidence_functions Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/generation/confidence.py
code served (permissive licence) · get_code("bcff288dd875a4ca")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math
from typing import Any, Mapping, Sequence

torch_available = False
try:
    import torch
    torch_available = True
except ImportError:
    pass

# Set seed for reproducibility
if torch_available:
    torch.manual_seed(0)

# Define the arguments for compute_confidence_functions
greedy_log_likelihoods = [-0.5, -1.2, -0.8, -1.5]
entropies = [0.3, 0.6, 0.4, 0.5]
token_prob_distributions = [
    [0.7, 0.2, 0.1],
    [0.5, 0.3, 0.2],
    [0.6, 0.25, 0.15],
    [0.4, 0.35, 0.25]
]

ARGS = {
    'greedy_log_likelihoods': greedy_log_likelihoods,
    'entropies': entropies,
    'token_prob_distributions': token_prob_distributions
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cycle_take Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
IdoAmit198/SALT/salt_benchmark/tasks/base.py
code served (permissive licence) · get_code("7a4ba8059dbdd76b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# cycle_take takes a Sequence and num_items: int
# It cycles through the sequence by indexing with modulo
# So we need a sequence (list, tuple, etc.) and an integer

# Example 1: Simple list of integers
items = [1, 2, 3, 4, 5]
num_items = 12

ARGS = {
    "items": items,
    "num_items": num_items
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
edit_distance Ran
ran, honoured the contract we drafted
IdoAmit198/SALT/salt_benchmark/tasks/code.py
code served (permissive licence) · get_code("1487b0303c654eb4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

ARGS = {
    "first": "kitten",
    "second": "sitting"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fenced_response_extraction Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/evaluation/atomic.py
code served (permissive licence) · get_code("59504ab7d6de5b6a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import regex

COMPLETE_FENCE_PATTERN = '(?<!\\*)[\\*]{4,}(?!\\*)'

BAD_FENCED_KEYWORDS = ['the answer is', 'final answer', 'the final answer is:', 'the output is:', 'output:', 'answer:', 'final output:', 'final:', 'final answer is:', 'cannot conclude', "can't conclude", 'can not conclude', 'therefore', 'thus', 'hence', 'answer', 'output', 'final', 'input', 'these', 'invalid', 'with', 'without', 'end']

def validate_response_format_via_keywords(response: str) -> bool:
    """Return True when a fenced region does not contain known bad format keywords."""
    response_lower = response.lower()
    return not any((keyword in response_lower for keyword in BAD_FENCED_KEYWORDS))

def fenced_response_extraction(response: str | None) -> tuple[str, int, int]:
    """Extract the intended fenced answer and its character span.

    The search follows the original benchmark behavior: prefer the last valid fenced
    region, reject fenced regions that contain bad format keywords, and accept a
    trailing unclosed fence if it contains usable content.

    Returns:
        ``(text, start, end)``. If no valid fenced answer exists, returns ``("", -1, -1)``.
    """
    if response is None or response == '':
        return ('', -1, -1)
    clean_space_response = '\n'.join(response.split('\n'))
    fence_matches = list(regex.finditer(COMPLETE_FENCE_PATTERN, clean_space_response, overlapped=True))
    if len(fence_matches) >= 2:
        pair_count = len(fence_matches) // 2
        for pair_index in range(pair_count - 1, -1, -1):
            opening = fence_matches[pair_index * 2]
            closing = fence_matches[pair_index * 2 + 1]
            matched_text = clean_space_response[opening.start():closing.end()]
            if matched_text.strip() != '' and matched_text.replace('*', '').strip() == '':
                continue
            if not validate_response_format_via_keywords(matched_text):
                continue
            return (matched_text, opening.start(), closing.end())
        if len(fence_matches) % 2 == 1:
            last_fence = fence_matches[-1]
            last_fenced_text = clean_space_response[last_fence.start():]
            last_fenced_content = last_fenced_text.replace('*', '').strip()
            if last_fenced_content != '' and validate_response_format_via_keywords(last_fenced_text):
                return (last_fenced_text, last_fence.start(), len(clean_space_response))
        return ('', -1, -1)
    if len(fence_matches) == 1:
        last_fence = fence_matches[-1]
        last_fenced_text = clean_space_response[last_fence.start():]
        last_fenced_content = last_fenced_text.replace('*', '').strip()
        if last_fenced_content != '' and validate_response_format_via_keywords(last_fenced_text):
            return (last_fenced_text, last_fence.start(), len(clean_space_response))
        return ('', -1, -1)
    return (response, 0, len(response))


# Test case 1: Response with valid fenced region containing good content
test_response_1 = "Some preamble\n****\nThis is valid content\n****\nSome epilogue"

# Test case 2: Response with valid fenced region but containing bad keyword
test_response_2 = "Some preamble\n****\nThe answer is correct\n****\nSome epilogue"

# Test case 3: Response with no fences
test_response_3 = "Just plain text with no fences"

# Test case 4: None response
test_response_4 = None

# Test case 5: Empty string response
test_response_5 = ""

# Test case 6: Response with unclosed trailing fence
test_response_6 = "Some text\n****\nUnclosed fence content"

ARGS = {
    "response": test_response_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
regex — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_dna_sequence Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/tasks/dna.py
code served (permissive licence) · get_code("5f1acff5ca532e94")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random

# Create a Random instance for the rng parameter
rng = random.Random(42)

# Define ARGS dict with all parameters
ARGS = {
    'rng': rng,
    'min_codons': 1,
    'max_codons': 30
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
hf_chat_format Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/generation/chat_templates.py
code served (permissive licence) · get_code("6c4c7369517068a5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from transformers import PreTrainedTokenizer

class MockTokenizerWithSystemSupport:
    """Mock tokenizer with chat_template that includes 'system'"""
    def __init__(self):
        self.chat_template = "{% if system_message %}<|system|>{{ system_message }}<|end|>{% endif %}<|user|>{{ user_message }}<|end|>"

class MockTokenizerWithoutSystemSupport:
    """Mock tokenizer with chat_template that doesn't include 'system'"""
    def __init__(self):
        self.chat_template = "<|user|>{{ user_message }}<|end|>"

# Test with tokenizer that supports system messages
tokenizer_with_system = MockTokenizerWithSystemSupport()

# Create test instructions
instructions = [
    "What is the capital of France?",
    "Explain quantum computing in simple terms."
]

# Define ARGS
ARGS = {
    "instructions": instructions,
    "default_system": "You are a helpful AI assistant.",
    "tokenizer": tokenizer_with_system
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_generation_cache Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/generation/cache.py
code served (permissive licence) · get_code("00d8ee857f953513")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
from pathlib import Path

# Create a temporary directory and cache file for testing
temp_dir = tempfile.mkdtemp()
cache_path = Path(temp_dir) / "test_cache.json"

# Create a valid cache file with the correct format
cache_data = {
    "version": 1,
    "payload": {
        "model_output": [1, 2, 3],
        "metadata": {"key": "value"}
    }
}

with cache_path.open('w', encoding='utf-8') as f:
    json.dump(cache_data, f)

ARGS = {
    "path": str(cache_path)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
maybe_save_dataset Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/tasks/base.py
code served (permissive licence) · get_code("4abe28680f1d85fe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Dataset. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from datasets import Dataset

# Create a small HuggingFace Dataset
data = {
    "text": ["hello world", "foo bar"],
    "label": [0, 1]
}
dataset = Dataset.from_dict(data)

# Define arguments for maybe_save_dataset
ARGS = {
    "dataset": dataset,
    "save": False,
    "save_dir": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Dataset — a Dataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Dataset output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
md_safe Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/tutorial_utils.py
code served (permissive licence) · get_code("32d15157c5bdb037")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

ARGS = {
    'text': 'Hello | World\nNew line'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normalize_generation_logprobs Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/generation/logprobs.py
code served (permissive licence) · get_code("1beeb0df99f00bd8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from dataclasses import dataclass

@dataclass(frozen=True)
class TokenLogprobVector:
    """Top-logprob vector for one generated token."""
    token: str
    logprobs: list[float]

def _iter_candidates(entry):
    if entry is None:
        return
    if isinstance(entry, (list, tuple)):
        for item in entry:
            yield from _iter_candidates(item)
        return
    if isinstance(entry, dict):
        for key, value in entry.items():
            pair = _candidate_to_pair(key, value)
            if pair is not None:
                yield pair
        return
    pair = _candidate_to_pair(None, entry)
    if pair is not None:
        yield pair

def _candidate_to_pair(key, value):
    if isinstance(value, (int, float)):
        return (float(value), str(key or ''))
    if isinstance(value, (tuple, list)) and value:
        if len(value) >= 2 and isinstance(value[0], (int, float)):
            return (float(value[0]), str(value[1]))
    logprob = getattr(value, 'logprob', None)
    if logprob is not None:
        token = getattr(value, 'decoded_token', None)
        if token is None:
            token = getattr(value, 'token', None)
        if token is None:
            token = str(key or '')
        return (float(logprob), str(token))
    return None

def normalize_generation_logprobs(logprobs):
    """Normalize common vLLM logprob shapes into token vectors."""
    if logprobs is None:
        return []
    vectors = []
    for entry in logprobs:
        candidates = list(_iter_candidates(entry))
        if not candidates:
            continue
        token = candidates[0][1]
        vectors.append(TokenLogprobVector(token=token, logprobs=[candidate[0] for candidate in candidates]))
    return vectors


class MockLogprobValue:
    def __init__(self, logprob, token):
        self.logprob = logprob
        self.token = token


ARGS = {
    "logprobs": [
        {
            "a": -0.5,
            "b": -1.2
        },
        [
            (-0.3, "hello"),
            (-0.7, "world")
        ],
        [
            MockLogprobValue(-0.4, "test"),
            MockLogprobValue(-0.9, "sample")
        ],
        None,
        [
            -1.0,
            -2.0
        ]
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
preprocess_logprob_vectors Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/generation/confidence.py
code served (permissive licence) · get_code("c18ed9a7d55bebc8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math
from typing import Sequence

# Set up test data for preprocess_logprob_vectors
# The function expects:
# - token_logprob_vectors: Sequence[Sequence[float] | None]
# - top_k: int (default 20)
# - eps: float (default 1e-20)
# - sentinel_threshold: float (default -1000.0)

# Create sample token logprob vectors
# Each element is a sequence of log probabilities for tokens
token_logprob_vectors = [
    # First sequence with valid logprobs
    [-0.5, -1.2, -2.1, -3.5, -4.2, -5.1],
    # Second sequence with valid logprobs
    [-0.1, -0.8, -1.5, -2.3, -3.1, -4.0],
    # Third sequence with fewer values
    [-0.3, -1.1, -2.0],
    # Fourth sequence with None
    None,
]

ARGS = {
    'token_logprob_vectors': token_logprob_vectors,
    'top_k': 6,
    'eps': 1e-20,
    'sentinel_threshold': -1000.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
preprocess_probability_distributions Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
IdoAmit198/SALT/salt_benchmark/generation/confidence.py
code served (permissive licence) · get_code("96016f244de452b6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math
from typing import Any, Mapping, Sequence

# Set random seed for reproducibility
import torch
torch.manual_seed(0)

# Construct valid arguments for preprocess_probability_distributions
ARGS = {
    "token_prob_distributions": [
        [0.5, 0.3, 0.15, 0.05],
        [0.7, 0.2, 0.07, 0.03],
        [0.1, 0.2, 0.3, 0.4],
    ],
    "top_k": 20,
    "eps": 1e-20,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
render_hf_prompts Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/generation/chat_templates.py
code served (permissive licence) · get_code("45780abec44755e6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from unittest.mock import Mock

torch.manual_seed(0)

# Create a mock tokenizer with chat_template support
mock_tokenizer = Mock()
mock_tokenizer.chat_template = "{% if messages[0]['role'] == 'system' %}{{ messages[0]['content'] }}{% endif %}{% for message in messages %}{{ message['role'] }}: {{ message['content'] }}{% endfor %}"

# Mock the apply_chat_template method to simulate rendering
def mock_apply_chat_template(chat, tokenize=False, add_generation_prompt=False):
    result = ""
    for msg in chat:
        result += f"{msg['role']}: {msg['content']}\n"
    if add_generation_prompt:
        result += "assistant:"
    return result

mock_tokenizer.apply_chat_template = mock_apply_chat_template

# Create sample instructions
instructions = [
    "What is the capital of France?",
    "How does photosynthesis work?"
]

# Define ARGS dictionary with all parameters for render_hf_prompts
ARGS = {
    "tokenizer": mock_tokenizer,
    "instructions": instructions,
    "default_system": "You are a helpful AI assistant."
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rotate_matrix Ran
ran, honoured the contract we drafted
IdoAmit198/SALT/salt_benchmark/tasks/code.py
code served (permissive licence) · get_code("8dbc7de09a25db3e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Define a simple 2D matrix as a list of lists with distinct dimensions (3 rows, 4 columns)
matrix = [
    [1, 2, 3, 4],
    [5, 6, 7, 8],
    [9, 10, 11, 12]
]

ARGS = {
    "matrix": matrix
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
strip_fence_markers Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/evaluation/atomic.py
code served (permissive licence) · get_code("71916a974ab5b94e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

# Construct valid arguments for strip_fence_markers
ARGS = {
    "text": "***Hello World***  \n  *test*  "
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
two_sum Ran
ran; our contract draft was wrong, not the code
IdoAmit198/SALT/salt_benchmark/tasks/code.py
code served (permissive licence) · get_code("62bda541506e048d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# Set random seed for reproducibility
torch.manual_seed(0)

# Define arguments for two_sum function
ARGS = {
    "nums": [2, 7, 11, 15],
    "target": 9
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
validate_response_format_via_keywords Ran
ran, violated the contract we drafted
IdoAmit198/SALT/salt_benchmark/evaluation/atomic.py
code served (permissive licence) · get_code("80ec7f5463b80ab5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

ARGS = {
    "response": "The user asked a question and here is my response with some analysis."
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ensure_repository_root Not yet run
unverified (harvested, no recorded run)
IdoAmit198/SALT/salt_benchmark/tutorial_utils.py
code served (permissive licence) · get_code("f32963252e5dd9df")
How it ran

no invocation recorded.

Also present in other papers' code

Of 23 samples lifted from this paper's linked repositories, 23 carry a function identity and 0 do not. Of the 23 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 23 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.

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-23.

Repositories linked to this paper

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

Abstract

As LLMs generate increasingly long outputs, effective uncertainty estimation must identify errors at fine-grained levels rather than discard entire responses. While such methods exist, evaluating uncertainty at any resolution (token to an entire generation) is challenging and highly sensitive to label imperfections, making zero-noise benchmarks essential; yet, long-form generation benchmarks tend to rely on fallible labels rather than deterministic ground truth. We introduce Single-answer Atomic Long-form Target (SALT), a benchmark of six procedurally generated tasks with single deterministic long textual ground truths, enabling unit-level evaluation of correctness, calibration, and ranking without external judges. Equipped with SALT, our analysis of 50+ LLMs reveals key insights: We identify which confidence functions dominate each uncertainty aspect and show that confidence ranking largely breaks at atomic resolution, even when clearer separability emerges at coarser line-level units. SALT further enables controlled atom-level interventions throughout generation, revealing two separable drivers of future errors: propagation from corrupted prefixes, dominated by global context correctness, and bounded degradation from increasing answercontext length. Finally, we demonstrate that reasoning, via Chain-of-Thought prompting or internalized through training, introduces a tradeoff, improving accuracy while degrading confidence ranking. These findings directly impact risk-critical applications requiring reliable error identification and mitigation. We release the Code at github.com/IdoAmit198/SALT.

For agents

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

get_harvested_code_for_paper("2607.03870")
get_code_for_paper("2607.03870")
have("2607.03870")

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

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

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

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

Connect an agent — have() is free.