In one line: DPO collapses RLHF's reward-model-plus-PPO pipeline into one binary cross-entropy loss by reparameterising the reward as the policy/reference log-ratio, which the paper reports as matching or beating PPO on its three tasks at 2023 scales.
How far to trust it: Believe the derivation (it is exact) and the recipe (simple, cheap, adopted everywhere). Treat the head-to-head wins over PPO as suggestive rather than settled: each is a single run judged by GPT-4, the summarisation margin over PPO is about one standard error, and later controlled studies found well-tuned on-policy RL ahead on harder tasks. The evidence, judged.
The idea in one sentence: the best policy for any reward under RLHF's KL-constrained objective is the reference reweighted by exp(reward / β), so every reward can be written as β log π/πref plus a prompt-only term that cancels in a preference comparison; fitting the preference pairs with that reward is one logistic loss on the policy itself, with no reward model, no sampling and no RL.
You need: the RLHF pipeline (reward model, KL penalty, PPO), taught on Alignment: SFT, RLHF, DPO family, RLVR, and cross-entropy as a likelihood (Loss functions). DPO's successors (IPO, KTO, SimPO, ORPO) and the online-against-offline evidence since are compared on the alignment page; PPO and GRPO for LLMs on RL for LLMs; this page is the paper. New terms: πref (the frozen starting model, usually the SFT model); β (the KL penalty's weight: small β lets the policy move far); implicit reward (β log π/πref, the reward a DPO policy defines); frontier (reward reached at each KL from πref); Preferred-FT (supervised fine-tuning on the chosen answers only); Unlikelihood (push chosen up and rejected down with no weight); PPO-GT (PPO on the true reward, an oracle).


