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 ran

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

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2604.22937")

Code

Syntology Ran 15 of 29 code samples harvested from 1 repository linked to this paper; 14 have no recorded run. Of those that ran: 3 ran · honoured contract; 5 ran · our draft was wrong; 7 ran with no contract checked.

By repository: found in paper text by Syntology: 29 samples from 1 repository, 15 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

megagonlabs/AutoPyVerifier found in paper text by Syntology 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; 3 honoured the contract we drafted; 14 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · honoured contract
5ran · our draft was wrong
7ran
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. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (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 from a repository marked official are listed first. 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 four 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; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). 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.

_exec_source megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran · our draft was wrong fingerprinted BSD-3-Clause (permissive) · 5bd17a58819c485c · report
_limited_import megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran BSD-3-Clause (permissive) · 0db1493fe471b490 · report
build_context_messages megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran BSD-3-Clause (permissive) · 2b62714e94367257 · report
build_critic_messages megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran BSD-3-Clause (permissive) · 3f06bdedff0f4d77 · report
build_seed_messages megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran BSD-3-Clause (permissive) · 1feb209908b9a544 · report
canonicalize_source megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran · our draft was wrong fingerprinted BSD-3-Clause (permissive) · e9908896ef097cd9 · report
compute_metrics megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran BSD-3-Clause (permissive) · c413778bf61cbc0f · report
extract_python_blocks megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran · honoured contract BSD-3-Clause (permissive) · 0aa1b5c8bb0029dd · report
f1 megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran fingerprinted BSD-3-Clause (permissive) · 9a5c2eab3c6aee32 · report
format_examples_for_prompt megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran · our draft was wrong BSD-3-Clause (permissive) · 18103dd8f81f69e9 · report
lower_confidence_bound megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran · honoured contract fingerprinted BSD-3-Clause (permissive) · d728fcb9c70b3226 · report
macro_f1 megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran · honoured contract fingerprinted BSD-3-Clause (permissive) · d7ee35668f18f66e · report
parse_program_source megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran · our draft was wrong BSD-3-Clause (permissive) · 7be1342addf327fc · report
safe_div megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran fingerprinted BSD-3-Clause (permissive) · 595c73a18c71d375 · report
validate_source megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology ran · our draft was wrong BSD-3-Clause (permissive) · 1453b53c8fa83a95 · report
Aggregator megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · f9865b0e7574bb0f · report
AtomicVerifier megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · 0cb067a345547711 · report
AutoVerifierSearch megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · be2158bc1810ca78 · report
EvalStats megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · 61f5e4c5e60226d0 · report
Example megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · a2e45084e25befb4 · report
LLMConfig megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · 20df428cb94cab3b · report
Node megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · cab1924a41908e7b · report
SandboxError megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · 13d538261c2e81fe · report
SearchConfig megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · c82321391e95dc51 · report
SearchResult megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · 97d98749608df61b · report
VerifierSetProgram megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · 283d573d05af3995 · report
_worker_evaluate megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · 5f5750a08c0ce808 · report
build_refine_messages megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · 05554b11384f0700 · report
evaluate_bundle_source megagonlabs/AutoPyVerifier/src/autopyverifier/search.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · 9967da40681d7bd1 · report

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