Create and explore imaginative 3D worlds with our new product Dreamfield (opens in a new tab)
Papers
Topics
Authors
Recent
Search
2000 character limit reached

Direct Preference Optimization: Your Language Model is Secretly a Reward Model

Published 29 May 2023 in cs.LG, cs.AI, and cs.CL | (2305.18290v3)

Abstract: While large-scale unsupervised LMs learn broad world knowledge and some reasoning skills, achieving precise control of their behavior is difficult due to the completely unsupervised nature of their training. Existing methods for gaining such steerability collect human labels of the relative quality of model generations and fine-tune the unsupervised LM to align with these preferences, often with reinforcement learning from human feedback (RLHF). However, RLHF is a complex and often unstable procedure, first fitting a reward model that reflects the human preferences, and then fine-tuning the large unsupervised LM using reinforcement learning to maximize this estimated reward without drifting too far from the original model. In this paper we introduce a new parameterization of the reward model in RLHF that enables extraction of the corresponding optimal policy in closed form, allowing us to solve the standard RLHF problem with only a simple classification loss. The resulting algorithm, which we call Direct Preference Optimization (DPO), is stable, performant, and computationally lightweight, eliminating the need for sampling from the LM during fine-tuning or performing significant hyperparameter tuning. Our experiments show that DPO can fine-tune LMs to align with human preferences as well as or better than existing methods. Notably, fine-tuning with DPO exceeds PPO-based RLHF in ability to control sentiment of generations, and matches or improves response quality in summarization and single-turn dialogue while being substantially simpler to implement and train.

Citations (12,890)

Summary

  • The paper introduces Direct Preference Optimization (DPO), a novel approach that optimizes language models to align with human preferences without reward modeling or reinforcement learning.
  • The paper leverages a simple classification objective with dynamic per-example weighting to overcome the instability and complexity of traditional RL methods.
  • The paper demonstrates DPO's competitive performance in tasks like sentiment modulation, summarization, and dialogue generation, setting a new direction for efficient LM fine-tuning.

Summary of the Direct Preference Optimization Algorithm

Introduction to LLM Tuning Challenges

Large-scale unsupervised LLMs have exhibited impressive capabilities, having been trained on massive datasets. However, precisely controlling their behavior remains difficult due to the varying intentions behind human-generated datasets. These models frequently adopt undesirable traits, and current methods aiming to fine-tune these models to reflect human preferences involve complex reinforcement learning (RL) algorithms that make the process computationally expensive and unstable. Recognizing the need for safer and more controllable AI systems, researchers have examined the possibility of bypassing explicit reward modeling and avoidance of reinforcement learning.

Direct Preference Optimization Approach

The paper introduces Direct Preference Optimization (DPO), a stable, performant, and computationally efficient algorithm for fine-tuning LMs to human preferences without the need for reward modeling or reinforcement learning. DPO directly optimizes policies to satisfy human preferences using a simple classification objective. It works by increasing the log probability of preferred responses compared to dispreferred responses, employing a dynamic per-example weight. DPO's ability to align with human preferences is shown to be comparable or superior to established methods like RL with proximal policy optimization (PPO), especially in tasks like sentiment modulation, summarization, and single-turn dialogues.

Theoretical Underpinnings and Advantages

DPO's framework is based on theoretical models that measure how well a given reward function aligns with empirical preference data, such as the Bradley-Terry model. This strategy allows DPO to avoid the instabilities associated with actor-critic algorithms commonly used in RL-based fine-tuning methods. It also addresses the over-specification issue, meaning multiple reward functions can induce the same preference distribution, and promotes generalization across different tasks without the risk of overfitting. Furthermore, DPO's simple nature avoids the need for complex hyperparameter tuning that other RL methods may require.

Empirical Validation and Future Potential

Experiments conducted with DPO show its effectiveness compared to alternative methods like PPO and Unlikelihood training, offering at least similar, if not better, alignment with human preferences. These results were demonstrated in tasks like generating summaries and dialogues, where models tuned with DPO exceeded performance benchmarks. There's potential for DPO to be applied to models even larger than the 6 billion parameters tested, and its efficacy opens avenues for numerous applications beyond fine-tuning LMs, such as in generating models in various modalities. While the results are promising, further research is needed to assess the robustness of DPO, including how the policies perform out of distribution and how reward over-optimization may present itself. Additionally, the accuracy of using automated systems, like GPT-4, for evaluation purposes could be a focus for continued investigation.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Tweets

