LeanPRM: Lean-Grounded Process Supervision for Natural Language Proof Verification

Rodney Lafuente-Mercado, Salman Rahman, Jingyan Shen, James Shiffer, Saadia Gabriel, Pavel Izmailov

TL;DR

LeanPRM is a new framework that uses the Lean proof assistant to automatically generate step-by-step correctness labels for natural-language mathematical proofs. By training on over 150,000 machine-verified steps, the authors developed proof verifiers that significantly outperform models trained on expensive human-annotated datasets like PRM800K.

What Problem Does This Paper Address?

As AI models get better at generating long, complex mathematical proofs, verifying their step-by-step reasoning—rather than just checking a final answer—has become a major bottleneck. This is known as process supervision.

Currently, obtaining high-quality "process" labels is difficult. Human annotation is incredibly expensive and slow. Automated methods often rely on "outcome" signals (did the model get the right final answer?), which don't exist for many open-ended proofs. While formal proof assistants like Lean provide ground-truth verification, translating informal natural-language proofs into formal code is a task that usually requires expert-level human effort. LeanPRM bridges this gap by automating the creation of a large-scale, Lean-grounded dataset for natural-language proof verification.

Methods

The LeanPRM framework operates in two main stages:

  1. Blind Proof Attempt (Stage 1): A large language model (LLM) is given a theorem statement and asked to write a proof in a single pass. Crucially, it must write each step in natural language paired with a corresponding Lean tactic. This is a "blind" attempt because the model receives no feedback from the Lean compiler during generation. This ensures that the errors the model makes are "natural" and representative of its actual reasoning failures.
  2. Verification and Classification (Stage 2): The Lean proof assistant checks the formal steps. If a step fails, a second LLM call analyzes the compiler's error message. It distinguishes between a mathematical error (the reasoning is flawed) and a syntax error (the math is sound, but the Lean code has a minor bug). Syntax errors are patched once and rechecked. Only proofs where the first failure is a genuine mathematical error are kept as negative examples.
Overview of the LeanPRM framework, showing the two-stage process from theorem statement to labeled datapoint.

The resulting verifiers are trained using Group Relative Policy Optimization (GRPO), a reinforcement learning technique that helps the model learn to distinguish correct steps from incorrect ones based on the Lean-generated labels.

Datasets

The authors introduced two primary resources:

  • LeanPRM Corpus: A training set of 10,634 proofs (6,370 correct, 4,264 incorrect) containing 152,005 labeled steps. The theorems are sourced from public formal corpora like NuminaMath-LEAN and Lean-Workbook.
  • LeanPRM-Bench: A new, high-quality evaluation benchmark consisting of 200 proofs (100 correct, 100 incorrect) with verified step-level labels.

The models were also evaluated on four external benchmarks: Hard2Verify, ProcessBench, PRMBench, and IMO-GradingBench.

Key Insights and Ideas

  • The "Blind" Advantage: By preventing the generator from seeing Lean's feedback, the authors capture the model's genuine mistakes. If the model could self-correct during generation, the dataset would lack the very "near-miss" errors that a verifier needs to learn to detect.
  • Separating Syntax from Logic: A major hurdle in using formal tools is that they are pedantic about syntax. LeanPRM's second stage is vital because it filters out "noise"—failures that are just coding bugs—allowing the verifier to focus purely on mathematical validity.
  • Scalability without Humans: Because the entire pipeline is automated, LeanPRM can scale as fast as new formal theorem statements can be collected or generated, offering a path toward supervising proofs that are too difficult for even expert humans to check reliably.
Figure 2: Composition of LeanPRM. Left: sources of the 10,634 theorems. Right: error class of the first failing step in each of the 4,264 incorrect proofs. Bars show percentages of incorrect proofs. Every incorrect proof fails first at a mathematical error, most often an unjustified assumption.

Key Results

The LeanPRM-trained verifiers showed substantial improvements over the state-of-the-art:

  • Accuracy Boost: A Qwen3-4B model trained on LeanPRM achieved 74.7% exact step-label accuracy on LeanPRM-Bench, compared to only 60.3% when trained on the human-labeled PRM800K dataset.
  • Generalization: LeanPRM-Verifier-4B outperformed the PRM800K baseline on four out of five benchmarks, including a 9.7-point lead on Hard2Verify and a 9.4-point lead on IMO-GradingBench.
  • Best-of-N Selection: On difficult IMO-level problems, the LeanPRM verifier was significantly better at picking the correct proof out of multiple candidates, whereas the PRM800K-trained model performed close to random chance.

Limitations and Future Work

While powerful, LeanPRM has some limitations:

  • LLM-in-the-loop: The classification of syntax vs. mathematical errors still relies on an LLM judge, which could introduce its own biases or errors (though the authors conducted audits to mitigate this).
  • Error Diversity: The negative examples are limited to the types of mistakes made by the specific models used for generation (Claude 3.5 Sonnet and Opus).
  • Future Directions: The authors suggest that this methodology could be applied to other domains with exact checkers, such as code verification or scientific simulators. They also aim to grow the corpus by automatically generating new theorem statements.

Summary updated

BibTeX
@misc{lafuentemercado2026leanprm,
  author = {Rodney Lafuente-Mercado and Salman Rahman and Jingyan Shen and James Shiffer and Saadia Gabriel and Pavel Izmailov},
  title = {{LeanPRM: Lean-Grounded Process Supervision for Natural Language Proof Verification}},
  year = {2026},
  eprint = {2610.17697},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.17697},
}
Figure