REFACTOR: Learning to Extract Theorems from Proofs
Not on the map. Why?
Abstract (arXiv)
Human mathematicians are often good at recognizing modular and reusable theorems that make complex mathematical results within reach. In this paper, we propose a novel method called theoREm-from-prooF extrACTOR (REFACTOR) for training neural networks to mimic this ability in formal mathematical theorem proving. We show on a set of unseen proofs, REFACTOR is able to extract 19.6% of the theorems that humans would use to write the proofs. When applying the model to the existing Metamath library, REFACTOR extracted 16 new theorems. With newly extracted theorems, we show that the existing proofs in the MetaMath database can be refactored. The new theorems are used very frequently after refactoring, with an average usage of 733.5 times, and help shorten the proof lengths. Lastly, we demonstrate that the prover trained on the new-theorem refactored dataset proves more test theorems and outperforms state-of-the-art baselines by frequently leveraging a diverse set of newly extracted theorems. Code can be found at https://github.com/jinpz/refactor.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 28 of its 48 references that are in the map. First posted on arXiv 26 Feb 2024.
Builds on
28 of 48 references.
References · 28
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2017Inductive Representation Learning on Large Graphscited by 6,284
- 2019Fast Graph Representation Learning with PyTorch Geometriccited by 2,414
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
- 2020Generative Language Modeling for Automated Theorem Provingcited by 379
- 2015Neural Module Networkscited by 375
- 2019The Neuro-Symbolic Concept Learner: Interpreting Scenes, Words, and Sentences From Natural Supervisioncited by 369
- 2019Deep Learning for Symbolic Mathematicscited by 266
- 2018Compositional Attention Networks for Machine Reasoningcited by 183
- 2020DreamCoder: Growing generalizable, interpretable knowledge with wake-sleep Bayesian program learningcited by 159
- 2019Learning to Prove Theorems via Interacting with Proof Assistantscited by 107
- 2022A Neuro-vector-symbolic Architecture for Solving Raven's Progressive Matricescited by 64
16 more
- 2022Top-Down Synthesis for Library Learningcited by 57
- 2018GamePad: A Learning Environment for Theorem Provingcited by 48
- 2020The Scattering Compositional Learner: Discovering Objects, Attributes, Relationships in Analogical Reasoningcited by 46
- 2020INT: An Inequality Benchmark for Evaluating Generalization in Theorem Provingcited by 44
- 2020Learning to Prove Theorems by Learning to Generate Theoremscited by 43
- 2019Exploration of Neural Machine Translation in Autoformalization of Mathematics in Mizarcited by 40
- 2018Automatically Composing Representation Transformations as a Means for Generalizationcited by 35
- 2016Differentiable Programs with Neural Librariescited by 30
- 2016Holophrasm: a neural Automated Theorem Prover for higher-order logiccited by 29
- 2019Learning to Reason in Large Theories without Imitationcited by 27
- 2020First Neural Conjecturing Datasets and Experimentscited by 26
- 2021Proving Theorems using Incremental Learning and Hindsight Experience Replaycited by 13
- 2019Guiding Inferences in Connection Tableau by Recurrent Neural Networkscited by 6
- 2014Learning-assisted Theorem Proving with Millions of Lemmascited by 5
- 2015Sharing HOL4 and HOL Light proof knowledgecited by 4
- 2023Lemmas: Generation, Selection, Applicationcited by 3
Built on by
Citing papers per year: 2024: 6; 2025: 2; 2026: 1.
9 papers.
- 2024Formal Mathematical Reasoning: A New Frontier in AIcited by 80
- 2024A Survey on Deep Learning for Theorem Provingcited by 55
- 2024Varying Shades of Wrong: Aligning LLMs with Wrong Answers Onlycited by 9
- 2025Towards Advanced Mathematical Reasoning for LLMs via First-Order Logic Theorem Provingcited by 8
- 2024Action abstractions for amortized samplingcited by 3
- 2024Library Learning Doesn't: The Curious Case of the Single-Use "Library"cited by 3
- 2025A Compute-Matched Re-Evaluation of TroVE on MATHcited by 2
- 2024Mathematical Derivation Graphs: A Relation Extraction Task in STEM Manuscriptscited by 1
- 2026Theory-Level Autoformalization: From Isolated Statements to Unified Formal Knowledge Basescited by 1
- 2026Theory-Level Autoformalization: From Isolated Statements to Unified Formal Knowledge Bases14 Jul 2026
- 2025A Compute-Matched Re-Evaluation of TroVE on MATH16 Jul 2025
- 2025Towards Advanced Mathematical Reasoning for LLMs via First-Order Logic Theorem Proving20 Jun 2025
- 2024Formal Mathematical Reasoning: A New Frontier in AI20 Dec 2024
- 2024Mathematical Derivation Graphs: A Relation Extraction Task in STEM Manuscripts26 Oct 2024
- 2024Library Learning Doesn't: The Curious Case of the Single-Use "Library"26 Oct 2024
- 2024Action abstractions for amortized sampling19 Oct 2024
- 2024Varying Shades of Wrong: Aligning LLMs with Wrong Answers Only14 Oct 2024
- 2024A Survey on Deep Learning for Theorem Proving15 Apr 2024