Sign up for free to view the 113 tweets with 1942 likes about this paper.

YouTube

Building custom LLMs with Metaflow: end-to-end stack with Nebius & Outerbounds 106K views
Direct Preference Optimization: Your Language Model is Secretly a Reward Model | DPO paper explained 45K views
Direct Preference Optimization (DPO) explained: Bradley-Terry model, log probabilities, math 41K views
Jay Alammar on LLMs, RAG, and AI Engineering 26K views
RLHF, DPO, & KTO: Top 3 AI/ML Optimization Techniques Explained 23K views
EZ撸paper: DeepSeek-R1 论文详解 part 3:GPT发展史 | scaling law | 训练范式 | emergent ability #deepseek 12K views
ChatGPT od środka: jak naprawdę działa LLM? 12K views
Deep dive: 4 NeurIPS 2023 best paper award papers - emergent ability, scaling, DPO, trustworthiness 11K views
DPO V.S. RLHF 5.5K views
Language Understanding and LLMs with Christopher Manning - 686 5.4K views
Интенсив GPT Week. Лекция 4: "Alignment" 5.1K views
Direct Preference Optimization (DPO) | Paper Explained 4K views
Make AI Think Like YOU: A Guide to LLM Alignment 3.5K views
Интенсив GPT Week. Семинар 3: "Alignment" 3K views
How DPO Works and Why It's Better Than RLHF 2.9K views
Teaching Large Language Models to Reason with Reinforcement Learning with Alex Havrilla - 680 1.9K views
LLMs | Alignment of Language Models: Contrastive Learning | Lec 13.3 1.9K views
【AI論文解説】RLHF不要なLLMの強化学習手法Direct Preference Optimization(+α) 1.8K views
Direct Preference Optimization in One Minute 1.6K views
Zephyr 7B Alpha DPO LLM beats RLHF Llama 2 Chat HuggingFace 1.1K views
From RLHF with PPO/DPO to ORPO + How to build ORPO on Trainium/Neuron SDK 982 views
Direct Preference Optimization 939 views
TRPO - Trust Region Policy Optimization | a breakthrough in RL paper explained. 731 views
Heather Gorham and Archit Sharma Discuss Direct Preference Optimization (Applied Context Ep. 1) 627 views
Fine-tuning OpenAI's GPT4O Using direct preference optimization (DPO) 616 views
#35: Prompting ist tot? Warum KI jetzt den Prompt schreibt 562 views
Lec 10 | Reinforcement Learning from Human Feedback: Part 04 527 views
RLHF DPO 數學詳細推導(36 min Uncut Ver.) 484 views
Offline Reinforcement Learning Research Survey 411 views
DPO : Direct Preference Optimization 379 views
Teaching Large Language Models to Reason with Reinforcement Learning with Alex Havrilla - 680 366 views
GPT SoVits整合包2月14日修复更新,DPO算法,长文本测试 306 views
LLM Fine-Tuning: RLHF vs DPO and beyond 290 views
08: Alignment [Session 8 of Full Course, LLM Engineering Cohort 3] 241 views
09: Alignment II & Merging [Session 9 of Full Course, LLM Engineering Cohort 3] 197 views
Reinforcement Learning for Agents • Talk at Worcester Polytechnic Institute (@WPI) • Dec 2, 2025 169 views
Penjelasan Metode DPO (Direct Preference Optimization) Dalam Proses Alignment LLM 142 views
94: Juan Uribe, o engenheiro da IA programadora da OpenAI 101 views
DPO for LLMs in Arabic 96 views
Direct Preference Optimization (DPO): Языковая модель как модель вознаграждения 58 views
368: Xoxo, Capenga e Inconsistente 48 views
[Ep2] DeepSeek R1 & RLHF 30 views
ELI5: Training Language Models with Human Feedback -- InstructGPT 13 views
47: Microsoft + Mistral, IA vs. programação, treinamento com DPO 13 views
MINISODE: "LLMs, a Survey" 12 views
62: Claude 3.5 Sonnet, Safe SuperIntelligence, IA no marketing 8 views
DPO: Rewolucja w Dopasowywaniu Modeli Językowych | Deep Dive 4 views
Direct Preference Optimization Your Language Model is Secretly a Reward Model 3 views
Finetune LLMs with Direct Preference Optimization