Direct Preference Optimization
Direct Preference Optimization (DPO)
DPO is a training method that aligns LLMs with human preferences without requiring a separate reward model or reinforcement learning. Introduced by Rafailov et al. (2023), it simplifies the RLHF pipeline.
How DPO Works
DPO reparameterizes the RLHF objective into a simple binary cross-entropy loss:
- Preference data — Collect pairs of (chosen, rejected) outputs (same as RLHF)
- Direct optimization — The model is trained to increase probability of chosen outputs relative to rejected outputs
- Implicit reward — The language model itself acts as the reward function
- KL constraint — A reference model prevents divergence
Key Insight
The optimal policy under the RLHF objective has a closed form relating the policy to the reward. DPO rearranges this to express the reward in terms of the policy, eliminating the need for a separate reward model.
Advantages over RLHF
- No reward model — Saves training compute and complexity
- No RL loop — Eliminates PPO instability
- Simple training — Standard supervised loss
- Stable — Converges reliably without hyperparameter tuning
- Equally effective — Matches or exceeds RLHF results
Limitations
- Same data requirements — Still needs human preference annotations
- Reference model needed — To prevent catastrophic forgetting
- Less studied — Less literature on failure modes vs RLHF
Use Cases
DPO is widely used for fine-tuning open-source models like Llama 4, Mistral Large, and qwen-2.5.
Comparison
| Aspect | RLHF | DPO |
|---|---|---|
| Architecture | Reward model + PPO | Direct loss |
| Training cost | Higher | Lower |
| Complexity | High | Low |
| Stability | Can be unstable | Stable |
| Popularity | GPT-4, Claude | Open models |
Related
- Reinforcement Learning from Human Feedback — The traditional approach DPO simplifies
- supervised-fine-tuning — Preliminary training stage
- pretraining — Before alignment