In 2023, steering a pretrained model towards what people prefer meant RLHF (Ziegler et al., Stiennon et al., Bai et al., InstructGPT), in three stages (§3):
The third stage is the painful one: several language models at once and sampling inside the training loop; PPO keeps four networks in play (policy, frozen reference, reward model, a learned value function), and it is notoriously unstable and sensitive to hyperparameters (§1, §5.2). The question: is the reinforcement learning necessary at all? The paper's answer is no: the same KL-constrained objective can be optimised exactly with one binary cross-entropy loss on the preference pairs: no separate reward model, no sampling, no RL (§1). (The pipeline in general, with InstructGPT's numbers, is taught on Alignment: SFT, RLHF, DPO family, RLVR; above is the paper's own statement of it.)
The key move is a change of variables. Three steps, each a line of algebra (§4, Appendix A.1 and A.2):
1. The best policy for any reward has a closed form. For a reward r, the maximiser of Eq. 3 over all policies is a reweighting of the reference, a standard result from KL-regularised control (Peters and Schaal; Peng et al.; Korbak et al.; Go et al.):
2. Turn it round: a reward is a log-ratio of policies. Take logs and rearrange:
3. Bradley-Terry only sees differences, so Z cancels. Put Eq. 5 into Eq. 1 and the two β log Z(x) terms cancel: the preference probability depends only on π* and πref (Eq. 6). Fitting that by maximum likelihood, as Eq. 2 fits a reward model, gives the DPO objective:
The same derivation works for rankings of more than two answers under the Plackett-Luce model, where it gives a softmax over the ranked answers' log-ratios (Appendix A.3, Eq. 20).
What that saves, on this page's toy (Train DPO and RLHF: 4-word reviews, 5,229 pairs labelled by a sentiment classifier), both pipelines on the same data (Fig. 1). The models are the glass plates at the back; switch to DPO and the reward model's plate is an empty frame. The value network is dashed: the toy's PPO uses the batch mean as its baseline. The plinth at the front holds one pair's two rewards: the reward model's in RLHF, the policy's own implicit reward in DPO. The general picture (one RL step model by model, and the memory bill of PPO, GRPO and DPO) is on Alignment: SFT, RLHF, DPO family, RLVR; this figure is the paper's claim on its toy.
The toy's own counts and runs (toy_sweep.mjs: the sweep runs "PPO, target KL 1" and "DPO, β = 1"), recomputed in your browser; pair 3's implicit rewards come from the same DPO run as Fig. 2.
The quantity inside the sigmoid is a reward in its own right, the implicit reward r̂θ(x, y) = β log [πθ(y|x) / πref(y|x)]. DPO is exactly reward-model fitting under this parameterisation, so the trained language model doubles as its own reward model, the title's claim. Its gradient (§4, derived in Appendix A.4) reads:
The authors' claim is that the weight matters: "a naïve version of this method without the weighting coefficient can cause the language model to degenerate" (§4). The naive version is the paper's Unlikelihood baseline, maximise log π(yw) and minimise log π(yl) (Appendix C.3). In Fig. 2 the same four training pairs of the toy go through both, during real training runs computed in your browser; the nine checkpoints of each 600-step run (0, 5, 10, 25, 50, 100, 200, 400, 600 steps) play in five stretches. The numbers in the steps are for β = 1; the counters follow the β you pick.
Bars: each answer's log πθ/πref in nats, to scale; the implicit reward is β times it. Grey trough: the pair's weight σ(r̂(yl) − r̂(yw)) (Unlikelihood: 1). Counters exact over all 20,736 sequences; settings as in the Train tab. The same push on one illustrative pair for eight losses, token by token, is on the alignment page, section 5.
It went down. The loss only asks the gap to grow, and pushing both down, the rejected faster, is often the cheapest way. At β = 0.1 the average chosen log-ratio ends at nats (about times less likely) and the rejected at ; at β = 1 the chosen answers end near where they started, at β = 5 slightly above. Later work calls this likelihood displacement (Pal et al. 2024; Razin et al. 2024; Why it matters):
Average log πθ/πref of the chosen and rejected answers over the training pairs, during 600 steps of DPO on the toy. From the sweep runs of toy_sweep.mjs (identical when rerun in the browser). Llama 3 added a negative log-likelihood term on the chosen answers for exactly this reason (Llama 3 §4.1.4); why shared parameters cause it is on the alignment page.
The recipe (§4, DPO outline, Appendix B): label pairs sampled from πref; use πref = πSFT when the data came from it, otherwise fine-tune on the chosen answers first (Preferred-FT) to reduce the shift between data and πref. The loss is about ten lines of PyTorch (Appendix B); TRL logs the implicit rewards as rewards/chosen, rewards/rejected and rewards/margins (TRL docs). Settings: What it takes.
Is anything lost by insisting that the reward be a log-ratio of a policy and the reference? Section 5 says no (§5.1): rewards that differ only by a function of the prompt give the same preferences and the same optimal policy, and Theorem 1 shows every such class contains exactly one reward of the form β log π(y|x)/πref(y|x) (given πref > 0 everywhere and β > 0).
Proofs in Appendix A.5 and A.6.
So restricting to log-ratios loses no reward class, and it is exactly what makes Eq. 4 tractable for every prompt. The same lens explains PPO's trouble (§5.2, Eq. 10): β log Z(x) is the reference's soft value function. It does not move the optimum, but without it the policy gradient has high variance; PPO learns a value function for it (hard to optimise), earlier work used a human-written completion as a one-sample baseline, and DPO's reward needs no baseline.
The toy checks this. Its policy class and reward-model class match exactly (both are sums of word-pair terms; the toy), so the DPO loss over policies and the Bradley-Terry loss over rewards should reach the same minimum. They do: . But only margins between compared answers are pinned down: trained to convergence without early stopping, the DPO policy put of its probability on sequences that never appeared in the data. The figure plots the implicit reward of a normally trained policy (600 steps) against the true reward.
Each dot is one of the 391 distinct sequences in the training pairs, area by its reference probability; the true reward is the toy's sentiment classifier. Computed live in your browser.
Tasks: IMDb sentiment with GPT-2-large and a sentiment classifier as the true reward (so the reward-KL frontier can be measured exactly); Reddit TL;DR summarisation from a GPT-J SFT model with Stiennon et al.'s human preferences; Anthropic HH dialogue with Pythia-2.8B. Sentiment is scored on the frontier, the other two by GPT-4 win rates.
Evaluation: on IMDb, each method's frontier of true reward against sequence-level KL to πref; elsewhere, win rates against the test set's reference summaries or preferred responses, judged by gpt-4-0314 with the answer order randomised (Appendix C.2).
Baselines: zero-shot GPT-J and 2-shot Pythia-2.8B; SFT; Preferred-FT (supervised on yw); Unlikelihood with a coefficient α on the push-down term; PPO on a learned reward; PPO-GT, an oracle PPO on the true reward (IMDb only; an off-the-shelf TRL version and the authors' tuned one); and Best of N, which samples N answers and keeps the one the learned reward likes best: strong, but N samples per query at test time (§6).
How well does DPO optimise the RLHF objective? On IMDb, 22 runs sweep each method's conservativeness (PPO target KL ∈ {3, 6, 9, 12}; DPO β ∈ {0.05, 0.1, 1, 5}; Unlikelihood α ∈ {0.05, 0.1, 0.5, 1}; seeds for Preferred-FT), evaluated every 100 steps. DPO gives by far the best frontier, the most reward at every KL, even against PPO-GT on the true reward; as both optimise the same objective, the authors read this as DPO being the better optimiser (§6.1, Figure 2 left). The figure is rebuilt from the paper's vector data (177 points).
Dots: every evaluation the figure plots; lines: each method's best-so-far envelope. Every PPO and PPO-GT point except the untrained starting checkpoints is beaten by some DPO point on both axes. Full version with toggles: the figures tab.
PPO-GT, and for DPO it depends on β. Average shortfall from the exact frontier (lower is better): . At β = 1 and 5 DPO is about as close as PPO-GT and closer than PPO on a learned reward; at the paper's β = 0.05 and 0.1 it falls well short, because for a long stretch the weights all sit near ½ and the update behaves like the unweighted one. The toy cannot test what made the paper's PPO weak at GPT-2-large scale, but it shows DPO's dominance is not a property of the objective (more).
Every evaluation of the 19 toy runs (reward against KL), computed by toy_sweep.mjs; the exact Eq. 4 frontier and the full sweep are on the Train tab.
Summarisation. At temperature 0, DPO wins about 61% of GPT-4 comparisons against the reference summaries and PPO 57% at its best temperature (also 0); DPO also beats the best Best of N (which plateaus at 64 to 128 samples, Figure 4), with β not meaningfully tuned. DPO is much more robust to temperature: PPO falls towards the base GPT-J at high temperature, and Preferred-FT barely improves on SFT (§6.2, Figure 2 right). Read from the figure's vector data, every point is a count out of 256 test prompts, with ±1 binomial standard error bars: DPO 158 and PPO 146 at temperature 0 (61.7% and 57.0%); at temperature 1, DPO 99 and PPO 18.
Dialogue. DPO is "the only computationally efficient method that improves over the preferred completions" of Anthropic HH, roughly matching the expensive Best of 128 at each method's best temperature: 62.9% against 60.8%, both at temperature 1.0, though at 0.25 DPO is at 37.0% and Best of 128 at 54.2% (§6.2, Figure 3). There is no PPO here: a public PPO model (reciprocate/ppo_hh_pythia-6B) could not beat the base Pythia-2.8B at any prompt or temperature tried, so Best of 128 stands in as "a rough proxy for PPO-level performance". DPO reaches its level quickly and stays there.
A new input distribution (added in v2, December 2023): on CNN/DailyMail news, the TL;DR policies win 0.36 (DPO) against 0.26 (PPO) at temperature 0 and 0.31 against 0.23 at 0.25, versus the ground-truth summaries, though PPO also saw extra unlabelled Reddit prompts (§6.3, Table 1).
GPT-4 as a stand-in for people. On TL;DR, three methods against greedy PPO: DPO at temperature 0.25 (272 respondents), SFT at 0.25 (122) and PPO at 1.0 (199). With the concise prompt GPT-4 (C), GPT-4 agrees with people 67%, 79% and 85% of the time, against 65% and 87% human-human agreement; people preferred DPO 58% of the time. The simple prompt GPT-4 (S) prefers longer, more repetitive summaries, so the main results use GPT-4 (C) (§6.4, Table 2).
About one. Each proportion has a standard error of about 3 points at n = 256, so the 4.7-point gap has one of about 4.3 (treating the runs as independent; per-prompt outcomes, which a paired test would need, are not published): . DPO's best against Best of 128's best: z ≈ on TL;DR, on HH. Temperature robustness is far outside the noise: at temperature 1, 99 wins against 18.
Limitations the authors list (§7): out-of-distribution generalisation against an explicit reward; whether self-labelling can use unlabelled prompts as RLHF does; reward over-optimisation in DPO (perhaps the slight late decline in Figure 3 right); scale beyond 6B; and the GPT-4 judge's prompt dependence. They suggest DPO for other generative modalities too.
What holds up. The derivation is exact and checkable: Eq. 4 is a textbook result, the cancellation is one line, the gradient is what autograd computes (this page checks the toy's losses and gradients against PyTorch to 1e-13). The IMDb frontier uses a ground-truth reward and 22 runs, and its gap is large: at a KL of at most 2, DPO reaches 0.91 against PPO's 0.49. TL;DR's temperature robustness is far outside the noise. The recipe has been reproduced by almost everyone since (Zephyr, Mixtral, Llama 3, Qwen2, Tülu 3, OLMo 2; Why it matters). And the authors flag scale, the judge's prompt sensitivity and out-of-distribution behaviour themselves, which counts in their favour.
What is weaker, concretely:
Verdict. Believe the derivation and the recipe: DPO optimises the RLHF objective without RL, with two models instead of four and no sampling, and it works well enough that it became the default. Treat "better than PPO" as unproven by this paper: the dialogue comparison has no PPO, the summarisation margin is one standard error, and the sentiment frontier mostly shows that the paper's PPO was hard to make work.
loss.label_smoothing) and IPO (loss=ipo). In production most people use Hugging Face TRL's DPOTrainer, which exposes the variants as loss_type.rewards/chosen: if it goes negative, the chosen answers are losing probability.It commoditised preference tuning. A fine-tuning loss anyone can run on preference pairs, with two models in memory and no sampling, became the standard alignment stage of open post-training pipelines within a year (which ones, dated, below).
It did not settle DPO against PPO. Later controlled studies found well-tuned online RL ahead, especially on code and reasoning, and offline DPO better at classifying pairs than at generating; on-policy samples and iterating (online DPO) close part of the gap (Xu et al. 2024, Tang et al. 2024, Tajwar et al. 2024; the evidence is compared on Alignment: SFT, RLHF, DPO family, RLVR). DPO also pushes the chosen answers' probability down, as the toy above shows (DPO-Positive, likelihood displacement).
It spawned a family, each fixing one weakness: IPO (a squared loss, so near-deterministic preferences cannot drive margins to infinity), conservative DPO and rDPO (label noise), KTO (unpaired thumbs up or down), ORPO (no reference), SimPO (reference-free, length-normalised), CPO, TR-DPO (the reference updated during training) and DiscoPOP (losses found by automated search). The alignment page compares the main ones on one pair and animates the push each puts on a pair against its margin, with their outcomes on this page's toy; the long runs train several here. GRPO is a separate line with the same motive of deleting RLHF machinery, there the value model (DeepSeekMath).
"Policy log-ratio = reward" became a reusable tool: DPO models are scored as reward models (RewardBench evaluates them beside classifiers), their implicit rewards build the next round's preference data (DICE), and the derivation pattern (solve the KL-regularised objective in closed form, substitute back) recurs across post-training papers (RewardBench, DICE).
A tiny language model, preference-tuned here by real arithmetic, every way the paper compares: DPO, its Unlikelihood and Preferred-FT baselines, RLHF with a learned reward model and PPO, and PPO on the true reward. The space is small enough that everything the paper could only estimate is exact here: the expected true reward, the KL to the reference, and the best possible reward-KL trade-off of Eq. 4.
Try: DPO at β = 1 (it follows the exact frontier); then β = 0.1, the paper's default (well below it, and the chosen answers lose probability); then PPO-GT; then DPO for 4,000 steps (it keeps climbing in KL and the grammar goes); then IPO at τ = 0.1 for 4,000 steps (it nearly levels off).
The paper's sweep shape (§6.1): DPO β ∈ {0.05, 0.1, 1, 5}, Unlikelihood α ∈ {0.05, 0.1, 0.5, 1}, Preferred-FT with 3 seeds, PPO and PPO-GT with 4 target KLs each (scaled to the toy's KL range: 0.5, 1, 2, 3), 19 runs evaluated every 25 steps. The results below were computed by toy_sweep.mjs with this page's engine; the button reruns all 19 here and compares.
The same data, 4,000 steps (about 49 passes). With deterministic labels a pair's margin can always grow, so the losses with a sigmoid or no bound keep pushing; IPO's squared loss has a finite target margin and nearly levels off (Azar et al. 2023). Final states, from toy_sweep.mjs (rerun any of them with the trainer above), are in the table under the chart.
DPO's evidence is mostly in figures that print no numbers. The arXiv HTML ships them as vector SVGs, so decode_figs.py reads every marker, line vertex and error bar from the paths and converts them with each figure's own tick marks (the straight-line calibration fits the ticks to within 1e-6 of a unit; values are good to about 1e-4). That is not reading curves by eye, and it turned up two facts the paper does not state: the TL;DR win rates are exact multiples of 1/256, and the error bars are one binomial standard error.
Figure 2 left: 177 evaluation points from 22 runs, evaluated every 100 steps; runs are not distinguished in the figure, so per-run curves cannot be recovered. "Beaten" counts a method's points for which some DPO point has both lower or equal KL and higher or equal reward.
Figure 2 right. Every plotted value times 256 is an integer to within 0.013 (so 256 prompts per point), and every error bar's half-height equals √(p(1 − p)/256) to within 0.2%: the bars are ±1 binomial standard error, which the paper does not say. Temperature 0 is plotted at 0.01.
Figure 3. The values are not on a 1/n grid, but the bars' sizes imply about 250 prompts per point if they are ±1 binomial standard error, as on TL;DR. Methods at the same temperature are drawn slightly offset in the original; here they share the temperature.
Figure 4: "performance plateaus after roughly 64-128 samples". On TL;DR the three N are identical at temperature 0 (greedy sampling gives one candidate).
Almost every successor keeps DPO's frame (a margin between the chosen and the rejected answer, measured against a reference) and changes one thing: how hard a pair is pushed as a function of its margin. The animation of that push for unlikelihood, DPO, the SLiC hinge, IPO, cDPO and SimPO, with what each did on this page's toy over 4,000 steps (the long runs), is on Alignment: SFT, RLHF, DPO family, RLVR, section 5, which owns the DPO family.
| part of the 2023 recipe | status in 2026 |
|---|---|
| The closed form of Eq. 4 and the implicit reward β log π/πref | Survived everywhere: the shared starting point of IPO, KTO, cDPO, rDPO and TR-DPO, and the logged rewards/* of every DPO trainer. |
| The sigmoid (Bradley-Terry) loss | Still the default (Llama 3, Tülu 3), with fixes for its unbounded push: label smoothing, a bounded loss (IPO), an NLL term on the chosen answers, or early stopping. |
| A frozen reference model | Optional: dropped by SimPO, ORPO and CPO, updated during training by TR-DPO, cached as log-probabilities at scale. |
| Offline pairs collected once | Mostly replaced by on-policy or iterative pairs (Qwen2, Tülu 3, OLMo 2), which recovers part of online RL's advantage. |
| "No RL needed" | True for preference and style alignment; not for reasoning, where online RL with verifiable rewards is the standard after DeepSeek-R1. |
Every link opens in a new tab. Reading time of the resources below: 3h 05m.
NeurIPS 2023 (Outstanding Main Track Runner-Up), the paper itself; the HTML version has the anchors this page links to. abstract page, PDF.
(45 min)
the authors' reference implementation, Apache 2.0; about 20 minutes for the README and the roughly 20-line preference_loss in trainers.py, which now also offers conservative DPO and IPO.
(20 min)
Cameron R. Wolfe, Deep (Learning) Focus: the full derivation walked through step by step, plus where DPO sits in the modern post-training pipeline, with TRL code.
(40 min)
Hugging Face TRL: the production implementation: dataset format, the logged implicit-reward metrics (rewards/chosen, rewards/rejected, rewards/margins) and the catalogue of loss variants exposed as loss_type.
(25 min)
Nathan Lambert, Interconnects: the DPO against PPO debate laid out with the evidence on both sides.
(20 min)
Nathan Lambert: a textbook chapter on DPO and its descendants, with the derivation, the failure modes and the variants side by side.
(35 min)
2022: the three-stage RLHF pipeline (SFT, reward model, PPO) that DPO collapses into one loss.
2022: preference labels from an AI judge (RLAIF); DPO consumes such pairs directly.
2024: the online-RL counterpoint that now dominates reasoning post-training, deleting PPO's value model instead of the RL loop.
2025: reinforcement learning with verifiable rewards at scale, the other pole of the DPO against online-RL debate.
2024: a frontier pipeline that chose DPO over PPO for compute and instruction following.
2025: the fully open Tülu 3 recipe, SFT then DPO then RLVR.
2024: Mixtral Instruct, SFT followed by DPO.
2021: in practice DPO is often run on LoRA adapters, which also gives a free reference model (the base with the adapter off).
where DPO sits in the post-training pipeline.
the KL-regularised objective, PPO and the online against offline question.
This page is one row of the Papers database; its properties (Paper, Takeaway, Topics, Year) live there.