← Latest papers
🤖 machine learning

Compile to Compress: Boosting Formal Theorem Provers by Compiler Outputs

This paper introduces "Compile to Compress," a learning-to-refine framework that leverages the compact set of compiler-generated failure modes to enable efficient, verifier-guided tree search, achieving state-of-the-art performance on PutnamBench with significantly reduced test-time compute compared to existing large language model provers.

Original authors: Guchan Li, Rui Tian, Hongning Wang

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

Original authors: Guchan Li, Rui Tian, Hongning Wang

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

The Big Idea: Turning "Error Messages" into a Map

Imagine you are trying to solve a very difficult math puzzle, but you are doing it by writing code. Every time you write a line of code that doesn't quite work, the computer (the "compiler") yells at you with an error message.

The Problem:
Most AI math-provers today are like a student who gets a red "X" on their homework and just erases the whole page and starts over from scratch. They try millions of random guesses. If they get stuck, they keep trying the same thing over and over, or they try to remember every single mistake they made in the past to figure out what to do next. This takes a massive amount of time and computer power.

The Insight:
The authors of this paper noticed something cool about how computers check math code. Even though there are billions of ways to write a wrong proof, the computer usually only gives you a handful of specific types of error messages.

Think of it like a doctor's office. There are billions of ways a human body can feel sick, but the doctor usually categorizes the symptoms into a few main buckets: "It's a cold," "It's a broken bone," or "It's a stomach bug." The computer compiler does the same thing. It takes a chaotic mess of wrong code and compresses it into a simple, structured label like "Missing a step" or "Wrong number type."

The Solution: "Compile to Compress"

The paper introduces a new way for AI to learn, called "Learning-to-Refine." Instead of treating every mistake as a unique disaster, the AI learns to treat the computer's error message as a map.

Here is the analogy:

  1. The Old Way (Blind Guessing): Imagine you are lost in a giant, dark forest. You try walking in a straight line. If you hit a tree, you turn around and try a different straight line. You might walk for miles before finding the exit.
  2. The New Way (The Compass): The computer compiler acts like a compass. When you hit a tree, instead of just saying "Ouch, I hit a tree," it says, "You are 10 feet North of the path."
    • The AI learns that anyone who hits a "North Tree" needs to walk South.
    • It doesn't need to remember the exact tree it hit; it just needs to know the type of error.
    • This "compresses" the infinite forest into a simple set of directions.

How It Works in Practice

The researchers built a system that does three main things:

1. The "Fix-It" Training (Cold Start)
They taught the AI how to fix its own mistakes. They took a bunch of failed math proofs, looked at the error message, and used a super-smart AI (like a human tutor) to write a "thought process" explaining how to fix that specific type of error. They then taught the main AI to mimic this "fix-it" thinking.

2. The "Chain of Distributions" (The Journey)
Instead of trying to solve the whole puzzle in one giant leap, the AI takes small steps.

  • Step 1: Try to solve it.
  • Step 2: If it fails, read the error message.
  • Step 3: Use the error message to change just the part that is wrong.
  • Step 4: Repeat.

The paper calls this a "Chain of Distributions." Imagine you are trying to find a specific house in a city.

  • Direct Generation: You pick a random address and hope it's the right one.
  • Refinement: You start at the city center. If you are told "You are too far East," you walk West. If you are told "You are too far North," you walk South. You are constantly adjusting your path based on feedback, rather than guessing randomly.

3. The "Value Guide" (The Smart Navigator)
The system also learned to guess which path is most likely to lead to the solution. It's like having a GPS that says, "Turning left here has a 90% chance of getting us to the exit, but turning right is a dead end." This helps the AI stop wasting time on bad ideas and focus on the ones that look promising.

The Results: Why It Matters

The team tested this on famous math competitions (like the Putnam, which is the hardest math contest for college students).

  • Before: The AI needed to try millions of random guesses to solve a problem, or it needed a huge, expensive computer to hold all its memories.
  • After: With this new "error-compression" method, smaller, cheaper AI models solved more problems than the biggest, most expensive models in the past.

The Takeaway:
The paper proves that you don't need a super-computer to be a math genius. You just need to know how to listen to your mistakes. By treating computer error messages as a compressed, structured map rather than just noise, the AI can navigate the complex world of math proofs much faster and smarter.

In a nutshell: They taught the AI to stop panicking when it makes a mistake and start using the error message as a helpful signpost to guide it to the correct answer.

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 →