TL;DR
This paper introduces Kimina-Prover, a novel large language model for formal theorem proving in Lean 4. By employing a "formal reasoning pattern" and large-scale reinforcement learning, Kimina-Prover achieves state-of-the-art performance on the miniF2F benchmark, demonstrating impressive sample efficiency and a surprising scaling behavior with model size. This work suggests a promising new direction for bridging the gap between informal mathematical intuition and rigorous formal verification.
What Problem Does This Paper Address?
Formal theorem proving, especially in complex systems like Lean 4, is a notoriously difficult task. While large language models (LLMs) have shown promise in generating proof steps, existing methods often struggle with:
- Computational Overhead: Traditional approaches rely on explicit search algorithms (like BFS or MCTS) which are computationally expensive and complex to scale.
- Reasoning Depth: LLMs often excel at pattern matching but have difficulty capturing the deep, structured, and non-linear reasoning required for formal proofs. Standard fine-tuning or chain-of-thought prompting isn't always sufficient.
- Model Size Scaling: Unlike many other LLM applications, previous neural theorem provers haven't consistently shown performance improvements with increased model size, suggesting a limitation in their ability to leverage larger capacities for better reasoning.
- Bridging Informal and Formal Reasoning: There's a gap between how humans intuitively approach mathematical problems and the strict, formal language required for proof assistants.
This paper aims to address these challenges by developing an LLM that can perform formal theorem proving more efficiently, effectively, and with better reasoning capabilities, while also showing a clear path for improvement with larger models.
Methods
Kimina-Prover builds upon the Qwen2.5-72B model and employs a novel "formal reasoning pattern" combined with a large-scale reinforcement learning (RL) pipeline.
- Formal Reasoning Pattern: This is a key innovation. Instead of just generating code, the model is trained to intersperse informal reasoning with Lean 4 code snippets within a
<think>block. This structured approach helps align informal mathematical intuition with formal proof steps and improves explainability. - Reinforcement Learning (RL): The model is trained using an RL pipeline where it generates candidate proofs, which are then verified by the Lean compiler. A binary reward signal (1 for correct, 0 for incorrect) is used to update the model's policy. This is crucial for learning complex, multi-step reasoning.
- Supervised Fine-Tuning (SFT): Before RL, the model undergoes SFT using a curated dataset of formal math problems and proofs. This "cold start" phase helps the model learn the basic structure and style of formal proofs.
- Informal Math Mix-Training: To further enhance reasoning capabilities, the model is also trained on informal mathematical thinking data, which helps it generate more meaningful reflections.
- Autoformalization: The paper also introduces an "Kimina-Autoformalizer" to automatically convert natural language problems into formal Lean 4 statements, creating a diverse dataset for training.
Datasets
- miniF2F: The primary benchmark used for evaluation, a cross-system benchmark for formal Olympiad-level mathematics.
- Numina 1.5 dataset: Used as a source for autoformalization.
- PutnamBench, ProofNet, Compfiles: Datasets used for training the autoformalizer.
- Mathlib: Used in some autoformalization experiments.
The authors also mention creating a curated prompt set from autoformalized and human-annotated statements.
Key Insights and Ideas
- Formal Reasoning Pattern is Key: The structured "formal reasoning pattern" is crucial for aligning informal intuition with formal proofs, leading to better performance and explainability.
- RL for Complex Reasoning: Large-scale RL is effective in teaching LLMs the intricate, multi-step reasoning required for formal theorem proving, going beyond simple pattern matching.
- Model Size Matters (Finally!): Unlike previous neural theorem provers, Kimina-Prover shows a clear and significant performance improvement as model size increases. This suggests that larger models can indeed leverage their capacity for more sophisticated formal reasoning.
- Bridging the Informal-Formal Gap: Kimina-Prover's approach has the potential to bridge the gap between how humans intuitively understand math and the strict requirements of formal verification, making formal methods more accessible.
- Sample Efficiency: The model achieves strong results even with a small number of samples (low pass@k), indicating efficient learning.
Key Results
- State-of-the-Art Performance: Kimina-Prover achieves 80.74% accuracy on the miniF2F benchmark with a sample budget of 8192 (pass@8192), surpassing previous state-of-the-art methods.
- Strong Low-Sample Performance: The model achieves 52.94% with pass@1 and 68.85% with pass@32, demonstrating exceptional sample efficiency.
- Scaling with Model Size: The 72B model significantly outperforms the 7B and 1.5B distilled versions, showing a clear upward trend in performance as model size increases. For example, at pass@8192, the 72B model achieves 80.74%, while the 7B distilled model reaches 70.8%.
- Outperforms General LLMs: Kimina-Prover significantly outperforms general-purpose LLMs like Gemini 2.5 Pro and OpenAI's o3 on formal reasoning tasks, especially on challenging subsets like IMO and AIME.
- Human-like Proof Style: The model generates proofs with a structured, decomposed style, often using "have" statements, which is characteristic of human-written proofs.
Limitations and Future Work
- Limitations:
- The paper notes that while the model shows emergent reasoning capabilities, it can still make mistakes, particularly in complex case analyses (as seen in the AIME 1987 P5 example).
- The autoformalization process, while useful, still requires careful expert monitoring to catch subtle errors.
- Future Work:
- Enhance proof quality by filtering outputs that overuse high-level tactics.
- Enable iterative refinement using Lean compiler feedback to fix errors efficiently.
- Integrate external tools like library search and computation engines to further alleviate generation challenges.
- Explore similar reasoning approaches in other domains that are limited in domain knowledge during pre-training.
Summary updated