LeanPRM
Lean-Grounded Process Supervision
for Natural Language Proof Verification

Rodney Lafuente-Mercado*1 Salman Rahman*2,3 Jingyan Shen3 James Shiffer2 Saadia Gabriel2 Pavel Izmailov3

* Equal contribution

1 UT Austin2 UCLA3 NYU

Summary

AI systems now write long proofs. Checking them means checking every step, and the step labels needed to train a checker are expensive to get from people. LeanPRM gets them from Lean. A model writes each proof twice, as prose and as Lean tactics, Lean checks the tactics, and the natural-language steps inherit the result.

The corpus has 10,634 proofs with 152,005 labeled steps and no human annotation. A Qwen3-4B verifier trained on it scores 74.7% on our held-out benchmark, against 60.3% for the same model trained on PRM800K, and it beats the PRM800K verifier on four of five benchmarks. The verifier reads plain proofs. Lean is only used to build the data.

10,634Proofs
152,005Labeled steps
200Benchmark proofs

How it works

1WriteA model is given a theorem and asked to prove it. Each step is a sentence of prose paired with the Lean tactic that carries it out. It never sees the compiler, so its mistakes are real mistakes.
2CheckLean checks the tactics in order. If one fails, that step and everything after it is wrong. If all of them pass, the proof is correct.
3SortSome failures are just bad Lean, not bad math. A second model reads the compiler output, repairs pure syntax once, and keeps only failures where the mathematics is at fault.
The LeanPRM pipeline: a paired proof attempt, Lean checking, a review of the first failure, and a verifier trained on the natural-language steps.
The pipeline on one proof. Lean finds the first failing step, the reviewer confirms it is a mathematical error, and the verifier trains on the prose with those labels.

A labeled proof

The proof from the figure above, as the verifier sees it. Click a step to see the Lean behind it and what the checker decided.

Theorem (NuminaMath). In a finite group where every automorphism is a power map x ↦ xm, any two elements commute.
theorem number_theory_65878 {G : Type*} [Group G] [Finite G]
    (h : ∀ f : G ≃* G, ∃ m : ℕ, 0 < m ∧ ∀ x : G, f x = x ^ m) :
    ∀ x y : G, x * y = y * x
Steps 1 to 4 are correct, steps 5 and 6 are not. The verifier is trained to reproduce exactly this labeling from the prose alone.

Results

We train Qwen3-4B with GRPO for 500 updates on LeanPRM and compare it with the same recipe on two other datasets. One is PRM800K, 800K human step labels. The other trains the model to solve NuminaMath problems with a final-answer reward, to test whether getting better at math makes a better checker. Scores are means over three seeds. Commercial models were prompted with the same instructions.

ModelQwen3-4B, 500 updatesLeanPRM-BenchexactHard2Verifybalanced acc.ProcessBenchavg. F1PRMBenchfirst errorIMO-GradingBenchbalanced acc.
Qwen3-4B (initial policy)48.237.174.342.553.8
NuminaMath-Solver-4B48.333.671.241.552.4
PRM800K-Verifier-4B60.363.183.043.357.0
LeanPRM-Verifier-4B (ours)74.772.874.947.466.4
Claude Sonnet 571.783.184.948.680.7
Claude Opus 580.381.084.547.681.8
Claude Fable 5.178.386.084.748.685.4
GPT-5.6 Sol75.385.579.847.183.2

LeanPRM-Bench is exact step-label accuracy on 200 held-out proofs. Underlined values are the best of the four trained or untrained 4B models. Hard2Verify, ProcessBench, PRMBench and IMO-GradingBench are external benchmarks the verifier never trained on.

What we found

Limits

The labels still pass through a model. It decides whether a failure is mathematical and whether the prose matches the Lean, and our audits of those decisions use a model too. All the wrong proofs are mistakes Claude made while trying to be right, which is a narrower set of errors than a checker will meet in the wild.

Code, data and the benchmark are linked at the top. The paper has the full details.