[Paper Review] Proof Artifact Co-training for Theorem Proving with Language Models
This paper introduces PACT (Proof Artifact Co-training), a self-supervised method that leverages kernel-level proof terms in Lean to generate auxiliary training signals for large language models, significantly improving tactic prediction performance. By jointly training on human proofs and self-supervised proof artifacts, the approach increases theorem proving success from 32% to 48% on held-out test theorems.
Labeled data for imitation learning of theorem proving in large libraries of formalized mathematics is scarce as such libraries require years of concentrated effort by human specialists to be built. This is particularly challenging when applying large Transformer language models to tactic prediction, because the scaling of performance with respect to model size is quickly disrupted in the data-scarce, easily-overfitted regime. We propose PACT ({\bf P}roof {\bf A}rtifact {\bf C}o-{\bf T}raining), a general methodology for extracting abundant self-supervised data from kernel-level proof terms for co-training alongside the usual tactic prediction objective. We apply this methodology to Lean, an interactive proof assistant which hosts some of the most sophisticated formalized mathematics to date. We instrument Lean with a neural theorem prover driven by a Transformer language model and show that PACT improves theorem proving success rate on a held-out suite of test theorems from 32\% to 48\%.
Motivation & Objective
- To address the scarcity of labeled data in formal mathematics, where human proof formalization requires years of expert effort.
- To improve the performance of large language models in tactic prediction for interactive theorem proving, especially in data-scarce regimes prone to overfitting.
- To develop a generalizable, self-supervised method that extracts training signals from proof terms without requiring human annotations.
- To demonstrate that combining PACT with pre-training (e.g., WebMath) yields superior generalization and performance on out-of-distribution theorems.
Proposed method
- PACT constructs self-supervised auxiliary tasks by extracting proof artifacts—fully typed, kernel-verified proof terms—from existing human-written proofs in Lean.
- The method trains a Transformer-based language model jointly on the standard tactic prediction objective and multiple self-supervised objectives derived from proof term structure and type-level invariants.
- Proof artifacts are used to create masked language modeling and reconstruction tasks, enabling the model to learn deep syntactic and semantic structure of formal proofs.
- The approach is integrated into LeanStep, a dataset and training environment for Lean 3 that supports supervised learning, reinforcement learning, and PACT co-training.
- The model is fine-tuned using a curriculum of increasingly complex theorems, with performance monitored on held-out test sets.
- PACT is combined with WebMath pre-training to enhance generalization and performance on novel, out-of-distribution theorems.
Experimental results
Research questions
- RQ1Can self-supervised learning from proof artifacts significantly improve tactic prediction performance in data-scarce formal theorem proving?
- RQ2How does co-training on proof artifacts compare to standard imitation learning in terms of generalization and robustness?
- RQ3To what extent can PACT improve performance on out-of-distribution theorems involving novel definitions or complex structures?
- RQ4Does combining PACT with pre-training on large-scale mathematical text (e.g., WebMath) yield better results than either method alone?
Key findings
- PACT improves the theorem proving success rate on a held-out test suite from 32% to 48%, demonstrating a substantial performance gain in a data-scarce regime.
- The combination of PACT with WebMath pre-training achieves the lowest validation loss and highest success rate, indicating synergistic benefits.
- On an out-of-distribution test set of thousands of theorems—including those with novel definitions—PACT achieves a 37% success rate, showing strong generalization.
- The model discovers more concise and general proofs than human-written counterparts, such as using complex-number lemmas not present in the original proof.
- The model correctly infers and applies lemmas like @norm_eq_zero with correct argument placeholders, even when they do not appear in training data.
- Proofs generated via PACT often use advanced idioms like `simpa [...] using @...`, indicating deep understanding of proof automation patterns.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.