Research map / Large language models / Agents, code and math
TheoremLlama: Transforming General-Purpose LLMs into Lean4 Experts
Ruida Wang, Jipeng Zhang, Yizhen Jia, Rui Pan, Shizhe Diao, Renjie Pi, Tong Zhang
Hong Kong University of Science and Technology · University of Illinois, Urbana Champaign · NVIDIA
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| fine-tune on OBT and add iterative proof writing (TheoremLlama vs GPT-4-Turbo) | Llama3-8B-Instruct · MiniF2F-Valid | accuracy (%): 25.41 -> 36.48 | Improved |
| fine-tune on OBT (TheoremLlama vs unfinetuned Llama3-Instruct) | Llama3-8B-Instruct · MiniF2F-Test | accuracy (%): 20.08 -> 33.61 | Improved |
| add NL guidance in training data (ablation) | TheoremLlama · MiniF2F-Test | accuracy (%): 17.21 -> 31.15 | Improved |
| add NL-FL bootstrapping (ablation) | TheoremLlama · MiniF2F-Valid | accuracy (%): 26.23 -> 34.84 | Improved |
| add NL-FL bootstrapping (ablation) | TheoremLlama · MiniF2F-Test | accuracy (%): 26.23 -> 31.15 | Improved |
| add block training (ablation) | TheoremLlama · MiniF2F-Test | accuracy (%): 23.36 -> 31.15 | Improved |
| add curriculum data sorting (ablation) | TheoremLlama · MiniF2F-Test | accuracy (%): 25.83 -> 31.15 | Improved |
| second round of iterative proof writing | TheoremLlama · MiniF2F-Valid | accuracy (%): 34.84 -> 36.48 | Improved |
| second round of iterative proof writing | TheoremLlama · MiniF2F-Test | accuracy (%): 31.15 -> 33.61 | Improved |
| NL-FL Bootstrapping (in-code comments) instead of Head Bootstrapping (ablation) | TheoremLlama · MiniF2F-Test | accuracy (%): 25.46 -> 31.15 | Improved |
| increase OBT training data from 1k to 10k to full (ablation) | TheoremLlama · MiniF2F-Test | accuracy (%): 29.01 -> 30.74 -> 31.15 | Mixed |
| apply TheoremLlama framework to DeepSeek-Math-7B | DeepSeek-Math-7B · MiniF2F-Test | accuracy (%): 24.60 -> 35.66 | Improved |
Later papers that compared with this method
1 later accepted paper reports TheoremLlama as a baseline in their results tables; 1 of them report a better number on most of the results they share with it.
- NL2Lean: Translating Natural Language into Lean 4 through Multi-Aspect Reinforcement Learning (EMNLP 2025 · better on 4 of 4 shared results)
Matched by method name in results tables read by AI. Authors' own tables tend to favour the newer method, and a comparison can be missed when a method is renamed.
Open problems this paper states
- “Struggles with difficult IMO-level problems, as LLMs lack understanding of intricate technical aspects of human proofs.” → Formal proof benchmarks stop at competition or undergraduate level. (an open problem in formal verification and proof data)
Open problems in formal verification and proof data
How can LLM proof and formalization pipelines be trusted beyond one prover, one benchmark and one difficulty level?
- Each method is tested in one proof assistant, language or domain. · 9 papers state it
- Formal statements can drift from the meaning of the natural-language original. · 5 papers state it
- LLM judges used for scoring are themselves unreliable. · 4 papers state it
Closest papers by meaning
- MUSTARD: Mastering Uniform Synthesis of Theorem and Proof Data (ICLR 2024 · similarity 0.92)
- Lean-STaR: Learning to Interleave Thinking and Proving (ICLR 2025 · similarity 0.91)
- Lean Workbook: A large-scale Lean problem set formalized from natural language math problems (NeurIPS 2024 · similarity 0.91)
- APOLLO: Automated LLM and Lean Collaboration for Advanced Formal Reasoning (NeurIPS 2025 · similarity 0.91)
- MA-LoT: Model-Collaboration Lean-based Long Chain-of-Thought Reasoning enhances Formal Theorem Proving (ICML 2025 · similarity 0.91)
- LeanAgent: Lifelong Learning for Formal Theorem Proving (ICLR 2025 · similarity 0.91)
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.