SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.12476 · 2026

Quickest Detection of Hallucination Onset: Delay Bounds and Learned CUSUM Statistics

Igor Itkin

arXiv · PDF · Open in the Atlas

Code that ran

19 of 20 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, 3 violated it and 0 have no contract verdict; 12 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/2606.12476.json · badge: /api/ran/2606.12476.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
YehudaItkin/quickest-hallucination-onset canonical (classifier label)
classifier basis: census
19 ran · 1 no recorded run
FunctionStatusWhere it lives
captured_mi Ran
ran; our contract draft was wrong, not the code
YehudaItkin/quickest-hallucination-onset/info_theory_limits.py
code served (permissive licence) · get_code("961f9bf67a31f503")
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 numpy as np

# Create synthetic data for the function
np.random.seed(0)

# p_hat: predicted probabilities, should be array-like with values in [0, 1]
p_hat = np.random.uniform(0, 1, size=100)

# y: binary labels, should be array-like with values 0 or 1
y = np.random.randint(0, 2, size=100)

# n_bins: number of bins for equal-frequency binning
n_bins = 40

ARGS = {
    'p_hat': p_hat,
    'y': y,
    'n_bins': n_bins,
}
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 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
closed_rate Ran
ran, honoured the contract we drafted
YehudaItkin/quickest-hallucination-onset/robustness/server_rate_aware_loss.py
code served (permissive licence) · get_code("7a54bda7a2f95086")
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 numpy as np

# Create sample probability predictions (should be between 0 and 1)
probs = [
    np.array([0.1, 0.2, 0.8, 0.9]),
    np.array([0.3, 0.7, 0.4, 0.6])
]

# Create sample labels (0 or 1, or values < 0.5 and > 0.5)
labs = [
    np.array([0, 0, 1, 1]),
    np.array([0, 1, 0, 1])
]

ARGS = {
    "probs": probs,
    "labs": labs
}
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 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
compute_kl_divergence Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YehudaItkin/quickest-hallucination-onset/poc_analysis.py
code served (permissive licence) · get_code("a477c96b5a8791a7")
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

# Create sample label sequences
# These should be sequences of binary labels (0s and 1s)
# We need multiple sequences to estimate the transition matrix properly

label_sequences = [
    np.array([0, 1, 1, 0, 1, 0]),
    np.array([0, 0, 1, 1, 0, 0]),
    np.array([1, 0, 1, 1, 0, 1]),
    np.array([0, 1, 0, 0, 1, 1]),
]

ARGS = {
    "label_sequences": label_sequences
}
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
compute_lorden_bound Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YehudaItkin/quickest-hallucination-onset/poc_analysis.py
code served (permissive licence) · get_code("c4414df2e860ac0a")
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 float64, ndim 0, 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 numpy as np

# Construct valid arguments for compute_lorden_bound
# The function expects:
# 1. label_sequences: a list of sequences where each sequence contains binary labels (0 or 1)
# 2. false_alarm_rate: a float (default 0.01)

# Create sample binary label sequences
# Each sequence should be a list/array of 0s and 1s
label_sequences = [
    np.array([0, 1, 1, 0, 1, 0]),
    np.array([0, 0, 1, 1, 0, 1]),
    np.array([1, 0, 1, 0, 0, 1]),
    np.array([0, 1, 0, 1, 1, 0])
]

