SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.18102 · ICML · 2025

CapBencher: Give Your LLM Benchmark a Built-in Alarm for Test-Set Overfitting

Takashi Ishida, Ikko Yamane, Thanawat Lodkaew

arXiv · PDF · Open in the Atlas

Code that ran

11 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; 0 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 2 failures of our instrument; 0 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/2505.18102.json · badge: /api/ran/2505.18102.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
google/BIG-bench canonical (classifier label)
classifier basis not recorded on the link
9 ran · 0 no recorded run
ishida-lab/capbencher canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
defaultEnco Ran
ran on a synthesized input
google/BIG-bench/bigbench/evaluate_task.py
code served (permissive licence) · get_code("400317ac04a14592")
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 numpy

def defaultEnco(o):
    if isinstance(o, numpy.integer):
        return int(o)
    raise TypeError

ARGS = {
    "o": numpy.int64(42)
}
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 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
default_format_fn Ran
ran on a synthesized input
google/BIG-bench/bigbench/api/json_task.py
code served (permissive licence) · get_code("fd4602d76e434e20")
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

# Construct a sample dictionary with 'input', 'target', and 'target_scores'
sample = {
    'input': 'What is the capital of France?',
    'target': 'Paris',
    'target_scores': {
        'Paris': 1.0,
        'London': 0.0,
        'Berlin': 0.0,
        'Madrid': 0.0
    }
}

