Group-Based Policy Optimization › Later Variants and What Changed
Language AI HandbookAll chapters Variants change different parts of the objective. When comparing their results, track which estimator, reduction, and sampling rule each reported experiment actually used.
DeepSeek-R1
DeepSeek-R1-Zero uses rule-based accuracy and format rewards and starts RL from a base model without a preliminary supervised fine-tuning step. The later DeepSeek-R1 recipe includes additional stages. Equation (1) in the published paper keeps the reference KL penalty and uses the whole-output likelihood ratio . It averages one objective term per response with the group factor . The ratio uses the raw likelihood of the complete response. GSPO takes a geometric mean before clipping.
DAPO
DAPO combines four techniques. Two alter the policy objective, and the others change which groups enter training and how lengths are rewarded:
- Clip-higher. DAPO widens the upper side of the clipping interval. With and , the lower boundary stays at and the upper boundary moves from to . A positive-advantage token can keep increasing the clipped objective over that additional range. The authors introduce this change to address entropy collapse in their setup.
- Dynamic sampling. Keep groups with both correct and incorrect answers. Draw more groups until the batch fills, provided eligible groups can be sampled. The method can draw groups from other prompts. Eligibility uses correctness even if length shaping changes the rewards.
- Token-level policy gradient loss. In the published formula, divide the summed completion-token terms by the number of completion tokens across the responses to that prompt. Each token in that pool has the same averaging coefficient. A single token mean across a whole update would generally weight prompts differently. Dr. GRPO uses a fixed generation-budget divisor instead.
- Overlong reward shaping. The paper applies a length-dependent penalty over a buffer near the generation limit.
Dr. GRPO
Dr. GRPO is the name Liu et al. (2025) give their modified objective. Their analysis identifies two sources of weighting in the original objective.
- Length weighting. At equal advantage and likelihood ratio, gives each token of a longer response a smaller coefficient. Liu et al. analyze this weighting and measure length effects in their experiments.
- Difficulty weighting. At a fixed centered reward, a smaller positive group standard deviation gives a larger multiplier. For binary rewards, groups split evenly have larger dispersion than groups with almost all successes or failures. An exact tie needs a separate guard.
The authors replace group standard-deviation scaling with mean-only centering. They use a fixed generation-length divisor in place of the length of the individual response.
GSPO
GSPO (Qwen, 2025) combines the per-token likelihood ratios into a single ratio for response :
The exponent makes the geometric mean of the learner-to-behavior ratios for the tokens. GSPO applies the clipped surrogate once per response, using and the group-standardized advantage. The objective averages those response-level terms with . The length term acts inside the ratio before clipping. Differentiating gives the mean of the token log-probability gradients. The authors report greater stability in their experiments with this sequence-based formulation.
Comparison
| Published objective | Advantage | Ratio | Reduction within a prompt group | Ties or sampling eligibility |
|---|---|---|---|---|
| DeepSeekMath GRPO (2024) | Token-level | Token mean per response, then mean over responses | Equation leaves zero variance undefined | |
| DeepSeek-R1 (2025), Eq. (1) | Group-standardized outcome | Whole-output likelihood ratio | Mean of response-level terms | Eq. (3) leaves zero variance undefined |
| DAPO (2025) | Group-standardized outcome | Token-level with clip-higher | Mean over all completion-token terms in the group | Filter by mixed binary correctness |
| Dr. GRPO (2025) | Token-level | Token sum divided by the fixed budget per response, then mean over responses | Mean centering yields zero | |
| GSPO (2025) | Within-group standardized reward | Sequence geometric-mean ratio | Mean of response-level terms | Eq. (6) leaves zero variance undefined |
The table compares the displayed objectives. The surrounding training recipe can also change which prompts enter a batch or how rewards are computed. For example, DAPO combines mixed-correctness sampling with a penalty for responses near the length limit.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!