Removing the reward model
RLHF fits a reward model to preferences, then optimises a policy against it with reinforcement learning. DPO shows the middle step can be skipped.
The KL-constrained objective has a closed-form solution: the optimal policy is the reference policy reweighted by the exponentiated reward.
Rearranging it expresses the reward in terms of the policy, which means any policy already implies a reward function.
The loss
- : the preferred response, the rejected one.
- : the same KL strength as in RLHF, typically 0.1.
Substituting that expression into the Bradley-Terry preference likelihood makes the partition function cancel, because it appears in both terms of the difference.
What is left is a supervised loss on pairs, with no sampling, no reward model and no reinforcement learning.
The gradient raises the likelihood of the preferred response and lowers the rejected one, weighted by how wrong the implicit reward currently is on that pair.
One training run, in order
- Start from the supervised fine-tuned model, and keep a frozen copy as the reference.
- Take a batch of prompts, each with a preferred and a rejected response.
- Compute the log probabilities of both responses under both models.
- Evaluate the loss and step the policy only.
- Watch the implicit reward margin and the KL from the reference, which are the two diagnostics.
That is two models in memory, where RLHF with PPO needs four.
The reference can even be evaluated once and cached, since it never changes, which reduces the working set to one trainable model.
What it gives up
Learning from a fixed dataset makes DPO off-policy.
DPO learns from responses generated earlier, often by a different model, and never from what the current policy would say now.
RLHF samples fresh outputs and scores them, so it explores and can be corrected on its own current mistakes.
That difference matters most where the reward can be checked, such as code that runs or answers that verify.
A known failure is that the loss can be reduced mostly by suppressing the rejected response, so the likelihood of both falls and the model becomes less confident overall.
The variants address exactly that.
IPO changes the objective to avoid the degeneracy, KTO drops the requirement for pairs, and ORPO merges the preference term into the supervised stage so there is only one training run.
DPO is widely used for open models because it costs a fraction of RLHF to run.
How close it comes to online RLHF depends on the task, and it falls furthest behind where answers can be checked.