TL;DR
Training large language models (LLMs) to reason with reinforcement learning usually relies on a blunt instrument: if the final answer is wrong, the entire chain of thought gets penalized, even if 99% of the steps were brilliant. This paper introduces Implicit Behavior Policy Optimization (IBPO), a framework that compares failed reasoning attempts against alternative attempts for the same prompt to pinpoint where things actually went sideways. By turning sparse pass/fail outcomes into step-sensitive learning signals—without needing expensive step-by-step human labels—IBPO makes reasoning training faster, smoother, and noticeably more accurate.
What Problem Does This Paper Address?
Imagine writing a three-page math proof, dropping a minus sign on the very last line, and having your professor tear up the whole packet and tell you every single line you wrote was garbage.
That is essentially how standard sequence-level reinforcement learning—like Group Relative Policy Optimization (GRPO) or Group Sequence Policy Optimization (GSPO)—trains LLMs to reason. The model generates a long chain of tokens and receives a single terminal reward at the end (correct or incorrect). That final score is broadcast uniformly backward across every intermediate decision.
This creates a nasty credit-assignment problem. Mostly-correct trajectories with a single local slip-up get discarded wholesale as negative examples, injecting massive variance into gradient updates. Fixing a minor habit ends up requiring tons of sampling and wasted updates—an efficiency bottleneck known as a learning tax. Meanwhile, training separate "process reward models" to grade individual steps is expensive to annotate, noisy, and brittle. The authors ask: can we extract step-level guidance using only final pass/fail rewards?
Methods
The core novelty of IBPO is treating multiple trajectories sampled for the same prompt as counterfactual reasoning paths—natural experiments showing what happens when the model makes slightly different intermediate choices. IBPO is not a brand-new optimizer; rather, it is a credit-assignment wrapper plugged directly on top of standard sequence-level optimizers (here, primarily GSPO).
Here is how the pipeline works:
- Sample and Pair: For a single prompt, the policy generates a group of candidate trajectories and checks their final answers. Each incorrect trajectory is paired with alternative reference trajectories from the same group (preferring correct ones if available, or other incorrect ones if not).
- Compare and Correct: An abstract comparison operator—instantiated here as a "compare-and-correct" step—prompts the model to repair the failed trajectory using the reference, producing a third, corrected trajectory verified by the terminal checker.
- Prevent Reward Hacking: To stop the model from lazily deleting its flawed attempt and writing a brand-new answer from scratch, an edit-distance filter detects full rewrites and zeroes out their bonus.
- Inject Process Signals: IBPO feeds this comparison back into the optimizer via two paths:
- Sequence-level reward shaping: Recoverable failures receive a modest reward boost before within-group normalization, separating "almost right" from "totally lost."
- Token-level gradient masking (
IBPO-mask): By looking at token-level edit differences between the failed and corrected trajectories, IBPO masks out unchanged tokens so gradients only update the specific tokens involved in the mistake.
Datasets
No new benchmarks are introduced; the authors enforce strict decontamination between training and evaluation sets:
- RL Training Prompts: DeepMath-103K (mathematics) and OpenCodeReasoning (competitive coding).
- Evaluation Benchmarks: Competition math and science benchmarks—AIME24, AIME25, HMMT25, MATH-500, and GPQA-Diamond—evaluated via answer matching, alongside LiveCodeBench v6 (25.02–25.05) evaluated via programmatic unit tests.
Key Insights and Ideas
- Process supervision is hiding in plain sight: You don't need a step-level judge or auxiliary value network to get fine-grained credit assignment. Comparing an incorrect roll-out to a repaired counterfactual naturally isolates the broken steps.
- Positive backward transfer: Jointly training the model to compare/repair mistakes alongside normal reasoning acts like multi-task learning. Making latent errors salient during comparison helps the base policy suppress local errors before they happen on standard single-pass evaluations.
- Fewer rollouts, smarter compute: Because two-stage correction costs extra tokens, the authors matched total GPU compute rather than rollout counts. Even when sampling only 8 base responses per prompt (plus corrections) against vanilla GSPO's 64 rollouts per prompt, IBPO wins handily—proving that structured feedback beats brute-force sampling.
Key Results
Tested on Qwen3-32B and Qwen3-Next-80B-A3B-Thinking under strictly matched training compute (including all correction, verification, and filtering overhead):
- Consistent accuracy gains: With token masking (
GSPO + IBPO(mask)), Qwen3-32B jumps over vanilla GSPO by +8.8 percentage points on AIME25 (77.1% $\rightarrow$ 85.9%), +11.4 points on LiveCodeBench (64.6% $\rightarrow$ 76.0%), and +7.5 points on HMMT25 (55.6% $\rightarrow$ 63.1%). Even the base sequence-shaping IBPO gains +8.2, +10.7, and +7.0 points, respectively. - Scaling holds up: On the massive Qwen3-Next-80B model,
IBPO(mask)reaches 94.4% on AIME25 (+4.3 points over GSPO), 75.8% on LiveCodeBench (+4.9 points), and 81.1% on HMMT25 (+5.2 points). - Beats specialized credit-assignment rivals: Under matched compute on Qwen3-32B,
IBPO(mask)outperforms PRIME, Math-Shepherd (even with PRM supervision), VinePPO, SPO, and GiGPO across math and coding tasks. - 37% compute savings: On Qwen3-Next, IBPO exhibits much smoother training curves and hits a 0.75 training-reward threshold using just 0.63$\times$ the compute of vanilla GSPO.
Limitations and Future Work
- Reliance on clean verifiers: Math and code enjoy crisp, objective pass/fail checks. In open-ended domains like creative writing or dialogue that rely on noisy "LLM-as-a-Judge" evaluators, judge bias or noise could corrupt the counterfactual comparison signals.
- Systematic blind spots & overhead: Sampling and comparing counterfactuals adds orchestration overhead, and if a model makes the exact same systematic mistake across all sampled trajectories, comparison signals weaken.
- Future directions: The authors suggest pairing IBPO with calibrated rubric-based rewards for open-ended tasks, exploring lighter comparison operators (like relative ranking or consistency scoring instead of full correction generation), and expanding evaluations to broader software engineering and instruction-following benchmarks.
Summary updated