ARGS = {
    "label_sequences": label_sequences,
    "false_alarm_rate": 0.01
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
cusum Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YehudaItkin/quickest-hallucination-onset/robustness/server_combined_detector.py
code served (permissive licence) · get_code("b23784c50042f538")
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 ndarray, ndim 1, dtype family float, shape (5,) 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

def cusum(inc):
    S, path = (0.0, np.empty(len(inc)))
    for t in range(len(inc)):
        S = max(0.0, S + inc[t])
        path[t] = S
    return path

# The function expects 'inc' to be an array-like object with:
# - len() support
# - indexable elements that can be added to floats
# - elements that support comparison with 0.0

inc = np.array([0.5, -0.3, 0.2, -0.1, 0.4])

ARGS = {
    "inc": inc
}
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 ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
estimate_transition_matrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YehudaItkin/quickest-hallucination-onset/poc_analysis.py
code served (permissive licence) · get_code("cc1453e7b43f6397")
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 ndarray, ndim 2, dtype family float, shape (2, 2) 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 expects label_sequences: a list/iterable of sequences
# Each sequence should contain binary labels (0 or 1)
# The function iterates through each sequence and counts transitions

label_sequences = [
    np.array([0, 1, 0, 1, 1, 0]),
    np.array([1, 1, 0, 0, 1, 0]),
    np.array([0, 0, 1, 1, 0, 1]),
]

ARGS = {
    "label_sequences": label_sequences,
}
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 ndarray, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) 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
first_crossing Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YehudaItkin/quickest-hallucination-onset/run_learned_cusum.py
code served (permissive licence) · get_code("7a94f90b57612500")
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
import numpy as np

def first_crossing(stat_path, threshold):
    """First index where the (already causal) statistic crosses threshold."""
    for t, s in enumerate(stat_path):
        if s >= threshold:
            return t
    return None

# Create a simple statistic path as a list/array of values
stat_path = [0.1, 0.3, 0.5, 0.8, 1.2, 1.5]
threshold = 0.9

ARGS = {
    "stat_path": stat_path,
    "threshold": threshold
}
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 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
first_onset Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YehudaItkin/quickest-hallucination-onset/run_learned_cusum.py
code served (permissive licence) · get_code("68919709182cddfa")
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
import numpy as np

torch.manual_seed(0)

# The function first_onset takes a parameter 'labs' and:
# 1. Checks len(labs) - so labs must be a sequence with length
# 2. Iterates through range(len(labs))
# 3. Accesses labs[t] with indexing
# 4. Compares labs[t] > 0.5 (numeric comparison)
# 5. Returns an index t or None

# Create a simple list/array of binary-like values where we can control
# whether there's a 0->1 transition
# Case 1: list with a transition at index 2
labs = [0.1, 0.2, 0.8, 0.9, 1.0]

ARGS = {
    "labs": labs
}
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 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
hb Ran
ran, violated the contract we drafted
YehudaItkin/quickest-hallucination-onset/info_theory_limits.py
code served (permissive licence) · get_code("97d96d79dbeca4ab")
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 ndarray, ndim 1, dtype family float, shape (4,) 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

def hb(p):
    """Binary entropy in bits."""
    p = np.clip(np.asarray(p, dtype=np.float64), 1e-12, 1 - 1e-12)
    return -(p * np.log2(p) + (1 - p) * np.log2(1 - p))

# The function takes a single parameter 'p' which should be array-like
# It converts it to a numpy array, clips values, and computes binary entropy
# Valid inputs are scalars, lists, or numpy arrays

ARGS = {
    "p": np.array([0.1, 0.5, 0.9, 0.3])
}
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 ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) 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
hb Ran
ran, honoured the contract we drafted
YehudaItkin/quickest-hallucination-onset/pac_bayes_poc.py
code served (permissive licence) · get_code("55e2fedbfb2d6589")
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

def hb(p):
    p = np.clip(np.asarray(p, dtype=np.float64), 1e-12, 1 - 1e-12)
    return float(-(p * np.log2(p) + (1 - p) * np.log2(1 - p)))

# The function takes a single parameter 'p' which should be a probability value
# or array-like of probability values between 0 and 1.
# It computes binary entropy.

# Test with a scalar probability value
p_value = 0.5

ARGS = {
    "p": p_value
}
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
info_rate Ran
ran; our contract draft was wrong, not the code
YehudaItkin/quickest-hallucination-onset/gap_analysis.py
code served (permissive licence) · get_code("ee3e6fcd610ff498")
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 numpy as np
import torch

torch.manual_seed(0)

# The function takes two array-like parameters: s_clean and s_hallu
# It calls .mean() on them and performs arithmetic operations
# They should be numpy arrays or similar with a mean() method

