vericoding benchmark: formally verified program synthesisA benchmark for vericoding: formally verified program synthesis
The authors test off-the-shelf LLMs on vericoding with 12,504 specifications, and the Dafny union success rate is 82.2% (Table 3).
- Vibe coding generates programs from natural language; the authors state that results may have bugs, and testing can usually only find bugs, not confirm their absence. Formal verification can provide machine-checkable proofs, but it is more labor-intensive than programming. The authors want a large-scale benchmark to measure whether LLMs can generate implementations and proofs from formal specifications alone.
- The authors compile specifications from verification benchmarks, vibe coding data, and documentation such as Numpy, remove implementations and proofs, and translate them to Dafny, Verus, and Lean. Off-the-shelf LLMs fill in implementations and proofs over fixed rounds; success is achieved when the proof checker passes and no bypass pattern is hit.
- Table 3 nine-model union: Dafny 82.2% (2161 problems), Verus 44.3% (2166 problems), Lean 26.8% (2361 problems). Additionally, Lean FVAPPS union 41.8% (4006 problems), DafnyBench pure verification union 96.8%.
- The authors plan to extend to SWE-bench and BashBench, and try tree search, reinforcement learning, and multi-model collaboration, and also plan to further study the role of natural language descriptions. Coverage includes three languages and nine off-the-shelf LLMs. The paper does not report the translation review model; FVAPPS did not use unit tests.
- Evaluated models
- claude-opus-4.1gpt-5-minigpt-5claude-sonnet-4gemini-2.5-progrok-codeglm-4.5gemini-2.5-flashdeepseek-chat-v3.1
- Benchmarks
- APPS (Test)DafnyBenchNumpyTripleVerifiedCogenVerinaBignumNumpySimpleHumanEvalCLEVERFVAPPS
- Metrics
- vericoding success ratemodel unionverification success rate
A research team released and tested what the authors call the largest vericoding benchmark, which asks LLMs to generate formally verified code from formal specifications, rather than generating potentially buggy code from natural language descriptions as in vibe coding. The benchmark contains 12,504 formal specifications, including 3,029 Dafny, 2,334 Verus/Rust, and 7,141 Lean, with 6,174 being new problems not seen before. Success rates with off-the-shelf LLMs are 27% for Lean, 44% for Verus/Rust, and 82% for Dafny; adding natural language descriptions did not significantly improve performance; over the past year, LLM progress on pure Dafny verification improved from 68% to 96%. The benchmark and results are publicly available on GitHub.
Paper analysis
What problem does this paper attempt to solve?
The authors aim to measure whether off-the-shelf LLMs can do vericoding from formal specifications alone, and for this purpose assemble a benchmark across three languages.
Measuring whether off-the-shelf LLMs can generate implementations and proofs from formal specifications alone (vericoding), and providing a large-scale benchmark for this.
- Scenario: The authors define vibe coding as generating programs from natural language, and state that results may have bugs. They state that testing can usually only find bugs, not confirm their absence, and mention Ariane-V, Shellshock lying dormant for 25 years, and the 2024 CrowdStrike outage affecting 8.5 million devices globally. Formal verification provides machine-checkable proofs, but the authors state it covers only a small fraction of software because it is more labor-intensive than programming.
- Existing benchmarks: The authors state that formal verification lacks large benchmarks comparable to automated theorem proving. The introduction plain text writes that the largest of its kind is less than "103"; this is inconsistent with Table 1. In Table 1, the largest verification benchmark is DafnyBench at 782, and vericoding benchmarks are CLEVER 161 and VERINA 189; the table note states these two categories are two orders of magnitude smaller than theorem proving and vibe coding. The authors also state that many examples are limited to single functions, and sometimes the specification directly repeats the algorithm implementation.
- Author premise: The authors draw an analogy to theorem proving. The paper writes that related benchmarks total over 100,000 theorems, MetaMath went from 21% to over 82%; Seed-Prover exceeds 50% on PutnamBench, formalizes 78.1% of past Olympiad problems, 99.6% on MiniF2F, and with Seed-Geometry solves 5 of the 6 IMO 2025 problems. The premise is that AI will soon be able both to verify existing code and to write verifiable new code from specifications.
- This paper proposes: The authors assemble Dafny, Verus/Rust, and Lean specifications and test them with off-the-shelf LLMs. The abstract gives 12,504 entries (Dafny 3,029, Verus/Rust 2,334, Lean 7,141), and states that 6,174 are new unseen problems. The starred row in Table 2 is also 6174; after the colon, the post-check count is 5735. In the conclusion, the authors state this is the largest vericoding benchmark to date.
What related research exists?
The paper contrasts theorem proving, verification, vibe coding, and CLEVER/VERINA; this paper focuses on joint generation of implementation and proof from formal specifications.
Theorem proving
- Large-scale benchmarks: Table 1 lists PutnamBench (Tsoukalas et al., 2024) 1709, FormalMATH (Yu et al., 2025) 5560, LeanDojo (Yang et al., 2023) 98734, LISA (Jiang et al., 2021) 183000. The introduction uses them to contrast the scale of formal verification benchmarks.
- Recent systems: The paper writes that MetaMath went from 21% to over 82% (Polu & Sutskever, 2020; Lample et al., 2022). Seed-Prover (Chen et al., 2025) exceeds 50% on PutnamBench, formalizes 78.1% of past Olympiad problems, 99.6% on MiniF2F, and with Seed-Geometry solves 5 of the 6 IMO 2025 problems.
Verification and vibe coding
- Verification benchmarks: Table 1 lists VeriBench 113, Verus-Bench 150, Verified Cogen 223, VerifyThisBench 481, DafnyBench 782. The paper writes that VerifyThisBench generates specifications, implementations, and proofs from natural language; VeriBench generates Lean implementations, specifications, and unit tests from Python code and documentation, which are then proved by an LLM.
- Vibe coding: Table 1 lists HumanEval 163, FVAPPS 4715, APPS 10000, CodeContests 13610, HumanEval-XL 22080. The paper writes that FVAPPS generates formal specifications from natural language, and code synthesis provides both description and specification. AI control (Greenblatt et al., 2024) uses a weaker LLM to supervise correctness and safety, but does not produce formal guarantees.
- Other languages: Table 1 notes also mention SV-COMP, SyGuS, and FVELER and AFP on Isabelle, without detailed comparison.
Vericoding and translation
- CLEVER and VERINA: Table 1 lists 161 and 189 for Lean. The paper writes that both also include generating specifications from documentation and require first synthesizing a Lean implementation before constructing a correctness proof. The authors focus on implementation and proof, and allow modifying the implementation over multiple rounds to make the proof easier or fix errors.
- Corpus construction: The paper writes that DafnyBench comes from Clover, DafnySynthesis, and GitHub scraping; FVAPPS uses an LLM to translate APPS Python into Lean and format it. AlphaVerus (Aggarwal et al., 2024) uses a self-improvement framework to iteratively translate programs from Dafny to Verus, using verifier feedback. The authors state that this paper uses off-the-shelf LLMs for translation, reviewing translations, and fixing errors, rather than that framework.
Experimental comparison
- Baselines: The main experiment does not treat existing vericoding systems as method baselines, but compares nine off-the-shelf LLMs and a model union. Pure verification is compared against Loughridge et al. (2025) on DafnyBench (782 problems), with the paper's cited June 2024 Opus-3 at 68%.
The authors place the difference from CLEVER and VERINA in: code generation does not provide natural language, this work does not do specification generation, and implementation and proof are generated jointly. The difference from theorem proving work is that the object changes from mathematical theorems to generating verifiable code from formal specifications.
How does the paper address this problem?
Use labeled specifications, cross-language translation, and fixed-round generation, proof checking, and bypass pattern interception for vericoding.
Vericoding gives a labeled formal specification to an off-the-shelf LLM, which fills in the implementation and proof within fixed rounds, and then a Dafny, Verus, or Lean checker decides; additionally, an LLM translates specifications to other languages to expand coverage.
Task definition
- Four objects: documentation is natural language intent, optionally containing pseudocode; spec includes function signatures and preconditions, postconditions, etc.; code is an executable or checkable implementation; proof proves the implementation correct relative to the spec. Spec and code can reference predicates, mathematical functions, data structures, and algorithms in the same or external files.
- Two types of provers: The authors treat Dafny and Verus as ATPs, using SMT to handle verification conditions automatically; Lean is an ITP, using tactics to build proofs. In ITPs, signatures and implementations form definitions, conditions and proofs form theorems; proofs are opaque, and theorems can only rely on the conditions of other theorems. In ATPs, signatures and conditions are grouped, and implementations and proofs are interleaved into proof-carrying code.
- Inputs and labels: Tasks contain context, spec, and optionally documentation. Solutions contain implementation, proof, and additional context such as imports, helpers, and lemmas. Figure 1 uses vc labels to divide preamble, helpers, definitions/spec, code, theorems, and postamble. The translation in Section 3.3 also uses labels such as vc-description.
- Problem types and tests: Verina, Clever, DafnyBench, Numpy Triple, etc., mostly involve single functions. FVAPPS and others may require multiple functions and their joint proofs. Some Lean tasks place unit tests in the postamble, not given to the LLM, to avoid writing implementations just to pass tests; by design, they are checked after vericoding. Section 4.1 writes that this FVAPPS experiment did not use these tests.
Sources and problem creation
- Three types of original sources: verification or vericoding benchmarks (DafnyBench for Dafny, VerifiedCogen for Verus, Verina and Clever for Lean); vibe coding benchmarks (APPS, FVAPPS, HumanEval); mathematical library documentation (Numpy v2.3, BigNum). The plain text cannot see the bold in Table 2; the original source scope follows Section 3.2 and Appendix 1.1.
- Hole-filling and formalization: Remove the main task implementation and helper lemmas and proofs, replacing them with holes like sorry. Vibe coding and documentation sources also undergo autoformalization. Appendix 1.1 writes that DafnyBench splits large files with multiple methods and removes files without methods; VerifiedCogen removes implementation bodies; Verina and Clever remove specification generation and spec isomorphism requirements.
- Specific sources: BigNum is Dafny big-number arithmetic written from scratch by the authors, with 13 functions commonly used in cryptography, combined with different helpers to yield 62 problems. The appendix writes that APPS focuses on 5,000 entries from the test split, then translated to Dafny; in Table 2, APPS Dafny is 883:677. NumPy is divided into simple and triple; triple uses Lean's new mvcgen to write specifications as Hoare triples.
- Keeping bad specifications: The authors keep incomplete, inconsistent, or non-compiling specifications, because fixing specifications is part of the formal verification process, and they also release problematic tasks for purposes like spec repair. Table 2 writes that experiments only use Y after compilation, formatting, and quality checks. Table 3 problem counts differ from some Y, e.g., Dafny NumpyTriple is 603 in Table 2 and 430 in Table 3; the paper does not explain the difference.
Translation and quality scores
- SpecTranslator: Figure 2 runs at most k rounds on a specification: generate or fix, VerifyFile in the target language, and on failure put the history into a repair prompt. Only specifications are translated. Python-to-Dafny adds generator-vs-judge on top. The paper does not give this k, nor does it name the LLM used for translation.
- Two-step validation: First, "LLM as a judge" compares against the labeled original source, checking whether preconditions, postconditions, and invariants are preserved, and catching cases where postconditions are replaced with true or function bodies are replaced with default values. Second, manual inspection of random samples. The authors find that a few specifications allow trivial solutions, from lossy translation or from manual specifications that do not fully capture natural language. The paper does not give the reviewer model name or manual sample size.
- Quality score: Per file, 1−∑i wi ni, where wi are normalized weights for problem types summing to 1.0, and ni is the count of type i in the file. Near-duplicates are compared using sentence transformers and FAISS on normalized descriptions and specifications. Scores and issues are written to JSONL, summarized in Appendix Table 5.
Solving loop
- Vericoder: Figure 3. Two prompt sets per language, for generation and for fixing based on errors; Appendix 1.3 gives full prompts. The authors state they informally tried variants but did not optimize extensively. Verus prompts may benefit from examples of common vstd lemmas; Dafny/Verus prompts include syntax examples.
- Rounds: Generally 1 generation plus 4 retries with error information; BigNum is 1 generation plus 9 retries. No separate blank-history independent trials are run.
- Success criteria: The model returns code blocks according to holes and reassembles the file. ValidateBlocks checks for patterns that bypass the proof checker, and VerifyFile runs dafny, verus, or lean. Success requires both to pass; otherwise, errors are returned to the model; reaching the limit results in failure and returns the last file.
- Bypass categories: The authors list assume(false) or sorry to disable the checker, replacing postconditions with true, specification leaking the implementation, and using comments across blocks to erase intermediate specifications. Dafny/Verus use ghost sections to mitigate leakage; the authors believe some leakage is hard to avoid, and responsibility lies with the spec writer. The comment-erasure category, the authors state, did not occur.
What experiments did the paper conduct?
In Table 3, the nine-model union success rates are Dafny 82.2%, Verus 44.3%, Lean 26.8%.
Experimental setup
- Models: claude-opus-4.1, gpt-5, gpt-5-mini, claude-sonnet-4, gemini-2.5-pro, gemini-2.5-flash, grok-code, glm-4.5, deepseek-chat-v3.1. Used off-the-shelf, no reinforcement learning or fine-tuning.
- Main experiment problem counts: Table 3 is Dafny 2161, Verus 2166, Lean 2361, excluding FVAPPS listed separately. The header gives per-source counts, e.g., Dafny: NumPy Simple 58, NumPy Triple 430, DafnyBench 443, HumanEval 162, Verina 157, BigNum 62, VerifiedCogen 172, APPS test 677. Lean's HumanEval 161 problems come from CLEVER.
- Metrics: Success means both code block validation and the language proof checker pass. Model union is the proportion solved by at least one LLM. The appendix writes that result files contain 55,397 vericoding experiments. Main results are not LLM-scored.
- Rounds and compilers: Generally 5, BigNum 10. Appendix 1.8: Dafny 4.11.0, Lean and mathlib v4.23.0-rc2, Verus and vstd v2025.08.25.
- Pure verification setup: Original DafnyBench 782 problems and original prompts, n=10 per problem; max token increased from 4096 to 8196, timeout 120 seconds; on hitting the limit, the current attempt retries n=3 (Appendix 1.6).
- Problem count differences: Table 2 says experiments use quality-checked Y, but Table 3 differs from some Y, e.g., Dafny NumpyTriple is 430 vs. 603. The paper does not explain. Below, experimental numbers follow Table 3.
Main results
Swipe horizontally to read the table
Model Dafny (2161) Verus (2166) Lean (2361) gpt-5 66.1% 30.9% 17.9% claude-opus-4.1 67.5% 24.6% 10.7% claude-sonnet-4 64.6% 19.9% 11.9% gemini-2.5-pro 55.0% 24.1% 10.9% gpt-5-mini 66.9% 16.5% 5.7% grok-code 53.0% 15.5% 4.2% deepseek-chat-v3.1 36.2% 6.1% 0.0% model union 82.2% 44.3% 26.8% From Table 3 Totals. Omitted glm-4.5 (42.0%, 16.6%, 1.6%) and gemini-2.5-flash (38.2%, 9.8%, 0.7%). deepseek-chat-v3.1 is the lowest single model in the table on all three language Totals. The Lean column excludes FVAPPS.
- Ranking: The authors state Dafny is highest, Verus next, Lean lowest. Among single models, claude-opus-4.1 leads on Dafny Totals, gpt-5 leads on Verus and Lean.
- Verus: The authors think the lower performance may be due to needing to distinguish ghost types from Rust native types, handling machine-level obligations like overflow, translations often lacking a systematic mapping between the two type systems, and Verus being newer with less corpus.
- Lean: The authors think the lower performance may be mainly because LLMs are more trained on mathematical theorem proving than code verification; the scaffolding only tells the LLM the proof state 5 times per example. The abstract writes the three languages as 27%, 44%, 82%; Table 3 union is 26.8%, 44.3%, 82.2%.
Pure verification and FVAPPS
- Verification only: Uses Loughridge et al. (2025)'s 782 problems and original prompts, without generating implementations from holes. In Table 3(B), claude-opus-4.1 is 89.2% (782), model union is 96.8%; gpt-5 is 72.0% (768), gemini-2.5-pro is 75.3% (437). That row does not report gpt-5-mini and gemini-2.5-flash.
- Author interpretation: The text writes that June 2024 Opus-3's 68% is now Opus-4.1's 89%, union 96%; the abstract writes from 68% to 96%; Table 3(B) union is 96.8%. Appendix 1.6 states that retries after token limits can explain gpt-5's lower score and the union's higher score.
- FVAPPS: Table 3(A) is 4006 Lean entries. The authors list it separately because specifications are weaker and more prone to trivial solutions, and unit tests were not used. gpt-5 is 38.0%, gemini-2.5-pro is 12.7%, model union is 41.8%.
Natural language and Hoare triples
- Verina: Table 3(C) title is 157 tasks, adding informal descriptions to prompts. Dafny union 87.3% vs. +vibe 86.6%; Verus union 46.8% vs. 37.8%. The authors write "no statistically significant performance improvement" and state that on average it looks slightly worse, so they did not extend to all benchmarks. The paper does not give the test name or p-value.
- Not every cell decreases: Dafny's gemini-2.5-pro goes from 66.8% to 68.8%; Verus's gemini-2.5-flash from 12.8% to 18.5%, grok-code from 17.9% to 18.5% (Table 3 C).
- Numpy-Triple: Lean model union is 7.6% (603 tasks). The authors state this is below the language average of 26.8%, and think it may be because mvcgen is newer; they expect success rates to improve in the next two years, once new models have seen the feature and Lean's SMT tactics are more proficient.
Difficulty, inspection, and other results
- Three parameters: spec character count, solution character count, spec ratio (code length divided by spec length). Figure 4 is split by language and colored by data source; text conversion cannot see curve values. The authors exclude cases where no implementation is produced.
- Author interpretation: The authors state that LLMs generate implementations relatively smoothly; the harder part is adding invariants or assertions for ATPs, or choosing tactics for ITPs. Spec length is the weakest predictor; the authors give examples where simple problems can have long solutions, like Fermat's Last Theorem, and longer specs often contain helpers that do not need vericoding. Solution length trends are clearer: longer implementations are more likely to be incorrect. Spec ratio is between the two, closer to solution length.
- Manual inspection: Randomly 5 successful outputs per language and per data source; the paper does not give the total count. Conditional on success, the authors state that about 9% of specifications are too weak, and another 15% are poorly translated; these are still legitimate tasks, just different from the original intent. Dafny showed no issues except redundant lemmas; Verus has many specifications weakened by translation; Lean sometimes adds redundant lemmas. Further cheating beyond validation, the authors state, was not found. Appendix 1.5.2 uses LC0033 to illustrate that under incomplete specifications, a model can produce an implementation that passes the checker but differs from the test expectations in comments.
Other ablations and analyses
- BigNum (62 problems) model union: Dafny 48.4%, Verus 4.8%, Lean 12.9%; several single models are 0.0% (Table 3).
- Dafny per-source union: HumanEval 93.2% (162), VerifiedCogen 95.9% (172), BigNum 48.4% (Table 3).
- Lean per-source union: NumPy Simple 52.5% (59), CLEVER/HumanEval 8.1% (161), NumPy Triple 7.6% (603) (Table 3).
- Appendix Table 5: BigNum near-duplicate rates are Dafny 98.4%, Verus 96.8%, Lean 96.8%; the authors state that Dafny's high duplication is intentional task splitting. Lean BigNum quality score is 18.3, Sorry Defs is 49.
- Pure verification sample sizes are incomplete: glm-4.5 is 278, deepseek-chat-v3.1 is 621, gemini-2.5-pro is 437 (Table 3 B).
- Appendix 1.8: Translating VerifiedCogen's 172 problems from Verus to Lean used 1.1M tokens, with a translation success rate of 99.4%; subsequent vericoding attempts used 2.6M tokens.
What are some points that can be further explored?
The authors plan to extend to more complex benchmarks and try tree search, reinforcement learning, and multi-model collaboration.
Limitations and future directions noted by the authors
- Task scale: The authors write that tasks in the dataset can usually be solved within 100 lines of code; extending formal specifications to more complex benchmarks like SWE-bench or BashBench is a future challenge (Section 5).
- Search and training: The authors write that current results do not involve extensive prompt optimization, and believe tree search and reinforcement learning (e.g., Seed-Prover) still have room for improvement (Section 5).
- Multi-model: The authors write that future work could explore collaborative LLM networks, where each model uses its strengths to handle verification problems (Section 5).
- Natural language descriptions: The authors plan to study the role of informal descriptions more thoroughly; after seeing no statistically significant performance improvement this time, they did not extend that experiment to all benchmarks (Section 4.1).
Experimental coverage
- Main experiment: Languages are Dafny, Verus, Lean; models are the nine off-the-shelf LLMs in Table 3. Generally 5 attempts per problem, BigNum has 10 (Section 4, Appendix 1.3). Table 3 problem counts are Dafny 2161, Verus 2166, Lean 2361, plus Lean FVAPPS 4006.
- Sources: APPS (Test), DafnyBench, NumpyTriple, VerifiedCogen, Verina, Bignum, NumpySimple, HumanEval, CLEVER, FVAPPS (Table 2, Table 3). Appendix 1.1 writes that NumPy specifications were manually checked, and that re-checking is still needed because some specifications slipped through the check.
- Pure verification: Uses Loughridge et al. (2025)'s 782 problems and original prompts, with n=10 per problem. Some models did not complete all 782; sample sizes in parentheses are in Table 3(B); that row does not report gpt-5-mini and gemini-2.5-flash (Appendix 1.6).
- Additional protocols: The natural language description comparison only compares Dafny and Verus on the 157 tasks indicated in the Table 3(C) title. The FVAPPS experiment did not use the unit tests accompanying the problems (Section 4.1). Success sample inspection randomly selected 5 successful outputs per language and per data source (Section 4).
- Unreported review details: The paper does not report the model name for the "LLM as a judge" in the translation phase; manual inspection only mentions "random sample" and "a handful," without sample sizes (Section 3.3). The natural language experiment reports "no statistically significant" without giving the test name or p-value (Section 4.1).
Summarize the main content of the paper
The authors present vericoding benchmarks for Dafny, Verus, and Lean, with union success rates of 82.2%, 44.3%, and 26.8%, respectively.
The authors define vericoding as: generating implementations and proofs from formal specifications, and accepting them via proof checkers; this is contrasted with vibe coding, which may contain bugs. The code generation stage does not treat natural language descriptions as a required input.
- Problem: Formal verification can provide machine-checkable proofs that code satisfies human specifications, but the authors state that human cost limits it to covering only a small fraction of software. The authors want a large benchmark across Dafny, Verus/Rust, and Lean to test off-the-shelf LLMs.
- Benchmark: The abstract states 12,504 specifications, with Dafny 3,029, Verus/Rust 2,334, and Lean 7,141, of which 6,174 are marked as new unseen problems. Tasks come from existing verification benchmarks, vibe coding data, and Numpy and BigNum documentation, processed via hole-filling, automatic formalization, or cross-language translation, with compilation and quality checks. The authors state in the conclusion that this is the largest vericoding benchmark to date.
- Pipeline: Off-the-shelf LLMs fill holes within 5 attempts (10 for BigNum). Success requires both code block validation and passing dafny, verus, or lean, and checks for several bypass patterns of the proof checker.
- Main results: The model union in Table 3 is Dafny 82.2% (2161), Verus 44.3% (2166), Lean 26.8% (2361, excluding FVAPPS). The abstract writes these as 82%, 44%, 27%. The highest single-model Dafny Totals is claude-opus-4.1 at 67.5%, and the highest for Verus and Lean is gpt-5 at 30.9% and 17.9%.
- Other results: FVAPPS (4006, Lean) union 41.8%. DafnyBench pure verification union 96.8%, compared by the authors to 68% in June 2024. When adding natural language descriptions, the authors write there is no statistical performance improvement and state it is on average slightly worse. Numpy-Triple Lean union is 7.6%.
- Authors' conclusions: The authors view vericoding as a strict alternative to vibe coding and believe that the pace of pure Dafny verification from 68% to 96% over the past year means vericoding success rates may rise further in the near term. The authors also state that longer implementations are more likely to be incorrect, and spec length has the weakest predictive power.