Beyond Entropy: Correctness-Aware Advantage Shaping via Contrastive Policy Optimization

Weiwen Xu, Jia Liu, Hou Pong Chan, Long Li, Deng Cai, Min Chen, Hao ZhangarXiv 2026

TL;DR

Contrastive Policy Optimization (CPO) improves Reinforcement Learning with Verifiable Rewards (RLVR) by replacing standard entropy-based advantage shaping with a token-level "contrastive disagreement" signal. By comparing a model's vanilla generation probabilities against its probabilities when guided by a reference answer, CPO precisely identifies token-level correctness and errors. This approach significantly boosts mathematical reasoning and out-of-domain generalization while solving the notorious "zero-advantage" problem in algorithms like GRPO.

What Problem Does This Paper Address?

Reinforcement Learning with Verifiable Rewards (RLVR)—exemplified by algorithms like Group Relative Policy Optimization (GRPO) used in models like DeepSeek-R1—has driven massive breakthroughs in mathematical and programmatic reasoning. However, these methods suffer from two fundamental limitations:

  1. Coarse Credit Assignment: Binary rewards (correct/incorrect) operate at the trajectory level, failing to pinpoint which specific tokens along a long reasoning chain actually caused the mistake or success.
  2. The Zero-Advantage Problem: When all sampled responses for a prompt are equally wrong (or equally right), their relative advantage is zero, yielding no optimization gradient and wasting vast amounts of training data.

To fix this, recent methods have turned to entropy to shape token-level advantages. The core flaw here is that entropy measures uncertainty, not correctness. A model might exhibit high entropy because it is productively exploring alternative valid solutions, or because it is completely confused by an incorrect path. Because entropy cannot distinguish useful uncertainty from detrimental confusion, it remains an imperfect proxy for correctness.

The authors introduce the intuition that while an LLM struggles to find its own fine-grained mistakes during self-review, conditioning the model on a reference answer causes distinct probability shifts: increasing probabilities for correct steps and suppressing tokens that lead to errors.

Intuition behind reference-guided probability shifts

Methods

The authors propose Contrastive Policy Optimization (CPO), a framework that leverages token-level contrastive disagreement ($\delta_t$) between a reference-guided posterior distribution and a vanilla prior generation distribution.

The workflow consists of:

  1. Prior Pass: The policy model generates a response $y$ for a prompt $x$, recording the vanilla token probabilities $\pi(y_t | x, y_{<t})$.
  2. Posterior Pass: The same sequence $y$ is fed back into the model, but this time the prompt is appended with the oracle reference answer $y^*$ (using a prompt designed to simulate a real-time problem-solving tone). This yields reference-guided probabilities $\pi_{post}(y_t | x, y^*, y_{<t})$.
  3. Contrastive Disagreement Calculation: The token-level signal is computed as the log-ratio of the posterior to the prior: $$\delta_t = \log \frac{\pi_{post}(y_t | x, y^*, y_{<t})}{\pi(y_t | x, y_{<t})}$$ The authors mathematically prove that this log-ratio is monotonically increasing with respect to the true position-wise correctness probability.

  4. Advantage Shaping with Clipping: This token-level signal is combined with the trajectory-level advantage ($A_{i,t} + \alpha \cdot \delta_{i,t}$). To ensure that token-level adjustments don't accidentally overwhelm or reverse a correct trajectory's overall reward, a clipping mechanism is introduced. Crucially, for zero-advantage groups, the clipping is omitted, allowing $\delta_t$ to provide informative gradients from otherwise dead data.

CPO Framework Architecture

Datasets

  • Training: The models were trained on the MATH dataset (7.5k problems).
  • In-Domain Evaluation: Evaluated using MATH500, AIME2024/2025, and AMC23.
  • Out-of-Domain Evaluation: Evaluated on GPQA (graduate-level Google-proof Q&A), MMLU-Pro, and KnowLogic (commonsense reasoning) to test robustness and generalization.

Key Insights and Ideas

  • Asymmetry of Disagreement: Empirical verification via resampling showed that negative contrastive disagreement is an incredibly strong indicator of token incorrectness (accuracy drops sharply when forcing high negative $\delta$ tokens). Conversely, positive disagreement maintains a stable baseline, bounded by the model's inherent capacity.
Figure 2: Impact of contrastive disagreement on token correctness (Accuracy@16).
  • Exploration vs. Exploitation Dynamics: Analysis of the combination strengths ($\alpha^+$ for correct responses, $\alpha^-$ for incorrect ones) revealed that correct responses naturally support exploration (keeping training entropy high), while incorrect responses drive exploitation (collapsing bad paths). A balanced 1:1 ratio yields the best downstream performance.
  • Unifying On-Policy Distillation (OPD): The authors show that standard OPD (where a student learns from a larger teacher model via reverse KL) is mathematically a special case of CPO. CPO broadens this concept: the "teacher" doesn't have to be a larger model; it can simply be the same model conditioned on a reference answer, critic feedback, or any correctness-informed signal.

Key Results

  • Reasoning Performance Gains: Built on top of GRPO, CPO outperformed standard GRPO by an average of 7.7% on Qwen2.5-Math-7B and 8.5% on Qwen3-Base-4B.
  • Hard Task Breakthroughs: On the highly challenging AIME2025 benchmark, CPO boosted Qwen2.5-Math-7B's performance from 30.0% to 43.3%.
  • Preserving Generalization: While entropy-intervened baselines showed severe out-of-domain degradation, CPO maintained or improved generalization. For example, on GPQA, CPO achieved 78.3% compared to GRPO's 56.7% using the Qwen3 backbone.
  • Mitigating Zero-Advantage: In controlled settings utilizing only zero-advantage prompts, CPO outperformed the entropy-regularized baseline (RL-ZVP) by 3.2% on average, proving it extracts meaningful learning signals where other methods fail.

Limitations and Future Work

  • Computational Overhead: Computing the reference-guided posterior requires an additional forward pass over the generated tokens, which increases overall training time by approximately 20% compared to standard GRPO. The authors suggest that decoupling this pass asynchronously could mitigate the bottleneck.
  • Verifiable Reward Dependency: CPO currently relies on the availability of ground-truth reference answers to construct its posterior distribution. This limits its immediate application to domains with clear ground truths (like math and coding). The authors point out that substituting reference answers with automated critic feedback or process-level annotations is a promising avenue to extend CPO to open-ended and subjective tasks.

Summary updated

BibTeX
@misc{xu2026beyond,
  author = {Weiwen Xu and Jia Liu and Hou Pong Chan and Long Li and Deng Cai and Min Chen and Hao Zhang},
  title = {{Beyond Entropy: Correctness-Aware Advantage Shaping via Contrastive Policy Optimization}},
  year = {2026},
  eprint = {2607.14614},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.14614},
}
Figure