← All writing

What DPO actually optimizes

Direct Preference Optimization is best understood as a clean way to turn comparison data into policy updates—not as a shortcut around the hard work of deciding what “better” means.

A is deceptively simple: given a prompt, one answer was chosen and another was rejected. DPO asks the model to make the former more likely than the latter, while staying anchored to a . The result is a loss that looks more like ordinary than a separate reward-model-plus-RL pipeline.

one prompt, two answers

prompt xchosen y+rejected y−vs.learn from the comparison
The label tells us which answer won.

The old pipeline

In the classic recipe, pairwise preferences first train a . A policy is then optimized against that learned reward, usually with a penalty for drifting too far from a reference policy. This can be powerful, but it introduces another model, an online optimization loop, and another set of failure modes to monitor.

DPO starts from the same kind of pairwise data but uses a useful observation: for the objective, the optimal policy and reward are linked by a . Substituting that relationship into a preference model produces a over the language model itself.

a shorter training route

RLHFDPOpairspairsrewardpolicypolicy
DPO skips fitting a separate reward model.

The loss, in plain English

Δθ = log πθ(y+|x) − log πθ(y−|x)

Δref = log πref(y+|x) − log πref(y−|x)

LDPO = −E[log σ(β · (Δθ − Δref))]

The notation is less intimidating than it looks. For each prompt x, the model compares its likelihood of the chosen answer y+ with its likelihood of the rejected answer y−. It makes larger than the equivalent gap under the reference model. The scalar β controls how aggressively that preference is enforced.

Put differently: DPO does not say “make this answer probable.” It says “make this answer by more than it used to.” That relative framing is the whole point.

compare the gaps

current modely−y+reference modely−y+log-likelihood gaps · schematic
The current model’s preference, relative to its starting point.

Why it is practical

  • Preference pairs can be trained in batches without fitting an explicit reward model first.
  • A . The reference-policy term makes the update about improvement relative to the starting behavior, rather than unconstrained imitation.
  • Clear debugging surface. If a pair is wrong, ambiguous, or , it is directly part of the signal—there is no second model to obscure where that mistake went.

What DPO does not fix

DPO is only as good as the comparison it receives. It can learn a strong preference for a verbose answer, a stylistic convention, or a benchmark artifact if those are what the labels reward. The objective is not a , a process verifier, or a substitute for .

This is especially important for reasoning and agentic systems. Outcome preferences can improve the final answer while leaving a brittle trajectory underneath. In those settings, I treat DPO as a reliable baseline for converting into a policy update—and pair it with environments and evaluations that can test the behavior we actually care about.

TAKEAWAY

DPO simplifies how we learn from preferences. It does not simplify preferences deserve to be learned.


a preference ≠ a proof

chosen answerstill needs checking
A chosen answer can still be wrong.