AI
New benchmark reveals AI's struggle with verified code generation
A large competitive-programming dataset tests whether language models can produce not just working code, but formal proofs that guarantee correctness—and finds they largely cannot.
Researchers have created VeriContest, a new benchmark to measure how well AI models can generate code that includes formal specifications and machine-verifiable proofs of correctness—not just code that runs and passes tests.
The benchmark#
The dataset contains 1,006 problems drawn from competitive programming platforms (LeetCode and Codeforces). Each problem is bundled with a natural-language description, expert-written formal specifications, correct Rust implementations, Verus-verified proofs, and both positive and negative test cases. The benchmark was built through a three-phase pipeline that combined manual validation of seed problems with semi-automated expansion and human review, then strengthened through testing to ensure specifications are complete.
The gap between code and proofs#
When researchers evaluated ten state-of-the-art language models, they found a stark disparity between ordinary code generation and verifiable code generation. The top performer achieved 97.51% accuracy on translating natural language into working code—a standard coding task. But performance collapsed on the verification components: 57.16% on specification generation, 13.82% on proof generation, and just 6.76% on end-to-end synthesis of fully verified programs.
Why it matters#
This work identifies specification and proof generation as the primary bottlenecks limiting current AI models' ability to produce code with machine-checkable correctness guarantees. The benchmark establishes a rigorous evaluation framework for tracking progress as future systems attempt to close the gap between practical code generation and formally verified software—a critical requirement for high-assurance applications.

