Stabilizing RLHF through Advantage Model and Selective Rehearsal

Baolin Peng, Linfeng Song, Ye Tian, Lifeng Jin, Haitao Mi, Dong YuarXiv 2023

Abstract

Large Language Models (LLMs) have revolutionized natural language processing, yet aligning these models with human values and preferences using Reinforcement Learning from Human Feedback (RLHF) remains a significant challenge. This challenge is characterized by various instabilities, such as reward hacking and catastrophic forgetting. In this technical report, we propose two innovations to stabilize RLHF training: 1) Advantage Model, which directly models advantage score (i.e., extra reward compared to the expected rewards) and regulates score distributions across tasks to prevent reward hacking. 2) Selective Rehearsal, which mitigates catastrophic forgetting by strategically selecting data for PPO training and knowledge rehearsing. Our experimental analysis on public and proprietary datasets reveals that the proposed methods not only increase stability in RLHF training but also achieve higher reward scores and win rates.

Introduction: The Challenges of RLHF

Training Large Language Models via Proximal Policy Optimization (PPO) is a delicate balancing act. While RLHF is the engine behind the conversational prowess of state-of-the-art models, it is notoriously unstable. Two major failure modes plague the process:

  1. Reward Hacking: Reward models (RMs) often learn disparate score distributions for different tasks. For example, a model might naturally assign higher absolute scores to "Code Generation" than to "General QA." A PPO agent will exploit this by forcing code-like patterns into non-coding responses to chase higher rewards, even if the quality is lower.
  2. Catastrophic Forgetting: As the model optimizes for specific prompts during the PPO stage, it often loses the high-quality, "expert-aligned" behaviors acquired during Supervised Fine-Tuning (SFT). This results in a model that achieves high reward scores but produces gibberish or loses general utility.
Figure 2: (a) Reward score distributions across tasks showing potential for hacking, and (b) the decline in win rate on the forget set for standard RM-PPO.

Proposed Innovations

The Advantage Model (AM)

In standard RLHF, the Reward Model provides an absolute scalar. The Advantage Model instead focuses on the relative gain. It calculates an "advantage score"—the extra reward a specific response achieves compared to the expected reward for that prompt.

Key features include:

  • Importance Weighting: It uses importance sampling to account for training data originating from different model versions.
  • Bounding Loss: It introduces a margin-based loss to ensure advantage scores stay within a calibrated range, preventing the "exploding" rewards that lead to hacking.

Selective Rehearsal

To prevent catastrophic forgetting, the authors employ a surgical data selection strategy rather than simply increasing data volume:

  • Representative Discovery: SimCSE embeddings and KMeans clustering group PPO prompts into "skill clusters" (e.g., math, creative writing).
  • Data Selection: Within each cluster, top-performing (high advantage) pairs are selected.
  • Rehearsal Training: During PPO, a standard Negative Log-Likelihood (NLL) loss term is added—acting as a "reminder" of the SFT objective—specifically for these high-quality, diverse examples.

Key Results and Insights

Better Calibration

Calibration is critical for a reliable reward signal. The Advantage Model significantly reduces Expected Calibration Error (ECE). While standard reward models tend to be overconfident, the AM provides a more "honest" signal that accurately reflects how much better one response is than another.

Figure 5: Calibration curves on HH-RLHF and Proprietary test data, demonstrating that the Advantage Model (AM) tracks perfect calibration more closely than the standard Reward Model (RM).

Performance and Stability

  • Higher Win Rates: On the main test set, the combined AM-PPO-SR (Advantage Model + Selective Rehearsal) approach achieved a 15.78% win rate over the SFT baseline, outperforming standard RM-PPO (12.72%).
  • Stability on the "Forget Set": Standard RM-PPO saw a massive performance drop on the forget set (a 29.28% loss rate). In contrast, the Selective Rehearsal model remained stable, with a loss rate of only 7.95%.
  • Task Parity: By analyzing mean and variance across 60+ task categories, the researchers showed that standard RMs have massive disparities between tasks. The AM flattens these distributions, making the reward signal "fair" across different domains.

Conclusion

By addressing the root causes of instability in RLHF—unbalanced reward distributions and the loss of SFT knowledge—the Advantage Model and Selective Rehearsal provide a more robust framework for model alignment. These techniques ensure that LLMs not only follow human preferences more accurately but also retain the broad capabilities developed during their initial training phases.

Summary updated

BibTeX
@misc{peng2023stabilizing,
  author = {Baolin Peng and Linfeng Song and Ye Tian and Lifeng Jin and Haitao Mi and Dong Yu},
  title = {{Stabilizing RLHF through Advantage Model and Selective Rehearsal}},
  year = {2023},
  eprint = {2309.10202},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.10202},
}
Figure