Direct Preference Optimization (DPO)
Aligning a model to human preference used to mean a three-stage pipeline: collect comparisons, fit a reward model, then run reinforcement learning against it. Direct Preference Optimization asks whether the reward model needs to exist at all, and answers that it does not — the preference data can train the model directly.
Turning reward into a lossDPO uses the same data as RLHF: a prompt with two answers, one marked preferred by a human. The trick is algebraic. The policy that maximises the RLHF objective has a closed form in terms of the hidden reward, and inverting that relation makes the reward cancel, leaving an ordinary classification loss over pairs. Training raises the log-probability of the preferred answer and lowers the rejected one, both measured against a frozen reference model — the copy you started from. One parameter, beta, sets how far the model is allowed to drift from it.
Why practitioners switched- One training loop instead of three: no reward model to fit, no sampling from the policy mid-run.
- Stability: it is supervised training, without the reward hacking and collapse that make PPO runs delicate to tune.
- Cost: cheap enough for a single GPU with LoRA, which is why openly released chat models such as Zephyr are built this way.
DPO learns only from the comparisons it is handed, so it never explores and cannot discover behaviour nobody demonstrated. The loss can also push probability away from both answers in a pair, quietly flattening fluency, and results shift noticeably with beta. Online variants and KTO exist to patch those edges.
Direct Preference Optimization (DPO) aligns a language model to human preference by training directly on pairs of answers labelled better and worse, with no separate reward model and no reinforcement learning. A single loss raises the probability of the preferred answer relative to the rejected one, held close to a frozen reference copy by the parameter beta. It reaches much of what RLHF achieves from one stable training run, which is why open chat models default to it.
Imagine training a new cook. The old way was to write a long scoring sheet for food, then have them cook endlessly while you graded every attempt. The simpler way is to put two dishes side by side and say which one you liked better, again and again. Direct Preference Optimization is that simpler way, applied to a chat assistant. People are shown two possible replies and pick the better one, and the assistant is adjusted straight from those choices — nudged towards the answers people prefer and away from the ones they reject. No separate grader, no endless trial and error. It is how most openly available chat assistants learn good manners.