Process-Verified Reinforcement Learning for Theorem Proving via Lean

Minsu Kim, Se-Young Yun

Introduction

Reinforcement Learning from Verifiable Rewards (RLVR) has emerged as a powerful paradigm for training Large Language Models (LLMs) on tasks with objective correctness, such as mathematics and coding. However, in automated theorem proving, the reward signal is typically binary: the model either successfully proves the theorem or it does not.

This binary approach creates a severe "sparse reward" problem. If a model generates a complex 50-step proof but makes a logical error on step 48, a binary reward treats the entire attempt as a failure, offering no credit for the 47 correct steps. While Process-based Reward Models (PRMs) can provide intermediate step-by-step feedback, they traditionally require massive amounts of expensive, human-labeled data.

This paper bridges the gap between structured processes and unstructured rewards by turning the Lean proof assistant into a "symbolic process oracle." By extracting fine-grained, tactic-level feedback directly from Lean's internal compiler, the researchers provide dense, verifier-grounded rewards that guide LLMs through the step-by-step logic of a proof without requiring human intervention.

Methods: Lean as a Symbolic Process Oracle

The authors propose a method to extract dense and sound feedback from Lean and integrate it into a Group Relative Policy Optimization (GRPO) objective. This approach balances outcome-level success with process-level correctness.

Overview of the Lean-based reinforcement learning framework, highlighting tactic-level parsing and first-error propagation.
  1. Tactic-Level Parsing: Instead of merely checking the final proof outcome, the system parses proof attempts into sequences of individual "tactics" (commands in Lean). Lean’s elaboration engine is then used to verify each tactic independently.
  2. First-Error Propagation: When a proof fails, Lean identifies the exact tactic where the logic first broke down. Under the proposed first-error propagation rule, every tactic before the error is marked as "locally sound," and every tactic from the error onward is treated as "erroneous."
  3. First-Token Credit Assignment: A critical technical contribution is determining where to apply the reward. The authors found that assigning the tactic-level reward exclusively to the first token of a tactic (e.g., the keyword intro or apply) is highly effective. In formal logic, the choice of tactic represents the critical strategic decision; rewarding this initial "intent" works better than rewarding the entire sequence or the final token.
  4. Combined Advantage: The global outcome reward (whether the whole proof passed) is combined with these local process rewards to create a single, dense advantage signal for the LLM.

Training Dynamics and Key Results

The researchers applied their method to two 7B parameter models: STP-Lean and DeepSeek-Prover-V1.5. Training utilized 10,000 samples randomly drawn from the STP dataset (a collection of 3.26M Lean proofs), and evaluation was conducted on standard benchmarks including MiniF2F-Test (high-school Olympiad math) and ProofNet-Test (undergraduate mathematics).

Training metrics comparing the combined Outcome + Tactic Advantage against baselines, showing improvements in reward and reduced entropy.
  • Benchmark Improvements: On the MiniF2F-Test (pass@64), the tactic-level supervision improved STP-Lean from 56.7% to 59.2%. On ProofNet (pass@32), performance jumped from 17.2% to 18.6%.
  • Stability Over Sparsity: Purely outcome-based RL (like standard GRPO) often suffers from instability in theorem proving because the model wanders aimlessly in the search space. As shown in the training dynamics, tactic-level rewards act as a compass, leading to lower policy entropy (more decisive models) and more robust training.
  • Efficiency vs. Search: The model's "single-shot" generation capabilities (generating the whole proof at once) approached or even outperformed complex tree-search methods that require significantly more computation at inference time.
  • The Value of Conciseness: Setting a strict 15-second verification timeout during training proved beneficial. It biased the model toward finding shorter, more "canonical" proofs rather than long, rambling attempts that are statistically more prone to errors.

Limitations and Future Work

While utilizing Lean as a process oracle marks a significant step forward, the study highlights a few areas for future refinement:

  • Fixed Reward Values: Currently, the rewards for "locally sound" and "erroneous" steps are fixed constants (e.g., -0.05 and -0.1). Developing a dynamic "general advantage estimator" for individual tactics could yield a more nuanced training signal.
  • The "Strategic" Gap: A major challenge in automated proving is that a tactic might be "locally sound" (it compiles in Lean without crashing) but "strategically dead" (it leads the proof into an unsolvable state). Lean's compiler cannot easily detect strategic dead-ends, meaning the model might still be rewarded for technically correct but practically useless steps. Solving this will likely require integrating a learned value function.
  • Lack of Natural Language Integration: This method currently focuses on "pure" Lean code. It does not yet incorporate natural language Chain-of-Thought (CoT) reasoning, which many modern models rely on to plan complex logic before writing formal code.

Ultimately, this work demonstrates that symbolic proof assistants are not just passive verifiers for evaluation; they can act as active, dense reward oracles during training, paving the way for RL frameworks that combine the scalability of LLMs with the rigorous reliability of formal logic.

Summary updated

BibTeX
@inproceedings{kim2026process,
  author = {Minsu Kim and Se-Young Yun},
  title = {{Process-Verified Reinforcement Learning for Theorem Proving via Lean}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=P00k4DFaXF},
}
Figure