LLM Library Learning Fails: A LEGO-Prover Case Study
Not on the map. Why?
Abstract (arXiv)
Recent advancements in the coding, reasoning, and tool-using abilities of LLMs have spurred interest in library learning (i.e., online learning through the creation, storage, and retrieval of reusable and composable functions, knowledge, checklists, or lemmas). Such systems often promise improved task performance through the automatic creation of broadly applicable tools, as well as superior computational performance through the caching of reasoning (i.e., the storage of generated tools). However, we find strong reason to be skeptical. We perform a deep dive into one such system, LEGO-Prover, which purports to learn reusable lemmas for mathematical reasoning. We find no evidence of the direct reuse of learned lemmas, and find evidence against the soft reuse of learned lemmas (i.e., reuse by modifying relevant examples). Crucially, we find that LEGO-Prover does not in fact improve over the simple baseline of prompting the model - the improvements in task accuracy vanish once computational cost is accounted for. Our findings suggest that serious misconceptions exist as to the effectiveness of these techniques, that a serious re-examination of the state of LLM-based library learning is required, and that we require much stronger standards for evaluation including behavioural analysis and ensuring that an equal computational budget is used for baselines.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 17 of its 22 references that are in the map. First posted on arXiv 3 Apr 2025.
Builds on
17 of 22 references.
References · 17
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023GAIA: a benchmark for General AI Assistantscited by 1,084
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2023ViperGPT: Visual Inference via Python Execution for Reasoningcited by 591
- 2023Large Language Models as Tool Makerscited by 293
- 2022Draft, Sketch, and Prove: Guiding Formal Theorem Provers with Informal Proofscited by 278
- 2024AI Agents That Mattercited by 199
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 191
- 2023CRAFT: Customizing LLMs by Creating and Retrieving from Specialized Toolsetscited by 122
- 2023LEGO-Prover: Neural Theorem Proving with Growing Librariescited by 108
- 2024TroVE: Inducing Verifiable and Efficient Toolboxes for Solving Programmatic Taskscited by 70
- 2024POSIX: A Prompt Sensitivity Index For Large Language Modelscited by 56
5 more
- 2023LILO: Learning Interpretable Libraries by Compressing and Documenting Codecited by 46
- 2024DynaSaur: Large Language Agents Beyond Predefined Actionscited by 30
- 2024Sibyl: Simple yet Effective Agent Framework for Complex Real-world Reasoningcited by 17
- 2024Paraphrase Types Elicit Prompt Engineering Capabilitiescited by 15
- 2024Library Learning Doesn't: The Curious Case of the Single-Use "Library"cited by 3
Built on by
Citing papers per year: 2025: 1; 2026: 2.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2025Thinking Machines: Mathematical Reasoning in the Age of LLMs
- 2026Stress-Testing the Reasoning Competence of LLMs With Proofs Under Minimal Formalism
- 2025FINEREASON: Evaluating and Improving LLMs' Deliberate Reasoning through Reflective Puzzle Solving
- 2026FABSVer: Faster Training and Better Self-Verification for LLM Mathematical Reasoning
- 2025LemmaHead: RAG Assisted Proof Generation Using Large Language Models
- 2024Formal Theorem Proving by Rewarding LLMs to Decompose Proofs Hierarchically
- 2025ProofCompass: Enhancing Specialized Provers with LLM Guidance
- 2026Less Is More: Cognitive Load and the Single-Prompt Ceiling in LLM Mathematical Reasoning