Group-Based Policy Optimization › Later Variants and What Changed

Michael BrenndoerferNovember 29, 20264 min read
Language AI HandbookAll chapters
Part 40 of 67Reasoning Post-Training and Verifiable Rewards
Chapter 301Group-Based Policy Optimization › Later Variants and What Changed
Reading section 7 of 10 · Later Variants and What Changed · 4 minSection 7 of 10 · 4 min

Section 7 of 10 · 4 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

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 πθ(oi∣q)/πθold(oi∣q)\pi_\theta(o_i\mid q)/\pi_{\theta_\text{old}}(o_i\mid q). It averages one objective term per response with the group factor 1/G1/G. 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 εlow=0.2\varepsilon_{\mathrm{low}}=0.2 and εhigh=0.28\varepsilon_{\mathrm{high}}=0.28, the lower boundary stays at 0.80.8 and the upper boundary moves from 1.21.2 to 1.281.28. 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, 1/∣oi∣1/|o_i| 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 ρi,t\rho_{i,t} into a single ratio for response oio_i:

si(θ)=(πθ(oi∣q)πθold(oi∣q))1/∣oi∣=exp⁡ ⁣(1∣oi∣∑t=1∣oi∣log⁡ρi,t(θ)).s_i(\theta) = \left(\frac{\pi_\theta(o_i \mid q)}{\pi_{\theta_\text{old}}(o_i \mid q)}\right)^{1/|o_i|} = \exp\!\left(\frac{1}{|o_i|}\sum_{t=1}^{|o_i|}\log\rho_{i,t}(\theta)\right).

The exponent makes sis_i the geometric mean of the learner-to-behavior ratios for the ∣oi∣|o_i| tokens. GSPO applies the clipped surrogate once per response, using sis_i and the group-standardized advantage. The objective averages those response-level terms with 1/G1/G. The length term acts inside the ratio before clipping. Differentiating log⁡si\log s_i gives the mean of the token log-probability gradients. The authors report greater stability in their experiments with this sequence-based formulation.

Comparison

Advantage, likelihood ratio, objective averaging, and the rules for tied rewards or sampling eligibility in published GRPO recipes.
Published objectiveAdvantageRatioReduction within a prompt groupTies or sampling eligibility
DeepSeekMath GRPO (2024)(ri−rˉ)/σr(r_i - \bar{r})/\sigma_rToken-level ρi,t\rho_{i,t}Token mean per response, then mean over responsesEquation leaves zero variance undefined
DeepSeek-R1 (2025), Eq. (1)Group-standardized outcomeWhole-output likelihood ratioMean of response-level termsEq. (3) leaves zero variance undefined
DAPO (2025)Group-standardized outcomeToken-level with clip-higherMean over all completion-token terms in the groupFilter by mixed binary correctness
Dr. GRPO (2025)ri−rˉr_i - \bar{r}Token-levelToken sum divided by the fixed budget per response, then mean over responsesMean centering yields zero
GSPO (2025)Within-group standardized rewardSequence geometric-mean ratioMean of response-level termsEq. (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!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy