TL;DR
This paper surveys the rapidly growing field of applying deep learning, particularly large language models (LLMs), to theorem proving. It provides a structured overview of current tasks, methods, datasets, and evaluation metrics, highlighting the significant progress made and the persistent challenges that remain in automating mathematical reasoning.
What Problem Does This Paper Address?
Automating mathematical theorem proving has been a long-standing goal, with applications ranging from pure mathematics to software verification. While traditional methods have seen success, they often struggle with the vast search spaces and complex reasoning required. The recent explosion of deep learning, especially LLMs, has opened new avenues for tackling these challenges. However, the field is rapidly evolving with diverse approaches, making it difficult to get a clear picture of the landscape, progress, and future directions. This survey aims to provide a comprehensive and structured overview to serve as a foundational reference for researchers in this domain.
Methods
The paper categorizes deep learning approaches in theorem proving into five main tasks:
- Autoformalization: Converting informal mathematical statements and proofs into machine-verifiable formal languages (e.g., Lean, Isabelle). This often leverages sequence-to-sequence models and, more recently, LLMs with few-shot prompting.
- Premise Selection: Identifying relevant previously proven lemmas or theorems that can aid in proving a new theorem. Techniques include embedding theorems using CNNs, RNNs, Transformers, and Graph Neural Networks (GNNs), as well as fine-tuning pre-trained language models.
- Proofstep Generation: Predicting the next step (tactic) in a formal proof. This is often framed as a classification problem or, more commonly now, as a language modeling task where LLMs generate proof steps.
- Proof Search: Systematically exploring the space of possible proof steps to find a valid proof. This involves techniques like Monte Carlo Tree Search (MCTS) guided by deep learning models, and reinforcement learning approaches.
- Other Tasks: This includes related areas like generating rationales for hypotheses, automated conjecturing, and predicting proof lengths.
Datasets
The paper categorizes datasets into two main types:
- Extracted/Manually Curated Datasets: These are derived from existing formal libraries (e.g., Coq, Isabelle, Lean, Mizar) or manually created from sources like textbooks and competition problems. Examples include ProofWiki, mathlib, Archive of Formal Proofs, miniF2F, and IMO-AG-30.
- Synthetic Generation/Augmentation Datasets: These are created using rule-based generators, iterative augmentation of existing proofs, or by leveraging LLMs for autoformalization. Large-scale pre-training corpora like WebMath, Proof-Pile, and DeepSeekMath are also highlighted.
Key Insights and Ideas
- LLMs are a Game-Changer: The emergence of LLMs has significantly accelerated research in theorem proving, particularly in tasks like autoformalization and proofstep generation, often outperforming previous specialized models.
- Bridging the Informal-Formal Gap: Autoformalization remains a critical but challenging task, with LLMs showing promise in translating informal math to formal languages, though accuracy for complex problems is still a hurdle.
- Data is King (and Scarce): While progress is rapid, the amount of high-quality formal proof data is still a bottleneck compared to domains like code generation, necessitating creative data generation strategies.
- Evaluation is Tricky: Comparing performance across different proof assistants and tasks is difficult due to varying evaluation metrics, resource constraints, and the potential for data contamination in pre-trained LLMs.
- Human-AI Collaboration is Key: While AI can automate many aspects, the ultimate goal is to assist human mathematicians. Future work needs to focus on user-friendly tools that integrate seamlessly into existing workflows.
Key Results
- Autoformalization: State-of-the-art LLMs can formalize only about 13-25% of high-school and undergraduate problems with few-shot prompting, but achieve higher accuracies (around 62-76%) for informalization.
- Premise Selection: DPR with Transformer encoders has shown significant improvements, with models like ReProver achieving higher recall and MRR than traditional methods on benchmarks like LeanDojo. Magnushammer improved theorem proving success rates from 57% to 71% on the PISA dataset.
- Theorem Proving (Proofstep Generation/Search): LLMs like GPT-4 in structured frameworks show impressive performance increases. LEGO-Prover achieved 57.0% accuracy on miniF2F-valid, significantly surpassing previous best provers. HTPS achieved a cumulative success rate of 58.6% on miniF2F-valid. NIAGRA outperformed E and Vampire on the MPTP2078 dataset.
Limitations and Future Work
Limitations: * Data Scarcity: Formal proof data is still limited compared to other domains where LLMs excel. Autoformalization is particularly data-scarce due to the difficulty of obtaining aligned informal-formal pairs. * Evaluation Challenges: Results are not directly comparable across proof assistants. Resource constraints (time, attempts) impact performance. Pre-trained LLMs may have data contamination issues. A unified evaluation framework is lacking. * Human-AI Interaction: Current evaluation methods are misaligned with mathematicians' needs, who require tools that are easily callable, low-latency, and generalize to their specific problems.
Future Work: * Conjecturing: Developing AI that can discover new conjectures, which can then be used to generate more training data. * Verified Code Generation: Leveraging theorem proving techniques to verify code generated by LLMs, potentially using proof assistants like Coq. * Math Education: Creating intelligent tutors that can provide feedback and support to students, making formal mathematics more accessible. * Improved Human-AI Interaction: Developing user-oriented tools that integrate with proof assistants and address mathematicians' practical needs.
Summary updated