← Latest papers
🤖 AI

Certified Program Synthesis with a Multi-Modal Verifier

This paper introduces LeetProof, an agentic pipeline built on the multi-modal verifier Velvet that overcomes the limitations of single-paradigm approaches in certified program synthesis by integrating dynamic validation, automated reasoning, and interactive proof scripting to systematically detect specification defects and achieve significantly higher rates of fully certified solutions.

Original authors: Yueyang Feng, Dipesh Kafle, Vladimir Gladshtein, Vitaly Kurin, George Pîrlea, Qiyuan Zhao, Peter Müller, Ilya Sergey

Published 2026-04-21
📖 5 min read🧠 Deep dive

Original authors: Yueyang Feng, Dipesh Kafle, Vladimir Gladshtein, Vitaly Kurin, George Pîrlea, Qiyuan Zhao, Peter Müller, Ilya Sergey

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 a boss who wants to build a complex machine (a computer program) based on a vague idea you have in your head (a natural language description). You hire a brilliant but sometimes over-eager apprentice (an AI) to do the work.

The problem? The apprentice is great at building things, but they often misunderstand your instructions or build a machine that looks right but doesn't actually do what you want. In the world of computer science, this is called "Vericoding": trying to automatically generate a program, a precise rulebook for what it should do, and a mathematical proof that it works.

This paper introduces a new system called LeetProof to solve this mess. Here is how it works, explained through a simple story.

The Old Way: The "One-Tool" Trap

Previously, researchers tried to solve this using only one type of tool, like a Swiss Army knife that only had a screwdriver.

  • The "Auto-Active" Tools: These are like fast, automated inspectors. They check the rules quickly but can't handle complex, weird logic. If the rule is too hard, they give up.
  • The "Interactive" Tools: These are like slow, meticulous human judges. They can handle any logic, but they take forever and require a human to guide them step-by-step.

The old approach forced you to pick one tool for the whole job. If you picked the fast one, you missed complex bugs. If you picked the slow one, it was too expensive and slow.

The New Way: The "Multi-Modal" Workshop (LeetProof)

The authors built LeetProof, which is like a specialized workshop with three different stations, each using the best tool for the specific task at hand. They use a "Multi-Modal Verifier" (a tool called Velvet) that can switch between these modes seamlessly.

Here is the three-step assembly line:

Step 1: The "Rough Draft" Inspector (Testing)

Before the apprentice even starts building the machine, they write down the rulebook (the specification).

  • The Problem: The AI might write a rulebook that is too vague (letting bad machines pass) or too strict (rejecting good machines).
  • The LeetProof Fix: Instead of hiring a slow human judge to read the rulebook, LeetProof runs a thousands-of-times-per-second "stress test." It throws random, weird inputs at the rulebook to see if it breaks.
    • Analogy: Imagine a chef writing a recipe. Instead of a food critic tasting it, the kitchen runs 1,000 simulations of the recipe with slightly different ingredients to see if the dish explodes or tastes terrible. If the rulebook fails the stress test, the AI rewrites it immediately. This catches errors 97% of the time before any real code is written.

Step 2: The "Blueprint" Builder (Synthesis)

Once the rulebook passes the stress test, the AI starts building the actual code.

  • The Problem: Programs often have loops (repeating actions). To prove a loop works forever, you need a "loop invariant"—a rule that says, "No matter how many times we repeat this, this one thing stays true."
  • The LeetProof Fix: The AI guesses the rule for the loop. LeetProof then runs the stress test again on the code itself.
    • Analogy: The AI builds a bridge. LeetProof drives a thousand random trucks over it. If a truck falls through because the bridge's support beam (the invariant) was guessed wrong, the AI knows to fix the blueprint immediately.

Step 3: The "Final Exam" (Interactive Proof)

Now that the machine is built and has passed thousands of stress tests, it's time for the final, official certification.

  • The Problem: Stress tests can't prove 100% certainty. They can only say, "We haven't found a bug yet."
  • The LeetProof Fix: This is where the slow, meticulous human-style judge (the interactive prover) comes in. But here's the trick: because the AI already filtered out 99% of the easy errors in Steps 1 and 2, the judge only has to solve the few, hardest remaining puzzles.
    • Analogy: Instead of a judge checking every single brick of a house from scratch, they only check the few structural joints that survived the wind tunnel tests. It's much faster and cheaper.

Why This Matters

The paper tested this system on 50 difficult coding puzzles (from a site called LeetCode).

  • The Result: The old "one-tool" approach managed to fully certify about 17 out of 50 problems.
  • LeetProof: Managed to fully certify 28 out of 50 problems using the same amount of money and time.

Even more impressively, the system found that 10% of the "official" answer keys in existing research benchmarks were actually broken or wrong! By using the stress-test method, LeetProof caught these errors that humans and other tools missed.

The Big Takeaway

LeetProof proves that you don't need a super-intelligent AI to do everything perfectly. Instead, you need a smart workflow:

  1. Use fast, cheap tests to filter out the obvious mistakes early.
  2. Use automated tools to handle the boring logic.
  3. Save the expensive, slow, high-power tools only for the final, hardest problems.

It's the difference between trying to solve a maze by staring at the whole map at once (hard and slow) versus walking through the maze, hitting dead ends quickly, and only using a helicopter to check the final few tricky turns.

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 →