Magnushammer: A Transformer-Based Approach to Premise Selection
Maciej Mikula, Szymon Tworkowski, Szymon Antoniak, Bartosz Piotrowski, Albert Q. Jiang, Jin Peng Zhou, Christian Szegedy, Lukasz Kucinski, Piotr Milos, Yuhuai Wu
Abstract
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 Magnushammer 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 4x 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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
27 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Improving Language Models by Retrieving from Trillions of Tokens cites Language Models are Few-Shot Learners
- Solving Quantitative Reasoning Problems with Language Models cites Language Models are Few-Shot Learners
- LEGO-Prover: Neural Theorem Proving with Growing Libraries cites Solving Quantitative Reasoning Problems with Language Models
- LEGO-Prover: Neural Theorem Proving with Growing Libraries cites Language Models are Few-Shot Learners
- Premise Selection for a Lean Hammer cites LEGO-Prover: Neural Theorem Proving with Growing Libraries
- Premise Selection for a Lean Hammer cites Graph2Tac: Online Representation Learning of Formal Math Concepts
- Proving Theorems Recursively cites Solving Quantitative Reasoning Problems with Language Models
- Proving Theorems Recursively cites LEGO-Prover: Neural Theorem Proving with Growing Libraries
- Learning Transferable Visual Models From Natural Language Supervision cites A Simple Framework for Contrastive Learning of Visual Representations
- Learning Transferable Visual Models From Natural Language Supervision cites Language Models are Few-Shot Learners
- Focused Transformer: Contrastive Training for Context Scaling cites Improving Language Models by Retrieving from Trillions of Tokens
- Focused Transformer: Contrastive Training for Context Scaling cites A Simple Framework for Contrastive Learning of Visual Representations
- Focused Transformer: Contrastive Training for Context Scaling cites Solving Quantitative Reasoning Problems with Language Models
- Focused Transformer: Contrastive Training for Context Scaling cites Language Models are Few-Shot Learners
- Focused Transformer: Contrastive Training for Context Scaling cites Learning Transferable Visual Models From Natural Language Supervision
Cited by top-tier papers27
- Focused Transformer: Contrastive Training for Context ScalingSzymon Tworkowski, Konrad Staniszewski, Mikolaj Pacek, Yuhuai Wu et al.NeurIPS 2023 · 190 citations
- LEGO-Prover: Neural Theorem Proving with Growing LibrariesHaiming Wang, Huajian Xin, Chuanyang Zheng, Zhengying Liu et al.ICLR 2024 · 125 citations
- Proving Theorems RecursivelyHaiming Wang, Huajian Xin, Zhengying Liu, Wenda Li et al.NeurIPS 2024 · 34 citations
- Graph2Tac: Online Representation Learning of Formal Math ConceptsLasse Blaauwbroek, Mirek Olsák, Jason Rute, Fidel Ivan Schaposnik Massolo et al.ICML 2024 · 18 citations
- Premise Selection for a Lean HammerThomas Zhu, Joshua Clune, Jeremy Avigad, Albert Q. Jiang et al.ICLR 2026 · 13 citations
Builds on15
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- Solving Quantitative Reasoning Problems with Language ModelsAitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer et al.NeurIPS 2022 · 2,039 citations
- Improving Language Models by Retrieving from Trillions of TokensSebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai et al.ICML 2022 · 1,629 citations
Related papers
- Thor: Wielding Hammers to Integrate Language Models and Automated Theorem ProversAlbert Qiaochu Jiang, Wenda Li, Szymon Tworkowski, Konrad Czechowski et al.NeurIPS 2022 · 154 citations
- A Minimalist Proof Language for Neural Theorem Proving over Isabelle/HOLQiyuan Xu, Renxi Wang, Peixin Wang, Haonan Li et al.OOPSLA 2026
- Neuro-Symbolic Proof Generation for Scaling Systems Software VerificationBaoding He, Zenan Li, Wei Sun, Yuan Yao et al.OSDI 2026
- Enhancing Neural Theorem Proving via High-Quality Proof Selection and Verifier FeedbackXiaoxue Zhu, Jilin Hu, Fuyuan Zhang, Jianyu Zhang et al.ICML 2026
- MUSTARD: Mastering Uniform Synthesis of Theorem and Proof DataYinya Huang, Xiaohan Lin, Zhengying Liu, Qingxing Cao et al.ICLR 2024 · 50 citations
