← Latest papers
🤖 AI

Goedel-Code-Prover: Hierarchical Proof Search for Open State-of-the-Art Code Verification

The paper introduces Goedel-Code-Prover, a hierarchical proof search framework for Lean 4 that utilizes a unified 8B-parameter model trained with hybrid reinforcement learning and a principled decomposition score to achieve a 62.0% success rate on code verification benchmarks, significantly outperforming larger baselines through efficient, scalable proof planning.

Original authors: Zenan Li (Mike), Ziran Yang (Mike), Deyuan (Mike), He, Haoyu Zhao, Andrew Zhao, Shange Tang, Kaiyu Yang, Aarti Gupta, Zhendong Su, Chi Jin

Published 2026-03-23
📖 5 min read🧠 Deep dive

Original authors: Zenan Li (Mike), Ziran Yang (Mike), Deyuan (Mike), He, Haoyu Zhao, Andrew Zhao, Shange Tang, Kaiyu Yang, Aarti Gupta, Zhendong Su, Chi Jin

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to teach a very smart, but slightly chaotic, robot how to write a perfect, bug-free computer program. You tell the robot, "Make a function that finds the one unique number in a list where everything else appears twice."

The robot tries to write the code. It looks good! But how do you know it's mathematically perfect? You can't just run it a million times; there might be a weird edge case you missed. You need a mathematical proof that the code must work, no matter what.

This is where Goedel-Code-Prover comes in. It's a new AI system designed to write these mathematical proofs for computer code. But here's the catch: writing these proofs is incredibly hard, even for AI.

Here is the story of how this paper solves that problem, explained simply.

The Problem: The "Black Box" vs. The "Blueprint"

In the past, AI models trying to prove code worked like a blindfolded archer. They would shoot an arrow (generate a proof) and hope it hit the bullseye.

  • The Issue: If they missed, they didn't know why. Was the arrow too heavy? Did they aim wrong? Did the wind blow?
  • The Math vs. Code Gap: AI is great at math proofs because it has read millions of math textbooks. It knows the "vocabulary" of math. But code is different. Every new program is like a new alien language with its own rules. The AI doesn't have a library of "how to prove this specific function" because no one has written those proofs by hand before.

The Solution: The "Master Architect" and the "Construction Crew"

The authors realized that trying to prove a whole complex program in one giant leap is impossible. Instead, they built a Hierarchical Proof Search. Think of it like building a skyscraper.

You don't just tell a construction crew, "Build a skyscraper." You break it down:

  1. Lay the foundation.
  2. Build the first floor.
  3. Build the second floor.

Goedel-Code-Prover does exactly this, but with logic. It uses a two-stage process:

Stage 1: The Master Architect (Decomposition)

Before trying to prove anything, the AI acts as an Architect. It looks at the giant, scary problem and says, "Okay, to prove this whole thing, we actually just need to prove three smaller, easier things."

  • The Magic Score: How does the AI know which smaller things are good? It uses a special "Scorecard."
    • Is it true? (Does the small thing actually help prove the big thing?)
    • Is it simpler? (Is this small thing actually easier to solve than the big thing?)
  • If the AI picks a bad sub-problem (one that is just as hard as the original), the Scorecard gives it a low grade, and the AI tries again.

Stage 2: The Construction Crew (Completion)

Once the Architect has broken the big problem into tiny, manageable bricks, the "Construction Crew" (the same AI, but now acting as a worker) tries to prove each brick.

  • It tries to prove the first small brick. If it fails, the computer gives it a specific error message: "You tried to use a hammer on a screw."
  • The AI reads the error, fixes its approach, and tries again.

The Secret Sauce: "Training with a Scorecard"

The biggest breakthrough in this paper is how they taught the AI.

Usually, you train AI by saying "Right" or "Wrong" at the very end. But in proof search, you might be 90% of the way there, and then fail. The AI gets no credit for the 90%.

The authors invented a Continuous Scorecard.

  • Imagine you are playing a video game. Instead of only getting points when you beat the final boss, you get points for every time you find a better path or solve a mini-puzzle.
  • This scorecard tells the AI: "Hey, that sub-problem you picked was 50% easier than the original. Good job! Keep going in that direction."
  • This allows the AI to learn how to plan (decompose) just as well as how to execute (prove).

The Results: Small Brain, Big Wins

The team trained a model called Goedel-Code-Prover-8B.

  • The Size: It has 8 billion "neurons" (parameters).
  • The Comparison: They compared it to massive models with 671 billion neurons (like DeepSeek-Prover) and huge frontier models like GPT-5.
  • The Result: The tiny 8B model beat the giants. It solved 62% of the hardest code verification problems, while the biggest models only solved about 23%.

Why? Because the giant models were trying to jump straight to the finish line (the "blindfolded archer"). The small model was taught to break the problem down into steps (the "Architect").

The Takeaway

This paper shows that for complex tasks like verifying code, planning is more important than raw power.

By teaching an AI to act like a project manager (breaking big problems into small, solvable pieces) rather than just a worker (trying to do everything at once), we can build smaller, cheaper, and much smarter systems that can prove code is safe and correct. It's the difference between trying to eat a whole elephant in one bite versus cutting it into delicious, manageable steaks.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →