[Paper Review] Goedel-Code-Prover: Hierarchical Proof Search for Open State-of-the-Art Code Verification
The paper presents Gödel-Code-Prover, a hierarchical proof search framework in Lean 4 that decomposes verification goals into subgoals with a principled scoring mechanism and hybrid reinforcement learning, achieving strong prove rates on Lean benchmarks. It reports a 62.0% overall success on 427 tasks, with up to 2.6x improvement over baselines.
Large language models (LLMs) can generate plausible code but offer limited guarantees of correctness. Formally verifying that implementations satisfy specifications requires constructing machine-checkable proofs, a task that remains beyond current automation. We propose a hierarchical proof search framework for automated code verification in Lean~4 that decomposes complex verification goals into structurally simpler subgoals before attempting tactic-level proving. Central to our approach is a principled decomposition score that combines constructive justification with structural effectiveness. Crucially, this score serves as both the training reward and the inference-time ranking criterion, ensuring strict alignment between optimization and deployment. We train Goedel-Code-Prover-8B, a single unified policy for both decomposition and completion, via supervised initialization followed by hybrid reinforcement learning, where a continuous decomposition reward drives planning exploration while supervised replay stabilizes proof generation. On three Lean-based code verification benchmarks comprising 427 tasks, our 8B-parameter model achieves a 62.0\% prove success rate, a 2.6$ imes$ improvement over the strongest baseline, surpassing neural provers up to 84$ imes$ larger. We further observe consistent inference-time scaling: success rates improve monotonically with search iterations and sampling budget, with our trained model achieving greater efficiency than frontier off-the-shelf models of comparable scale.
Motivation & Objective
- Motivate the need for formal verification of code to provide correctness guarantees beyond testing and LLM plausibility.
- Propose a hierarchical decomposition–then–prove framework in Lean 4 to automate code verification.
- Introduce a principled decomposition score used for both training and inference to align optimization and deployment.
- Train a unified 8B-parameter policy that handles both decomposition and completion via supervised initialization and hybrid RL.
- Empirically validate on three Lean benchmarks showing substantial improvements over frontier models and neural provers.
Proposed method
- Formulate automated Lean 4 code verification as a Hoare-style task and model proof search as a planning (decomposition) followed by proving (tactic generation) loop.
- Define a decomposition score combining constructive justification (proof reconstruction and quickcheck) and structural effectiveness (operator footprint based on AST).
- Use a two-stage training pipeline: supervised fine-tuning on scaffolded decomposition/completion trajectories, followed by hybrid reinforcement learning balancing dense decomposition rewards with sparse completion signals.
- Adopt a unified policy Gödel-Code-Prover-8B for both decomposition and completion with a shared objective; apply GRPO for decomposition and supervised replay for completion.
- Inference proceeds with iterative decomposition selecting highest-footprint goals, then leaf-proof completion, with potential parallel runs for pass@k.

Experimental results
Research questions
- RQ1How well can a learned hierarchical proof search framework verify Lean 4 code compared with frontier models and neural provers?
- RQ2How does the decomposition score influence training and deployment performance and proof success?
- RQ3What is the effect of joint decomposition and completion training versus ablated setups?
- RQ4How does proving performance scale with inference budget and iterations in practice?
Key findings
- The framework achieves 68.8%, 54.0%, and 62.3% prove success on Verina, Clever, and AlgoVeri, respectively, with an overall 62.0% on 427 tasks.
- It outperforms the strongest baseline by 2.6x and surpasses neural provers up to 84x larger.
- Quickcheck filters discard invalid subgoals, contributing to robust decomposition validity.
- Proofs typically involve 8–17 decomposed lemmas and over 130 lines of proof code on average, with some exceeding 680 lines.
- Inference shows monotonic improvement with more search iterations and budget, indicating scalable potential.
- Across benchmarks, the approach demonstrates substantial gains over frontier reasoning models and neural provers.

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.