GRPO and DAPO: within-group reward dispersion gates the learning signal
GRPO and DAPO, the RL recipes for post-training LLMs against verifiable rewards, and why within-group reward dispersion gates the learning signal.

Group Relative Policy Optimization (GRPO), from DeepSeek's DeepSeekMath paper, is now the default recipe for post-training LLMs against verifiable rewards. It deletes PPO's learned critic; only the spread of rewards across G sampled responses replaces it.
GRPO and DAPO in one paragraph
GRPO is the RL algorithm introduced in DeepSeekMath. It keeps PPO's clipped policy-gradient surrogate and deletes the learned value-function critic; nothing replaces the critic except the dispersion of rewards across the G responses the policy samples per prompt. DAPO (Decoupled Clip and Dynamic sAmpling Policy Optimization), from ByteDance Seed and Tsinghua AIR, is the published account of what it takes to run this recipe at scale: four training-detail fixes separate a naive GRPO run on Qwen2.5-32B from a score above DeepSeek's R1 reasoning-RL recipe on competition math.
A prompt whose rollouts all score the same contributes no policy gradient at all.
GRPO replaces the learned critic with rollout-group statistics
PPO gets each token's advantage from a learned value model as large as the policy, trained from terminal-only rewards. GRPO drops it.

GRPO drops PPO's value model: advantages come from the rewards of a group of sampled outputs. Source: DeepSeekMath paper, Figure 4, p. 13.What to see
PPO (top) routes each output through reward, value, and GAE blocks to get per-token advantages, training two models (policy and value, the Trained Models boxes in the legend); GRPO (bottom) samples G outputs per question, scores them with the reward model (no value model), and a group-computation block turns the G rewards into the G advantages, training only the policy.
GRPO's substitute is the group. For each question, sample G outputs from the current policy, score each with the reward model, and set the advantage of every token of output i to the group-normalized reward:
Each whole response is reinforced or penalized by how far its reward sits from the group mean, in group standard deviations.
| Setting | GRPO | DAPO |
|---|---|---|
| Group size G | 64 | 16 |
| Updates per batch | 1 | 16 |
| KL term | β 0.04 | none |
| Reward | learned | rule ±1 |
Why DeepSeekMath drops the value model, the reward-model argument, the KL term, and all eight operating-point settings
In RLHF-style PPO, the advantage of each generated token comes from generalized advantage estimation over per-token rewards, using a learned value model. DeepSeekMath gives two reasons to drop the value model: it is typically another model of comparable size as the policy, and it must be learned from terminal-only supervision, since the reward model scores only completed responses.
In RLHF-style PPO, the KL penalty against the reference policy (the frozen model RL starts from) is folded into the per-token reward. The value model is a substantial memory and compute burden (argued, not benchmarked: the paper reports no PPO counterpart at 7B). And because the reward model scores only completed responses, a value function that is accurate at every intermediate token must be learned from terminal-only supervision, a credit-assignment problem GRPO avoids setting up at all.
Under this outcome supervision the advantage is constant across an output's tokens, so GRPO is a sequence-level update: each whole response is reinforced or penalized in proportion to how far its reward sits from the group mean, measured in group standard deviations.
The paper also argues the group baseline matches how reward models are built, since they are trained on comparisons between outputs to the same question, and a within-question relative advantage asks the reward model only the kind of question it was trained to answer.
Two further changes accompany the group baseline. The KL penalty moves out of the per-token reward and into the loss as an explicit regularizer, estimated with the unbiased, guaranteed-positive estimator from Schulman's KL-approximation note (the k3 form), which keeps the advantage a pure function of the rewards. And the PPO clip survives in the objective but does no work in the original paper's runs: DeepSeekMath takes a single gradient update after each sampling stage, so the policy ratio is 1 at update time and the clip never binds (the paper's own appendix derivations drop the clip under exactly this assumption). The clip binds only in the off-policy regime DAPO runs.
| Operating point | GRPO (DeepSeekMath) | DAPO |
|---|---|---|
| Group size G | 64 | 16 |
| Batch | 1,024 (unit not stated) | 512 prompts |
| Gradient updates per rollout batch | 1 | 16 |
| Clip range eps (on the policy ratio) | symmetric, value not reported | 0.2 lower / 0.28 upper |
| KL term | in loss, k3 estimator, KL coefficient beta 0.04 | removed |
| Reward | learned reward model | rule-based +1/-1 |
| Loss reduction | mean per response, then per group | mean over all tokens in the group |
| Generation length | max 1,024 tokens | 16,384 soft cap, 4,096 penalty band, 20,480 hard cap |
Source: DeepSeekMath Section 4.2, p. 15; DAPO Sections 2.3, 2.4, 3 and 4.1, pp. 3-8.
Uniform rewards across a group yield zero gradient from the prompt
If all G outputs of a question earn the same reward, every advantage is zero (and the zero standard deviation leaves the normalization undefined): the question contributes no policy gradient beyond the KL term.
Only a mixed group carries signal. Example group of 8; advantages from the formula above, std taken over the group. Source: Late in DAPO's run, roughly half of each batch comes back all-correct (Figure 3b, p. 5).What to see
no signal exactly when the model is strongest.
Two fixes follow: resample prompts until every group disperses (DAPO's dynamic sampling, below), or reshape the reward so dispersion survives, as Mega-ASR's DG-WGPO reward does for degraded speech.
The three groups in words, discrete versus continuous rewards, the critic comparison and the std term
Three groups under a binary +1/-1 verifier
All correct
- Every reward is +1, equal to the group mean
- Every advantage is zero
- A prompt the model has mastered: no policy gradient
Mixed
- Some rewards are +1, some -1
- Correct responses sit above the mean and are reinforced; wrong ones are penalized
- The only kind of group that carries a learning signal
All wrong
- Every reward is -1, equal to the group mean
- Every advantage is zero
- A prompt beyond the model's reach: no policy gradient
The learning signal exists only on prompts the policy sometimes solves and sometimes fails at the current sampling temperature. Because the zero is exact, zero-dispersion groups are countable in every batch, and DAPO counts them: the fraction of prompts whose rollouts all come back correct climbs throughout training and reaches roughly half of each batch late in the run (Figure 3b, p. 5), exactly when the model is strongest.
The exact zero is a discrete-reward phenomenon: under a binary verifier, uniform groups are common, while under DeepSeekMath's continuous reward model exact ties are rare and the failure arrives instead as low dispersion, with the std division amplifying whatever reward noise remains. That is consistent with DeepSeekMath never naming the failure mode and specifying no handling for zero-variance groups, and with DAPO, which trains against a binary rule reward, naming it and building a fix into the objective.
A well-calibrated PPO critic produces a soft version of the same zeroing, since a value function that correctly predicts a saturated prompt's reward also sends advantages toward zero. The group baseline zeroes out exactly, by construction, computed from the same batch. A critic, by contrast, still emits per-token signal on the saturated groups GRPO discards: the critic-based VAPO recipe later reported 60.4 on the same Qwen-32B AIME setup, more than ten points above DAPO, so dropping the value model trades training signal for simplicity, and the comparison is not settled.
Dividing by the group's standard deviation has a second effect: each prompt's update is measured in units of its own dispersion, so a nearly-uniform group that is not exactly uniform gets amplified advantages. Dr. GRPO later named this a question-level difficulty bias and removed the std term from the advantage entirely.
The same coupling constrains reward design: a reward whose metric saturates in the regime where the model operates yields no policy gradient even when it is perfectly correct on average. The two classes of fix follow from the two sides of the dependence: resample prompts until every group disperses, or reshape the reward so dispersion survives where the task needs gradient.
DeepSeekMath's RL gains are reweighting: Maj@K rises, Pass@K does not
DeepSeekMath-Instruct 7B with GRPO (Table 5, p. 12)
- 82.9 → 88.2GSM8K
- 46.8 → 51.7MATH
- ≈144Kmath prompts in the RL run
RL raises Maj@K (the majority answer over K samples) but not Pass@K (any of K correct): it reweights answers the SFT model could already produce.

RL raises Maj@K but leaves Pass@K essentially unchanged. Source: DeepSeekMath paper, Figure 7, p. 21.What to see
the Maj@K curves separate (Maj@K-RL above Maj@K-Instruct) on both benchmarks, while the Pass@K curves (Pass@K-RL and Pass@K-Instruct) track each other, with RL slightly below Instruct at large K on both benchmarks.
Section 5.2 writes five methods as one gradient; only the data source and each token's coefficient differ:
| Method | Coefficient on each token's log-probability gradient |
|---|---|
| SFT | 1 |
| RFT | a binary correct/incorrect indicator |
| DPO | a sigmoid of the preference margin |
| PPO | the critic's advantage |
| GRPO | the group z-score plus a per-token pull toward the reference model |
At 1.3B scale, sampling from the current policy beats stale samples (the RL form of training on self-generated contexts) and graded coefficients beat binary ones: GRPO sits at the online, graded corner.
What the reweighting result does not cover, and the unified gradient in full
GRPO also brings gains on out-of-domain benchmarks that contributed no RL data. The interpretive result is Figure 7: RL raises Maj@K across K up to 64, but leaves Pass@K essentially unchanged on both benchmarks. The paper's own reading is that the improvement comes from "boosting the correct response from TopK rather than the enhancement of fundamental capabilities", that is, from reweighting probability mass toward answers the SFT model could already produce.
The result is scoped by its setup, which the authors flag themselves: RL prompts came from the instruction-tuning distribution and exploration used naive nucleus sampling. It does not bound RL from a base model: DAPO starts from Qwen2.5-32B scoring near zero on AIME and its pass@32 climbs throughout training alongside avg@32 (DAPO Figure 1, p. 1), with reflection and backtracking behaviors its case study reports as absent early in training.
The paper's Section 5.2 makes the reweighting view systematic by writing SFT, rejection-sampling fine-tuning (RFT), DPO (preference optimization on chosen/rejected response pairs), PPO, and GRPO as one gradient expression that differs only in where the data comes from and what scalar coefficient multiplies each token's log-probability gradient (the table above).
DAPO: a rule-based reward, no KL term, and four fixes between 30 and 50
R1-style results failed to reproduce, DAPO argues, for lack of training details, not compute. Its fixes, added one at a time on Qwen2.5-32B:
DAPO also deletes GRPO's KL term: a long chain-of-thought model necessarily diverges far from its base model, so the paper drops the penalty rather than penalize an inevitable divergence.
Each fix and its failure, the benchmark, the reward and the KL removal
DAPO's starting claim is that R1-style results failed to reproduce not for lack of compute but for lack of training details omitted from the published reports, with entropy collapse, reward noise, and training instability as the named failure modes.
| Fix | Failure it targets | AIME 2024 in the cumulative ablation |
|---|---|---|
| Clip-higher | entropy collapse from the symmetric clip | 36 → 38 |
| Dynamic sampling | groups with zero reward dispersion | 42 → 50 |
| Token-level loss | per-response averaging under long chain-of-thought | 41 → 42 |
| Overlong reward shaping | truncation penalties as reward noise | 30 → 36 (filtering), 38 → 41 (soft punishment) |
AIME 2024 is a 30-problem competition-math benchmark scored as avg@32, mean accuracy in percent over 32 samplings of the test set; all DAPO evidence is this one benchmark on this one base model, without seed variance. The naive GRPO baseline scores 30, DeepSeek's reported R1-Zero-Qwen-32B 47, and full DAPO 50 in half the training steps. The reward is deliberately minimal, +1 for a final answer equivalent to ground truth and -1 otherwise, over a 17K-prompt math set rewritten so every answer is an integer, which makes the rule verifiable without a formula parser.
The KL penalty exists in RLHF to keep an aligned model near its initial policy. The deletion is also cheaper here than in RLHF generally: the KL penalty doubles as protection against over-optimizing a learned reward model, and a rule-based verifier leaves no reward model to over-optimize.
Table 1 as published:
| Configuration | AIME 2024 avg@32 |
|---|---|
| Naive GRPO | 30 |
| + Overlong Filtering | 36 |
| + Clip-Higher | 38 |
| + Soft Overlong Punishment | 41 |
| + Token-level Loss | 42 |
| + Dynamic Sampling (full DAPO) | 50 |
| DeepSeek-R1-Zero-Qwen-32B (reference) | 47 |
Source: DAPO Table 1, p. 9. The rows are cumulative in this order, not independent ablations, so each delta is conditional on everything above it; the table supports the mechanism analysis, not a performance ranking.
Clip-higher: a symmetric clip zeroes gradient on exploration tokens
The first failure is entropy collapse: rollouts become near-identical and exploration stops. A symmetric clip on the ratio is asymmetric in probability space, as the figure shows.
The upper clip therefore zeroes the gradient of exactly the rare tokens exploration depends on and never touches confident ones. The measurement matches: the mean probability of up-clipped tokens settles below 0.2 after an early transient (Figure 3a, p. 5).
Clip-higher, as DAPO runs it
- 0.2lower clip bound, kept
- 0.28upper clip bound, raised
- ≈0.4where generation entropy stabilizes
Raising only the upper bound keeps entropy around 0.4 and accuracy climbing past the baseline's plateau.

With clip-higher, generation entropy holds around 0.4 instead of decaying to zero. Source: DAPO paper, Figure 2, p. 3.What to see
on the right, the baseline's entropy (w/o Clip-Higher, the lighter line) decays to near zero by step 1,000 while the clip-higher run (w/ Clip-Higher, the darker line) holds around 0.4; on the left, the baseline's accuracy plateaus around 0.25 while the clip-higher run keeps improving.
How the clip zeroes gradient, why only the upper bound moves, and why the clip binds at all
Generation entropy decays toward zero early in training, the G rollouts of each prompt become near-identical, and exploration stops. DAPO's diagnosis is that PPO's symmetric clip is asymmetric in probability space. Clipping zeroes the gradient of tokens whose policy ratio leaves the trust region rather than bounding the ratio itself, and the threshold where gradient stops is multiplicative in the old probability.
- Rare token, probability 0.01: stops receiving gradient once it reaches 0.012.
- Confident token, probability 0.9: keeps its gradient up to a nominal 1.08, a bound above probability 1 that can never bind.
The fix decouples the two clip bounds, raising the upper bound to 0.28 while keeping the lower at 0.2, because raising the lower bound would let negative-advantage updates push token probabilities to zero and collapse the sampling space from the other side.
The clip binds at all only because DAPO takes 16 gradient updates per rollout batch, so by the later minibatches the policy has moved off the rollout distribution and the clip binds throughout training. Clipping, and therefore clip-higher, is the price of reusing rollouts; how hard the clip works is set by how off-policy the update schedule is.
Dynamic sampling: refill the batch until every group has dispersion
The second failure is the fraction of prompts whose groups have zero reward dispersion and therefore zero advantage. DAPO's fix is a constraint written directly into the objective: the number of correct responses in each group must be strictly between 0 and G.
Dynamic sampling, operationally
- Over-sampledraw more prompts than the batch needs
- Discarddrop groups that come back all-correct or all-wrong
- Refillkeep sampling until the batch is full of dispersed groups
Every prompt in every batch then carries gradient. It is the largest single step in Table 1's cumulative ablation, and the dynamic-sampling run reaches the unfiltered baseline's best accuracy in roughly a third of the training steps (Figure 6, p. 8).

The share of all-correct prompts climbs through training. Source: DAPO paper, Figure 3, p. 5.What to see
the right panel's all-correct prompt fraction climbing through training, the zero-dispersion share dynamic sampling removes; the left panel's up-clipped tokens sitting at low probabilities, the evidence behind clip-higher.
The filtering is not free: discarded groups cost generation, and Figure 6 counts steps, not GPU-hours.
What the efficiency claim does and does not measure
The paper argues the wall-clock impact is limited because synchronized rollout time is dominated by the longest samples anyway, but Figure 6 reports no sampling-overhead measurement, so the efficiency claim is about gradient quality per step, not compute.
Token-level loss: per-response averaging dilutes long-response tokens
Per-response averaging shrinks per-token gradient as responses grow, under-teaching good long reasoning and under-penalizing long gibberish.
Two ways to reduce the loss over a group
Per-response mean (GRPO)
Each response weighs the same, so each token of a long one counts less.
Token-level mean (DAPO)
Divide by all tokens in the group, so a pattern counts the same at any length.
The fix adds one point in the ablation (within single-seed noise); the paper credits it with stability, not score.
The two reductions in full, and later alternatives
In long chain-of-thought training per-response averaging misweights both directions at once: the reasoning patterns inside high-quality long responses are under-taught, and the gibberish and repetition that low-quality long responses accumulate are under-penalized. GRPO averages per token within each response, then across responses, so every response gets equal weight regardless of length and each token of a long response contributes proportionally less gradient than each token of a short one. DAPO normalizes the summed per-token loss by the total token count across the group, so a generation pattern is promoted or suppressed by the same amount regardless of the length of the response it appears in.
DAPO observes the consequence of per-response averaging as an unhealthy climb in both entropy and mean response length, with length spiking near 5,000 tokens before swinging erratically (Figure 4, p. 6). In the cumulative ablation the fix adds a single point, within plausible single-seed noise on a 30-problem benchmark, and the paper credits it with training stability and healthier length growth rather than score.
Token-count normalization has its own bias, since a single very long response can dominate its group's update: Dr. GRPO instead removes the per-response length normalization, tracing it to length inflation in incorrect responses, and GSPO later moved the importance ratio and the clip to the sequence level entirely, reporting more stable training, notably for mixture-of-experts models.
Overlong reward shaping: truncation penalties are reward noise
Penalizing truncated samples is reward noise: sound reasoning gets punished solely for its length.
DAPO's graded length penalty
- Up to the 16,384 soft capreward untouched
- 4,096-token penalty bandreward decreases linearly to -1
- 20,480 hard capthe band ends before the hard cap
Masking truncated samples (Overlong Filtering) is the ablation's second-largest delta; the shipped recipe replaces the step penalty with the graded one above.
The truncation problem, filtering and the graded penalty in full
Generation runs under a hard length cap, and the default treatment punishes truncated samples. That punishment is reward noise: a sound reasoning process gets penalized solely for its length, which, in the paper's words, can confuse the model about the validity of its own reasoning.
Simply masking truncated samples out of the loss (Overlong Filtering) is the first row of the cumulative ablation and its second-largest delta, and removing it produces an entropy explosion late in training (Figure 5, p. 7). The shipped version replaces the step penalty with the graded one above, so the penalty is a smooth function of length rather than a truncation event correlated with reasoning depth.
The cumulative ablation applies the graded penalty on top of the filtering row; whether the mask is kept in the final recipe the paper does not say. Reward is untouched up to the soft cap, then decreases linearly to -1 across the penalty band before the hard cap (lengths in the operating-point table).
Sources
- DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models (arXiv:2402.03300)
- DAPO: An Open-Source LLM Reinforcement Learning System at Scale (arXiv:2503.14476)
- Schulman, 2020, Approximating KL Divergence
- Liu et al., 2025, Understanding R1-Zero-Like Training: A Critical Perspective / Dr. GRPO (arXiv:2503.20783)
All 6 sources and what each supports
- DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models (arXiv:2402.03300): GRPO objective, advantage normalization, and critic-removal rationale, Section 4.1, pp. 11-14 (GRPO section, including Figure 4, p. 13, reproduced as the header and first body figure); RL hyperparameters and single-update schedule, Section 4.2, p. 15, with the clip-dropping simplification in Appendix A.1.5-A.1.6 (operating-point table and clip-never-binds claim); GSM8K/MATH results, Table 5, p. 12; Maj@K/Pass@K finding and quote, Section 5.2.2 and Figure 7, p. 21 (reweighting section, including the reproduced figure); unified gradient-coefficient paradigm, Section 5.2.1, Eq. 5 and Table 10, pp. 18-19, and Appendix A.1.
- DAPO: An Open-Source LLM Reinforcement Learning System at Scale (arXiv:2503.14476): naive-GRPO baseline, headline result, and pass@32 curve, Section 1 and Figure 1, pp. 1-2; KL removal, Section 2.3; rule-based reward and dataset, Sections 2.4 and 3.5; clip-higher mechanism and evidence, Section 3.1, Figures 2 and 3a, pp. 3-5 (both reproduced); dynamic sampling, Section 3.2, Figures 3b and 6 (Figure 3 reproduced); token-level loss, Section 3.3, Figure 4; overlong shaping, Section 3.4, Figure 5; hyperparameters, Section 4.1, p. 8; cumulative ablation, Table 1, p. 9; emergent reflection case study, Section 4.4.
- Schulman, 2020, Approximating KL Divergence: the k3 estimator GRPO uses for its loss-side KL term (GRPO section).
- Liu et al., 2025, Understanding R1-Zero-Like Training: A Critical Perspective / Dr. GRPO (arXiv:2503.20783): removal of the std normalization (question-level difficulty bias) and the per-response length normalization (dispersion and token-level loss sections).
- Yue et al., 2025, VAPO: Efficient and Reliable Reinforcement Learning for Advanced Reasoning Tasks (arXiv:2504.05118): value-based 60.4 AIME 2024 result on Qwen-32B under settings matching DAPO (dispersion section's critic trade-off).
- Zheng et al., 2025, Group Sequence Policy Optimization (arXiv:2507.18071): sequence-level importance ratios and clipping, MoE stability claim (token-level loss section).