atlas

Research map / Large language models / Agents, code and math

Magnushammer: A Transformer-Based Approach to Premise Selection

ICLR 2024 · Large language models › Agents, code and math · approach: Retrieval-augmented formal theorem proving · 9 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Magnushammer uses a two-stage contrastive transformer retriever (Select then Rerank) for premise selection in Isabelle, releasing a 4.4M-example Isabelle premise dataset, and combined with Thor it reaches 71.0% on PISA.

Problem

Premise selection for automated theorem proving in proof assistants, where symbolic hammers like Sledgehammer require heavy domain engineering and are hard to port to new proof assistants.

Approach

Treat proof states and premises as text and train a transformer contrastively for cosine-similarity retrieval (Select), then re-rank the top candidates with a joint proof-state-premise cross-scoring head (Rerank), trained with alternating updates on a shared backbone.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace Sledgehammer with Magnushammer for single-step premise selectionPISA theorem proving · PISA single-stepproof success rate (%): 38.3 -> 59.5Helped
Replace Sledgehammer with Magnushammer in ThorThor · PISA multi-stepproof success rate (%): 57.0 -> 71.0Helped
Replace Sledgehammer with Magnushammer for single-step premise selectionminiF2F · miniF2F test single-stepproof success rate (%): 20.9 -> 34.0Helped
Replace Sledgehammer with Magnushammer in ThorThor · miniF2F test multi-stepproof success rate (%): 29.9 -> 37.3Helped
Remove the Rerank stage (ablation)Magnushammer · PISA, budget 800proof success rate (%): 56.3% -> 54.2%Hurt
Train on MAPL instead of HPL (ablation)Magnushammer · PISA, budget 800proof success rate (%): 54.0% -> 56.3%Helped
Add language-model pre-training (ablation)Magnushammer trained on MAPL · PISA, budget 800proof success rate (%): 53.0 -> 56.3Helped
Use 0.1% of MAPL instead of 100% of MAPL (ablation)Pre-trained Magnushammer · PISA, budget 800proof success rate (%): 56.3 -> 39.2Hurt
Use 0.1% MAPL instead of 0.1% HPL (ablation)Pre-trained Magnushammer · PISA, budget 800proof success rate (%): 34.9 -> 39.2Helped
Increase model size from 920K to 86.2M parameters (ablation)Magnushammer · PISA, budget 800proof success rate (%): 40.7 -> 57.0Helped
Add a tactic prompt (ablation)Magnushammer premise selection · PISAproof success rate (%): 55.60 -> 56.19No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: MAPL HPL SH partition Archive of Formal Proofs Isabelle Standard library GitHub and arXiv subsets of the Pile

Benchmarks: PISA miniF2F

Metrics: proof success rate

Baselines: Sledgehammer Sledgehammer + heuristics BM25 TF-IDF OpenAI text-embedding-ada-002 Thor Thor + Sledgehammer LISA DSP Thor + auto

Builds on: InfoNCE Thor Sledgehammer Contriever HOList

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy