Alignment / Preference
verifiedDPO
RLHF trains a reward model and then optimises against it with reinforcement learning — two models, two stages, and a great deal that can go wrong. DPO shows the reward model was never needed: the same optimum can be reached by a supervised loss on the preference pairs themselves. One stage, no sampling, no value network.
Train directly on preference pairs with a classification-style loss, keeping a frozen reference model for the ratio. Far simpler and cheaper than PPO and widely adopted for that reason. It is not free: it optimises the preferences it was given rather than exploring, so it cannot discover a response better than the ones it was shown.
The RLHF optimum is π*(y|x) ∝ π sub ref (y|x)·exp(r(x,y)/β), which inverts to r(x,y) = β·log(π*(y|x)/π sub ref (y|x)) + β·log Z(x). That last term depends on the prompt alone, so it cancels between two responses to the same prompt — which is what makes the substitution possible rather than merely tidy. Substituting into the Bradley–Terry loss removes r entirely, leaving −log σ(β·log(π sub θ (y sub w )/π sub ref (y sub w )) − β·log(π sub θ (y sub l )/π sub ref (y sub l ))) — the reward model was implicit in the policy all along.
Loss over 1000 training steps, starting near 6.0. It falls to about 2.12, with 88% of the total improvement arriving in the first half.
Preference loss over a training run. Drag model size to watch where the run bottoms out.
Reviewed by opendroid · 2026-08-04
- arXiv:2305.18290 — Direct Preference Optimization: Your Language Model is Secretly a Reward Model