Abstract
Formal mathematical reasoning remains a critical challenge for artificial intelligence, hindered by limitations of existing benchmarks in scope and scale. To address this, we present FormalMATH, a large-scale Lean4 benchmark comprising 5,560 formally verified problems spanning from high-school Olympiad challenges to undergraduate-level theorems across diverse domains. To mitigate the inefficiency of manual formalization, we introduce a novel human-in-the-loop autoformalization pipeline that integrates specialized LLMs for statement autoformalization, multi-LLM semantic verification, and negation-based disproof filtering. This approach reduces expert annotation costs by ensuring that 72.09% of the statements reaching the final manual verification stage are valid. Our evaluation of state-of-the-art LLM-based theorem provers reveals significant limitations: even the strongest models achieve only a 16.46% success rate, exhibiting pronounced domain bias and over-reliance on simplified automation tactics. Notably, we identify a counterintuitive inverse relationship between natural-language solution guidance and proof success, suggesting that human-written informal reasoning introduces noise in formal settings.
Introduction
While Large Language Models (LLMs) have demonstrated significant proficiency in solving natural language mathematics, Formal Mathematical Reasoning (FMR) remains a formidable frontier. In FMR, models must generate code in formal languages like Lean4 that are strictly verified by axiomatic compilers. Unlike informal math, where partial credit or "stumbling" into a correct answer is possible, formal proofs are binary: a single character error results in failure.
Existing benchmarks like MiniF2F or ProofNet face three primary limitations:
- Narrow Scope: Often restricted to high school algebra.
- Small Scale: Limited datasets (under 300 problems) hinder robust statistical evaluation.
- Saturation: Top models are already achieving over 80% accuracy, necessitating more challenging benchmarks.
The primary bottleneck in scaling these benchmarks is "autoformalization"—the translation of natural language problems into formal code—which typically requires intensive manual effort from domain experts.
Methods: A Human-in-the-Loop Pipeline
To overcome the scaling bottleneck, the researchers developed a novel human-in-the-loop autoformalization pipeline designed to maximize dataset size without compromising quality.
The pipeline consists of four distinct stages:
- Ensemble Autoformalization: Multiple specialized LLMs generate candidate Lean4 translations of natural language problems.
- Semantic Verification: A panel of advanced LLMs (e.g., o1-mini, Claude 3.5 Sonnet) "back-translates" the code into English to verify alignment with the original problem.
- Negation-Based Disproof: To ensure logical validity, the system attempts to prove the negation of the statement. If an automated prover can prove the opposite, the statement is discarded as a hallucination.
- Expert Review: Finally, IMO-level human experts verify the remaining candidates. This automated filtering is highly efficient, with over 72% of the statements reaching this final stage being validated as correct.
The FormalMATH Dataset
FormalMATH comprises 5,560 verified Lean4 problems, making it 22.8x larger than the widely used MiniF2F benchmark. It draws from diverse sources such as Omni-math, Numina-Olympiad, and Hardmath, covering domains ranging from high school competitions to undergraduate calculus and discrete mathematics. The researchers also provide FormalMATH-Lite, a 425-problem subset optimized for test-time scaling experiments where compute budgets are a primary consideration.
Key Results and Performance Analysis
Evaluation of current state-of-the-art provers on FormalMATH highlights a significant gap between current AI capabilities and human-level formal reasoning.
- Low Success Rates: The strongest model, Kimina-Prover, achieved only a 16.46% success rate on the full benchmark.
- Domain Bias: Models exhibit a "specialist" bias, performing relatively well in algebra but failing significantly in calculus and differentiation. This suggests that models may be relying on pattern recognition of common tactics rather than deep logical reasoning.
- Automation Dependency: Provers often over-rely on high-level tactics like
aesoporlinarith. When these fail, models struggle to decompose proofs into manual, deductive steps.
Insights: The Chain-of-Thought Paradox
A surprising finding is the Chain-of-Thought (CoT) Paradox: providing models with human-written informal solutions actually decreased their success rate in formal proving. This suggests a misalignment between high-level human reasoning and the granular, tactical requirements of Lean4. Human-written steps may introduce "noise" that distracts the model from the specific formal trajectories required by the compiler.
Conclusion and Future Work
FormalMATH serves as a rigorous reality check for the field of formal theorem proving. Future research must address cross-domain generalizability and the "CoT Paradox." Potential solutions include developing intermediate "sketching" languages to bridge the gap between natural language and formal code, and moving beyond pattern matching toward true deductive rigor.
Summary updated