Abstract
Aligning Large Language Models (LLMs) with human preferences typically involves complex Reinforcement Learning from Human Feedback (RLHF) or simpler but often suboptimal offline Direct Alignment from Preferences (DAP) methods. We present Online AI Feedback (OAIF), a framework that enables on-policy direct alignment by leveraging an LLM as a real-time annotator. OAIF mitigates the distribution shift issues inherent in offline methods like Direct Preference Optimization (DPO) without the architectural complexity of traditional RLHF. Our results demonstrate that Online DPO significantly outperforms offline counterparts and standard RLHF across multiple benchmarks, achieving a 58% win rate in human evaluations on summarization tasks.
Introduction
The alignment of LLMs ensures that model outputs remain helpful, harmless, and honest. Currently, two primary paradigms exist: RLHF and DAP. RLHF, while effective, requires training a separate reward model and navigating the instabilities of reinforcement learning algorithms like PPO. Conversely, DAP methods like DPO simplify the process by optimizing the policy directly from preference data. However, most DAP implementations are offline, relying on static datasets. This leads to a distribution shift: as the model evolves during training, the static dataset no longer reflects the model's current output distribution, causing performance to plateau or degrade.
Methodology: Online AI Feedback (OAIF)
OAIF addresses the limitations of offline alignment by introducing an "online" feedback loop. Instead of using a pre-collected dataset, OAIF generates preference pairs on-the-fly using the model's current state.
The process consists of three iterative steps:
- Sampling: For a given prompt $x$, the current policy $\pi_\theta$ generates two candidate responses, $y_1$ and $y_2$.
- Annotation: An "LLM Annotator" (a separate, typically larger model) evaluates the pair $(y_1, y_2)$ based on a provided rubric and selects a preferred response $y_+$.
- Optimization: The model parameters are updated using a direct alignment loss (such as DPO, IPO, or SLiC) based on the fresh preference pair $(y_+, y_-)$.
By utilizing an LLM as a proxy for human judgment, OAIF eliminates the need to train and maintain a separate reward model, significantly simplifying the "online" alignment pipeline.
Experimental Setup
We evaluated OAIF across three primary alignment benchmarks: TL;DR (summarization), Anthropic Helpfulness, and Anthropic Harmlessness. We compared Online DPO against several baselines, including Offline DPO, RLAIF (Reinforcement Learning from AI Feedback), and standard RLHF. The policy models were primarily based on PaLM 2-XS.
Key Insights and Results
Overcoming Distribution Shift
A critical finding is the impact of on-policy data. In offline DPO, the model eventually overfits to the static preference dataset, leading to a sharp decline in performance as training progresses. In contrast, Online DPO maintains a steady upward trajectory in win rate because the feedback is always relevant to the model's current outputs.
Performance Benchmarks
In human evaluations on the TL;DR summarization task, Online DPO achieved a 58% win rate in a head-to-head comparison against Offline DPO (7%), RLAIF (3%), and RLHF (6%), with 26% ties. Across various tasks, online versions of DAP methods consistently outperformed their offline versions by significant margins (e.g., ~66% win rate for Online vs. Offline DPO).
Controllability and Quality
OAIF offers unique flexibility. By modifying the system prompt of the LLM Annotator, researchers can steer model behavior (e.g., requesting shorter summaries) without retraining a reward model. Furthermore, analysis shows that the performance gains are not merely due to increased verbosity; Online DPO maintains higher quality scores than baselines even when controlling for response length.
Conclusion
Online AI Feedback (OAIF) represents a significant step forward in simplifying and improving LLM alignment. By combining the stability of direct alignment losses with the performance benefits of on-policy feedback, OAIF provides a robust alternative to traditional RLHF. Future work will explore the scaling of OAIF to larger models and the potential for generating novel, online prompts to further enhance model exploration.
Summary updated