Beyond Compilation: Evaluating Faithful Natural-Language-to-Lean Statement Formalization
This paper argues that relying solely on Lean compilation rates to evaluate natural-language-to-Lean formalization is misleading due to a significant gap between syntactic validity and semantic faithfulness, proposing a rigorous human-calibrated consensus metric and identifying elaboration feedback as the most critical intervention for improving formal statement accuracy.
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 Picture: Translating Math, Not Just Checking It
Imagine you have a library of complex math problems written in plain English (like a textbook). You want to translate these problems into a strict, computer-readable language called Lean.
In the past, researchers mostly focused on the second step: giving the computer a perfect translation and asking, "Can you prove this is true?"
This paper focuses on the first step: "Can you translate the English sentence into Lean correctly in the first place?"
The authors argue that just because a translation "works" (the computer accepts it without errors) doesn't mean it actually says the same thing as the original English sentence. It's like a translator who writes a sentence that is grammatically perfect but accidentally changes the meaning entirely.
The Core Problem: "Compiling" vs. "Being Faithful"
The paper introduces a crucial distinction between two things:
- Compilation (The Grammar Check): The computer checks if the Lean code follows the rules of syntax. If it does, the code "compiles."
- Analogy: Imagine a student writing an essay. The teacher checks if they used correct spelling and punctuation. If they did, the essay "passes."
- Faithfulness (The Meaning Check): Does the code actually say what the original math problem meant?
- Analogy: The student might have perfect spelling, but they wrote about "cats" when the prompt asked about "dogs." The essay passed the grammar check, but it failed the meaning check.
The Big Discovery:
The authors found a massive gap between these two.
- Their best AI system could get 89.5% of the translations to "compile" (pass the grammar check).
- However, only 60.5% of those translations were actually "faithful" (they meant the same thing).
- The Gap: About 29% of the time, the AI produced code that looked perfect to the computer but was actually wrong in meaning. It might have forgotten a condition, changed a number, or made the statement too easy (or too hard).
How They Measured This
Since computers can't always tell if a translation is "meaningful," the authors created a new testing protocol:
- The Benchmark: They gathered 400 difficult math problems from graduate-level textbooks (Real Analysis, Complex Analysis, Topology, and Algebra).
- The "Judge" Panel: Instead of just one computer, they used two different advanced AI models to act as judges. They asked these judges: "Does this Lean code mean the same thing as the English sentence?"
- The Consensus Rule: For a translation to count as "Faithful," both AI judges had to agree it was good.
- Human Audits: To make sure the AI judges weren't crazy, human math experts randomly checked the results. They confirmed that when the AI judges said "No, this is wrong," they were usually right.
The Toolkit: How to Fix the Translations
The authors tested a "tool-augmented agent" (a smart AI assistant) that could use three specific tools to fix its mistakes. They treated this like a science experiment, turning the tools on and off to see which one helped the most.
Think of the AI as a student trying to write a math translation. The tools are:
- Expert Drafting (T): The AI asks a specialized "translator bot" for a first draft.
- Analogy: Asking a professional translator for a rough draft before you edit it.
- Search (S): The AI looks up definitions and symbols in the math library (Mathlib) or on the web.
- Analogy: Looking up a word in the dictionary to make sure you are using the right term.
- Feedback (F): The AI tries to compile the code. If it fails, the computer gives an error message, and the AI tries to fix it.
- Analogy: The teacher grading the essay and saying, "You missed a comma here," or "This sentence doesn't make sense."
The Results of the Toolkit:
- Feedback (F) is the MVP: This was the most powerful tool. It fixed the most "grammar errors" (compilation issues). However, it also revealed a problem: by fixing the grammar so aggressively, it sometimes created code that was grammatically perfect but still had the wrong meaning.
- Search (S) helps with grounding: It helped the AI pick the right words, but it wasn't as powerful as Feedback.
- Expert Drafting (T) became less important: Once the AI had Feedback and Search, the "rough draft" from the expert bot didn't add much value. The AI could do just as well on its own if it had the other tools.
The Main Takeaway
The paper concludes that we need to stop celebrating AI just because it can "compile" code.
- Old Way: "Look! The AI wrote code that the computer accepted!"
- New Way: "Look! The AI wrote code that the computer accepted AND actually means what we asked for."
The authors show that while AI is getting very good at the "grammar" of math code, it still struggles to keep the "meaning" intact. They provide a new way to measure this gap and show that using a combination of tools (especially feedback and search) is the best way to bridge it, but even then, a significant portion of translations still lose the original meaning.
In short: Just because the computer says "Good job" doesn't mean the AI actually understood the math. We need to check if the meaning was preserved, not just if the code runs.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.