Direct Preference Optimization & Its Relatives
The closed-form optimum of KL-regularized RL, and DPO, IPO and KTO.
DPO trains a language model on preference pairs with a loss no harder than logistic regression, yet in the population limit it solves the same KL-regularized problem as RLHF with PPO. Deriving it carefully shows exactly when that equivalence holds and where it breaks: on deterministic preferences, on responses the data never cover, and whenever the reference model or the length of a response quietly changes what "better" means.
What you’ll learn
- Derive the DPO loss from the KL-regularized objective, and prove that under realizability and full coverage its population minimizer is the KL-optimal policy.
- Compute the DPO gradient, interpret its weighting through the implicit reward, and explain likelihood displacement.
- Place DPO in the ΨPO family, show why its KL regularization stops binding on deterministic preferences, and derive the per-pair optima of DPO and IPO.
- Compare KTO, SimPO and ORPO by the data and reference they need and the objective they optimize, and summarize the evidence on offline versus on-policy preference optimization.
From the KL objective to a classification loss
Start from the optimum of , derived in RL from Human Feedback, for any reward :
Take logarithms and solve for the reward. Every reward is the implicit reward of its own optimal policy, plus a term that depends on the prompt alone:
Insert this into the Bradley–Terry model for the true reward . The prompt-only term cancels in the difference:
The preference probabilities are now written entirely through the optimal policy. Replace it by a parametric policy and maximize the likelihood of the data:
For each prompt and pair, the population loss is the cross-entropy between the true preference probability and the modeled one . By Gibbs' inequality each cross-entropy is minimized exactly when .
achieves on every pair: its implicit reward is , which differs from by a per-prompt constant. So it is a minimizer.
Conversely, a minimizer must match on every pair of positive probability, which by full coverage is every pair. By the identification result in Reward Models from Preferences, its implicit reward is then , so , and normalization makes it .
Each hypothesis matters. With finitely many comparisons, the empirical loss constrains the policy only on the responses that appear in the data; how the remaining probability is spread is left to the parameterization and the optimizer. Most of the failure modes below live in that gap.
What the gradient does
Write for the implicit reward margin. Since and ,
The weight is the implicit reward model's probability of misordering the pair, exactly as in reward-model training; a pair already ordered with confidence stops pulling. Rafailov et al. (2023) report that a naive version without this weight could make the language model degenerate.
Only the difference of the two log-likelihood gradients is constrained. Nothing in the loss requires to rise: the margin can grow while both log-probabilities fall, provided the rejected one falls faster.
The last possibility is common in practice. Razin et al. (2025) call it likelihood displacement: during DPO the probability of the preferred responses often decreases, and the freed probability can move to responses the data never mention, sometimes with the opposite meaning. In one of their experiments, DPO on refusal data more than halved a model's refusal rate on unsafe prompts. They trace the effect to preference pairs whose two responses have similar hidden representations, measured by a centered embedding similarity, and found that filtering out such pairs prevented the unintended shift in their experiments.
The implicit reward also assigns credit within a response. In the token-level MDP with KL regularization, the optimal policy satisfies for soft optimal values, so each token's log-ratio acts as a soft advantage (Rafailov, Hejna, Park & Finn, 2024). Summed over tokens, these give the sequence-level implicit reward up to the start state's value.
During DPO training the loss falls steadily, yet the log-probability of most preferred training responses also falls. What is the most likely explanation?
- A sign error: DPO is minimizing the likelihood of the preferred responses
- The loss constrains only the margin, so both log-probabilities can fall as long as the rejected ones fall faster; the freed probability goes to other responses
- is too large, which makes DPO ignore the preferred responses
- The reference model is being updated along with the policy
Show the answer
B. The loss constrains only the margin, so both log-probabilities can fall as long as the rejected ones fall faster; the freed probability goes to other responses
The DPO gradient pushes up and down relative to each other. Shared features of the two responses can make both fall together, with the rejected one falling faster. This likelihood displacement is a property of the loss, not a bug, and it is why the probability mass that leaves both responses deserves monitoring.
Deterministic preferences: ΨPO and IPO
Azar et al. (2024) cast preference optimization as a family. For a non-decreasing function and a distribution of comparison responses, ΨPO maximizes
Take one prompt and one pair of responses with true preference probability , and the log-ratio margin . Data labeling the pair in proportion give DPO's population loss for this pair and its minimizer:
IPO's sampled loss regresses the margin of each ordered example on a target, when wins and when wins (Azar et al., 2024). Its expectation and minimizer:
Both targets increase with . As the DPO target diverges while the IPO target stays at . When the data say that beats every time, as they do for every pair labeled only once, DPO drives whatever is: the KL regularization stops binding. IPO keeps a finite margin set by .
A pair is preferred one way 90% of the time (). With , DPO's per-pair target margin is nats. What is IPO's target margin, in nats?
Show the answer
1.6 nats
. IPO's target is linear in and bounded by , while DPO's grows like the log-odds and is infinite at . The two are not one objective with different constants: they treat confident preferences very differently.
In practice DPO's overfitting on deterministic data is held in check by early stopping, by label smoothing (treating each label as correct with probability slightly below 1, which makes ), or by IPO's bounded target. Which works best has depended on the data and the tuning budget.
Changing the data or the reference: KTO, SimPO, ORPO
| Method | Data | Reference model | Loss | Notes |
|---|---|---|---|---|
| KTO (Ethayarajh et al., 2024) | single responses labeled desirable or undesirable | yes | with , maximize on desirable and on undesirable responses; estimates the policy's KL from , with no gradient through it | inspired by prospect theory; reported to match or exceed DPO from 1B to 30B parameters |
| SimPO (Meng, Xia & Chen, 2024) | pairs | no | Bradley–Terry on the average per-token log-probability, , with a target margin | length-normalized; nothing anchors the policy to its start |
| ORPO (Hong, Lee & Thorne, 2024) | pairs | no | supervised log-likelihood of plus times of the log odds ratio of against | one stage: no separate SFT model or reference |
Length deserves a comment. DPO's implicit reward sums log-ratios over tokens, so long responses can carry large margins, and Park et al. (2024) found significant length exploitation in DPO, which they linked to out-of-distribution bootstrapping and reduced with an explicit length regularizer. SimPO's per-token average removes the direct dependence on length, but without a reference model nothing keeps the policy near its starting distribution, and and must be tuned to prevent drift. KTO's reference point plays the role of a baseline: a response counts as desirable only if its log-ratio beats the policy's typical log-ratio.
Offline or on-policy? The evidence
DPO's appeal is that it needs no sampling. The worry is the flip side: it never sees, let alone corrects, the policy's mistakes on responses outside the dataset. Careful studies from 2024 probed this:
- Xu et al. (2024) compared DPO with PPO on dialogue and code generation. In theory, they show that DPO can find biased solutions that put probability on out-of-distribution responses the data never rule out; in their experiments, DPO was sensitive to the distribution shift between model outputs and the preference data, and well-tuned PPO outperformed it in every experiment, most clearly on hard competitive-programming tasks.
- Tajwar et al. (2024) found that methods which sample from the current policy, or which push probability down on bad responses (a negative gradient), outperformed offline maximum-likelihood objectives, especially when the best responses are unlikely under the reference. They explain this through mode-seeking objectives, which move probability between regions faster than maximum likelihood can.
- Rafailov, Chittepu, Park et al. (2024) found that direct alignment algorithms such as DPO also overoptimize: at higher KL budgets their quality degrades in the same way as RLHF's, often before a single epoch through the data is complete.
A practical middle ground is iterative or online preference optimization: sample responses from the current policy, label or score them (by people, a reward model or an AI judge), run DPO on the fresh pairs, and repeat. This restores much of what on-policy RL offers while keeping DPO's simple loss. As of the mid-2020s, which approach is better is contested and probably depends on the task, the data and the tuning budget.
Key takeaways
- DPO inverts the KL-regularized optimum, , and substitutes into Bradley–Terry, where cancels: logistic regression on implicit reward margins.
- Under Bradley–Terry preferences, realizability and full coverage, the population DPO minimizer is exactly ; with finite data the loss constrains only the responses it sees.
- The gradient weights each pair by its misordering probability and constrains only the margin, so both log-probabilities can fall: likelihood displacement.
- Per pair, DPO targets the margin , infinite for deterministic preferences, while IPO targets . KTO, SimPO and ORPO change the data, the reference or the length normalization, and with them the objective.
- Studies from 2024 (Xu et al.; Tajwar et al.) favored on-policy sampling and negative gradients in many settings. Iterative DPO is a middle ground, and as of the mid-2020s the comparison remains contested.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Which assumption is not needed for the population DPO minimizer to equal the KL-optimal policy ?
- Preferences follow the Bradley–Terry model with reward
- The comparison data give positive probability to every pair of responses
- The KL-optimal policy belongs to the policy class
- The reward takes values between 0 and 1
Show the answer
D. The reward takes values between 0 and 1
The proof uses Bradley–Terry to write preferences through rewards, coverage to force agreement on every pair, and realizability so that the target is attainable. Rewards are only identified up to a per-prompt shift anyway, and their scale relative to is what matters; no range restriction is needed.
No pair of responses in a preference dataset is labeled twice, so the observed preference for every pair is unanimous ( for the recorded order). What per-pair log-ratio margin does IPO with regularization target?
- 0
Show the answer
B.
For a pair won with probability , IPO's expected squared loss is minimized at , which is when . DPO's target, , is infinite in the same situation.
You have a large log of single chatbot responses, each marked thumbs-up or thumbs-down, but no pairs of responses to the same prompt. Which method can use these data directly?
- DPO
- IPO
- KTO
- SimPO
Show the answer
C. KTO
KTO needs only a binary desirable or undesirable label for each response, compared against a reference point, rather than paired preferences. DPO, IPO and SimPO are all defined on pairs for the same prompt.
Which statement is best supported by the 2024 comparisons of offline and on-policy preference optimization (Xu et al.; Tajwar et al.)?
- DPO and PPO always reach the same policy, because they share a population optimum
- On-policy sampling is never needed when the preference dataset is large
- Sampling from the current policy, or pushing probability down on bad responses, helped in their experiments, and DPO was sensitive to the shift between model outputs and the preference data
- PPO cannot be used with a reward model trained on preferences
Show the answer
C. Sampling from the current policy, or pushing probability down on bad responses, helped in their experiments, and DPO was sensitive to the shift between model outputs and the preference data
A shared population optimum says nothing about finite data: DPO constrains the policy only on the responses in the dataset, and can leave probability on responses no comparison rules out. Xu et al. found well-tuned PPO ahead of DPO in all their experiments, with DPO sensitive to the shift between model outputs and the preference data; Tajwar et al. found that on-policy sampling and negative gradients helped. As of the mid-2020s the question remains contested.
Further reading
- R. Rafailov, A. Sharma, E. Mitchell, S. Ermon, C. D. Manning & C. Finn, "Direct preference optimization: Your language model is secretly a reward model," NeurIPS (2023).
- M. G. Azar, Z. D. Guo, B. Piot, R. Munos, M. Rowland, M. Valko & D. Calandriello, "A general theoretical paradigm to understand learning from human preferences," AISTATS (2024).
- K. Ethayarajh, W. Xu, N. Muennighoff, D. Jurafsky & D. Kiela, "KTO: Model alignment as prospect theoretic optimization," ICML (2024).
- S. Xu, W. Fu, J. Gao, W. Ye, W. Liu, Z. Mei, G. Wang, C. Yu & Y. Wu, "Is DPO superior to PPO for LLM alignment? A comprehensive study," ICML (2024).
- N. Razin, S. Malladi, A. Bhaskar, D. Chen, S. Arora & B. Hanin, "Unintentional unalignment: Likelihood displacement in direct preference optimization," ICLR (2025).