Overview
Deep learning has revolutionized natural language processing and computer vision, but "neural theorem proving"—using AI to write formal mathematical proofs—remains a notoriously data-starved frontier. Researchers have introduced Proof Artifact Co-Training (PACT), a novel methodology that overcomes this chronic data scarcity. By training large language models on low-level "proof artifacts" generated by computer kernels, PACT significantly boosts the success rate of automated theorem proving in the Lean proof assistant, improving state-of-the-art performance from 32% to 48%.
The Problem: Data Scarcity in Formal Mathematics
In interactive theorem provers like Lean, humans write "tactics" (high-level commands such as simp or induction) to construct proofs. However, formalizing mathematics is incredibly labor-intensive. It is estimated to cost roughly 2.5 man-years of expert labor to produce just one megabyte of formalized code.
Because these datasets of human-written tactics are so small, large Transformer models (like GPT-3) overfit almost immediately. Instead of learning the underlying logic of mathematics, they simply memorize the few examples available. Consequently, the usual "scaling laws" of deep learning—where larger models reliably yield better performance—break down in this domain.
Methodology: Proof Artifact Co-Training (PACT)
The core insight behind PACT is that while human-written tactics are scarce, the underlying "proof terms" they generate are abundant. When a human writes a single-line tactic, the Lean kernel expands it into a massive, explicit, low-level tree structure to rigorously verify the logic.
PACT extracts self-supervised training data from these low-level artifacts. Instead of solely predicting the next human tactic, the model is co-trained on several auxiliary tasks designed to teach it the "connective tissue" of formal logic.
These auxiliary tasks are grouped into mixtures (mix1 and mix2) and include:
- Proof Term Prediction: Predicting the entire low-level expansion of a goal.
- Skip-proof: Filling in a "masked" or missing sub-term within a proof.
- Type Prediction: Identifying the mathematical type of a specific sub-expression.
- Premise Selection: Determining which existing lemmas are needed to prove a specific step.
To facilitate this, the researchers introduced LEANSTEP, a massive new collection of datasets for Lean 3. It includes ~128,000 examples of human-authored proof steps (tactic), millions of examples extracted from Lean’s mathematical library (mix1 & mix2), and a temporally held-out test set (future-mathlib) to ensure the model isn't just memorizing known proofs.
Key Insights
- Mining the "Dark Matter" of Proofs: Human tactics are just the tip of the iceberg. The low-level proof terms generated by the computer act as the "dark matter" of formal mathematics, providing the dense, abundant signal needed to effectively train large Transformers.
- Multi-task Regularization: Co-training acts as a powerful regularizer. Because the model must succeed at rigorous low-level tasks (like type checking), it cannot easily overfit the high-level tactic data.
- Restoring Scaling Laws: With PACT, performance once again correlates with model size. Larger models (up to 837M parameters) demonstrated better generalization, a trend previously disrupted by data scarcity.
- Cross-Domain Transfer: Pre-training on a massive corpus of informal math from the web (WebMath) significantly aids formal theorem proving, suggesting that language models can bridge the gap between how humans discuss math and how computers verify it.
Key Results
The application of PACT yielded massive performance jumps across the board.
- State-of-the-Art Success: On a held-out test suite, the success rate for proving theorems jumped from 32.2% (baseline) to 48.4% (with PACT).
- Generalization to Novel Math: On the
future-mathlibset—consisting of theorems the model had never seen and involving newly defined concepts—it achieved a 37% success rate. - Human-Level Elegance: In many instances, the model discovered proofs that were shorter and more elegant than the original human versions. Notably, 19 proofs generated by the AI were of such high quality that they were committed back into the official Lean
mathlibrepository.
Limitations and Future Work
While PACT represents a major leap forward, challenges remain:
- Search Latency: Sampling from a large Transformer is computationally expensive. The model is "smarter" than traditional search-based provers, but much slower (~1 second per step).
- The Exploration Ceiling: The model is still fundamentally limited by the existing library. It cannot yet "invent" entirely new branches of mathematics or generate its own curriculum of theorems to practice on.
- Scaling Further: While an 837M parameter model is large for this specific subfield, it is small compared to modern 175B+ parameter LLMs. Combining even larger models with PACT could push the frontier of automated reasoning to unprecedented heights.
Summary updated