Direct Language Model Alignment from Online AI Feedback

Shangmin Guo, Biao Zhang, Tianlin Liu, Tianqi Liu, Misha Khalman, Felipe Llinares-López, Alexandre Rame, Thomas Mesnard, Yao Zhao, Bilal Piot, Johan Ferret, Mathieu Blondel · Submission to NeurIPS 2024 · Rejected

TL;DR

Direct alignment methods like Direct Preference Optimization (DPO) eliminate the instability of reinforcement learning from human feedback (RLHF), but they traditionally rely on static, offline datasets that cause severe off-policy distribution shifts. Online AI Feedback (OAIF) bridges this gap by sampling response pairs on-the-fly from the current model and using an LLM annotator to score them in real time. This simple on-policy framework beats both offline preference tuning and traditional RLHF/RLAIF, while making alignment steerable via natural language prompts.

What Problem Does This Paper Address?

Direct Alignment from Preferences (DAP) algorithms—such as DPO, IPO, and SLiC—are widely favored over classical RLHF because they bypass training a separate reward model (RM) and avoid unstable policy-gradient optimization (like PPO). However, existing DAP implementations suffer from an offline, off-policy bottleneck:

  1. Distribution Shift: Pairwise preferences are usually pre-collected using older, external models ($\rho$). As the target policy ($\pi_\theta$) evolves during training, its generated outputs drift away from $\rho$, leading to significant distribution mismatch.
  2. Reward Overoptimization / Overfitting: Because the policy cannot receive interactive feedback on its own updated outputs, offline DAP methods quickly plateau and overfit.

While standard RLHF provides online feedback on the current policy's generations, it requires training an explicit RM (which itself encounters out-of-distribution errors) and managing high-variance policy gradients.

Methods

OAIF brings on-policy, interactive learning to DAP methods without training an explicit reward model:

  1. On-Policy Sampling: At each training step $t$, given a prompt $x$, the model samples two candidate responses directly from its current policy: $y_1, y_2 \sim \pi_{\theta_t}(\cdot \mid x)$.
  2. Online LLM Annotation: Instead of routing outputs through a specialized reward model, an off-the-shelf LLM annotator (e.g., PaLM 2-L) ranks $y_1$ and $y_2$ using zero-shot prompting. To eliminate position bias, scores are averaged across both orderings ($y_1$ vs. $y_2$ and $y_2$ vs. $y_1$) to assign chosen ($y^+$) and rejected ($y^-$) labels.
  3. Parameter Update: The policy parameters are updated via standard DAP objectives (DPO, IPO, or SLiC). Gradients are computed treating response generation and annotation as constant (via a stop_gradient operation).
Prompt x ──> Current Model π_θ ──> (y1, y2) ──> LLM Annotator ──> (y+, y-) ──> DAP Loss Update

Datasets

The authors evaluated OAIF across three standard alignment benchmarks by extracting input prompts:

  • TL;DR (Reddit Summarization)
  • Anthropic Helpfulness
  • Anthropic Harmlessness

They also used the Stylistic-Continuation dataset (based on GPT-2 Large) to empirically demonstrate the severity of off-policy distribution shifts.

Key Insights and Ideas

  • Offline DAP Suffers Sudden Overfitting: Tracking DPO win rates over training revealed that offline DPO rapidly degraded after ~3,500 steps due to overfitting static offline pairs. In contrast, online DPO with OAIF continuously improved.
  • LLM Annotators Beat Fixed Reward Models: Synchronously training RMs is computationally heavy, and static RMs generalize poorly to shifting policy outputs. Direct LLM prompting bypasses RM training entirely and produces higher-quality preference signals.
  • Text-Based Controllability Without Retraining: Modifying alignment targets in RLHF usually requires recollecting human data and retraining the RM. With OAIF, behaviors can be steered on-the-fly by altering the annotator's instruction prompt (e.g., instructing the annotator to favor concise responses shrank average response lengths from ~120 to ~40 tokens).
  • Weaker Teachers Can Guide Stronger Students: Even a smaller annotator (PaLM 2-XS) successfully aligned a larger policy (PaLM 2-S). Because discrimination (judging preference) is fundamentally simpler than generation, weak supervision remains viable.

Key Results

  • Human Evaluation Wins Over Offline DAP: Online DAP variants consistently outperformed their offline equivalents, achieving an average human win rate of ~66%:
  • Online DPO vs. Offline DPO: Win rates of 63.74% on TL;DR, 58.60% on Helpfulness, and 60.26% on Harmlessness.
  • Online IPO vs. Offline IPO: 64.81% win rate on TL;DR.
  • Online SLiC vs. Offline SLiC: 71.43% win rate on TL;DR.
  • Superiority Over RLHF and RLAIF: In 4-way human evaluation on TL;DR, Online DPO was preferred 58% of the time, vastly outpacing offline DPO (7%), RLHF (6%), and RLAIF (3%), with 26% ties.
  • Robust Beyond Length Bias: Even when responses were bucketed by length, OAIF generations achieved higher human quality scores across all length tiers, confirming improvements were not merely artifacts of generating longer text.

Limitations and Future Work

  • Prompt Distribution Shift: The study assumes in-distribution evaluation prompts drawn from pre-existing datasets; out-of-distribution prompt generalization remains untested.
  • Task-Specific Prompt Engineering: Experiments relied on custom annotation prompts for each specific domain. Developing a universal, principle-based prompt (akin to Constitutional AI) is needed for generalist alignment.
  • Scaling to Frontier-Scale Models: Most policy models tested were relatively small (PaLM 2-XS and PaLM 2-S). Validating how well OAIF scales when aligning frontier-scale policies—where distinguishing marginal quality differences is substantially harder—remains open for future exploration.

Summary updated

BibTeX
@misc{guo2024direct,
  author = {Shangmin Guo and Biao Zhang and Tianlin Liu and Tianqi Liu and Misha Khalman and Felipe Llinares-López and Alexandre Rame and Thomas Mesnard and Yao Zhao and Bilal Piot and Johan Ferret and Mathieu Blondel},
  title = {{Direct Language Model Alignment from Online AI Feedback}},
  year = {2024},
  eprint = {2402.04792},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.04792},
}
Figure