SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.22937 · 2026

AutoPyVerifier: Learning Compact Executable Verifiers for Large Language Model Outputs

Estevam Hruschka, Pouya Pezeshkpour

arXiv · PDF · Open in the Atlas

Code that ran

15 of 29 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; 6 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 14 no recorded run), measured 2026-11-22; 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/2604.22937.json · badge: /api/ran/2604.22937.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
megagonlabs/AutoPyVerifier community
Papers with Code archive
15 ran · 14 no recorded run
FunctionStatusWhere it lives
_exec_source Ran
ran; our contract draft was wrong, not the code
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("5bd17a58819c485c")
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) 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 ast

# Simple valid Python source code that uses allowed imports and syntax
valid_source = """
import math
import json
from collections import Counter

def calculate_sum(numbers):
    return sum(numbers)

result = calculate_sum([1, 2, 3, 4, 5])
counter = Counter(['a', 'b', 'a', 'c', 'b', 'a'])
data = json.dumps({'key': 'value'})
"""

ARGS = {
    'source': valid_source
}
Setup block drafted by
a language model, Claude Haiku 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
_limited_import Ran
ran; our contract draft was wrong, not the code
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("0db1493fe471b490")
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 module. 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
import re
import json
import statistics
import fractions
import decimal
import itertools
import collections
import ast

