Why Look for Alternatives to PPO?
PPO works. It ran the final RLHF stage of the first large aligned models, InstructGPT foremost among them. But it has a considerable operational cost.
Recall what PPO (Proximal Policy Optimization) requires. The full count, including which parts learn and which stay frozen, is in RLHF in practice; PPO's own machinery is explained in PPO, value functions and actor-critic. In short:
| Model | Role | Status |
|---|---|---|
| The policy | the model you want to improve | trained |
| The critic (also called the value model) | estimates "how much total reward will this beginning of a response earn" | trained |
| The reference model | frozen copy of the starting point, used to measure drift | frozen |
| The reward model | scores the responses | frozen |
Two trained models, two frozen ones: four sets of weights to host, and for the two trained ones you also have to store gradients and optimizer states. On top of that: clipping (cutting off whatever goes past a bound), Kullback-Leibler coefficients and hyperparameters everywhere, PPO is notoriously difficult to stabilize.
The natural question: can you keep RL's power (the model generates its responses and learns from its mistakes) while eliminating the complexity?
Two algorithms answer yes: GRPO and oDPO.
The Flaw in PPO That GRPO Fixes
In one sentence: PPO needs a whole critic network, which has to be trained and whose errors pollute the learning signal; GRPO deletes it and uses the average of a group of answers to the same question as its baseline.
GRPO stands for Group Relative Policy Optimization. The algorithm was introduced in the DeepSeekMath paper.
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models (the paper that introduces GRPO)The Central Idea
GRPO starts from a simple observation: why train a critic to estimate a response's quality, when you can directly compare responses against each other?
Instead of asking the critic "how much is this response worth?", GRPO generates a group of responses to the same prompt and compares them. The best are reinforced, the worst are penalized. No need for a separate model to estimate an "absolute value", relative comparison is enough.
It's like grading exams: instead of a complex absolute grading rubric, you rank the papers against each other.
How It Works, Step by Step
For each training prompt:
Step 1 (Generate a group of responses. The current model produces different responses to the same prompt) in practice a handful to a few dozen. The sampling temperature is set high enough to get diversity: temperature is the dial that decides whether the model always takes the most likely next word (low temperature, identical answers) or allows itself less likely ones (high temperature, varied answers).
Step 2, Evaluate each response. A score is assigned to each response. This score can come from a classic reward model or, even better, from an automatic verifier, that is the principle of RLVR (Reinforcement Learning with Verifiable Rewards), covered in Reward modeling and RLVR. In math for example: if the answer is correct, otherwise.
Step 3, Normalize within the group. Compute the mean and standard deviation of the scores in the group, then each response's advantage:
The symbols: is the score of the -th response in the group; (Greek mu) is the mean of those scores; (sigma) is their standard deviation, the usual measure of how spread out they are (see expectation and variance); is that response's advantage. In plain words: by how much does this answer beat the group average, counted in standard deviations?
Careful: on this page means the standard deviation of a group of scores here, while further down, in the DPO loss, the same means the sigmoid function. That is a notation clash inherited from the papers, not a subtlety: the two objects have nothing to do with each other.
If , the response is better than the group average, reinforce it. If , it's worse, penalize it. This is the group baseline: each response is judged relative to the others, not in absolute terms.
Step 4, Update the model. Apply a policy gradient update weighted by these normalized advantages.

The Formula Decoded
The complete GRPO loss:
Let's decode each piece:
-
, the loss to be minimized. is the number of responses in the group, and simply means "average over the responses". is the prompt, the -th generated response.
-
, the policy being trained, that is, the model itself, whose learned parameters are collectively called (theta). is a copy of that same model as it stood when the responses were generated, and is the frozen copy of the starting point.
-
, the importance ratio: how much has the probability of this response changed since the last update. If the ratio is very different from 1, the model has moved a lot.
-
, the clipping (identical to PPO): we prevent the ratio from straying too far from 1. (epsilon) is the half-width of the allowed band; with the default inherited from the PPO paper, , the ratio is bounded between 0.8 and 1.2. This prevents overly brutal updates that would destabilize the model.
-
, we take the minimum of both terms (clipped and unclipped). This is PPO's conservative mechanism: we never take the most optimistic update, always the most cautious.
-
, the normalized advantage computed in step 3. This is where GRPO differs from PPO: this advantage comes from the group, not from a critic.
-
, the Kullback-Leibler penalty. The Kullback-Leibler divergence, abbreviated KL after its two authors, measures how far apart two probability distributions are: it is zero when they are identical and grows as they separate. Here it measures the gap between the trained model and the frozen copy of the starting point, which stops the former from drifting away from the latter. (beta) is the coefficient that sets the strength of that constraint.
In plain words: for each of the responses, push its probability in the direction of its advantage, never counting more than a 20% change at once, and subtract a penalty proportional to how far the model has drifted from where it started.