ARGS = {
    'sample': sample,
    'input_prefix': 'Question: ',
    'output_prefix': '\nAnswer: ',
    'choice_prefix': ' | ',
    'random_seed': 42,
    'append_choices_to_input': 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 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
escape_markdown_chars Ran
ran on a synthesized input
google/BIG-bench/bigbench/models/dummy_model.py
code served (permissive licence) · get_code("74b5cfb996a14d7f")
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

def escape_markdown_chars(s):
    replace_chars = '\\*_{}[]<>()#+-.!|`'
    for char in replace_chars:
        s = s.replace(char, '\\' + char)
    s_s = s.lstrip()
    s = '&numsp;' * (len(s) - len(s_s)) + s_s
    s_s = s.rstrip()
    s = s_s + '&numsp;' * (len(s) - len(s_s))
    return s

ARGS = {
    's': '  hello_world*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
format_quote Ran
ran on a synthesized input
google/BIG-bench/bigbench/models/dummy_model.py
code served (permissive licence) · get_code("068de30a70e23c02")
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
import numpy as np

def escape_markdown_chars(s):
    replace_chars = '\\*_{}[]<>()#+-.!|`'
    for char in replace_chars:
        s = s.replace(char, '\\' + char)
    s_s = s.lstrip()
    s = '&numsp;' * (len(s) - len(s_s)) + s_s
    s_s = s.rstrip()
    s = s_s + '&numsp;' * (len(s) - len(s_s))
    return s

def format_quote(q):
    new_lines = [escape_markdown_chars(line) for line in q.splitlines()]
    return '\\\n'.join(new_lines)

# Set seed for reproducibility
torch.manual_seed(0)

# The function expects a string with potential markdown characters and newlines
# Let's create a test string with various markdown characters and multiple lines
test_quote = "  Hello *world* with _markdown_ chars!\nSecond line with [links] and **bold**\n  Third line with trailing spaces  "

ARGS = {
    'q': test_quote
}
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
get_capped_answer Ran
ran; our contract draft was wrong, not the code
ishida-lab/capbencher/evaluate_qa.py
code served (permissive licence) · get_code("bddbb97d5a56e92d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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.

from typing import Any, Dict, Optional

# The function expects a dictionary with a potential 'capped_answer' key
example = {
    'capped_answer': 'This is a sample capped answer',
    'other_field': 'some value',
    'numeric_field': 42
}

ARGS = {
    'example': example
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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
gpt2_non_embedding_params Ran
ran on a synthesized input
google/BIG-bench/bigbench/models/huggingface_models.py
code served (permissive licence) · get_code("814bb53e690c85e8")
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 = {
    "n_layers": 2,
    "d_hidden": 4,
    "d_mlp": 8,
}
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
gpt_embedding_params Ran
ran on a synthesized input
google/BIG-bench/bigbench/models/huggingface_models.py
code served (permissive licence) · get_code("121bc81a5612fa6f")
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 torch.nn as nn

torch.manual_seed(0)

# Parameters for the gpt_embedding_params function
n_layers = 3
d_hidden = 64
d_mlp = 256

ARGS = {
    "n_layers": n_layers,
    "d_hidden": d_hidden,
    "d_mlp": d_mlp,
}
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
gpt_non_embedding_params Ran
ran on a synthesized input
google/BIG-bench/bigbench/models/huggingface_models.py
code served (permissive licence) · get_code("4fda836877d6e520")
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

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

# Construct arguments for gpt_non_embedding_params
# The function takes three integer parameters: n_layers, d_hidden, d_mlp
# These represent:
# - n_layers: number of transformer layers
# - d_hidden: hidden dimension size
# - d_mlp: MLP dimension size

ARGS = {
    "n_layers": 12,
    "d_hidden": 768,
    "d_mlp": 3072,
}
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
make_nshot_dataset Ran
ran on a synthesized input
google/BIG-bench/bigbench/api/json_task.py
code served (permissive licence) · get_code("2cc8cb27bd3e5662")
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 copy
from typing import List, Any, Dict, Union, Optional
import numpy as np

# Create sample data for the function
samples = [
    {
        'input': 'What is the capital of France?',
        'target': ['Paris', 'The capital is Paris']
    },
    {
        'input': 'What is the capital of Germany?',
        'target': ['Berlin', 'The capital is Berlin']
    },
    {
        'input': 'What is the capital of Spain?',
        'target': ['Madrid', 'The capital is Madrid']
    },
    {
        'input': 'What is the capital of Italy?',
        'target': ['Rome', 'The capital is Rome']
    },
    {
        'input': 'What is the capital of Japan?',
        'target': ['Tokyo', 'The capital is Tokyo']
    }
]

ARGS = {
    'samples': samples,
    'shots': 2,
    'random_seed': 42,
    'repeat_samples': 1,
    'separator': ' ',
    'max_examples': None
}
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 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
parse_judge_output Ran
ran; our contract draft was wrong, not the code
ishida-lab/capbencher/evaluate_qa.py
code served (permissive licence) · get_code("f1b0ac1568f939bd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 re
from typing import Any, Dict, Optional

# Sample judge output text that contains the fields the function is looking for
text = """
Here is the evaluation:

extracted_final_answer_from_response_A: 42
extracted_final_answer_from_response_B: 42
correct: yes

The answers match.
"""

ARGS = {
    'text': text
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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
postprocess_output Ran
ran on a synthesized input
google/BIG-bench/bigbench/models/model_utils.py
code served (permissive licence) · get_code("fb48e1bc0bb1a69e")
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 re

# Test case 1: Simple string with stop_string
text_1 = "The apple is on the ground. What is this?"
max_length_1 = None
stop_string_1 = "."
output_regex_1 = None

# Test case 2: String with regex extraction
text_2 = "The answer is 42. And 7*7 = 49."
max_length_2 = None
stop_string_2 = None
output_regex_2 = r"\d+"

# Test case 3: List of strings with max_length
text_3 = ["Hello world this is a long string", "Short text"]
max_length_3 = 10
stop_string_3 = None
output_regex_3 = None

# Test case 4: Combining all features
text_4 = "Result: 123. More text here. Final: 456."
max_length_4 = 30
stop_string_4 = "."
output_regex_4 = r"\d+"

# Use test case 1 as primary
ARGS = {
    "text": text_1,
    "max_length": max_length_1,
    "stop_string": stop_string_1,
    "output_regex": output_regex_1,
}
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

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, 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 11 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

Publishing a large language model (LLM) benchmark (especially its ground-truth answers) on the Internet risks contaminating future LLMs and enabling evaluation gaming: it may be unintentionally (or intentionally) used to train or select a model, or exploited to overfit and hack leaderboards when labels are accessible. A common mitigation is to keep the benchmark private and let participants submit their models or predictions to the organizers, but this still permits test-set overfitting through feedback loops. To overcome this issue, we propose CapBencher, a way to publish benchmarks without fully disclosing the groundtruth answers, while preserving open evaluation of LLMs. The main idea is to reduce the best possible accuracy, i.e., Bayes accuracy, by injecting randomness to the answers by preparing several logically correct answers, and only include one of them as the solution in the benchmark. Not only does this obscure the ground-truth answers, but it also offers a test for leakage or gaming: since even fully capable models should not surpass the Bayes accuracy, any model that does is a strong signal. We show theoretically and empirically that CapBencher accurately detects test-set overfitting across diverse benchmarks, models, training methodologies, and scenarios.

For agents

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

get_harvested_code_for_paper("2505.18102")
get_code_for_paper("2505.18102")
have("2505.18102")

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

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

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

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

Connect an agent — have() is free.