s_clean = np.array([1.0, 2.0, 3.0, 4.0])
s_hallu = np.array([2.5, 3.5, 4.5, 5.5])

ARGS = {
    's_clean': s_clean,
    's_hallu': s_hallu,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, 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
integrated_autocorr_time Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YehudaItkin/quickest-hallucination-onset/gap_analysis.py
code served (permissive licence) · get_code("e6338bda293878cd")
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. 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 numpy as np

# Create sample sequences for testing
# The function expects a list of 1-D arrays (per-document score sequences)
seq1 = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0])
seq2 = np.array([2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0])

seqs = [seq1, seq2]

ARGS = {
    "seqs": seqs,
    "max_lag": 15
}
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 tuple — a tuple output has no array shape of its own; none is 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
label_autocorr_time Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YehudaItkin/quickest-hallucination-onset/pac_bayes_poc.py
code served (permissive licence) · get_code("784b6ff3e6d5fb0c")
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. 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 numpy as np

# Create sample binary label sequences
# The function expects a list of sequences, each sequence being an array
# that will be used for computing autocorrelation

seq1 = np.array([0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 
                 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 
                 0, 1, 0, 1, 1], dtype=np.float64)

seq2 = np.array([1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1,
                 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0,
                 1, 1, 0, 1, 0], dtype=np.float64)

seq3 = np.array([0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0,
                 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0,
                 1, 1, 0, 0, 1], dtype=np.float64)

seqs = [seq1, seq2, seq3]
max_lag = 40

ARGS = {
    "seqs": seqs,
    "max_lag": max_lag
}
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 tuple — a tuple output has no array shape of its own; none is 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
logit Ran
ran, violated the contract we drafted
YehudaItkin/quickest-hallucination-onset/gap_analysis.py
code served (permissive licence) · get_code("b4d244c709d78560")
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 ndarray, ndim 1, dtype family float, shape (4,) 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 logit function takes a single parameter 'p' which should be a probability
# value or array of probabilities (values between 0 and 1, exclusive of 0 and 1)

# Create a valid probability value for testing
p_value = np.array([0.1, 0.5, 0.9, 0.3])

ARGS = {
    "p": p_value
}
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 ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) 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
prob_path Ran
ran, violated the contract we drafted
YehudaItkin/quickest-hallucination-onset/run_learned_cusum.py
code served (permissive licence) · get_code("e1d0447885c9fa5b")
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 ndarray, ndim 1, dtype family float, shape (4,) 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 prob_path takes a single parameter 'probs' and converts it to a float64 numpy array
# It doesn't call any methods on probs, just passes it to np.asarray with dtype=np.float64
# So probs can be a list, numpy array, or any array-like object

# Create a simple list of probabilities as the input
probs = [0.1, 0.2, 0.3, 0.4]

ARGS = {
    "probs": probs
}
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 ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) 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
sentence_spans Ran
ran, honoured the contract we drafted
YehudaItkin/quickest-hallucination-onset/robustness/server_consistency_features.py
code served (permissive licence) · get_code("522583c33481ad1a")
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

SENT_END = ('.', '!', '?')

def sentence_spans(token_labels):
    """Return [(start, end)] token-index ranges per sentence.

    Mirrors token_features._detect_sentence_boundaries: a boundary opens right
    after any token whose word.rstrip() is sentence-final punctuation. The spans
    tile [0, len(token_labels)) with no gaps, so every token belongs to exactly
    one sentence.
    """
    n = len(token_labels)
    starts = [0]
    for i, tok in enumerate(token_labels):
        if tok['word'].rstrip() in SENT_END and i + 1 < n:
            starts.append(i + 1)
    spans = []
    for j, s in enumerate(starts):
        e = starts[j + 1] if j + 1 < len(starts) else n
        spans.append((s, e))
    return spans


# Construct token_labels: a list of dicts, each with a 'word' key
token_labels = [
    {'word': 'Hello'},
    {'word': 'world.'},
    {'word': 'How'},
    {'word': 'are'},
    {'word': 'you?'},
    {'word': 'I'},
    {'word': 'am'},
    {'word': 'fine.'},
]

