Papers › AutoPyVerifier: Learning Compact Executable Verifiers for Large Language Model Outputs

AutoPyVerifier: Learning Compact Executable Verifiers for Large Language Model Outputs

24 Apr 2026arXiv:2604.22937added by Syntology

Pouya Pezeshkpour, Estevam Hruschka

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

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

PaperPDFCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 29 code samples harvested from 1 repository linked to this paper: 15 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 6 honoured, 0 violated, 0 with no contract checked; 9 where Syntology's instrument failed) · 14 unverified. Where Syntology's instrument failed: 9 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: found in paper text by Syntology: 29 samples from 1 repository, 15 ran (6 with no instrument failure; 9 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

megagonlabs/AutoPyVerifier found in paper text by SyntologySyntology: 29 samples, 15 ran (9 instrument-failed) · 14 unverified report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

29 samples harvested: 15 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 6 honoured, 0 violated, 0 with no contract checked; 9 where Syntology's instrument failed) · 14 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

6ran · honoured contract
9ran · our draft was wrong
14unverified

Licence: 0 of the 29 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from megagonlabs/AutoPyVerifier. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

megagonlabs/AutoPyVerifier found in paper text by Syntology 29 samples, 15 ran (9 instrument-failed) · 14 unverified
_exec_source src/autopyverifier/search.py ran · our draft was wrong fingerprinted BSD-3-Clause (permissive) · 5bd17a58819c485c · report fixture: signature source:str/0/str · returned dict · level recorded 2026-09-22
_limited_import src/autopyverifier/search.py ran · our draft was wrong BSD-3-Clause (permissive) · 0db1493fe471b490 · report fixture: signature name:str/0/str, globals:NoneType/0/?, locals:NoneType/0/?, fromlist:tuple/1/empty, level:int/0/int · returned module · level recorded 2026-09-22
build_context_messages src/autopyverifier/search.py ran · our draft was wrong BSD-3-Clause (permissive) · 2b62714e94367257 · report fixture: signature task_description:str/0/str, x:dict/0/?, y:dict/0/?, required_fields:list/1/str, verifier_specs:list/1/dict · returned list · level recorded 2026-09-22
build_critic_messages src/autopyverifier/search.py ran · our draft was wrong BSD-3-Clause (permissive) · 3f06bdedff0f4d77 · report fixture: signature task_description:str/0/str, node:Node/0/?, false_pos:list/1/Example, false_neg:list/1/Example · returned list · level recorded 2026-09-22
build_seed_messages src/autopyverifier/search.py ran · our draft was wrong BSD-3-Clause (permissive) · 1feb209908b9a544 · report fixture: signature task_description:str/0/str, examples:list/1/Example, num_seeds:int/0/int · returned list · level recorded 2026-09-22
canonicalize_source src/autopyverifier/search.py ran · our draft was wrong fingerprinted BSD-3-Clause (permissive) · e9908896ef097cd9 · report fixture: signature source:str/0/str · returned str · level recorded 2026-09-22
compute_metrics in 208 papers src/autopyverifier/search.py ran · honoured contract BSD-3-Clause (permissive) · c413778bf61cbc0f · report fixture: signature tp:int/0/int, tn:int/0/int, accept:int/0/int, reject:int/0/int, n:int/0/int, beta_pp:float/0/float, beta_np:float/0/float, set_size:int/0/int, delta:float/0/float · returned tuple · level recorded 2026-09-22
extract_python_blocks src/autopyverifier/search.py ran · honoured contract BSD-3-Clause (permissive) · 0aa1b5c8bb0029dd · report fixture: signature text:str/0/str · returned list · level recorded 2026-09-22
f1 in 57 papers src/autopyverifier/search.py ran · honoured contract fingerprinted BSD-3-Clause (permissive) · 9a5c2eab3c6aee32 · report fixture: signature p:float/0/float, r:float/0/float · returned float · level recorded 2026-09-22
format_examples_for_prompt src/autopyverifier/search.py ran · our draft was wrong BSD-3-Clause (permissive) · 18103dd8f81f69e9 · report fixture: signature examples:list/1/Example, include_labels:bool/0/bool · returned str · level recorded 2026-09-22
lower_confidence_bound src/autopyverifier/search.py ran · honoured contract BSD-3-Clause (permissive) · d728fcb9c70b3226 · report fixture: signature mean:float/0/float, den:int/0/int, delta:float/0/float · returned float · level recorded 2026-09-22
macro_f1 in 5 papers src/autopyverifier/search.py ran · honoured contract fingerprinted BSD-3-Clause (permissive) · d7ee35668f18f66e · report fixture: signature tp:int/0/int, tn:int/0/int, fp:int/0/int, fn:int/0/int · returned tuple · level recorded 2026-09-22
parse_program_source src/autopyverifier/search.py ran · our draft was wrong BSD-3-Clause (permissive) · 7be1342addf327fc · report fixture: signature source:str/0/str · returned VerifierSetProgram · level recorded 2026-09-22
safe_div in 29 papers src/autopyverifier/search.py ran · honoured contract fingerprinted BSD-3-Clause (permissive) · 595c73a18c71d375 · report fixture: signature num:float/0/float, den:float/0/float · returned float · level recorded 2026-09-24
validate_source src/autopyverifier/search.py ran · our draft was wrong BSD-3-Clause (permissive) · 1453b53c8fa83a95 · report fixture: signature source:str/0/str · returned Module · level recorded 2026-09-22
Aggregator in 13 papers src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · f9865b0e7574bb0f · report
AtomicVerifier src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · 0cb067a345547711 · report
AutoVerifierSearch src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · be2158bc1810ca78 · report
EvalStats src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · 61f5e4c5e60226d0 · report
Example src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · a2e45084e25befb4 · report
LLMConfig src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · 20df428cb94cab3b · report
Node in 32 papers src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · cab1924a41908e7b · report
SandboxError src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · 13d538261c2e81fe · report
SearchConfig src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · c82321391e95dc51 · report
SearchResult src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · 97d98749608df61b · report
VerifierSetProgram src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · 283d573d05af3995 · report
_worker_evaluate src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · 5f5750a08c0ce808 · report
build_refine_messages src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · 05554b11384f0700 · report
evaluate_bundle_source src/autopyverifier/search.py unverified BSD-3-Clause (permissive) · 9967da40681d7bd1 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for AutoPyVerifier (graph method: AutoPyVerifier). 29 bricks; individually on a fixture: 15 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 6 honoured, 0 violated, 0 with no contract checked; 9 where Syntology's instrument failed) · 14 unverified. The assembly has not been run end-to-end.

  1. AutoVerifierSearch entry · level 0 · unverified · be2158bc1810ca78
  2. EvalStats helper · level 0 · unverified · 61f5e4c5e60226d0
  3. Example helper · level 0 · unverified · a2e45084e25befb4
  4. LLMConfig helper · level 0 · unverified · 20df428cb94cab3b
  5. Node helper · level 0 · unverified · cab1924a41908e7b
  6. SearchConfig helper · level 0 · unverified · c82321391e95dc51
  7. SearchResult helper · level 0 · unverified · 97d98749608df61b
  8. build_context_messages helper · level 1 · ran · our draft was wrong · 2b62714e94367257
  9. build_critic_messages helper · level 1 · ran · our draft was wrong · 3f06bdedff0f4d77
  10. build_refine_messages helper · level 0 · unverified · 05554b11384f0700
  11. build_seed_messages helper · level 1 · ran · our draft was wrong · 1feb209908b9a544
  12. compute_metrics helper · level 1 · ran · honoured contract · c413778bf61cbc0f
  13. evaluate_bundle_source helper · level 0 · unverified · 9967da40681d7bd1
  14. extract_python_blocks helper · level 1 · ran · honoured contract · 0aa1b5c8bb0029dd
  15. parse_program_source helper · level 1 · ran · our draft was wrong · 7be1342addf327fc
  16. VerifierSetProgram helper · level 0 · unverified · 283d573d05af3995
  17. format_examples_for_prompt helper · level 1 · ran · our draft was wrong · 18103dd8f81f69e9
  18. lower_confidence_bound helper · level 1 · ran · honoured contract · d728fcb9c70b3226
  19. macro_f1 helper · level 1 · ran · honoured contract · d7ee35668f18f66e
  20. safe_div helper · level 1 · ran · honoured contract · 595c73a18c71d375
  21. _worker_evaluate helper · level 0 · unverified · 5f5750a08c0ce808
  22. Aggregator helper · level 0 · unverified · f9865b0e7574bb0f
  23. AtomicVerifier helper · level 0 · unverified · 0cb067a345547711
  24. SandboxError helper · level 0 · unverified · 13d538261c2e81fe
  25. _exec_source helper · level 1 · ran · our draft was wrong · 5bd17a58819c485c
  26. canonicalize_source helper · level 1 · ran · our draft was wrong · e9908896ef097cd9
  27. f1 helper · level 1 · ran · honoured contract · 9a5c2eab3c6aee32
  28. validate_source helper · level 1 · ran · our draft was wrong · 1453b53c8fa83a95
  29. _limited_import helper · level 1 · ran · our draft was wrong · 0db1493fe471b490

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2604.22937") returns these assemblies with each brick's role and wiring (how to connect).

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2604.22937, was issued in April 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections