[Paper Review] Magnushammer: A Transformer-Based Approach to Premise Selection
Magnushammer, a transformer-based premise selection method, significantly outperforms Sledgehammer on the PISA and MiniF2F benchmarks and, when combined with a neural prover (Thor), sets a new state-of-the-art at 71.0% on PISA.
This paper presents a novel approach to premise selection, a crucial reasoning task in automated theorem proving. Traditionally, symbolic methods that rely on extensive domain knowledge and engineering effort are applied to this task. In contrast, this work demonstrates that contrastive training with the transformer architecture can achieve higher-quality retrieval of relevant premises, without the engineering overhead. Our method, Magnushammer, outperforms the most advanced and widely used automation tool in interactive theorem proving called Sledgehammer. On the PISA and miniF2F benchmarks Magnushammer achieves $59.5\%$ (against $38.3\%$) and $34.0\%$ (against $20.9\%$) success rates, respectively. By combining \method with a language-model-based automated theorem prover, we further improve the state-of-the-art proof success rate from $57.0\%$ to $71.0\%$ on the PISA benchmark using $4$x fewer parameters. Moreover, we develop and open source a novel dataset for premise selection, containing textual representations of (proof state, relevant premise) pairs. To the best of our knowledge, this is the largest available premise selection dataset, and the first one for the Isabelle proof assistant.
Motivation & Objective
- Motivate a data-driven, generic premise selection tool that minimizes domain-specific engineering.
- Demonstrate that transformer-based retrieval and re-ranking can outperform symbolic methods on large premise libraries.
- Show scalability with model size, data size, and computational budget.
- Release a large, text-based premise-pairs dataset to foster future research.
- Investigate integration with neural theorem provers to boost overall proof rates.
Proposed method
- Two-stage retrieval: Select stage retrieves 1024 premises via cosine similarity in a shared embedding space.
- Rerank stage re-evaluates the retrieved premises with a transformer that attends proof state tokens to premise tokens to output a relevance score.
- Training uses two alternating objectives: Select trained with a modified InfoNCE loss and Rerank trained with binary cross-entropy.
- backbone transformer is pre-trained on a language modeling task (GitHub/arXiv subset of The Pile) and fine-tuned on (proof_state, premise) pairs.
- Dataset: 4.4M premise-selection examples with 433k unique premises (MAPL), plus Human Proofs Library (HPL) data; data is text-based and released on Hugging Face.
Experimental results
Research questions
- RQ1Can transformer-based Premise Selection outperform symbolic methods on standard benchmarks (PISA, MiniF2F) with limited domain-specific engineering?
- RQ2How do model size, data size, and inference budget affect premise selection quality?
- RQ3What is the effect of combining Magnushammer with neural theorem provers (e.g., Thor) on multi-step proofs?
- RQ4Does pre-training and dataset composition (HPL vs MAPL) impact performance and data efficiency?
- RQ5Is a Select-only retrieval strategy competitive enough to reduce compute while maintaining high proof rates?
Key findings
- Magnushammer achieves 59.5% proof rate on the PISA benchmark in single-step proofs, versus Sledgehammer’s 38.3%.
- In multi-step settings, Thor + Magnushammer reaches 71.0% proof rate on PISA, surpassing the previous 57.0% Thor baseline.
- On MiniF2F, Magnushammer single-step yields 34.0% vs Sledgehammer’s 20.9%; multi-step with Thor + Magnushammer yields 37.3% (test) compared to alternatives.
- Even a small 920K-parameter model with Magnushammer outperforms Sledgehammer (40.7% vs 38.3%).
- Using Magnushammer with Thor achieves state-of-the-art performance on PISA and competitive results on MiniF2F with significantly smaller models compared to some baselines.
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.