ARGS = {
    "name": "math",
    "globals": None,
    "locals": None,
    "fromlist": (),
    "level": 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 module — a module output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a module 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
build_context_messages Ran
ran; our contract draft was wrong, not the code
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("2b62714e94367257")
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 json
from typing import Any, Dict, List, Tuple

ARGS = {
    'task_description': 'Classify the sentiment of the given text as positive, negative, or neutral.',
    'x': {
        'text': 'I really enjoyed this movie, it was fantastic!',
        'id': 1
    },
    'y': {
        'sentiment': 'positive',
        'confidence': 0.95,
        'reasoning': 'The text contains positive words like "enjoyed" and "fantastic"'
    },
    'required_fields': [
        'sentiment',
        'confidence',
        'reasoning',
        'input_length'
    ],
    'verifier_specs': [
        {
            'field': 'sentiment',
            'type': 'string',
            'allowed_values': ['positive', 'negative', 'neutral']
        },
        {
            'field': 'confidence',
            'type': 'float',
            'min': 0.0,
            'max': 1.0
        },
        {
            'field': 'reasoning',
            'type': 'string'
        },
        {
            'field': 'input_length',
            'type': 'integer',
            'min': 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
build_critic_messages Ran
ran; our contract draft was wrong, not the code
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("3f06bdedff0f4d77")
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 json
from typing import Any, Dict, List, Tuple, Set, Optional, Iterable
from dataclasses import dataclass, field

@dataclass
class Aggregator:
    name: str
    code: str
    metadata: Dict[str, Any] = field(default_factory=dict)

@dataclass
class AtomicVerifier:
    name: str
    code: str
    description: str = ''
    requires: List[str] = field(default_factory=list)
    metadata: Dict[str, Any] = field(default_factory=dict)

@dataclass
class EvalStats:
    tp: int
    tn: int
    accept: int
    reject: int
    pp: float
    np: float
    cov_pos: float
    cov_neg: float
    feasible: bool
    score: float
    lcb_pp: float = 0.0
    lcb_np: float = 0.0
    false_pos_ids: List[str] = field(default_factory=list)
    false_neg_ids: List[str] = field(default_factory=list)
    accepted_ids: List[str] = field(default_factory=list)
    rejected_ids: List[str] = field(default_factory=list)
    context_failures: List[str] = field(default_factory=list)

@dataclass
class Example:
    id: str
    x: Any
    y: Any
    objective: int
    metadata: Dict[str, Any] = field(default_factory=dict)

@dataclass
class VerifierSetProgram:
    source_code: str
    verifiers: List[AtomicVerifier]
    aggregator: Aggregator
    signature: str

    @property
    def size(self) -> int:
        return len(self.verifiers)

    @property
    def required_fields(self) -> List[str]:
        fields: Set[str] = set()
        for verifier in self.verifiers:
            fields.update(verifier.requires)
        return sorted(fields)

@dataclass
class Node:
    program: VerifierSetProgram
    parents: Set[str] = field(default_factory=set)
    children: Set[str] = field(default_factory=set)
    stats: Optional[EvalStats] = None
    critic_summary: str = ''
    visits: int = 0

def format_examples_for_prompt(examples: Iterable[Example], include_labels: bool=True) -> str:
    rows = []
    for ex in examples:
        row = {'Query': ex.x, 'Output': ex.y}
        if include_labels:
            row['objective'] = ex.objective
        rows.append(row)
    return json.dumps(rows, ensure_ascii=False, indent=2)

# Build small but valid Example objects
false_pos_examples = [
    Example(id="fp_1", x="query 1", y="output 1", objective=0),
    Example(id="fp_2", x="query 2", y="output 2", objective=0),
]

false_neg_examples = [
    Example(id="fn_1", x="query 3", y="output 3", objective=1),
    Example(id="fn_2", x="query 4", y="output 4", objective=1),
]

# Build small verifiers
verifier_1 = AtomicVerifier(
    name="check_length",
    code="def check_length(x): return len(x) > 0",
    description="Checks if input is non-empty",
    requires=["x"],
)

verifier_2 = AtomicVerifier(
    name="check_format",
    code="def check_format(x): return isinstance(x, str)",
    description="Checks if input is string",
    requires=["x"],
)

# Build aggregator
aggregator = Aggregator(
    name="all_pass",
    code="def aggregate(results): return all(results)",
)

# Build VerifierSetProgram
program = VerifierSetProgram(
    source_code="def verify(x):\n    return len(x) > 0 and isinstance(x, str)",
    verifiers=[verifier_1, verifier_2],
    aggregator=aggregator,
    signature="verify(x: str) -> bool",
)

# Build EvalStats
stats = EvalStats(
    tp=8,
    tn=7,
    accept=10,
    reject=5,
    pp=0.8,
    np=0.7,
    cov_pos=0.85,
    cov_neg=0.75,
    feasible=True,
    score=0.775,
    lcb_pp=0.75,
    lcb_np=0.65,
    false_pos_ids=["fp_1", "fp_2"],
    false_neg_ids=["fn_1", "fn_2"],
    accepted_ids=["a1", "a2"],
    rejected_ids=["r1", "r2"],
    context_failures=[],
)

# Build Node
node = Node(
    program=program,
    parents=set(),
    children=set(),
    stats=stats,
    critic_summary="Initial version",
    visits=1,
)

# Build task description
task_description = "Verify that user queries are well-formed and contain appropriate context."

ARGS = {
    "task_description": task_description,
    "node": node,
    "false_pos": false_pos_examples,
    "false_neg": false_neg_examples,
}
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
build_seed_messages Ran
ran; our contract draft was wrong, not the code
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("1feb209908b9a544")
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
import json
from typing import Any, Dict, List
from dataclasses import dataclass, field

@dataclass
class Example:
    id: str
    x: Any
    y: Any
    objective: int
    metadata: Dict[str, Any] = field(default_factory=dict)

# Create small example data
examples = [
    Example(
        id="ex1",
        x="What is 2 + 2?",
        y="The answer is 4",
        objective=1,
        metadata={"difficulty": "easy"}
    ),
    Example(
        id="ex2",
        x="Solve: x^2 = 9",
        y="x = 3 or x = -3",
        objective=1,
        metadata={"difficulty": "medium"}
    ),
]

task_description = """
You are given math problems and need to verify if the model's output correctly 
solves the problem. Check if the answer is mathematically correct and complete.
"""

num_seeds = 2

ARGS = {
    "task_description": task_description,
    "examples": examples,
    "num_seeds": num_seeds,
}
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
canonicalize_source Ran
ran; our contract draft was wrong, not the code
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("e9908896ef097cd9")
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) 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 ast

ARGS = {
    "source": "import math\nresult = math.sqrt(16)\nprint(result)"
}
Setup block drafted by
a language model, Claude Haiku 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
compute_metrics Ran
ran, honoured the contract we drafted
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("c413778bf61cbc0f")
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) 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

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

# Define the helper functions from the function signature
def safe_div(num: float, den: float) -> float:
    return num / den if den > 0 else 0.0

def f1(p: float, r: float) -> float:
    return 2 * p * r / (p + r) if p + r > 0 else 0.0

def lower_confidence_bound(mean: float, den: int, delta: float=0.05) -> float:
    if den <= 0:
        return 0.0
    radius = math.sqrt(math.log(2.0 / delta) / (2.0 * den))
    return max(0.0, mean - radius)

def macro_f1(tp: int, tn: int, fp: int, fn: int):
    p_pos = safe_div(tp, tp + fp)
    r_pos = safe_div(tp, tp + fn)
    p_neg = safe_div(tn, tn + fn)
    r_neg = safe_div(tn, tn + fp)
    f1_pos = f1(p_pos, r_pos)
    f1_neg = f1(p_neg, r_neg)
    return (0.5 * (f1_pos + f1_neg), p_pos, p_neg)

# Now construct valid arguments for compute_metrics
# Parameters: tp, tn, accept, reject, n, beta_pp, beta_np, set_size, delta

# Create realistic confusion matrix values
tp = 45  # true positives
tn = 40  # true negatives
accept = 50  # total accepted (tp + fp)
reject = 45  # total rejected (tn + fn)
n = 100  # total samples

# Derive fp and fn from the above
# fp = accept - tp = 50 - 45 = 5
# fn = reject - tn = 45 - 40 = 5

# Beta thresholds (confidence bounds for precision and NPV)
beta_pp = 0.7  # minimum acceptable precision threshold
beta_np = 0.75  # minimum acceptable NPV threshold

# Set size parameter
set_size = 10

# Delta for confidence bound calculation
delta = 0.05

ARGS = {
    'tp': tp,
    'tn': tn,
    'accept': accept,
    'reject': reject,
    'n': n,
    'beta_pp': beta_pp,
    'beta_np': beta_np,
    'set_size': set_size,
    'delta': delta,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — 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
extract_python_blocks Ran
ran, honoured the contract we drafted
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("0aa1b5c8bb0029dd")
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) 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 re

def extract_python_blocks(text: str):
    pattern = re.compile('(?ms)^```(?:python)?[^\\n]*\\n(.*?)^```[ \\t]*(?:\\n|$)', re.IGNORECASE | re.MULTILINE)
    return [m.strip() for m in pattern.findall(text)]

# Create test text with python code blocks
text = """
Here is some documentation.


x = 1
y = 2


Some more text.


z = 3


And another python block:

Python
def hello():
    return "world"


Final text.
"""

ARGS = {
    "text": text
}
Setup block drafted by
a language model, Claude Haiku 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 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
f1 Ran
ran, honoured the contract we drafted
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("9a5c2eab3c6aee32")
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 torch
import numpy as np

torch.manual_seed(0)

# f1 computes the harmonic mean (F1 score formula) of two values p and r
# It takes two floats and returns a float
# The function checks if p + r > 0, otherwise returns 0.0

ARGS = {
    "p": 0.8,
    "r": 0.6
}
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 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
format_examples_for_prompt Ran
ran; our contract draft was wrong, not the code
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("18103dd8f81f69e9")
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) 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 json
from typing import Any, Dict, List, Tuple
from dataclasses import dataclass, field
from dataclasses import dataclass
from typing import Iterable, List

@dataclass
class Example:
    id: str
    x: Any
    y: Any
    objective: int
    metadata: Dict[str, Any] = field(default_factory=dict)

def format_examples_for_prompt(examples: Iterable[Example], include_labels: bool=True) -> str:
    rows = []
    for ex in examples:
        row = {'Query': ex.x, 'Output': ex.y}
        if include_labels:
            row['objective'] = ex.objective
        rows.append(row)
    return json.dumps(rows, ensure_ascii=False, indent=2)


# Create example instances
example1 = Example(
    id="ex1",
    x="What is 2+2?",
    y="4",
    objective=1,
    metadata={"source": "math"}
)

example2 = Example(
    id="ex2",
    x="What is the capital of France?",
    y="Paris",
    objective=2,
    metadata={"source": "geography"}
)

example3 = Example(
    id="ex3",
    x="Translate 'hello' to Spanish",
    y="hola",
    objective=3,
    metadata={"source": "translation"}
)

# Create an iterable of examples
examples_list = [example1, example2, example3]

ARGS = {
    "examples": examples_list,
    "include_labels": True
}
Setup block drafted by
a language model, Claude Haiku 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
lower_confidence_bound Ran
ran, honoured the contract we drafted
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("d728fcb9c70b3226")
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) 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 math

