TL;DR
Pythagoras-Prover is a new family of open-source Lean 4 theorem provers that proves high-quality formal reasoning doesn't require massive frontier models. By leveraging a compute-frugal data pipeline and a novel statement-mutation technique called Augmented Lean Formalisation (ALF), their 4B parameter model outperforms the 671B DeepSeek-Prover-V2 on the MiniF2F benchmark.
What Problem Does This Paper Address?
Automated Theorem Proving (ATP) using interactive proof assistants like Lean offers a holy grail for mathematical AI: because code is verified by a deterministic type-checker, logical hallucinations are completely eliminated. However, training neural theorem provers is notoriously difficult due to two bottlenecks:
- Data Scarcity: There is a severe lack of verified, high-quality formal proof data available for training.
- Compute Intensity: Formal proof search requires long reasoning traces, making both supervised fine-tuning (SFT) and inference-time sampling incredibly expensive.
As a result, top-tier performance has traditionally been the exclusive domain of massive frontier models or systems utilizing heavy, compute-intensive search and self-correction loops. Pythagoras-Prover aims to democratize ATP by delivering state-of-the-art performance within practical, accessible compute budgets.
Methods
The authors introduce a highly efficient training recipe consisting of three core components:
- Curriculum Supervised Fine-Tuning (SFT): Instead of training on all data simultaneously, the training corpus is stratified into easy, medium, and hard tiers. The model learns progressively, mastering shorter, simpler proofs before moving on to complex competition-level problems.
- Dynamic Proof-Reasoning Filtering: To fit training instances into a strict 8k-token context budget without naively truncating valuable data, the authors implement a dynamic filter. If a combined informal reasoning chain and formal proof exceed the budget, the model drops the informal reasoning and trains strictly on the formal proof.
- Augmented Lean Formalisation (ALF): To scale the training set without the massive computational overhead of compiling every new variant in Lean, ALF mutates existing verified statements across five types: simplification, generalization, lemma proposal, proof-step decomposition, and reformulation. It then uses self-distillation to generate proofs, bypassing full verification in favor of a lightweight structural consistency check.
The project also explores a paradigm shift by introducing Pythagoras-Prover-Diffusion-4B, a proof-of-concept diffusion model for Lean that utilizes tactic-based masking to iteratively refine proofs block-by-block rather than generating them strictly token-by-token.
Datasets
The models were trained and evaluated using several key data sources:
- Seed Corpus: A Lean-verified dataset of ~800K instances built using open models under 30B parameters, sourced from DART-Math-Hard, DeepScaleR-Preview, and OpenR1-Math.
- ALF Expanded Corpus: By applying the ALF mutation operator to the seed corpus, the authors expanded their training data by roughly 2.5× to a total of ~2M instances.
- MiniF2F-ALF (New Benchmark): The authors introduced this companion benchmark by applying ALF mutations (variable renaming, numerical perturbations) to the standard MiniF2F-Test set. It serves as a contamination-sensitive probe to test whether models have truly learned transferable math concepts or have simply memorized benchmark surface forms.
Key Insights and Ideas
- Data Curation Beats Raw Scale: The fact that a 4B model can surpass a 671B model emphasizes that data structure (curriculum learning) and diversity (ALF mutations) matter more than parameter count for formal logical domains.
- Decoupling Expansion from Verification: Traditionally, generating synthetic data for Lean required running the Lean compiler on every single generation—a massive computational bottleneck. The success of ALF proves that unverified, self-distilled data passing a simple semantic alignment check is highly effective for post-training.
- Current Provers are Surface-Brittle: The evaluation on the new MiniF2F-ALF benchmark revealed a striking trend: every single tested model suffered a performance drop when problem statements were lightly perturbed. This indicates that current state-of-the-art provers are heavily reliant on exact benchmark recall.
Key Results
- Pythagoras-Prover-4B achieved a 86.1% pass@32 on MiniF2F-Test, notably outperforming DeepSeek-Prover-V2-671B (82.4%) despite being roughly 167× smaller.
- Pythagoras-Prover-32B achieved 93.0% pass@2048 on MiniF2F-Test, setting a new state-of-the-art among open-weight neural provers evaluated without test-time self-correction.
- On PutnamBench (college-level math), Pythagoras-Prover-32B solved 93 out of 672 problems, leading the open-source leaderboard.
- Pythagoras-Prover-Diffusion-4B trailed its autoregressive counterpart in raw accuracy (63.2% pass@32) but generated proofs 2.58× faster, demonstrating a promising new trade-off on the accuracy-efficiency frontier.
Limitations and Future Work
- Diffusion Context Windows: The diffusion model's context length was capped at 4,096 tokens because longer sequences caused severe training instability (sustained high gradient norms). Overcoming this variance bottleneck is crucial for solving longer proofs.
- Autoregressive Bias: The diffusion prover was fine-tuned from an autoregressively pretrained Qwen backbone, meaning it inherits a strong prior optimized for next-token prediction rather than iterative refinement.
- Benchmark Saturation: The standard MiniF2F benchmark is approaching saturation (above 90% accuracy). While MiniF2F-ALF helps mitigate this, the field broadly requires new, more challenging evaluation suites with controlled difficulty stratification.
Summary updated