FormalMATH: Benchmarking Formal Mathematical Reasoning of Large Language Models

Zhouliang Yu, Ruotian Peng, Keyi Ding, Yizhe Li, Zhongyuan Peng, Minghao Liu, Yifan Zhang, Zheng Yuan, Huajian Xin, Wenhao Huang, Yandong Wen, Ge Zhang, Weiyang Liu · Submission to ICLR 2026 · Desk rejected

TL;DR

Existing benchmarks for automated theorem proving in formal languages like Lean 4 are often too small, narrow in scope, or saturated by modern language models. To fix this, the authors introduce FormalMATH, a rigorous benchmark of 5,560 formally verified Lean 4 problems spanning high-school Olympiad to undergraduate mathematics. Evaluating state-of-the-art LLM provers reveals they still struggle deeply—the strongest models achieve under 30% Pass@32—while suffering from heavy domain bias and fragile proof strategies.

What Problem Does This Paper Address?

Formal Mathematical Reasoning (FMR) requires models to write proofs in interactive theorem provers (like Lean 4) where code is verified by a strict kernel. While existing benchmarks like MiniF2F and ProofNet spurred progress, they face critical bottlenecks:

  1. Narrow Scope: They heavily skew toward specific domains (e.g., high-school algebra or basic undergraduate analysis).
  2. Small Scale: MiniF2F has only 244 test problems; ProofNet has 186.
  3. Saturation: Top provers boast >80% success rates on older suites, masking their true limitations.

The community needs a diverse, large-scale, unsaturated benchmark requiring models to synthesize formal Lean 4 proofs from scratch.

Methods

Creating thousands of correct formal statements is labor-intensive because informal-to-formal translation (autoformalization) is fraught with subtle semantic mismatches. The authors designed a four-stage human-in-the-loop autoformalization pipeline:

  1. LLM Translation: Finetuned autoformalizers (using Qwen2.5-Coder and DeepSeek-Prover) generate candidate Lean 4 statements via Best-of-$N$ sampling, filtered by Lean 4 syntax/type checking.
  2. Multi-LLM Semantic Verification: Models like Claude 3.5 Sonnet and OpenAI o1-mini back-translate the Lean code to English, compare it with the original problem, and perform unanimous voting to reject semantic misalignments (filtering out ~60.7% of candidates).
  3. Negation-Based Disproof: Based on the Law of the Excluded Middle, provers attempt to prove the negation ($\neg T$) of candidate statements. If the negation is proven, the statement is demonstrably false and rejected.
  4. IMO-Level Expert Review: 12 International Mathematical Olympiad medalists manually verify statements using an error checklist.
  5. Parallel Verification Architecture: To make proof validation feasible across thousands of samples, the authors centralize expensive Mathlib imports at a root thread and fork child processes for individual proofs.

Datasets

  • FormalMATH (Full): 5,560 formally verified Lean 4 statements sourced from high-school competition sets (Omni-Math, Numina, AIME, BlueMO) and university-level datasets (U-Math, HardMath, DEMIMATH). It is 22.8× larger than MiniF2F.
  • FormalMATH-Lite: A representative, difficulty-balanced subset of 425 problems (359 high-school, 66 undergraduate) used for high-budget compute scaling experiments.

Key Insights and Ideas

  • Informal CoT Can Hurt Formal Proving: In natural language math, chain-of-thought (CoT) prompting usually boosts performance. However, when models were fed human natural-language solution outlines to guide Lean 4 proof generation, performance dropped compared to purely autonomous, code-level CoT. High-level informal sketches skip granular case distinctions and parameters that Lean 4 tactics require, confusing the prover and inflating perplexity.
  • Severe Domain Bias: Models heavily favor high-school algebra and applied math (achieving up to 50–58% in undergraduate algebra) but completely collapse in calculus, integration, and discrete math (frequently hitting 0% to 5% accuracy). This reflects imbalances in open-source training corpuses.
  • Diminishing Returns from Test-Time Sampling: Unlike informal math where models can "stumble" onto correct answers via loose logic, formal proofs are binary and brittle—one type mismatch ruins the entire proof. Scaling test-time sampling by 100× (Pass@32 to Pass@3200) only brought modest absolute gains (~4.6% for STP).
  • Heuristic Traps & Cheating Tactics: Error analysis on failed proofs revealed models frequently introduce fake witnesses (e.g., arbitrarily picking $a = 0$) and attempt to blast through invalid logic with simp or aesop, prioritize shallow goals, and fail to handle non-linear multivariable inequalities with nlinarith.

Key Results

  • Full Benchmark Difficulty: On the full 5,560-problem benchmark, the leading reasoning model, DeepSeek-Prover-V2 (671B), achieves only 28.31% Pass@32. Smaller models like Kimina-Prover-7B reach 16.46% (Pass@32), and best-first search (BFS-Prover) reaches 11.13% (Pass@$1\times32\times100$).
  • FormalMATH-Lite Scaling:
  • Single-pass model STP improves from 48.59% (Pass@32) to 53.17% (Pass@3200).
  • Tree search (BFS-Prover) scales from 27.10% (Pass@$1\times32\times100$) to 45.88% (Pass@$32\times32\times100$).
  • DeepSeek-Prover-V2 (671B) tops out at 61.88% at Pass@3200.
  • Prompting Strategies: Under Pass@3200 on Lite with DeepSeek-V1.5-RL, autonomous naive CoT reaches 51.7%, natural-language-guided CoT yields 51.2%, and vanilla decoding achieves 49.8%.

Limitations and Future Work

  • Lack of Fully Formal Autoformalization Verification: There is currently no machine-checkable meta-verifier ensuring natural language problems match Lean 4 code. The pipeline still ultimately relies on human expert review.
  • Evaluation Compute Costs: Verifying thousands of Lean 4 scripts across hundreds of samples per problem is computationally demanding, requiring substantial GPU/CPU infrastructure.
  • Future Provers: The authors note that newer models (such as later checkpoints of DeepSeek-Prover-V2) were not fully evaluated across all ablation settings due to compute and release-timeline constraints.

Summary updated

BibTeX
@misc{yu2025formalmath,
  author = {Zhouliang Yu and Ruotian Peng and Keyi Ding and Yizhe Li and Zhongyuan Peng and Minghao Liu and Yifan Zhang and Zheng Yuan and Huajian Xin and Wenhao Huang and Yandong Wen and Ge Zhang and Weiyang Liu},
  title = {{FormalMATH: Benchmarking Formal Mathematical Reasoning of Large Language Models}},
  year = {2025},
  eprint = {2505.02735},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.02735},
}

Loading related content...

Figure