Part VII's RLHF — short for Reinforcement Learning from Human Feedback — chapter fit a reward model from preference comparisons, then ran a separate policy-gradient loop against it — two stages, two different update rules. What if the algebra let both stages collapse into one?
Apply each comparison. The policy shifts after every single one — no reward model sits in between the preference data and the policy update at all.
For an optimal policy under a KL (Kullback–Leibler)-regularized reward objective, the reward and the policy are related in closed form: . Substitute that directly into the Bradley-Terry preference loss from Part VII, and the reward model cancels out algebraically, leaving a loss purely in terms of the policy:
- — the DPO loss being minimized for a single preference pair.
- — the KL-penalty strength inherited from the RLHF objective; controls how far the policy is allowed to drift from the reference.
- — the policy currently being trained.
- — the frozen reference policy (typically the pre-RLHF model) the trained policy is measured against.
- — the winning (preferred) response in the comparison.
- — the losing (dispreferred) response in the comparison.
- The reward model's term cancels in the gradient
Differentiating this with respect to the policy's own parameters, the softmax's term cancels exactly between the winner and loser gradients.
- What's left is a single-stage update
One gradient step per preference pair, straight on the policy — no reward model and no separate RL update rule required, simpler than RLHF's two-stage procedure.
Two completely different training procedures — fit-a-reward-model-then-run-RL versus one direct gradient loop — landing on the same ranking from the same three comparisons. Neither path is "more correct"; DPO — short for Direct Preference Optimization — is just a shortcut through algebra that happens to skip a stage RLHF needs.
The very first comparison, "B beats A", starting from a uniform policy:
- At initialization, the policy IS the reference
everywhere, so for every arm. The bracketed term is , so and .
- The gradient step
The update is , with learning rate and . With , the update factor pushes up and down by the same amount:
- Nothing else moved
is untouched — this comparison never mentioned C, and DPO's update (like RLHF's) only touches the two arms actually being compared.
Find the arm, among the three, with the lowest preference parameter after DPO training.
DPO isn't a different objective from RLHF — it's the same Bradley-Terry preference objective, with the reward model's role folded into the policy's own log-ratio against a reference. That's the entire appeal: one training loop instead of two, no separate reward model to overfit or drift out of sync with the policy being trained against it. The next chapter asks where the preference data itself comes from in the first place — what happens when a model critiques its own answers instead of a human supplying every comparison.