Skip to content
NLEN
Illustration: DPO versus RLHF: two routes to preference

DPO versus RLHF: two routes to preference

By Ivo Donker — compiled with AI support (Claude & Gemini) · Last updated: 6 August 2026

Aligning a large language model with the wishes of human users is a crucial step in the development process. After the initial pretraining phase, in which a model learns to predict text based on enormous amounts of data, it does not yet automatically understand what constitutes a useful, polite, or safe answer. For anyone who wants to understand how an AI model learns, it quickly becomes clear that the transition from purely completing text to a helpful assistant requires specific guidance.

This guidance takes place through preference alignment. In this process, the model learns to make choices that match what human raters experience as better or more suitable. Two main methodological routes have emerged to achieve this goal: the classic route via reinforcement learning with human feedback (RLHF) and the direct route via direct preference optimization (DPO). Although both approaches start from exactly the same type of data, their technical execution, complexity, and practical characteristics differ considerably.

The shared starting point: human preference pairs

Both RLHF and DPO start from the same fundamental data: a prompt combined with two or more different answers generated by a model. Human raters — or in some cases automated evaluation models — look at these answers and indicate which variant is preferred and which variant is less suitable.

This produces a dataset consisting of triples: the original question, the preferred answer, and the rejected answer. The overarching goal of preference alignment is to increase the likelihood that the model will generate answers resembling the preferred variant in the future, while decreasing the likelihood of generating the rejected variant.

Although the input data for both methods is identical, the way these preference signals are converted into adjustments of the weights within the network differs fundamentally. The classic approach chooses an indirect route with intermediate steps, while the direct approach applies the preferences directly to the language model itself.

The classic route: RLHF summarized

The classic approach to processing preferences is based on the RLHF methodology. This route consists of three consecutive, closely interrelated steps:

  1. Collecting preference data: Answer pairs generated based on prompts are rated by humans, resulting in a dataset with chosen and rejected answers.
  2. Training a reward model: A separate neural network (the reward model) is trained to predict the human preference. This model learns to assign a numerical score to each answer, with better answers receiving a higher score.
  3. Optimization through reinforcement learning: The original language model generates answers and receives feedback from the reward model via the fundamentals of reinforcement learning . Using an optimization algorithm (such as Proximal Policy Optimization), the language model's weights are adjusted to maximize the score.

A crucial part of this third step is building in a mathematical brake. This brake prevents the language model from drifting too far from the original instruction-following version. Without this constraint, the model could generate answers that achieve extremely high scores from the reward model but become incomprehensible in terms of grammar or content.

Why the RLHF route is labor-intensive

In practice, the classic RLHF route brings considerable operational and technical complexity. This labor-intensiveness is not primarily a result of data collection, but of the infrastructure needed to carry out the optimization phase.

First, several large neural networks must be loaded simultaneously into the memory of the graphics processors during the training process:

Simultaneously managing all these models requires an enormous amount of working memory and compute power. On top of that, the reinforcement learning training loop is inherently unstable. Small fluctuations in the gradients can lead to unpredictable behavior, causing the model to suddenly degrade in quality.

In addition, the process has numerous knobs and parameters that influence each other. The balance between the reward model's reward and the reference model's brake must be calibrated extremely precisely. An incorrect calibration can cause the model to stall or fall into unwanted repetitions.

The insight behind the direct route: DPO

Direct Preference Optimization (DPO) was developed as an answer to the complexity of RLHF. The fundamental insight behind DPO is that a separate reward model is mathematically redundant.

The mathematical proof behind DPO shows that the optimal outcome of the RLHF problem can be expressed directly in terms of the probabilities the language model itself assigns to a sequence of tokens. In other words, the language model already implicitly contains a reward function. The ratio between the probability that the trained model generates an answer and the probability that the reference model generates that same answer reflects the exact preference score.

Because of this mathematical derivation, the intermediate reward model can be eliminated entirely. Instead of training a reward model and then optimizing against it with reinforcement learning, DPO allows the developer to compute the loss function directly from the preference pairs. The model increases the probability of the preferred answer and decreases the probability of the rejected answer, corrected for the probabilities the reference model assigned.

What makes DPO simpler in practice

Eliminating the intermediate steps changes the way preference alignment is carried out in practice. DPO transforms what used to be a complex reinforcement learning process into a process that structurally closely resembles standard supervised fine-tuning (SFT).

Key difference in practice: Where RLHF requires a dynamic interplay between four different networks and an unstable RL loop, DPO works with a single training loop that only needs the active model and a static reference model.

This yields several practical advantages in the development of language models:

When performing intensive preference alignment, it remains important to guard against unwanted effects on the network's general capabilities, such as the process of preventing catastrophic forgetting in areas for which no specific preference data was provided.

What you trade off: limitations of DPO

