Paper 07~7 min readNeurIPS 2023
Paper Breakdown

Direct Preference
Optimization, explained.

Teaching a model to be helpful and harmless used to mean building a second AI to grade the first, then running finicky reinforcement learning to chase those grades — a Rube Goldberg machine that fell over constantly. This 2023 paper proved you can throw the whole contraption away and get there with one ordinary training loss.

Video breakdown
The animated walkthrough is in production.
Read the full breakdown below in the meantime ↓
01

The RLHF machine

The reason a raw language model becomes a helpful assistant is alignment — tuning it to prefer the responses humans actually like. The dominant recipe, RLHF (reinforcement learning from human feedback), does this in three stages: collect human preferences (this answer is better than that one), train a separate reward model to imitate those judgments, then use reinforcement learning (PPO) to push the model toward high-reward outputs.

It works — it's how ChatGPT was aligned — but that third stage is a beast. Reinforcement learning on a giant model is memory-hungry, hyperparameter-sensitive, prone to instability, and happy to "reward-hack" by finding cheap tricks that score high without being good.

02

The insight: your model is already the reward model

DPO's authors did the algebra everyone had skipped. They showed that the reward function RLHF works so hard to learn can be rewritten in terms of the model's own probabilities relative to a frozen reference copy. The policy and the reward aren't two separate things to train — they're two views of the same object.

The paper's memorable framing: your language model is secretly a reward model. If that's true, you never need to build the reward model or run RL against it. You can optimize the model directly.

03

One loss instead of three stages

DPO uses the exact same data as RLHF — pairs of a chosen (preferred) and a rejected response for each prompt — but trains with a single, supervised, classification-style loss: raise the model's probability of the chosen response and lower the rejected one, gently anchored to the reference model so it doesn't drift.

RLHF vs DPO
RLHF — 3 stages
1 · Collect preference pairs
2 · Train a reward model
3 · Optimize with PPO (RL)
DPO — 1 stage
1 · Collect preference pairs
2 · One direct loss on the model
— no reward model, no RL —

Same inputs, same goal, two stages deleted.

04

Why it's stable

PPO is online reinforcement learning: it samples fresh outputs from the model, scores them, updates, and repeats — a feedback loop with many ways to wobble. DPO is offline and supervised: a fixed dataset of preference pairs, one loss, gradient descent. It trains as calmly and reproducibly as ordinary fine-tuning, on far less hardware.

Worth knowing

The practical unlock is accessibility: a team that could never stand up a stable PPO pipeline can run DPO with a standard training script, which is a big part of why open models aligned so quickly after 2023.

05

The real results

Across sentiment control, summarization, and single-turn dialogue, DPO matched or beat PPO-based RLHF on how well outputs aligned with human preferences — while being dramatically simpler to implement and train, and far more stable.

Reward model?RL loop?Stability
RLHF (PPO)Yes — separate modelYes — online RLFragile
DPONoNoStable, supervised
06

Why it still matters

DPO became the default alignment method for a huge fraction of open models — its simplicity made preference tuning something any team could do. It also opened a whole family of direct-preference variants (IPO, KTO, ORPO and more), each tweaking the loss for different data or goals.

More deeply, it's a lesson in looking harder before reaching for heavy machinery: an entire reinforcement-learning stage turned out to be unnecessary once someone did the math. Sometimes the reward model you're training is already sitting inside the model you have.

Frequently asked

Quick answers

What is DPO?

A method that aligns a model to human preference pairs directly, with one classification-style loss — no separate reward model and no reinforcement learning.

How is it different from RLHF?

RLHF trains a reward model then optimizes with PPO (RL). DPO proves you can skip both and optimize the policy directly from the same preference data.

"Your LM is secretly a reward model"?

DPO shows the RLHF reward can be rewritten in terms of the model's own probabilities vs a reference — so policy and reward are the same object, and you can optimize directly.

Why is it more stable than PPO?

PPO is online RL with many fragile moving parts; DPO is a simple supervised loss over a fixed dataset, as stable as ordinary fine-tuning.

What data does DPO need?

Preference pairs — a chosen and a rejected response per prompt — the same data RLHF collects, with no reward labels beyond the comparison.

Direct Preference Optimization: Your Language Model is Secretly a Reward Model · Rafailov, Sharma, Mitchell, Ermon, Manning, Finn · NeurIPS 2023 · read the original paper on arXiv → · Vibe Engines · 2026
Finished this one? 0 / 30 Paper Breakdowns done

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Paper Breakdowns