Abstract
This paper introduces the largest benchmark to date for "vericoding"—the automated generation of computer programs accompanied by machine-checkable proofs of correctness. Spanning over 12,000 formal specifications across Dafny, Lean, and Verus (Rust), the study evaluates the capabilities of modern Large Language Models (LLMs) in formal verification. While LLMs achieve high success rates in automated environments like Dafny (up to 82.2%), they continue to struggle with the complex logical reasoning and interactive tactics required for languages like Lean.
Introduction
The current software development landscape is increasingly dominated by "vibe coding," where developers use natural language prompts to generate code. While efficient, this approach lacks the rigorous guarantees required for critical systems. Traditional testing can identify bugs but cannot prove their absence. Formal verification—writing mathematical proofs that a program adheres to its specification—remains the gold standard for reliability. However, this field has historically been labor-intensive and niche.
This research addresses the scarcity of large-scale data for training and testing AI on "vericoding": the simultaneous generation of implementation and formal proof from a mathematical specification. By scaling existing benchmarks by an order of magnitude, the authors provide a robust foundation for advancing AI-driven formal methods.
Methods
The researchers developed a comprehensive pipeline to transform existing code and natural language benchmarks into formal verification tasks. Central to this is SpecTranslator, an LLM-based tool utilizing a conversational repair loop to translate specifications between languages (e.g., Dafny to Lean) while ensuring syntactic validity through compiler feedback.
The Vericoder Pipeline evaluates LLMs by challenging them to complete "holes" in a formal specification with both implementation and proof. To maintain integrity, the authors implemented validation scripts to detect "cheating" patterns—such as the use of assume or sorry keywords—and a quality scoring framework to penalize "weak specs" that could be satisfied by trivial solutions.
Datasets
The resulting benchmark comprises 12,504 formal specifications, with 6,174 being entirely new or translated. These tasks are distributed across three primary verification-friendly languages: Dafny (3,029 tasks), Verus/Rust (2,334 tasks), and Lean (7,141 tasks).
The dataset draws from diverse sources, including formalized versions of classic benchmarks like HumanEval and APPS, as well as specialized verification sets like DafnyBench and CLEVER.
Key Insights and Results
The study reveals that "vibes" (natural language descriptions) do not significantly enhance LLM performance once mathematical requirements are clearly defined. Language maturity plays a critical role; LLMs performed best in Dafny (82.2% success), likely due to its reliance on SMT solvers for automated logic handling. In contrast, success rates were lower for Verus (44.3%) and Lean (26.8%), where models struggle with specific interactive "tactics."
Analysis of complexity predictors shows that while specification length is a poor indicator of difficulty, solution length is a strong predictor. Longer proofs are significantly more prone to errors that LLMs cannot self-correct. Notably, performance on simpler benchmarks like DafnyBench has improved from 68% to 96% in just one year, indicating rapid progress in basic verified function generation.
Limitations and Future Work
Despite the scale of the benchmark, challenges remain. Approximately 9% of specifications were identified as "weak," allowing for technically correct but trivial solutions. Furthermore, the current focus is on single-function tasks; real-world software involves complex multi-module interactions that represent a significant frontier for AI. The "Lean Gap" highlights the ongoing difficulty AI faces with Interactive Theorem Proving. Future research may explore multi-agent systems to route tasks to the most suitable models for specific verification challenges.
Summary updated