ai papers
On the Differences Between RLHF and DPO
Junyoung Park · 2026-07-30 · 26 min
Preliminary
Learning human preferences
The most basic way to train an LLM is simpler than it might seem: give it the beginning of a sentence and ask it to predict the next token.
For example, consider the following Korean sentence fragment:
For lunch today, I ate kimchi stew
Training simply increases the probability that an appropriate continuation follows. By learning from countless sentences on the internet this way, the model acquires grammar, knowledge, and even some reasoning ability.
There is one problem. Predicting the next token well and giving the answer a person wants are not exactly the same task.
The internet contains kind and unkind answers, accurate and incorrect writing, logically organized explanations, and a remarkable amount of confident nonsense.
To a pretrained model, they are all equivalent training data. It does not judge whether an answer is good or bad; it only learns which token is likely to appear next. It resembles a student who has read an enormous number of books but has no idea how to write an exam response that earns a high score.
SFT, or Supervised Fine-Tuning, was introduced to address this problem.
People collect well-written questions and answers into a dataset:
Here is a question and is an ideal answer written by a person. Training increases the probability that the model generates that answer.
This method is intuitive and works well. Instruction tuning produces a model that follows user directions far better than a base model.
It is nevertheless difficult for people to write a perfect answer to every question.
Compare the following two requests:
- “Write the perfect explanation of PPO for someone learning reinforcement learning for the first time.”
- “Choose which of these two answers is better.”
For most people, the second is easier. Writing a perfect answer from scratch requires very different effort from selecting the better of two existing answers.
You do not need to know how to run a restaurant to judge whether its food tastes good. Online reviews sometimes make even that proposition doubtful, but relative comparisons are often easier than writing demonstrations directly.
Training an LLM from such comparisons is called preference learning, and RLHF—Reinforcement Learning from Human Feedback—is a representative method.
RLHF
The name RLHF may evoke a person sitting beside the model, praising or scolding it after every generated response.
In practice, people are not placed inside every iteration of the reinforcement-learning loop. They would become exhausted and, more importantly, they are expensive.
Conventional RLHF has people compare answers in advance to construct a preference dataset, then trains a Reward Model to stand in for human judgment. The Reward Model subsequently evaluates responses generated by the policy.
A standard RLHF pipeline such as InstructGPT consists of three broad stages:
- SFT on a dataset of good answers
- Reward Model training on human preferences
- Policy optimization to maximize Reward Model scores
First, provide the same question to the SFT model several times and generate different answers:
Show two responses to a person and ask which is better. Denote the selected response by and the unselected one by :
and stand roughly for winner and loser. Papers also call them the preferred and dispreferred responses.
The resulting preference dataset has the form
Importantly, the person did not assign exact scores to the answers.
They did not say, “The first answer is worth 8.37 points and the second 6.24.” They said only that the first was better than the second.
Reinforcement learning, however, needs a numerical evaluation of the model’s response. A Reward Model is therefore trained to turn this relative ranking into a scalar reward.
Reward Model
Let the Reward Model be . Given question and response , it emits one scalar:
A high reward is assumed to indicate a response that people are likely to prefer, and a low reward one they are unlikely to prefer.
The Bradley-Terry Model is commonly used for these preferences.
Given two responses and , it defines the probability that a person prefers as
Using a sigmoid gives the simpler form
What matters is not each reward’s absolute value, but the difference between the rewards.
For example, consider
and
Both reward differences are 2, so the Bradley-Terry Model assigns them the same preference probability.
The Reward Model should not blindly make the selected answer’s score large. It should make the selected answer’s reward higher than that of the unselected answer.
Its loss is therefore
The loss decreases when the Reward Model gives the selected response a higher score and increases when it scores the unselected response higher.
So far, this does not look very different from binary classification.
The problem is that training a good Reward Model is not the end. We do not ultimately want a judge that scores responses well; we want an LLM that generates good responses.
The Reward Model only imitates human preferences. The actual policy must now be trained to increase that reward.
A Policy That Maximizes Reward
Let the language model we want to train be .
Given a question , the Policy generates a response .
At its simplest, we could maximize the following objective so that the model generates responses to which the Reward Model assigns high scores.
With only this objective, however, the Policy may find weaknesses in the Reward Model and generate strange responses.
The Reward Model is not human preference itself. It is an approximation trained on a limited preference dataset. If we optimize the Policy too aggressively, it may generate responses that please only the Reward Model rather than responses people actually like.
This is like discovering loopholes in an exam rubric and writing an answer that earns a high score despite saying very little. That skill may have had its uses in school, but it is not what we want from an LLM.
We therefore add a KL divergence penalty so that the Policy being trained does not move too far from the existing Reference model.
Here is generally a frozen copy of the SFT model used as the Reference model.
The first term raises the Reward.
The second term prevents the Policy from moving too far from the Reference model.
A large binds the Policy more strongly to the Reference model, while a small allows the Policy to change more in pursuit of higher Reward.
The objective balances two goals:
- Generate high-Reward responses that people are likely to prefer.
- Do not stray too far from the language ability and response distribution of the existing SFT model.
PPO has commonly been used to optimize this objective in practice.
One point deserves emphasis here: RLHF and PPO are not the same thing.
RLHF is the overall framework for training a model with Human Feedback. PPO is the reinforcement-learning algorithm used within that framework to update the Policy with a Reward Model.
Other reinforcement-learning methods can be used instead of PPO. The two concepts have come to be mentioned almost as a pair because PPO has been used so frequently in LLM-based RLHF.
The Complexity of PPO-Based RLHF
Running PPO-based RLHF requires more models than one might expect.
- The Policy Model that is actually trained
- The Reference Model that anchors the Policy
- The Reward Model that evaluates generated responses
- The Value Model that predicts the future Reward of each State
It amounts to bringing in three more models behind the scenes just to teach one model well. Education has always been expensive.
The Policy Model generates a response. The Reward Model evaluates the complete response. At each Token-generation step, the Value Model predicts the future Reward and uses it to calculate the Advantage.
The PPO training process must also Sample new responses from the current Policy.
It evaluates the generated response with the Reward Model, calculates a KL penalty against the Reference Model, estimates the Advantage with the Value Model, and then updates the Policy using PPO clipping.
Repeating this process creates the following cycle:
LLM responses are long and the models themselves are large. Generating the rollout is therefore expensive, and training also requires Forward passes through several models and a Backward pass through the Policy.
There are also many factors to manage, including the scales of the Reward and Value, the KL coefficient, the PPO clipping range, and Advantage normalization.
This is exactly why I wrote such a long article about PPO earlier. PPO works well, but it is by no means a simple training method.
This raises a rather fundamental question:
People have already told us which response is better. Must we really train a separate Reward Model and then train the Policy again with PPO?
The current RLHF structure is as follows:
The Reward Model first learns human preferences, and the Policy then learns the Reward Model's preferences.
It is literally doing the work twice.
Could we instead use the preference dataset to train the Policy itself directly?
The method that begins with this question is Direct Preference Optimization, or DPO.
Direct Preference Optimization
Training Without a Reward Model
The full title of the DPO paper is:
Direct Preference Optimization: Your Language Model is Secretly a Reward Model
It means that your language model is, in fact, a Reward Model. It is a fairly provocative paper title—almost like a YouTube thumbnail.
DPO's main idea is not a proposal for a new Reward.
Rather, if we rearrange the KL-constrained Reward-maximization objective used in conventional RLHF, the Preference probability can be expressed directly in terms of Policy probabilities without explicitly training a Reward Model.
Recall the conventional RLHF objective:
Suppose the Reward function in this objective is given.
The Optimal policy that maximizes the objective can be expressed as
Here is the Partition function that makes the probabilities of all responses sum to 1.
Intuitively, a response with a higher Reward receives a higher probability than it had under the Reference model.
However, a response that the Reference model would almost never generate cannot gain an arbitrarily high probability merely because its Reward is slightly higher. The term is the anchor.
Now let us rearrange the Optimal policy equation in terms of the Reward.
Taking the Log of both sides gives
The Reward can therefore be written as
This equation is DPO's most important starting point.
Instead of representing the Reward function with a separate Neural Network, we can represent it as the Log probability ratio between the Policy and the Reference policy.
But still remains.
Computing exactly for an LLM is practically impossible because it requires summing probabilities over every possible response . That should be clear from considering how many possible sentences there are.
Fortunately, the Bradley-Terry Model used for the Reward Model depends not on the absolute values of the Rewards but only on their difference.
Substitute the Reward expression derived above.
Because both responses answer the same question , their terms cancel.
This is precisely where the separate Reward Model disappears.
The difference in Rewards can be expressed using only the Policy and Reference probabilities.
DPO Loss
Substituting the actual Policy to be trained for the Optimal policy gives the following Preference probability:
Because the preference dataset tells us that a person actually selected , we can use a Binary cross-entropy-style Loss that increases this probability.
That is almost the entirety of the DPO Loss.
The rollout, Reward Model, Value Model, GAE, and PPO clipping used in PPO have all disappeared from the equation.
We can simply load preference pairs in Batches and perform Gradient descent much like ordinary Language Model Fine-tuning.
This is why it is called Direct Preference Optimization. It optimizes the Policy directly from the preference dataset without the Reward Model as an intermediary.
What DPO Actually Compares
At first glance, the DPO Loss may look complicated because it contains so many Logs and fractions, but the value it actually compares is simple.
Define the following quantity as the Implicit reward that the Policy assigns to response :
The DPO Loss can then be written as
It looks almost identical to the Reward Model Loss.
In a conventional Reward Model, a separate Network predicts the Reward difference.
In DPO, the Log probability ratio between the Policy and Reference policy plays the role of the Reward.
In other words, the Reward has not disappeared.
It is represented by changes in probability within the Policy rather than emitted by a separate model.
This is what the paper's title, “Your Language Model is Secretly a Reward Model,” means.
We thought we had fired the Reward Model, only to discover that the Policy was now doing the Reward Model's job as well. It is a structure commonly seen in companies.
The Relative Probability Matters
It is also worth considering how DPO differs from simple SFT.
SFT only increases the probability of the Preferred response .
It does not use information about the Rejected response .
DPO, by contrast, learns the relative Margin between the Preferred and Rejected responses.
DPO trains this Margin to grow.
Put simply, it does two things together:
- It makes the Policy prefer the Preferred response more than the Reference model does.
- It makes the Policy prefer the Rejected response less than the Reference model does.
The absolute size of is insufficient on its own.
DPO considers how much the relative probability of the Preferred response has increased compared with the Reference model.
For example, if the Reference model already generated a certain response with high probability, it is not enough for the Policy merely to assign that response a high probability too.
This value indicates how much more the Policy has come to prefer that response relative to the Reference model.
DPO learns not the simple Likelihood of the Preferred response, but its relative change in preference from the Reference model.
Why Does the Reference Model Remain?
The Reward Model and Value Model disappear in DPO, but the Reference Model remains.
Without the Reference Model, we could simply learn the difference in Log probabilities between the Chosen and Rejected responses:
Training this way, however, would remove the KL constraint from the original RLHF Objective.
The Reference probability in DPO incorporates into the Loss the KL regularization that kept the Policy from moving too far from the baseline model in conventional RLHF.
It is therefore more accurate to view DPO not as a method that eliminates the Reference Model, but as one that redefines Reward through its relationship with the Reference Model.
The Reference Model is generally a frozen SFT model. The Policy being trained also starts from the same SFT checkpoint.
Because the two models are identical at the beginning of training, the following value is nearly 0:
As training progresses, the Policy changes so that this value becomes relatively larger for Preferred responses and smaller for Rejected responses.
The Role of
also appears in DPO.
This comes from the coefficient in the original KL-constrained RLHF Objective that controlled how far the Policy could move from the Reference Model.
In the theoretical derivation, a larger makes it more costly to change the Policy substantially for a small increase in Reward. The Optimal policy is therefore bound more strongly to the Reference policy.
In the actual DPO Loss, however, also directly scales the Logit. It is therefore better to understand it as a Hyperparameter that jointly determines the scale of the Preference margin and the Regularization against the Reference policy, rather than merely saying that “a larger always weakens training.”
If is too small, the Policy may overfit the preference pairs. If it is too large, the desired difference in preferences may not be learned sufficiently.
Like any other Hyperparameter, it ultimately has to be tuned for the Dataset and Model. Eliminating reinforcement learning did not bring the happy ending of eliminating Hyperparameter tuning as well.
Intuition Behind the DPO Gradient
Examining the Gradient of the DPO Loss also shows which preference pairs receive stronger training.
First, recall the definition of Implicit reward:
The DPO Gradient has the following form:
The latter term is intuitive.
It raises the probability of the Preferred response and lowers the probability of the Rejected response.
The preceding Sigmoid term determines the Weight according to how badly the current Policy misjudges the ordering of the two responses.
If the Policy already gives the Preferred response a much higher Implicit reward, this Weight becomes small.
Conversely, if it rates the Rejected response more highly, the Weight becomes large.
Thus, preference pairs that the current Policy ranks incorrectly receive stronger training than pairs it already distinguishes well.
This is slightly different from indiscriminately increasing every Chosen probability and decreasing every Rejected probability.
Differences Between RLHF and DPO
What Has Disappeared?
Conventional PPO-based RLHF required the following process:
DPO simplifies it to the following:
No separate Reward Model is required.
A Value Model is unnecessary as well, so GAE is not calculated.
There is no PPO clipping or Advantage normalization.
Nor is there an Online rollout process that continuously Samples responses from the current Policy and evaluates them with a Reward Model inside the training Loop.
Ordinary Offline training can be performed using preference pairs collected in advance.
From an implementation perspective, only the following information is needed:
- Prompt
- Preferred response
- Rejected response
- The Policy's Log probability
- The Reference Model's Log probability
Because the Reference Model is not trained, it does not need Gradients. Its Log probabilities for the Dataset can even be computed in advance.
These differences make DPO simpler to implement than PPO-based RLHF and allow it to train more like a conventional Supervised Fine-tuning Pipeline.
What Has Not Disappeared?
The name DPO may suggest that even Human Feedback is no longer necessary, but that is not the case.
DPO still requires preference pairs of the following form:
Someone must decide which response is better.
That someone may be a person, a strong LLM Judge, or a Rule-based verifier. When AI supplies the Preference labels, the setup is closer to RLAIF.
In other words, DPO does not eliminate the Feedback itself.
It eliminates the intermediate process of training a separate Reward Model from that Feedback and then optimizing the Reward Model again through reinforcement learning.
A simple comparison looks like this.
Conventional RLHF:
DPO:
Human preferences have not suddenly become free; the path that conveys them to the Policy has merely become shorter.
Is DPO Reinforcement Learning?
DPO is derived from a reinforcement-learning Objective, but its actual training process does not use a Reinforcement Learning algorithm in the conventional sense.
It does not interact with an environment to collect new Trajectories, nor does it calculate a Policy Gradient from a Scalar reward emitted by a Reward Model.
Instead, it minimizes a Binary classification-style Loss on a fixed preference dataset.
The DPO paper therefore describes DPO as an RL-free algorithm.
That does not mean DPO suddenly invented a completely unrelated objective.
It analyzes the Optimal policy of the following Objective used in conventional RLHF,
expresses the relationship between the Reward and the Policy in Closed form, and then substitutes the Preference Loss directly into the Policy.
The following two statements are therefore both true:
- DPO training itself does not use a reinforcement-learning Loop like PPO.
- The DPO Loss is derived from the KL-regularized RLHF Objective and the Bradley-Terry Preference Model.
I personally find it helpful to think of DPO as “a way to solve a reinforcement-learning Objective without doing reinforcement learning.” The phrasing is a little odd, but that is how its structure actually works.
Advantages and Limitations of DPO
Training Has Become Simpler
DPO's greatest advantage is, of course, its simplicity.
PPO-based RLHF requires managing the interactions among the Policy, Reference, Reward, and Value Models. Response Sampling and Reward calculation also take place inside the training Loop.
DPO, by contrast, only needs to calculate the Log probabilities of preference pairs and minimize a single Loss.
Anyone with experience in ordinary Language Model Fine-tuning can understand a DPO implementation relatively easily.
There is also no need to train and store separate Reward and Value Models, reducing the management burden of the overall Pipeline.
At this point, DPO may look like a strictly superior method that completely replaces RLHF, but that is not always the case.
Bound to an Offline Preference Dataset
Basic DPO uses a fixed preference dataset collected in advance.
Even as the Policy changes during training, it does not automatically receive new Feedback on responses generated by the new Policy.
Suppose, for example, that we construct a preference dataset from responses generated by the initial SFT model.
As DPO training proceeds, the Policy's response distribution changes. Yet the Dataset still contains only responses generated by the initial Model.
There is no direct Preference signal for strange responses that the Policy begins to generate during training, or for good responses that were not in the Dataset.
Online RLHF, by contrast, can continually evaluate responses from the current Policy with the Reward Model.
This requires assuming that the Reward Model generalizes well, but it can at least evaluate new Samples from the current Policy's Output distribution.
Put simply:
- DPO repeatedly studies answer sheets that have already been graded.
- Online RLHF has the Reward Model grade each new problem as it is answered.
If the existing answer sheets are good enough, DPO is much more efficient. But an Online method may be advantageous when the Policy moves far beyond the Dataset or needs to explore new behaviors.
Sensitive to the Quality of Preference Labels
DPO directly incorporates the difference between Preferred and Rejected responses into the Policy.
Consequently, it learns the stated relationship even when a Preference label is wrong, or when the two responses are nearly equal in quality but are forcibly assigned a Winner and Loser.
Human preferences are not always consistent.
Some people like short, direct answers, while others prefer long, friendly ones. Even the same person's judgment may change with their condition that day.
The Bradley-Terry Model assumes that each response has a latent Scalar reward and that the difference between two Rewards determines the Preference probability.
In reality, however, it is difficult to believe that human preferences can always be neatly ordered by a single Scalar value.
A may be better than B and B better than C, yet in a particular context C may once again be better than A. Human feelings are not that consistent to begin with.
DPO inherits both this assumption about the Preference model and the quality of the Dataset.
Eliminating the Reward Model does not eliminate the difficulty of Preference modeling.
The Reward Model Cannot Be Reused
In conventional RLHF, the Reward Model is a separate evaluation model.
Once trained, it can be used to compare multiple Policies, perform Rejection sampling, filter a Dataset, or evaluate new Responses.
In DPO, by contrast, the Reward is implicitly contained in the Log probability ratio between the Policy and Reference Model.
This Implicit reward depends on the relationship between the current Policy and Reference.
It is difficult to use it to score the Outputs of other Policies independently, as one could with a general, separately trained Reward Model.
DPO is therefore convenient when the final goal is to Fine-tune a single Policy to a preference dataset. When the Reward Model itself must be used across several processes, the conventional RLHF structure may be more appropriate.
Directly Optimizing Preferences Is Not Always Safe
DPO increases the relative Margin between the Preferred and Rejected responses.
But an increase in that relative Margin does not necessarily mean that the absolute Likelihood of the Preferred response always rises.
For example, even if the Probability of the Preferred response decreases slightly, the relative Margin between the two responses can grow if the Probability of the Rejected response decreases much more.
DPO's actual objective is not to memorize the Chosen response unconditionally, but to shift the preference difference between Chosen and Rejected in the correct direction relative to the Reference model.
This property is also an advantage of DPO, but it means that an unsuitable Dataset or Hyperparameter can produce unexpected Probability changes.
Simplifying the Loss leaves the work of Dataset analysis and training-result validation in place.
Summary
The basic idea of RLHF is to turn human preferences into Reward and use reinforcement learning to train a Policy that generates responses with high Reward.
Conventional PPO-based RLHF generally proceeds in the following order:
DPO uses the relationship between the Reward Model and the Optimal policy to reduce this process to
In DPO, Reward does not disappear; it is represented implicitly inside the Policy by the following Log probability ratio:
Training then makes the selected response's Implicit reward higher than that of the unselected response.
What DPO changes, in the end, is not whether Human Feedback exists.
It replaces the indirect process of first teaching human preferences to a Reward Model and then conveying them to the Policy through PPO with a direct connection from preference pairs to the Policy.
My simplest summary of DPO would be this:
Instead of translating human tastes into scores and then teaching them back to the model, show the model directly which response people preferred.
Showing the model directly does not mean that it perfectly understands the human mind, of course. Humans do not understand the human mind very well either.
At the very least, however, it substantially reduces the complicated process of bringing in additional Reward and Value Models to train a single model, continually generating responses, and running PPO.
DPO's greatest significance is not that it discovered a new Preference signal.
It lies in reconsidering the problem that conventional RLHF was solving and demonstrating mathematically that the Reward Model and Policy need not be trained as separate stages.