The formula is nearly identical to PPO. The only difference is how is computed: PPO uses a separately trained critic to estimate the advantage, GRPO uses the group mean. By eliminating the critic, you remove an entire model from the training loop, less memory, less code, fewer things to get wrong.
Why It Works Better Than PPO in Practice
Less memory. PPO: 4 models. GRPO: 3 models (policy + reference + reward model), or just 2 if an automatic verifier replaces the reward model. Do the arithmetic in the open: a critic the same size as the policy, say 70 billion parameters, takes GB in BF16 (2 bytes per parameter) for its weights alone, and since it is trained, add its gradients and optimizer states, which cost at least as much again. Removing the critic removes that whole block.
More stable. PPO's critic is itself a neural network that must be trained, and its estimation errors propagate into the policy's updates. GRPO computes its baseline directly from the actual scores, no approximation error.
Simpler to implement. The reference implementation of GRPO in TRL (Transformer Reinforcement Learning, Hugging Face's post-training library) is markedly shorter than a full PPO implementation, which additionally has to host the critic, the GAE advantage estimator and all their settings.
It scales. The larger (the group size), the more accurate the baseline. It's a very simple compute-versus-quality trade-off to adjust.
GRPO + RLVR: The Winning Combination
GRPO shines particularly when combined with RLVR, that is, when a machine rather than a learned model decides whether the answer is right:
- You pose a math problem to the model
- GRPO generates a group of different responses
- An automatic verifier gives (correct) or (incorrect)
- Correct responses are reinforced, incorrect ones are penalized
No reward model, no critic, no human annotators. Just a model, a verifier, and GRPO. That simplicity is what let the open-source community launch its own DeepSeek-R1 reproductions so quickly.
- DeepSeek: GRPO is introduced in the DeepSeekMath paper; it was the use for DeepSeek-R1, on mathematical reasoning and code, that made it famous.
- The Qwen team (Alibaba): they started from GRPO and then published their own variant, GSPO, whose abstract credits it with part of the improvements in the Qwen3 models. See GRPO variants.
- Open-source community: thanks to libraries such as TRL and OpenRLHF, GRPO became the most common RL algorithm for R1 reproduction projects.
- Trend: GRPO, and above all its corrected variants, have largely replaced PPO as the starting point for training reasoning.
The Flaw in DPO That oDPO Fixes
In one sentence: DPO learns from a frozen set of pairs that quickly becomes too easy for the model; oDPO builds the pairs on the fly from what the model produces right now.
A note on the name: the literature usually says online DPO; "oDPO" is a convenient shorthand, not the name of a founding paper.
The Problem with Classic DPO
DPO (Direct Preference Optimization) was a revolution: it eliminates RL entirely, training directly on preference pairs (preferred response versus rejected response). The mechanism is covered in DPO and DPO in practice.
Direct Preference Optimization: Your Language Model is Secretly a Reward ModelBut DPO has a structural flaw. It is offline: you collect a dataset of preference pairs before training, then train the model on this fixed dataset. The problem?
The model evolves, but its training data stays frozen.
At the start of training, the dataset pairs are informative: they show errors the model actually makes. But as the model improves, these pairs become trivial, the model already knows the preferred response is better. It's not learning much anymore.
It's like a student who keeps solving beginner-level exercises when they've already become an expert: they get 100% but no longer progress.
The oDPO Solution: Fresh Pairs at Every Step
oDPO (online DPO) solves this problem by generating preference pairs on the fly, from the current model's responses.
The oDPO Loop, Step by Step
Step 1, Sample prompts. Draw a batch of prompts from the training dataset.
Step 2, Generate responses. For each prompt, the current model (the one being trained) generates different responses. This is the crucial difference from offline DPO: the responses come from the model in its current state, not from a pre-collected dataset.
Step 3, Score the responses. A reward model (or automatic verifier) assigns a score to each response.
Step 4, Form the pairs. For each prompt, take the response with the best score, chosen (preferred response), and the one with the worst score, rejected (rejected response). You now have a fresh preference pair that reflects the errors the model is making right now.
Step 5, Apply the DPO loss. Use exactly the same loss as classic DPO on these fresh pairs:
The symbols: is the preferred response ( for winner) and the rejected one ( for loser); is the prompt; is the model being trained and its frozen starting copy; (beta) sets how firmly the model is held near that reference. As for , here it is the sigmoid function, the S-shaped curve that squashes any number into the range 0 to 1, used to turn a gap into a probability. Nothing to do with the standard deviation written above.
In plain words: raise the probability of the good answer and lower the probability of the bad one, but always relative to what the starting model gave them.
The formula is identical to standard DPO. What changes is that and are generated by the current model instead of coming from a fixed dataset.
Step 6, Update the weights and repeat.
With oDPO, preference pairs are always at the model's current level. The model never re-encounters errors it has already corrected, it's always confronted with its current mistakes. It's a training curriculum that automatically adapts to the student's level.
oDPO vs Offline DPO: When to Choose What?
Offline DPO remains relevant when:
- You have an excellent human preference dataset (e.g., Anthropic HH, UltraFeedback)
- Your compute resources are limited, offline DPO doesn't need to generate responses at every step
- Human annotation quality is superior to what an automatic reward model could provide
oDPO is preferable when:
- You have a good reward model or automatic verifier
- Your existing preference dataset is small or of average quality
- You are willing to pay for generation at every step in order to train on the model's current mistakes rather than on mistakes it has already fixed
You will often read that online methods end up ahead of offline ones. The underlying argument is sound (learning from your current mistakes beats learning from stale ones) but the measured gap depends entirely on the dataset, the reward model and the benchmark chosen. No general figure is given here, for want of a neutral comparison to cite.
GRPO vs oDPO: What's the Difference?
Both algorithms generate responses on the fly (they're both "online"), but they differ in how they use those responses:
| GRPO | oDPO | |
|---|---|---|
| Loss type | Policy gradient (RL) | DPO loss (contrastive) |
| How are responses used? | Each response individually, weighted by its advantage | As pairs (preferred versus rejected) |
| Number of responses used | All responses contribute | Only the 2 extremes (best and worst) |
| Information exploited | The complete ranking of the group | Only "which is better, which is worse" |
| Kullback-Leibler term | Explicit in the loss | Implicit, via the reference model |
If you generate sixteen responses, GRPO uses all sixteen scores to compute advantages, every response contributes to the update. oDPO keeps only two (the best and the worst) and ignores the other fourteen. In theory GRPO is therefore more sample-efficient: it extracts more learning from the same amount of generated text, which is the expensive part. That said, the argument is theoretical, and no comparison figure is offered here.
Summary Table: PPO vs GRPO vs DPO vs oDPO
| PPO | GRPO | Offline DPO | oDPO | |
|---|---|---|---|---|
| Models in memory | 4 (policy, reference, reward, critic) | 2-3 (policy, reference, reward or verifier) | 2 (policy, reference) | 3 (policy, reference, reward) |
| Generation during training | Yes | Yes | No (fixed dataset) | Yes |
| Required data | Prompts + reward model | Prompts + reward model or verifier | Pre-collected (preferred, rejected) pairs | Prompts + reward model or verifier |
| Implementation complexity | Very high | Moderate | Low | Moderate |
| Stability | Hard to stabilize | Stable | Very stable | Stable |
| Who uses it | OpenAI, historically (InstructGPT) | DeepSeek, the Qwen team | Several open-weight families whose technical reports describe a DPO stage | Research, open-source projects |
In Practice: When to Choose What?
-
GRPO, when you have an automatic verifier (math, code) or a good reward model, and you want to train reasoning. It's the usual starting point for reproducing DeepSeek-R1 type results, in practice in one of its corrected variants, described in GRPO variants.
-
oDPO, when you want the simplicity of DPO while working on fresh data. A good compromise if you have a reward model but no exact verifier.
-
Offline DPO, when you have an excellent human preference dataset and limited resources. Remains the simplest to implement.
-
PPO, in practice, increasingly less used for LLMs. Its complexity is no longer justified now that simpler alternatives exist.
The ecosystem is converging toward simpler algorithms that drop PPO's most expensive components while keeping its power. GRPO and its variants dominate for reasoning (math, code); DPO and its online versions for general alignment. PPO, with its four models and dozens of hyperparameters, remains important to understand (the importance ratio and the clipping you meet everywhere come from it) but it is rarely the first choice today.
1. PPO needs a critic, an entire trained network that estimates how much a partial answer is worth. What does GRPO replace it with?
2. A preference-pair dataset was carefully collected before training. Why does it become a problem for classic DPO as training goes on?
3. You generate sixteen answers per prompt. What is the real difference between GRPO and online DPO in how those sixteen answers are used?
4. The Greek letter sigma appears both in GRPO's advantage formula and in DPO's loss function. What does it stand for?