[Paper Review] AlgoVeri: An Aligned Benchmark for Verified Code Generation on Classical Algorithms
AlgoVeri introduces a multi-language vericoding benchmark aligned across Dafny, Verus, and Lean for 77 classical algorithms, exposing cross-language gaps and differing repair dynamics in state-of-the-art models.
Vericoding refers to the generation of formally verified code from rigorous specifications. Recent AI models show promise in vericoding, but a unified methodology for cross-paradigm evaluation is lacking. Existing benchmarks test only individual languages/tools (e.g., Dafny, Verus, and Lean) and each covers very different tasks, so the performance numbers are not directly comparable. We address this gap with AlgoVeri, a benchmark that evaluates vericoding of $77$ classical algorithms in Dafny, Verus, and Lean. By enforcing identical functional contracts, AlgoVeri reveals critical capability gaps in verification systems. While frontier models achieve tractable success in Dafny ($40.3$% for Gemini-3 Flash), where high-level abstractions and SMT automation simplify the workflow, performance collapses under the systems-level memory constraints of Verus ($24.7$%) and the explicit proof construction required by Lean (7.8%). Beyond aggregate metrics, we uncover a sharp divergence in test-time compute dynamics: Gemini-3 effectively utilizes iterative repair to boost performance (e.g., tripling pass rates in Dafny), whereas GPT-OSS saturates early. Finally, our error analysis shows that language design affects the refinement trajectory: while Dafny allows models to focus on logical correctness, Verus and Lean trap models in persistent syntactic and semantic barriers. All data and evaluation code can be found at https://github.com/haoyuzhao123/algoveri.
Motivation & Objective
- Promote fair, cross-language evaluation of vericoding for classical algorithms with global invariants.
- Align specifications semantically across SMT-based and interactive theorem proving verification systems.
- Quantify model performance and identify tool-chain bottlenecks across Dafny, Verus, and Lean.
- Analyze test-time compute dynamics and error modes in frontier vs open models.
Proposed method
- Create a corpus of 77 textbook-style algorithm problems with aligned specifications across Dafny, Verus, and Lean.
- Evaluate target LLMs through multi-turn refinement using compiler/verifier feedback until verification succeeds.
- Use a semantic validator to filter solutions beyond compiler verification to ensure algorithmic fidelity.
- Compare frontier models and open-weight models across languages to identify performance gaps by algorithm class.
- Perform iso-compute analyses to compare depth-based repair versus width-based parallel sampling.
Experimental results
Research questions
- RQ1Can LLMs generate code and proofs that are accepted by SMT-based and ITP verification systems when tasked with globally invariant algorithms?
- RQ2How do performance and failure modes differ across Dafny, Verus, and Lean under aligned specifications?
- RQ3What are the relative contributions of model capability vs. verifier system in achieving vericoding success?
- RQ4Do iterative repair strategies yield meaningful improvements for open models, and how does this compare to frontier models?
Key findings
- Frontier models achieve higher verification rates in Dafny (up to 40.3% compiler-verified with semantic filtering) than in Verus (24.7%) and Lean (7.8%).
- AlgoVeri reveals large performance gaps across languages and algorithm classes, with graph algorithms and global invariants notably challenging, especially under Verus and Lean.
- Frontier models show ongoing improvement through iterative repair in Dafny and Verus, tripling pass rates in some cases, while open models saturate earlier (e.g., GPT-OSS-120B).
- An iso-compute analysis indicates repairing depth yields less benefit than parallel sampling for open models, suggesting limited efficacy of deep repair for current architectures.
- Language design shapes refinement trajectories: Dafny supports logic-focused improvements, Verus/Lean impose syntactic/semantic barriers and search complexity that hinder progress.
- table_headers:[],
- table_rows:[]} }] }{
- table_headers
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.