[Paper Review] Generative Language Modeling for Automated Theorem Proving
This paper trains decoder-only Transformer models to generate Metamath proof steps, showing pre-training on mathematical data and synthetic data augmentation improve automated theorem proving; the best model achieves state-of-the-art proof completion on set.mm and can generate proofs adopted by the formal community.
We explore the application of transformer-based language models to automated theorem proving. This work is motivated by the possibility that a major limitation of automated theorem provers compared to humans -- the generation of original mathematical terms -- might be addressable via generation from language models. We present an automated prover and proof assistant, GPT-f, for the Metamath formalization language, and analyze its performance. GPT-f found new short proofs that were accepted into the main Metamath library, which is to our knowledge, the first time a deep-learning based system has contributed proofs that were adopted by a formal mathematics community.
Motivation & Objective
- Demonstrate that generative pre-training improves automated theorem proving performance in a formal language (Metamath).
- Assess the impact of model size on proof-finding ability in a small-proof dataset.
- Explore iterative training with a learned value function to guide proof search and enable self-improvement.
- Evaluate the effect of pre-training on mathematics-focused data versus generic web data on prover performance.
- Show that synthetic data augmentation can boost performance for smaller models without harming validity.
Proposed method
- Use decoder-only Transformers (up to 36 layers, 774M parameters) to generate PROOFSTEP given GOAL in Metamath proofs.
- Format data as GOAL <GOAL> PROOFSTEP <PROOFSTEP> and train with a conditional language modeling objective.
- Maintain a proof search loop that expands the most promising goals by sampling e tactics per step and exploring up to d steps.
- Implement a Python-based Metamath verifier and a compatible proof search kernel for end-to-end evaluation.
- Augment training data with synthetic datasets that generate arithmetic and ring-algebra proofs to improve subgoal handling.
- Iteratively train a learned value function f_P that predicts whether a goal leads to a proof and use it to guide search (via V).
- Perform experiments across model sizes (160M, 400M, 700M, up to 1.5B) and pre-training regimes (CommonCrawl, Github, WebMath).
Experimental results
Research questions
- RQ1Does pre-training on math-focused data improve theorem-proving performance compared with generic text data?
- RQ2How does model size affect proof-finding performance in a formal setting like Metamath?
- RQ3Can iterative data generation with a learned value function guide proof search to improve results?
- RQ4What is the impact of synthetic data augmentation on prover performance, especially for smaller models?
- RQ5Is the GPT-f approach capable of closing a substantial share of held-out Metamath proofs?
Key findings
- Pre-training on mathematics-focused data yields better performance than generic web data for the prover.
- Model size positively correlates with performance, with larger models achieving higher proof-finding rates.
- Iterative data generation with a learned value function improves prover performance over policy-only training.
- Synthetic data augmentation provides measurable gains for larger models, with diminishing or mixed benefits for smaller models.
- The best model attains 31.58% on the valid set and demonstrates state-of-the-art performance for Metamath proof completion in this setup.
- Pre-training WebMath data yields the highest performance gains among the tested regimes for the 700M model (42.56% on WebMath pre-trained 700M).
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.