ARGS = {
    'token_labels': token_labels
}
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 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
sentence_text Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YehudaItkin/quickest-hallucination-onset/robustness/server_consistency_features.py
code served (permissive licence) · get_code("0ee4c527d9a78710")
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 numpy as np

# Construct token_labels as a list of dicts, where each dict has a 'word' key
token_labels = [
    {'word': 'The'},
    {'word': 'quick'},
    {'word': 'brown'},
    {'word': 'fox'},
    {'word': 'jumps'},
    {'word': 'over'},
    {'word': 'the'},
    {'word': 'lazy'},
    {'word': 'dog'}
]

# Construct span as a tuple of (start, end) indices
span = (1, 4)

ARGS = {
    'token_labels': token_labels,
    'span': span
}
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 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
shrink_cov Ran
ran, honoured the contract we drafted
YehudaItkin/quickest-hallucination-onset/robustness/server_combined_detector.py
code served (permissive licence) · get_code("a07e3b7fd4653047")
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 ndarray, ndim 2, dtype family float, shape (4, 4) 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 shrink_cov takes X as input
# X should be a 2D array that can be passed to np.cov
# np.cov expects shape (n_features, n_samples) when rowvar=False
# or (n_samples, n_features) when rowvar=False (which is the case here)
# So X should be a 2D numpy array with shape (n_samples, n_features)

# Create a small sample dataset
np.random.seed(0)
X = np.random.randn(2, 4)  # 2 samples, 4 features

ARGS = {
    "X": X
}
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 ndarray, ndim 2, dtype family float, shape (4, 4) — shape (4, 4) 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
transition_matrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YehudaItkin/quickest-hallucination-onset/pac_bayes_poc.py
code served (permissive licence) · get_code("9d1fe7f549739c9a")
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 ndarray, ndim 2, dtype family float, shape (2, 2) 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 expects seqs, which is an iterable of sequences
# Each sequence should be indexable and contain values that can be converted to int
# The function builds a transition matrix by counting transitions between consecutive elements

# Create sample sequences with binary values (0 and 1)
seq1 = [0, 1, 0, 1, 1, 0]
seq2 = [1, 0, 1, 1, 0, 0]
seq3 = [0, 0, 1, 0, 1, 1]

seqs = [seq1, seq2, seq3]

ARGS = {
    "seqs": seqs
}
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 ndarray, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) 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
broadcast_to_tokens Not yet run
unverified (harvested, no recorded run)
YehudaItkin/quickest-hallucination-onset/robustness/server_consistency_features.py
code served (permissive licence) · get_code("12e94a3f50444017")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 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 20 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

Token-level hallucination detectors are evaluated as classifiers, by AUC over all tokens, yet a streaming monitor is judged by its reaction time: the number of tokens that pass between the onset of a hallucination and the alarm. We formulate hallucination onset detection as a quickest change detection problem. A first-order Markov model of the latent faithful/hallucinated state, validated on RAGTruth, places the task inside classical change-point theory and yields Lorden's lower bound on detection delay: about 1.3 tokens at a false-alarm rate of 0.01. We then show that a causal recurrent labeler acts as a CUSUM with a learned increment. Among the onsets it catches it detects in 11-13 tokens, against 31 for a linear per-token baseline, though at this false-alarm budget every detector catches under a third of onsets and the recall-honest delay is 56-66 tokens: low-false-alarm onset detection is hard. A controlled decomposition attributes the speed advantage mostly to a better per-token score rather than to temporal accumulation. An information-rate optimality theorem of Donsker-Varadhan type explains the remaining order-of-magnitude gap: the learned score realizes only 1/4.5 of the divergence the features carry, a deficit that recalibration cannot remove, with the remainder a finite-horizon effect. Classification metrics conceal this delay structure; sequential analysis makes it measurable. Code: https://github.com/YehudaItkin/quickest-hallucination-onset.

For agents

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

get_harvested_code_for_paper("2606.12476")
get_code_for_paper("2606.12476")
have("2606.12476")

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

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

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

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

Connect an agent — have() is free.