atlas

Research map / Large language models / Agents, code and math

CLEVER: A Curated Benchmark for Formally Verified Code Generation

NeurIPS 2025 · Large language models › Agents, code and math · approach: Execution-based code verification · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces CLEVER, a manually curated 161-problem Lean 4 benchmark (from HumanEval) for end-to-end verified code generation requiring spec equivalence proofs and implementation correctness proofs, and shows few-shot and agentic LLM approaches solve at most one problem end-to-end.

Problem

Existing formally verified code generation benchmarks use specifications that are computable, leak implementation logic, rely on test cases, or are auto-generated, allowing trivial or cheating solutions; no benchmark requires complete, human-quality formal specs with machine-checked correctness.

Approach

Hand-written non-computable Lean specifications (Prop-valued) for 161 HumanEval tasks, with a staged pipeline requiring the model to generate a spec, prove isomorphism to the hidden ground-truth spec, generate an implementation, and prove it satisfies the ground-truth spec, all checked by Lean's kernel.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use COPRA instead of few-shot generation for proof stepsGPT-4o · CLEVERimplementation certification pass@600-sec: 1.863% -> 3.727%Helped
Use COPRA instead of few-shot generation for proof stepsClaude-3.7 · CLEVERimplementation certification pass@600-sec: 1.863% -> 8.696%Helped
Use COPRA instead of few-shot generation for proof stepsGPT-4o · CLEVERend-to-end pass@600-sec: 0% -> 0.621%No clear effect
Use COPRA instead of few-shot generation for proof stepsClaude-3.7 · CLEVERend-to-end pass@600-sec: 0.621% -> 0.621%No clear effect
Use KiminaProver-7b for proof stepsGPT-5-mini · CLEVERspecification compilation pass@600-sec: 90.062%Helped
Use KiminaProver-7b for proof stepsGPT-5-mini · CLEVERspecification certification pass@600-sec: 0%Hurt

Surprising findings

Limitations

Experimental setup

Datasets: HumanEval

Benchmarks: CLEVER

Metrics: pass@k-seconds compile@k prove@k end-to-end success rate

Baselines: GPT-4o few-shot o4-mini few-shot Claude-3.7 few-shot DeepSeek-R1 few-shot COPRA with GPT-4o COPRA with Claude-3.7 GPT-5-mini with Kimina prover FVAPPS

Builds on: COPRA HumanEval Kimina-Prover

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy