Save the Good Prefix: Precise Error Penalization via Process-Supervised RL to Enhance LLM Reasoning

Haolin Liu, Dian Yu, Sidi Lu, Yujun Zhou, Rui Liu, Zhenwen Liang, Haitao Mi, Chen-Yu Wei, Dong YuarXiv 2026

TL;DR

Reinforcement learning (RL) for language model reasoning typically discards partially correct answers due to sparse, all-or-nothing final rewards. This paper introduces Verifiable Prefix Policy Optimization (VPPO), a method that uses a Process Reward Model (PRM) solely to pinpoint the first mistake in a reasoning chain, rewarding the correct prefix and penalizing the rest. This simple shift in credit assignment significantly boosts both accuracy and exploration efficiency across difficult math benchmarks with minimal computational overhead.

What Problem Does This Paper Address?

When training Large Language Models (LLMs) on complex, multi-step reasoning tasks (like math or logic), standard RL algorithms like GRPO rely on sparse outcome rewards—a binary 1 or 0 based entirely on whether the final answer is correct.

This creates a severe credit assignment problem. If a model writes a brilliant 10-step mathematical proof but makes a minor calculation error in the final step, sparse RL treats the entire trajectory as a total failure.

While Process Reward Models (PRMs) can score intermediate steps, treating their raw step-wise scores as rewards introduces noise and invites reward hacking. However, PRMs are highly accurate at a simpler, more objective task: first-error detection.

The authors reveal that failed trajectories are far from useless: 88% of incorrect responses contain at least one correct step, and on average, valid reasoning makes up 34% of a failed attempt. VPPO aims to salvage these "good prefixes" to guide RL training rather than throwing them away.

Figure 1: Distribution of Correct Steps before the First Error in Incorrect Responses. Among incorrect trajectories, 88% contain at least one correct step before the first error. We define the correct-step ratio as the number of steps before the first incorrect step divided by the total number of steps; the average correct-step ratio is 34%.

Methods

VPPO repurposes a fixed, offline PRM (specifically, Qwen2.5-Math-PRM-7B) to act strictly as a first-error detector.

  1. Trajectory Partitioning: During training, if a generated response is incorrect, the PRM scans the steps to find the first mistake. The reasoning path is split into a verified good prefix and an erroneous suffix.
  2. Precise Reward Allocation: Instead of rewarding the whole response, VPPO applies an additional reward ($\alpha$) to the end of the good prefix, reinforcing the valid initial logic, while applying targeted penalties only after the mistake.
  3. The Shorten-Prefix Strategy: Directly rewarding all good steps introduces a vulnerability called step inflation (a form of reward hacking where the model splits a single logical step into dozens of tiny micro-steps to farm token rewards). To counteract this, VPPO trims a small suffix from the good prefix (proportional to the prompt token length). This creates an unrewarded "buffer zone" near the error boundary, forcing the model to focus on the quality of early reasoning rather than gaming the step count.

Datasets

  • Training: The models were fine-tuned using the open-source axon-rl MATH training dataset (~8k competition-level math problems from AMC and AIME).
  • Evaluation: Models were evaluated across a diverse suite of hard math benchmarks: AIME-24, AIME-25, AMC-23, MATH-500, Minerva, Olympiadbench, HMMT-Feb-2024, and HMMT-Feb-2025.
  • Threshold Tuning: The benchmark ProcessBench was utilized to calibrate the PRM's error-detection threshold, determining that a score threshold of 0.8 yielded the most reliable first-error localization.

Key Insights and Ideas

  • Salvation of Failed Attempts: In a preliminary study on AIME25, the authors took questions where a model failed all 32 initial attempts. By extracting the good prefixes from those failures and sampling continuations from them, the model successfully solved the problems in 8 out of 30 cases. Failure often stems from derailment, not a lack of underlying knowledge.
  • Resolving Gradient Conflict: When a model samples both a correct and an incorrect path that share the same initial steps, standard sparse RL creates a conflicting gradient signal (encouraging the prefix in one rollout but discouraging it in the other). VPPO aligns these signals, consistently reinforcing the shared correct prefix.
  • Exponential Sample Complexity Boost: The authors theoretically prove that in a tree-structured reasoning space where correct paths are rare (i.e., hard questions), VPPO reduces the sample complexity required to learn a near-optimal policy from exponential to linear relative to the reasoning depth.

Key Results

VPPO consistently outperformed standard GRPO and prior PRM-guided baselines (such as Mixed and RTS) across both base and instruct-tuned models.

  • Pass@1 Accuracy: On Qwen3-4B-Base, VPPO achieved an average accuracy of 35.4% across all benchmarks, outperforming GRPO (33.7%). On the instruct-tuned Qwen3-4B, VPPO reached 44.8% compared to GRPO's 42.9%.
  • Pass@K (Exploration Capability): VPPO significantly expanded the model's reasoning boundaries. On AIME datasets, VPPO achieved a Pass@128 of 53.4% (4B-Base), noticeably higher than GRPO's 49.9%. It even matched or beat dedicated Pass@K optimization algorithms while maintaining superior Pass@1 performance.
  • Computational Efficiency: Unlike actor-critic frameworks that jointly train a heavy critic model, VPPO uses a fixed PRM, adding only a 1.1$\times$ per-step runtime overhead compared to standard GRPO.

Limitations and Future Work

  • Format Vulnerability: The parsing pipeline relies entirely on the model explicitly formatting its output with literal markers like "Step 1...", "Step 2...". If a model fails to follow this layout, step segmentation breaks down.
  • Heuristic Trimming: The choice of the cut length $c(q)$ in the shorten-prefix strategy is currently heuristic (set to prompt length). While highly effective in practice, a more principled, adaptive method for determining this buffer zone is needed.
  • Future Directions: The authors propose integrating good prefixes into a replay buffer during RL training. By forcing the model to practice completing diverse, self-generated prefixes, the model's generalization capabilities could be further enhanced.

Summary updated

BibTeX
@misc{liu2026save,
  author = {Haolin Liu and Dian Yu and Sidi Lu and Yujun Zhou and Rui Liu and Zhenwen Liang and Haitao Mi and Chen-Yu Wei and Dong Yu},
  title = {{Save the Good Prefix: Precise Error Penalization via Process-Supervised RL to Enhance LLM Reasoning}},
  year = {2026},
  eprint = {2601.18984},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.18984},
}
Figure