def lower_confidence_bound(mean: float, den: int, delta: float=0.05) -> float:
    if den <= 0:
        return 0.0
    radius = math.sqrt(math.log(2.0 / delta) / (2.0 * den))
    return max(0.0, mean - radius)

ARGS = {
    "mean": 0.75,
    "den": 100,
    "delta": 0.05
}
Setup block drafted by
a language model, Claude Haiku 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 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
macro_f1 Ran
ran, honoured the contract we drafted
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("d7ee35668f18f66e")
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) 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 torch

torch.manual_seed(0)

# The function macro_f1 takes 4 integer parameters: tp, tn, fp, fn
# These represent true positives, true negatives, false positives, false negatives
# The function computes macro F1 score and precisions for binary classification

ARGS = {
    "tp": 10,
    "tn": 8,
    "fp": 2,
    "fn": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — 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
parse_program_source Ran
ran; our contract draft was wrong, not the code
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("7be1342addf327fc")
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) and returned VerifierSetProgram. 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 ast
from typing import Any, Dict, List

# Create a minimal valid verifier bundle source code
verifier_source = """
import math

def verify_positive(x, y, context=None):
    return x > 0 and y > 0

def verify_sum(x, y, context=None):
    return x + y > 0

def aggregate(checks, x, y, context=None):
    return all(checks.values()) if isinstance(checks, dict) else all(checks)

VERIFIER_SPECS = [
    {
        'name': 'verify_positive',
        'description': 'Check if both values are positive',
        'requires': ['x', 'y'],
        'metadata_key': 'some_value'
    },
    {
        'name': 'verify_sum',
        'description': 'Check if sum is positive',
        'requires': ['x', 'y']
    }
]
"""

