VeriBench: End-to-End Formal Verification Benchmark for AI Coding Agents in Lean 4

Test-based coding benchmarks have repeatedly required strengthening passes: HumanEval to HumanEval+, and SWE-Bench to SWE-Bench Verified to SWE-Bench+, each release exposing bugs the prior suite missed. Finite test suites can leave behaviorally important bugs unobserved. Existing formal-verification benchmarks (e.g., VERINA, FVAPPS, CLEVER, DafnyBench) provide stronger machine-checkable signals. However, many focus on proof completion, scaffolded verified generation, or isolated subtasks rather than source-conditioned construction of complete formal artifacts. Rather than strengthen tests again, we evaluate whether agents can specify and prove machine-checked guarantees that hold for all inputs, not just the tested ones. Therefore we introduce VERIBENCH, an 884-task benchmark for agentic Python-to-Lean 4 autoformalization under verifier feedback. We score each artifact with a novel SCSC (smooth conjunctive score for code verification), a geometric mean over verification properties (e.g., compilation, proof closure, and theorem equivalence) where any weak property lowers the score while still crediting partial progress. Its primary Python-to-Lean 4 track includes a 602-task canonical core and VERIBENCH-INDUSTRYSET, a 282-task set spanning industry-elicited high-assurance domains. The canonical core spans HumanEval-style programs, classical algorithms, Python standard-library functions, introductory programming tasks, and a 460-task security-critical subset adapted from MIT 6.858. Under an agentic verifier-feedback loop, Codex, Claude Code, and Leanstral v2 reach agent-skill scores of only 0.29, 0.22, and 0.10. Codex and Claude Code typecheck all generated files, yet estimated theorem–gold equivalence remains at ≤ 0.156 across evaluated systems. For Codex, Claude Code, and the single-call LLM baseline using Sonnet 4.6, equivalence is capped at ≤ 0.105. SCSC’s theorem-equivalence factor TE1 is computed by a Claude Sonnet 4.6 LLM judge over extracted agent and gold theorem statements. A separate Codex CLI rubric check reaches raw Pearson r = 0.61 on a pool labeled by five human raters, with weaker rank correlations (ρ≈0.38). Together, these results support treating TE1 as a semantic equivalence estimate, not a formal bi-implication proof or a calibration of the deployed Sonnet judge. VERIBENCH reframes code-verification evaluation from isolated proof search to end-to-end conjunctive grounding, surfacing theorem formulation as a bottleneck at least as severe as proof search.

Authors

Publication Details

Journal
Stanford Digital Repository
Published
2026-11-24
DOI
https://doi.org/10.25740/nw314gc8770
Primary Topic
Logic, programming, and type systems
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

VeriBench: End-to-End Formal Verification Benchmark for AI Coding Agents in Lean 4

Brando Miranda, Daneshvar Amrollahi, Allen Nie, Santiago Cuéllar et al.
1 links
Stanford Digital Repository
Logic, programming, and type systems
article

VeriBench: End-to-End Formal Verification Benchmark for AI Coding Agents in Lean 4

Brando Miranda, Daneshvar Amrollahi, Allen Nie, Santiago Cuéllar, Rylan Schaeffer, Steven Dillmann, Leni Aniva, Dilara Soylu, Sanmi Koyejo, Zixiao Jolene Wang, Kirill Acharya, Yegor Denisov-Blanch, Simon Obstbaum, Elyas Obbad, Iddah Mlauzi, Kai Fronsdal, Srivatsava Daruru, John Sarracino, Shurui Liu, Mo Tiwari, Bo Han, Ethan S Hersch, Zhanke Zhou, Donghyun Lee, Rakshit Kaushik, Weston Kirk, Donald Poindexter Jr., Ying Li
article en

Abstract

Test-based coding benchmarks have repeatedly required strengthening passes: HumanEval to HumanEval+, and SWE-Bench to SWE-Bench Verified to SWE-Bench+, each release exposing bugs the prior suite missed. Finite test suites can leave behaviorally important bugs unobserved. Existing formal-verification benchmarks (e.g., VERINA, FVAPPS, CLEVER, DafnyBench) provide stronger machine-checkable signals. However, many focus on proof completion, scaffolded verified generation, or isolated subtasks rather than source-conditioned construction of complete formal artifacts. Rather than strengthen tests again, we evaluate whether agents can specify and prove machine-checked guarantees that hold for all inputs, not just the tested ones. Therefore we introduce VERIBENCH, an 884-task benchmark for agentic Python-to-Lean 4 autoformalization under verifier feedback. We score each artifact with a novel SCSC (smooth conjunctive score for code verification), a geometric mean over verification properties (e.g., compilation, proof closure, and theorem equivalence) where any weak property lowers the score while still crediting partial progress. Its primary Python-to-Lean 4 track includes a 602-task canonical core and VERIBENCH-INDUSTRYSET, a 282-task set spanning industry-elicited high-assurance domains. The canonical core spans HumanEval-style programs, classical algorithms, Python standard-library functions, introductory programming tasks, and a 460-task security-critical subset adapted from MIT 6.858. Under an agentic verifier-feedback loop, Codex, Claude Code, and Leanstral v2 reach agent-skill scores of only 0.29, 0.22, and 0.10. Codex and Claude Code typecheck all generated files, yet estimated theorem–gold equivalence remains at ≤ 0.156 across evaluated systems. For Codex, Claude Code, and the single-call LLM baseline using Sonnet 4.6, equivalence is capped at ≤ 0.105. SCSC’s theorem-equivalence factor TE1 is computed by a Claude Sonnet 4.6 LLM judge over extracted agent and gold theorem statements. A separate Codex CLI rubric check reaches raw Pearson r = 0.61 on a pool labeled by five human raters, with weaker rank correlations (ρ≈0.38). Together, these results support treating TE1 as a semantic equivalence estimate, not a formal bi-implication proof or a calibration of the deployed Sonnet judge. VERIBENCH reframes code-verification evaluation from isolated proof search to end-to-end conjunctive grounding, surfacing theorem formulation as a bottleneck at least as severe as proof search.

Stanford Digital Repository
Logic, programming, and type systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon