TL;DR
Researchers have created MMA, the largest dataset of its kind, containing 332,000 pairs of informal mathematical statements and their formal counterparts in languages like Isabelle and Lean4. By training on this multi-language data, they discovered a "cross-pollination" effect: models trained on multiple formal languages simultaneously perform significantly better at autoformalization than those trained on a single language.
What Problem Does This Paper Address?
"Autoformalization" is the holy grail of formal verification—it is the task of taking a mathematical statement written in plain English (natural language) and translating it into a machine-verifiable language (formal language) that a computer can check for correctness.
The bottleneck isn't a lack of formal code; we have massive libraries like the Archive of Formal Proofs. The problem is a lack of parallel data. To train a translation model, you need pairs of "English Statement A" and "Formal Code A." Manually creating these pairs requires a rare "double expert" proficient in both high-level mathematics and specific, complex programming languages like Lean or Isabelle. Consequently, previous datasets were either tiny or limited to narrow domains like high school algebra.
Methods
The authors employ a clever "reverse-engineering" approach called informalisation.
- The Reverse Flip: Instead of trying to formalize English, they used GPT-4 to "informalize" existing formal libraries. Because formal languages are precise and rigid, it is much easier for a Large Language Model (LLM) to describe what a piece of code does in English than it is to write the code from an English description.
- Dataset Construction: They processed the two largest formal corpora—the Archive of Formal Proofs (Isabelle) and mathlib4 (Lean4)—to create the MMA (Multi-language Mathematical Autoformalization) dataset.
- Fine-tuning: They took open-weights models (LLaMA-33B and Mistral-7B) and fine-tuned them on MMA to perform the actual autoformalization task (Natural Language $\rightarrow$ Formal).
- Multi-language Training: Crucially, they compared models trained on just one formal language versus models trained on a mixture of languages to see if diversity improved performance.
Datasets
- MMA (New): 332,000 informal-formal pairs. This includes 244K Isabelle pairs and 88K Lean4 pairs. It is roughly 4x larger than previous single-language datasets.
- Evaluation Benchmarks: The models were tested on miniF2F (high school competition math) and ProofNet (undergraduate-level math) to see how well they generalize to unseen problems.
Key Insights and Ideas
Informalisation is the Path of Least Resistance
The authors argue (and prove) that using a powerful model like GPT-4 to generate "noisy" natural language from formal code is a highly effective way to bootstrap training data for the much harder task of formalization.
The Power of Polyglots
The most striking finding is that multi-language training is a "free lunch." A model trained on both Isabelle and Lean4 outperforms a model trained on only one of them, even when tested on that specific language. This suggests that the model is learning underlying mathematical "concepts" that transcend specific syntax.
Data Efficiency
Jointly trained models were more data-efficient. Even though a joint model sees fewer examples of a specific language (because the training budget is shared), it reaches higher accuracy than a specialized model. For Isabelle tasks, the model trained on both Isabelle and Lean4 achieved a lower validation loss and higher token accuracy than the model trained on Isabelle alone.
Syntactic vs. Semantic Correctness
The paper highlights that "compiling" isn't enough. A statement might be syntactically correct code but fail to capture the actual meaning of the English prompt. This necessitated a more nuanced human evaluation.
Key Results
From Zero to Hero
Base models (not fine-tuned) scored 0% on autoformalization benchmarks. After fine-tuning on MMA, Mistral-7B produced statements that were "acceptable with minimal corrections" 29–31% of the time.
Human-in-the-Loop Utility
The researchers used a 0–4 "effort scale" to rate how much work a human expert would need to do to fix the AI's output (where 4 means rewriting from scratch and 0 means no corrections needed). They found that fine-tuned models significantly reduced the "correction effort," making them viable assistants for formal mathematicians.
Limitations and Future Work
- Noisy Data: GPT-4 isn't perfect. The authors found a 74% correctness rate in the generated informal statements. Some "hallucinations" or misunderstandings of complex mathematical concepts (like p-adic valuations) still exist in the training set.
- Evaluation Bottleneck: Because automated metrics (like BLEU score) are poor indicators of mathematical correctness, the authors had to rely on manual inspection by experts, which is difficult to scale.
- Proprietary Dependency: The initial dataset creation relied on GPT-4. The authors hope that as open-source models improve, they can use an iterative "back-translation" loop (where the model improves its own training data) without needing proprietary APIs.
- Expanding the Tower of Babel: Future work involves adding more formal languages like Coq or HOL Light to further test the benefits of multi-language diversity.
Summary updated