Introduction
Large Language Models (LLMs) have demonstrated significant potential in mathematical reasoning, yet they often struggle in specialized domains like combinatorics. This "data drought" stems from the scarcity of formal proofs; while Lean’s Mathlib4 library is extensive, only a tiny fraction addresses combinatorial identities. To bridge this gap, researchers have introduced LeanComb, a specialized benchmark, and ATG4CI, an automated framework that synthesized over 260,000 new theorems and proofs, setting a new state-of-the-art in automated theorem proving for this domain.
The LeanComb Benchmark
LeanComb provides a high-quality, human-verified foundation for training and evaluation. It consists of 727 manually formalized combinatorial identities and lemmas sourced from classical mathematical literature. The dataset includes a training set of 418 identities and 209 lemmas, alongside a test set of 100 identities. These cover a wide range of categories, including Calculus, Probability, and Special Numbers, providing the "gold standard" seed data necessary for model fine-tuning.
ATG4CI: Scaling Data through Automated Generation
To overcome the limitations of small datasets, the authors developed the ATG4CI (Automated Theorem Generator for Combinatorial Identities) framework. This iterative system is designed to grow the formal library by synthesizing new theorems from existing proof paths.
The framework operates through several key stages:
- Partial Proof Paths (P3s): Using the Lean4Kit tool, existing proofs are decomposed into trees to identify "intermediate states"—points where a proof is partially complete.
- Candidate Generation: A fine-tuned LLM suggests "tactics" (proof steps). If the model identifies a valid intermediate state that it cannot yet resolve, that state is treated as a new candidate theorem.
- Reinforcement Learning (RLSCI): A search algorithm inspired by Monte Carlo Tree Search (MCTS) explores these paths, rewarding the model for finding valid logical sequences.
- Validation & Correction: To ensure high data quality, the framework includes rigorous deduplication and automated error correction to fix logical inconsistencies before adding theorems to the training set.
Experimental Results and Key Insights
The ATG4CI framework successfully generated the LeanComb-Enhanced dataset, containing 260,466 machine-verified theorems, each with a complete formal proof in Lean 4. A key insight of this work is the "self-improvement" cycle: data generated in the first iteration is used to fine-tune the model, which then becomes significantly more proficient at generating complex data in subsequent rounds.
Training LLMs on this enhanced dataset yielded dramatic results:
- Performance Gains: Models such as Mistral-7B and Llama3-8B saw success rate improvements of 17% to 21% on the LeanComb test set.
- State-of-the-Art Success: The best-performing model, Mistral-7B, reached a 26% success rate, nearly tripling its baseline performance.
- Generalization: The models also showed improved performance on the general miniF2F benchmark, proving that the rigorous logic required for combinatorial identities enhances broader mathematical reasoning.
Conclusion and Future Work
By treating unresolved subgoals as new theorems and utilizing a formally verified feedback loop, the researchers have created a scalable solution to the data scarcity problem in AI mathematics. While challenges remain—particularly in handling very deep proofs exceeding 40 steps—this approach provides a blueprint for expanding formal knowledge across other "data-poor" scientific fields. Future efforts will focus on expanding this automated generation to other areas of STEM, potentially creating a self-evolving library of formal human knowledge.
Summary updated