Pairwise Proximal Policy Optimization: Harnessing Relative Feedback for LLM Alignment

Tianhao Wu, Banghua Zhu, Ruoyu Zhang, Zhaojin Wen, Kannan Ramchandran, Jiantao Jiao · Submission to ICLR 2024 · Rejected

TL;DR

Pairwise Proximal Policy Optimization (P3O) reimagines RLHF by replacing standard token-level policy gradients with trajectory-level relative feedback between pairs of generated responses. By comparing two outputs per prompt directly, P3O eliminates the need for an auxiliary critic network and Generalized Advantage Estimation (GAE), guaranteeing mathematical invariance to reward scale shifts and achieving a superior KL–reward trade-off over PPO and DPO.

What Problem Does This Paper Address?

The standard third stage of Reinforcement Learning with Human Feedback (RLHF) optimizes language models using Proximal Policy Optimization (PPO). However, PPO suffers from fundamental structural mismatches with the reward modeling phase:

  1. Reward Inconsistency & Instability: Reward models are trained using pairwise comparison losses (like the Bradley-Terry loss), which are invariant to prompt-dependent constant shifts ($r(y|x) + \delta(x)$). PPO is not invariant to such shifts because it relies on learning a value function $V(x)$ to estimate advantages. Different prompt-level baselines alter critic updates and destabilize training.
  2. Unnecessary Token-Wise Complexity: While reward models output a single scalar for an entire sequence, PPO treats generation as a Markov Decision Process (MDP). This requires training a separate critic network and tuning Generalized Advantage Estimation (GAE) to redistribute sparse end-of-sequence rewards across individual tokens, introducing approximation error and variance.

Methods

The authors formalize text generation as a Contextual Bandit (CB) where the entire sequence is treated as a single action, and introduce P3O:

  • Pairwise Policy Gradient (PPG): Instead of learning a value function $V(x)$ to act as a baseline, P3O samples two completions ($y_1, y_2$) for each prompt $x$. The second completion serves as an unbiased baseline for the first, yielding a symmetric policy gradient directly proportional to the reward margin $(r(y_1|x) - r(y_2|x))$.
  • Pairwise Clipping: To prevent overly large policy updates, P3O adapts PPO’s surrogate clipping objective into two variants:
  • P3O-V1 (Separate Clipping): Clips the importance sampling ratio $\pi_\theta(y_i|x)/\pi_{\theta_\text{old}}(y_i|x)$ individually for both responses.
  • P3O-V2 (Joint Clipping): Clips the change in the relative log-ratio $\log \frac{\pi_\theta(y_1|x)}{\pi_\theta(y_2|x)}$ directly.
  • Online-DPO Baseline: The authors also formulate an online version of Direct Preference Optimization (DPO) using the proxy reward model to label pairs on the fly for comparison.

Datasets

The authors evaluate their method on two standard RLHF benchmarks:

  • Reddit TL;DR: Summarization task using a 6B SFT base model (CarperAI/openai_summarize_tldr_sft) and a 6B GPT-J reward model.
  • Anthropic Helpful and Harmless (HH): Multi-turn dialogue / question-answering evaluated across two model sizes: Pythia-1B and Pythia-6B SFT models, paired with a 6B GPT-J reward model.

Note: No new datasets were introduced.

Key Insights and Ideas

  • Reward Equivalence & Invariance: The paper formally defines reward equivalence: two reward functions are equivalent ($r \sim r'$) if they differ only by a prompt-dependent scalar $\delta(x)$. Bradley-Terry reward training cannot resolve this shift. P3O and DPO are proven to be strictly invariant to this equivalence, whereas PPO yields different updates under equivalent rewards due to critic regression errors.
  • Critic-Free Simplicity: Because one sample serves as the baseline for the other, P3O removes the critic model entirely. This eliminates critic memory overhead, advantage normalization, and GAE hyperparameters ($\lambda$).
  • Better KL Control than DPO: Although DPO directly optimizes policy weights toward the theoretical optimum, its updates do not enforce strict step-by-step policy improvement. Consequently, online-DPO drifts heavily from the reference policy. P3O retains the trust-region policy gradient foundation, preventing excessive KL drift while chasing high reward.

Key Results

  • KL–Reward Frontier: Across both TL;DR and Anthropic HH (1B and 6B models), P3O strictly dominates PPO and online-DPO. At equivalent KL divergence from the SFT model, P3O delivers a reward increase of 0.1 to 0.3 over baselines.
  • DPO Divergence: Online-DPO achieves slightly higher raw reward than P3O on HH, but incurs ~22% higher sequence KL divergence (12.01 vs. 9.83 for P3O), leading to degraded, incoherent text.
  • Head-to-Head GPT-4 Evaluation (HH Test Set):
  • P3O vs. PPO: 57.0% win rate.
  • P3O vs. Online-DPO: 54.6% win rate (GPT-4 penalized DPO's over-optimized, vague outputs).
  • P3O vs. SFT: 69.3% win rate.
  • Algorithmic Stability: P3O-V2 (joint clipping) demonstrated more consistent frontier stability than P3O-V1 (separate clipping).

Limitations and Future Work

  • Granular Credit Assignment: Treating generation purely as a contextual bandit foregoes token-level credit assignment. Tasks with clear intermediate step correctness (such as step-by-step mathematical reasoning) may still benefit from token-wise feedback.
  • Pairwise Restriction: P3O currently operates on pairs ($K=2$). Extending the formulation to ranked lists of $K > 2$ responses per prompt is left for future work.
  • Reward Over-Optimization: The authors note that the theoretical differences in reward hacking between trajectory-wise bandit RL and token-wise MDP RL require deeper investigation.

Summary updated

BibTeX
@inproceedings{wu2023pairwise,
  author = {Tianhao Wu and Banghua Zhu and Ruoyu Zhang and Zhaojin Wen and Kannan Ramchandran and Jiantao Jiao},
  title = {{Pairwise Proximal Policy Optimization: Harnessing Relative Feedback for LLM Alignment}},
  booktitle = {FMDM @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=yQT406rH72},
}
Figure