Aligning Large Language Models (LLMs) with human preferences is the critical process that transforms base models into helpful assistants. While Reinforcement Learning from Human Feedback (RLHF) is the industry standard, it is often computationally expensive and sensitive to hyperparameters. Researchers from Tencent AI Lab have introduced Adversarial Preference Optimization (APO), a framework that treats alignment as a competitive game between the model and its reward judge, significantly improving efficiency and robustness.
The Challenge: Distribution Shift
A primary obstacle in alignment is distribution shift. When a Reward Model (RM) is trained on a static dataset of human preferences, it learns to evaluate the specific types of responses the model produced at that time. However, as the LLM improves during training, it generates higher-quality outputs that differ from the initial training set.
As shown in Figure 1, the RM becomes an unreliable judge for these new outputs because they fall outside the distribution it was trained to handle. Traditionally, solving this requires expensive "human-in-the-loop" re-annotation to update the RM with fresh data.
The APO Framework
Inspired by Generative Adversarial Networks (GANs), APO frames alignment as a min-max game with two players: the LLM (Generator), which seeks to maximize rewards, and the Reward Model (Discriminator), which learns to distinguish between high-quality "Golden Responses" and the LLM's current outputs.
As detailed in Figure 4, the process follows an iterative loop:
- RM Step: The Reward Model is updated using a combined loss function. It evaluates original human preference data alongside new pairs where a "Golden" response (often sourced from a stronger model like GPT-4) is preferred over the LLM's latest sampled output. This forces the RM to constantly raise the bar.
- LLM Step: The LLM is updated to maximize the reward from this sharpened RM. Because APO is a framework rather than a specific algorithm, it is compatible with various methods such as Direct Preference Optimization (DPO), RRHF, or Rejection Sampling (RJS).
Experimental Results
The researchers evaluated APO using the Anthropic Helpful & Harmless (HH) dataset with Alpaca-7B and LLaMA-2-7B as base models. The results demonstrate that the adversarial approach consistently outperforms static baselines:
- Win Rates: The APO-enhanced DPO model achieved a 74.22% win rate against the baseline Alpaca2 model.
- RM Accuracy: Through three rounds of adversarial play, Reward Model accuracy on test sets improved from a baseline of ~63% to over 67.5%.
- Helpfulness and Harmlessness: APO-enhanced models showed consistent gains across both metrics, suggesting that adversarial pressure refines model behavior across multiple dimensions of quality.
Conclusion and Future Work
APO offers a compelling path for researchers to extract more value from limited preference data. By treating the RM as a moving target that evolves alongside the generator, APO bridges the distribution gap without requiring constant human intervention. While the current study relies on "offline" batch sampling and GPT-4 as a "golden" proxy, future work may explore combining APO with "online" RLHF (like PPO) to further push the boundaries of model performance and safety.
Summary updated