The Direct Preference Optimization Family
Rafailov et al. (2023) showed that RLHF's optimum has a closed form in terms of the preference data, so you can skip the explicit reward model and optimize the policy directly. The idea spawned a family (IPO, KTO, SimPO, ORPO, BPO), each aimed at a failure mode of DPO. By 2026 direct alignment algorithms ship more frontier post-training runs than PPO. The over-optimization curve from Lesson 2 still applies, though: DAAs do not escape Goodhart, they just move where it bites.
Learning Objectives
- Derive the DPO closed form from the RLHF-with-KL optimum.
- State the failure mode each of IPO, KTO, SimPO, ORPO, BPO fixes in DPO.
- Distinguish "implicit reward gap" from "preference strength" and explain why IPO's identity mapping matters.
- Explain why Rafailov et al. (NeurIPS 2024) find that DAAs over-optimize despite having no explicit RM.
The Problem
The RLHF objective (Lesson 1):
max_pi E_{x,y~pi} [ r(x, y) ] - beta * KL(pi || pi_ref)
has a known optimum:
pi*(y|x) = (1/Z(x)) * pi_ref(y|x) * exp(r(x, y) / beta)
So the reward is implicitly defined by the ratio of the optimal policy to the reference:
r(x, y) = beta * log(pi*(y|x) / pi_ref(y|x)) + beta * log Z(x)
Substitute this into the Bradley-Terry preference likelihood and the partition function Z(x) cancels because it depends only on x. What remains is a loss in the policy parameters alone, with no reward model needed. That is DPO.
The wrinkle is that the derivation assumes three things: the optimum is reachable, the preference data is in-distribution, and the reference policy is the true mode anchor. None of them hold exactly, and each family member targets a different violated assumption.
The Concept
DPO (Rafailov et al., 2023)
L_DPO = -log sigmoid(
beta * log(pi(y_w | x) / pi_ref(y_w | x))
- beta * log(pi(y_l | x) / pi_ref(y_l | x))
)
What can go wrong:
- The implicit reward gap
beta * (log(pi/pi_ref)_w - log(pi/pi_ref)_l)is unbounded. A tiny preference can produce an arbitrarily large gap. - The loss drives chosen and rejected log-probs in opposite directions. It can push the chosen absolute log-prob down as long as the rejected falls faster. This is the Degraded Chosen Response phenomenon.
- Out-of-distribution preferences (a rare pair compared against another rare pair) produce arbitrary implicit rewards.
IPO (Azar et al., 2024)
Identity Preference Optimization replaces the log-sigmoid with an identity mapping on the preference probability. The loss becomes a squared-error on a bounded target:
L_IPO = (log(pi(y_w | x) / pi_ref(y_w | x)) - log(pi(y_l | x) / pi_ref(y_l | x)) - 1/(2 beta))^2
The margin is bounded by 1/(2 beta), so preference strength and implicit-reward gap stay proportional and nothing blows up.
KTO (Ethayarajh et al., 2024)
Kahneman-Tversky Optimization drops pairwise structure entirely. It takes a single labeled output with a binary "desirable" or "undesirable" signal and maps it to a prospect-theory utility:
v(x, y) = sigma(beta * log(pi(y|x) / pi_ref(y|x)) - z_ref)
Gains and losses get different weights (loss aversion). The payoff is that you can train on unpaired data, which is far more plentiful.
SimPO (Meng et al., 2024)
Simple Preference Optimization aligns the training signal with generation. It removes the reference policy and normalizes log-likelihood by length:
L_SimPO = -log sigmoid(
(beta / |y_w|) * log pi(y_w | x)
- (beta / |y_l|) * log pi(y_l | x)
- gamma
)
A margin gamma stabilizes training. Length normalization takes away the incentive to exploit DPO's length bias, where a longer y_w gives a larger log-prob gap by construction.
ORPO (Hong et al., 2024)
Odds-Ratio Preference Optimization adds a preference term to the standard SFT negative log-likelihood:
L_ORPO = L_NLL(y_w) + lambda * L_OR
L_OR = -log sigmoid(log(odds(y_w) / odds(y_l)))
There is no reference policy because the SFT term is the regularizer. You train in a single stage from the base model to the aligned model, with no separate SFT checkpoint.
BPO (ICLR 2026 submission, OpenReview id=b97EwMUWu7)
BPO names the Degraded Chosen Responses problem: DPO preserves the ranking y_w > y_l, but the absolute log-prob of y_w can still drop. BPO adds a single-line correction that penalizes downward moves on the chosen response. It reports +10.1% accuracy over DPO on Llama-3.1-8B-Instruct for math reasoning.
The universal result: DAAs still over-optimize
Rafailov et al. "Scaling Laws for Reward Model Overoptimization in Direct Alignment Algorithms" (NeurIPS 2024) trained policies with DPO, IPO, and SLiC on multiple datasets across KL budgets. The gold-reward-vs-KL curves have the same Gao et al. peak-and-collapse shape. The implicit reward gets queried on out-of-distribution samples during training, and KL regularization does not stabilize that.
So DAAs do not escape Goodhart. They change the surface where it bites, from "reward model over-optimized" to "reference policy ratio over-optimized." The fixes are the same for both: better data, ensembles, early stopping.
Choosing among them (2026)
- If you have large paired preference data: DPO with conservative beta, SimPO if length bias is evident.
- If you have unpaired binary feedback: KTO.
- If you want a single-stage pipeline from a base model: ORPO.
- If you see degraded chosen log-probs in DPO logs: BPO.
- If preference strengths vary widely and DPO is saturating: IPO.
Run all five on a battery of your own tasks and pick the winner per task. Math reasoning and safety have no reason to share the same optimum.
Use It
code/main.py compares six losses (DPO, IPO, KTO, SimPO, ORPO, BPO) on a toy preference dataset where the true preference strength varies by pair. The five pairwise losses train on the same 500-pair sample and KTO on 500 unpaired labels, all with a small softmax policy. It prints each method's final probabilities, win rate, and logits.
Ship It
This lesson produces outputs/skill-preference-loss-selector.md. Given dataset statistics (paired vs unpaired, variable vs uniform preference strength, length distribution) and a target (single-stage or SFT-then-preference), recommend a preference loss and report the failure mode it protects against.
I'd run main.py before rereading the formulas. It is a 4-action softmax policy, not a language model, so the six losses sit side by side in a few lines each and you can read the gradient of every one. It prints the probabilities, win rate, and logits per method. Chosen-log-prob drift is not printed, so for Exercise 1 you'll compute it yourself from the logits.
The toy is also honest about its limits. There is one token per action, so SimPO's length normalization divides by 1 and cannot show the length-bias fix. The BPO penalty is a hand-picked 0.05 weight on the chosen log-ratio, and the ORPO term is a simplified version of the odds-ratio loss. I'd treat those three as shapes of the idea, and test the length claim with Exercise 3 before believing it.
My bet is that the part worth sitting with is the implicit reward, beta * (log pi - log pi_ref). DPO, IPO, and BPO all push on it in train_dpo, and what changes between them is the gradient on it: DPO saturates through the sigmoid, IPO regresses it toward 1/(2 beta), and BPO adds a pull on the chosen log-ratio. Once that is clear, the rest of the family reads as variations on where you put the anchor.
Exercises
-
Run
code/main.py. From the printed logits, computelog pi(a) - log pi_ref(a)for every action under DPO and BPO. Action 0 is usually preferred over actions 2 and 3, yet DPO lowers its probability (0.273 to 0.231). Check whether BPO holds it higher (0.253). Then check the best action, 1, where BPO ends below DPO (0.507 vs 0.636), and explain why the 0.05 anchor weight does that. -
Modify the preference data so that all pairs have equal strength. Which of the six methods is most robust? Which degrades? Explain IPO's advantage here.
-
Make the rejected responses on average 2x longer than chosen. Without changing anything else, show DPO's length exploitation numerically and SimPO's fix.
-
Rafailov et al. (NeurIPS 2024) claim DAAs over-optimize. Reproduce a single-point version: plot chosen-minus-rejected KL divergence and observe over-optimization in DPO at large beta.
-
Read the BPO paper abstract (OpenReview b97EwMUWu7). Write down the one-line correction BPO adds to DPO. Confirm against the implementation in
code/main.py.
Key Terms
| Term | What people say | What it actually means |
|---|---|---|
| DPO | "RLHF without a reward model" | Loss derived from the closed-form RLHF optimum; policy parameters only |
| Implicit reward | "the log-ratio" | beta * log(pi(y|x) / pi_ref(y|x)), the DPO-implied reward |
| IPO | "bounded DPO" | Replaces log-sigmoid with identity; implicit reward gap capped by 1/(2 beta) |
| KTO | "unpaired DPO" | Prospect-theory utility over single labels with loss aversion |
| SimPO | "reference-free DPO" | Length-normalized log-likelihood + margin; no reference policy |
| ORPO | "one-stage DPO" | NLL + odds-ratio preference term; trains from base model in one pass |
| BPO | "chosen-preserving DPO" | DPO plus a penalty for decreasing the chosen response's absolute log-prob |
| Degraded Chosen | "chosen goes down" | DPO decreases chosen log-prob so long as rejected falls faster |
| DAA | "direct alignment algorithm" | Any preference-loss method that skips an explicit RM |
Further Reading
- Rafailov et al.: Direct Preference Optimization (NeurIPS 2023, arXiv:2305.18290)
- Azar et al.: A General Theoretical Paradigm to Understand Learning from Human Preferences (AISTATS 2024, arXiv:2310.12036) (IPO)
- Ethayarajh et al.: KTO: Model Alignment as Prospect Theoretic Optimization (arXiv:2402.01306)
- Meng, Xia, Chen: SimPO (NeurIPS 2024, arXiv:2405.14734)
- Hong, Lee, Thorne: ORPO (EMNLP 2024, arXiv:2403.07691)
- BPO: Behavior Preservation Optimization (ICLR 2026 OpenReview b97EwMUWu7)
- Rafailov et al.: Scaling Laws for RM Overoptimization in DAAs (NeurIPS 2024, arXiv:2406.02900)
Code
- main.py (python, 231 lines)