Compare PPO with DPO

PPO vs. DPO: Learning from Rewards vs. Learning from Preferences
Title: PPO vs. DPO: Learning from Rewards vs. Learning from Preferences
Source: AIML.com Research

Introduction: PPO vs DPO

When people talk about aligning large language models with human preferences, Proximal Policy Optimization (PPO) and Direct Preference Optimization (DPO) are often mentioned side by side. They both “optimize a policy,” but they operate under fundamentally different kinds of supervision. 

  • PPO is a reinforcement learning algorithm. It improves a policy through interaction, using scalar rewards gathered from rollouts and constraining updates, so the policy does not change too abruptly. 

  • DPO is a preference-based post-training method: it learns offline from chosen-vs-rejected response pairs and stays anchored to a reference model, increasing the probability of preferred outputs without training a separate reward model or running an online rollout loop. 

Once you frame the comparison around the feedback you can reliably obtain, rewards from interaction vs. preferences from comparisons, the rest of the differences become straightforward.

PPO: learning from interaction, with “don’t change too much” updates

PPO lives in the classic reinforcement learning loop: the policy acts in an environment, produces trajectories, and receives rewards. The challenge is that policy-gradient updates can be unstable. If one update shifts the policy too far, the data distribution changes abruptly and the learning signal becomes unreliable, sometimes to the point of collapse.

So PPO’s central design choice is conservative improvement. It updates the policy, but it explicitly limits how much the new policy can deviate from the policy that generated the data. In practice this is often implemented via the clipped probability ratio objective and monitored with diagnostics like approximate KL-divergence and clip fraction.

A useful way to think about PPO is as a small training system rather than a single equation:

  • Rollouts from the current policy (on-policy or nearly on-policy).
  • Advantage estimation (commonly GAE) to produce a lower-variance learning signal.
  • Actor-critic structure, where the critic learns values and the actor learns the policy update direction.
  • Stability knobs and metrics (clip range, KL, entropy bonus, value loss weight, rollout length).

PPO is powerful because it can learn from real interaction, but that power comes with operational complexity: you are constantly generating data and keeping the learning dynamics stable.

DPO: learning from preferences, anchored to a reference model

Now consider the alignment setting for language models. You may not trust a handcrafted reward function, and you may not want the cost and instability of an online RL loop. But you can collect comparisons: for a given prompt, humans (or a proxy) prefer response A over response B.

DPO is designed precisely for that situation. Rather than learning a separate reward model and then optimizing with PPO, DPO turns preference pairs into a direct objective: it increases the model’s probability of the chosen response relative to the rejected response.

The second key design choice is the reference model. DPO does not just push the policy toward “chosen”. It also keeps the policy anchored near a reference checkpoint. This anchoring is what prevents the model from drifting into strange regions while it learns to separate chosen from rejected.

Operationally, DPO tends to feel like fine-tuning:

  • A dataset of (prompt, chosen, rejected) pairs.
  • A reference policy used as an anchor.
  • A standard minibatch training loop, no rollouts, no critic, no advantage estimation.

So the simplification is real: DPO removes the online interaction loop and the reward-model training stage, and it replaces them with a stable offline objective over preference data.

When each approach makes sense

A good rule of thumb is to match the algorithm to the kind of signal you can obtain reliably.

PPODPO
When to use it?- You can interact with an environment or simulator to generate fresh experience.

- You have a reward signal you trust (or can design carefully).

- You need sequential decision-making behavior (robotics, games, control, recommender RL).
- Your feedback comes primarily as preferences (human rankings, pairwise comparisons).

- You’re doing LLM post-training / alignment and want a stable, engineering-friendly loop.

- You want to avoid maintaining a separate reward model and a rollout-based RL stage.
When to avoid it?- Interaction is expensive and you can’t afford rollout collection.

- Your reward is poorly specified and likely to be exploited.

- You want a simple, reliable fine-tuning-style pipeline.
- Preference data is low-quality, biased, or too narrow (DPO will faithfully learn the bias).

- The task truly requires interactive exploration (DPO cannot discover new states; it only learns from what’s in the dataset).

- You need explicit control over a scalar reward objective rather than “preferred vs. not preferred.”
Title: PPO vs. DPO
Source: AIML.com Research

The simplest way to remember the difference

PPO is built around interaction and reward: collect rollouts, estimate advantages, update carefully so the policy does not change too much at once.

DPO is built around comparisons and anchoring: learn directly from chosen-vs-rejected pairs, while staying close to a reference model to keep training stable.

That is the conceptual separation that will keep you oriented as you move between classic RL and modern preference-based post-training.

Video Explanation

  • This video titled, “LLM Training & Reinforcement Learning from a Google Engineer | SFT + RLHF | PPO vs GRPO vs DPO”, by Martin explains how the SFT→RLHF pipeline works in practice, then breaks down how PPO, GRPO, and DPO perform the optimization step—especially the PPO vs. DPO segment around 12:00–20:00 (Runtime: 8 minutes)
YouTube video
LLM Training & Reinforcement Learning by Martin

Author

Help us improve this post by suggesting in comments below:

– modifications to the text, and infographics
– video resources that offer clear explanations for this question
– code snippets and case studies relevant to this concept
– online blogs, and research publications that are a “must read” on this topic

Leave the first comment

Partner Ad
Find out all the ways that you can
Contribute