atlas

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

REFACTOR: Learning to Extract Theorems from Proofs

ICLR 2024 · Large language models › Agents, code and math · approach: Retrieval-augmented formal theorem proving · 0 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.

Trains a GraphSAGE-based node classifier on Metamath proof trees, built by expanding human proofs with known theorems, to predict which subtree forms a reusable theorem, then uses it to extract, verify, and refactor new theorems and improve Holophrasm proving.

Problem

Automatically discovering modular, reusable theorems (lemmas) from formal mathematical proofs, which humans do by recognizing reusable subcomponents, in the Metamath formal system.

Approach

Reverse human theorem extraction: expand a proof by inlining a known theorem's proof, creating a synthetic proof tree where the inlined subtree is a labeled target; train a GNN to do node-level binary classification of which nodes form the theorem, then verify predicted subtrees as valid theorems.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use REFACTOR instead of the symbolic compression baseline for theorem extractionTheorem extraction model · Theorem extraction test setproof accuracy: 1.7% -> 19.6%Helped
Train Holophrasm on the refactored dataset with newly extracted theoremsHolophrasm'20 · Metamath test theoremstest proofs found: 557 -> 632Helped
Train Holophrasm on the refactored dataset with newly extracted theoremsHolophrasm'16 · Metamath test theoremstest proofs found: 412 -> 468Helped
Remove all graph edges while retaining node features (ablation)REFACTOR · Theorem extraction test setproof accuracy: 13.3% -> 0.1%Hurt
Keep only edges from leaves to root (ablation)REFACTOR · Theorem extraction test setproof accuracy: 13.3% -> 0.1%Hurt
Keep only edges from root to leaves (ablation)REFACTOR · Theorem extraction test setproof accuracy: 13.3% -> 3.5%Hurt
Remove node features (ablation)REFACTOR · Theorem extraction test setproof accuracy: 13.3% -> 0%Hurt
Increase model size from 80k to 4535k trainable parameters (ablation)REFACTOR · Theorem extraction test setproof accuracy: 2.3% -> 19.6%Helped

Surprising findings

Limitations

Experimental setup

Datasets: set.mm (Metamath library)

Benchmarks: set.mm theorem extraction test set Metamath test theorems (2720)

Metrics: node accuracy proof accuracy number of test proofs found new theorem usage

Baselines: Holophrasm'16 Holophrasm'20 MetaGen Symbolic compression baseline

Builds on: GraphSAGE Holophrasm Adam

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