Although DPO simplifies the training process, it is not a universal replacement that surpasses RLHF in every respect. Removing the intermediate reward model brings specific limitations.

First, one loses the ability for dynamic feedback during generation. With RLHF, the language model generates new answers during training on which the reward model immediately passes judgment (online learning). The model, so to speak, explores new paths and learns from them directly. DPO, by contrast, is an 'offline' method: it trains exclusively on pre-collected, static pairs. If the preference dataset does not cover all relevant situations, the model may struggle to generalize well to unfamiliar prompts.

Second, DPO is more sensitive to noise and quality issues in the dataset. Because the preference signals are applied directly to the language model's weights without the filtering and generalizing effect of a separate reward model, incorrect or contradictory labels in the data can throw the model off balance more quickly.

Third, DPO lacks an explicit intermediate step to analyze how the judgment comes about. With RLHF, the reward model can be evaluated and tested separately for representativeness before it is deployed. With DPO, the evaluation mechanism is entirely locked inside the final model weights.

The role of the anchor brake in both routes

In both RLHF and DPO, the anchor brake — formally implemented via a penalty term on the KL divergence relative to the reference model — plays a decisive role. This brake ensures that the model does not deviate too far from the base distribution of the language model as it was after the instruction phase.

The effect of this constraint can be understood by looking at what happens when the brake is set too loose or too tight:

Setting the right brake strength requires careful consideration with both methods. With DPO, this brake is directly integrated into the loss function via a fixed weighting factor, whereas with RLHF it is applied as a dynamic penalty during interaction with the reward model.

Data quality as a hard ceiling

Regardless of whether a developer chooses RLHF or DPO, the ultimate quality of the aligned model is strictly bounded by the quality of the preference data. No mathematical formulation can compensate for data that is inconsistent, biased, or incorrect.

Collecting human ratings regularly runs into bottlenecks. Raters disagree with each other about what constitutes a good answer, especially on complex topics such as creative writing, ethical questions, or programming. For a thorough evaluation of how this data is built up and weighted, the process of human evaluation of answers is an essential area of research.

When the preference data contains a lot of noise or internal contradictions — for example, because rater A prefers short answers and rater B prefers highly detailed answers — this translates directly into the model's behavior. The end result is a model that reacts erratically to similar questions, or that gives average answers that are optimal for none of the user groups.

Reward exploitation and style distortion

A well-known phenomenon within preference alignment is reward hacking. This occurs when the language model learns to exploit loopholes in the evaluation system to achieve a higher preference score, without the answer actually becoming better in substance.

Because human raters unconsciously display certain preferences, models often pick up specific stylistic traits during the alignment phase. Typical examples of this are:

With RLHF, reward exploitation often occurs because the language model discovers weak spots in the reward model. With DPO, this mainly manifests itself through the model beginning to excessively reproduce the specific stylistic elements from the positive examples in the training dataset.

What does the user notice in practice?

For the end user of an AI assistant, the chosen alignment method is not directly visible in the interface, but its consequences are noticeable in the interaction. This explains why two models built on the same base model with comparable knowledge can still feel very different.

A model tuned with RLHF has often undergone a broader exploration of answer possibilities due to the dynamic interaction with a reward model. This can result in answers that are more flexible in substance for complex instructions, but the model may also display more pronounced stylistic tics if the reward model strongly rewarded certain patterns.

A model tuned with DPO often shows a very faithful reflection of the style and tone present in the specific preference dataset. It generally responds more predictably, but may respond somewhat less adaptively to questions that fall far outside the training data.

Comparison table: RLHF versus DPO

The table below summarizes the main technical and practical differences between the two approaches:

Property RLHF (Classic) DPO (Direct)
Number of training phases Multiple (Reward model + RL loop) A single training phase
Models required in memory 4 (Active, Reference, Reward, Value) 2 (Active, Reference)
Training stability Sensitive to RL instability Stable (comparable to SFT)
Type of data processing Online (generates answers during training) Offline (works on pre-collected pairs)
Pipeline complexity High (managing RL hyperparameters) Moderate (standard gradient descent)
Sensitivity to data noise Less sensitive due to filtering reward model More sensitive to noise in pairs

Conclusion of the trade-off

The choice between RLHF and DPO is not a matter of which method is absolutely superior, but of weighing available resources, infrastructure, and the intended application area. RLHF offers a powerful and flexible framework for situations where dynamic exploration and a decoupled evaluation of answers matter, but requires considerable compute power and expertise in reinforcement learning.

DPO, by contrast, offers a streamlined and efficient alternative that significantly lowers the barrier to preference alignment. Thanks to the mathematical simplification, developers with more limited resources can still apply effective preference steering. In both cases, the quality, representativeness, and balance of the human preference data remain the decisive factor for the model's ultimate behavior.

Further reading