ARGS = {
    'source': verifier_source
}
Setup block drafted by
a language model, Claude Haiku 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 VerifierSetProgram — a VerifierSetProgram output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VerifierSetProgram 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
safe_div Ran
ran, honoured the contract we drafted
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("595c73a18c71d375")
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 torch

torch.manual_seed(0)

ARGS = {
    "num": 5.0,
    "den": 2.0,
}
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 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
validate_source Ran
ran; our contract draft was wrong, not the code
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("1453b53c8fa83a95")
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) and returned Module. 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 ast

# Valid Python source code that passes all sandbox checks
valid_source = """
import math
import json
from collections import Counter

def calculate(x):
    return math.sqrt(x) + 1

result = calculate(16)
data = json.dumps({"key": "value"})
counts = Counter([1, 2, 2, 3, 3, 3])
"""

# Invalid source with banned syntax (for testing error cases)
invalid_source_with_global = """
global x
x = 5
"""

# Invalid source with banned import
invalid_source_with_banned_import = """
import os
"""

# Invalid source with banned call
invalid_source_with_eval = """
result = eval("1 + 1")
"""

ARGS = {
    "source": valid_source
}
Setup block drafted by
a language model, Claude Haiku 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 Module — a Module output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Module 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
Aggregator Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("f9865b0e7574bb0f")
How it ran

no invocation recorded.

AtomicVerifier Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("0cb067a345547711")
How it ran

no invocation recorded.

AutoVerifierSearch Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("be2158bc1810ca78")
How it ran

no invocation recorded.

EvalStats Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("61f5e4c5e60226d0")
How it ran

no invocation recorded.

Example Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("a2e45084e25befb4")
How it ran

no invocation recorded.

LLMConfig Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("20df428cb94cab3b")
How it ran

no invocation recorded.

Node Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("cab1924a41908e7b")
How it ran

no invocation recorded.

SandboxError Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("13d538261c2e81fe")
How it ran

no invocation recorded.

SearchConfig Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("c82321391e95dc51")
How it ran

no invocation recorded.

SearchResult Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("97d98749608df61b")
How it ran

no invocation recorded.

VerifierSetProgram Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("283d573d05af3995")
How it ran

no invocation recorded.

_worker_evaluate Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("5f5750a08c0ce808")
How it ran

no invocation recorded.

build_refine_messages Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("05554b11384f0700")
How it ran

no invocation recorded.

evaluate_bundle_source Not yet run
unverified (harvested, no recorded run)
megagonlabs/AutoPyVerifier/src/autopyverifier/search.py
code served (permissive licence) · get_code("9967da40681d7bd1")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

Verification is becoming central to both reinforcement-learning-based training and inference-time control of large language models (LLMs). Yet current verifiers face a fundamental trade-off: LLM-based verifiers are expressive but hard to control and prone to error, while deterministic executable verifiers are reliable and interpretable but often limited in capability. We study the following question: given a development set of LLM outputs and labels for a target objective, such as correctness, can we automatically induce a minimal set of Python verifiers whose joint satisfaction closely matches that objective? We propose Au-toPyVerifier, a framework that uses an LLM to synthesize candidate verifier functions and then refines them through search over a directed acyclic graph (DAG). By navigating the DAG, AutoPyVerifier systematically explores the space of deterministic executable verifiers and selects a compact verifier set whose joint satisfaction best approximates the target objective. Across mathematical reasoning, coding, function calling, and instruction-following benchmarks for several state-of-the-art LLMs, AutoPyVerifier improves target-objective prediction by up to 55.0 F1 points over the initial LLM-generated verifier sets. Additional analyses show that the most useful verification targets vary by benchmark and model, and that the DAG-based search shifts the learned verifier sets toward more structural and semantically grounded checks. We further show that exposing the discovered verifier set to an LLM as an external tool improves downstream accuracy by up to 17.0 points. We release our code 1 .

For agents

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

get_harvested_code_for_paper("2604.22937")
get_code_for_paper("2604.22937")
have("2604.22937")

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

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

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

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

Connect an agent — have() is free.