atlas

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

Lean-STaR: Learning to Interleave Thinking and Proving

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

Lean-STaR trains LLMs to generate informal thoughts before each Lean tactic, using GPT-4 retrospective rationales and expert iteration verified by the Lean solver, reaching 36.1% pass@64 on miniF2F-test.

Problem

Language-model-based formal theorem proving in Lean relies only on formal (proof state, tactic) data, ignoring the informal thought process that precedes each proof step.

Approach

Generate synthetic natural-language thoughts retrospectively with GPT-4 conditioned on ground-truth tactics, fine-tune a tactic predictor to produce a thought before each tactic, then bootstrap with expert iteration filtered by Lean verification, and use a sampling-based proof search suited to thought-augmented outputs.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add retrospectively generated thoughts to tactic trainingInternLM2-7b SFT · miniF2F-testPass@32: 29.5% -> 32.8%Helped
Add retrospectively generated thoughts to tactic trainingInternLM2-plus-7b SFT · miniF2F-testPass@32: 41.3% -> 43.4%Helped
Add one round of expert iteration to Lean-CoTInternLM2-7b Lean-CoT · miniF2F-testPass@32: 32.8% -> 34.0%Helped
Add a second round of expert iterationInternLM2-7b Lean-STaR (Iter-1) · miniF2F-testPass@32: 34.0% -> 34.8%Helped
Increase sampling budget from K=32 to K=64InternLM2-7b Lean-STaR (Iter-2) · miniF2F-testpass rate: 34.8% -> 36.1%Helped
Apply expert iteration without CoT, using (state, tactic) pairs only (ablation)InternLM2-plus-7b SFT · miniF2F-testPass@32: 41.3% -> 43.0%Helped
Replace CoT expert iteration with expert iteration without CoT (ablation)InternLM2-plus-7b · miniF2F-testPass@32: 43.0% -> 45.4%Hurt
Use joint training instead of continuing training from Lean-CoT (ablation)InternLM2-plus-7b Lean-STaR · miniF2F-testPass@32: 45.5% -> 43.9%Hurt
Use joint training instead of continuing training from Lean-CoT (ablation)InternLM2-base-7b Lean-STaR · miniF2F-testPass@32: 33.2% -> 34.0%Helped
Use sampling rather than best-first search for thought-augmented proving (ablation)Lean-CoT · miniF2F-testpass rate: 27.0% / 25.4% -> 32.8%Mixed

Surprising findings

Limitations

Experimental setup

Datasets: LeanDojo Benchmark 4 v9 Mathlib via LeanDojo

Benchmarks: miniF2F-test LeanDojo random subset (320 problems)

Metrics: pass@32 pass@64

Baselines: GPT-3.5 few-shot GPT-4 few-shot Llemma-7b ReProver COPRA InternLM2-7b SFT (InternLM2-7b) InternLM2-plus-7b

Builds on: Self-Taught Reasoner (STaR) expert iteration GPT-f ReST-EM LeanDojo

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