Group Sequence Policy Optimization
TL;DR. GSPO (from the Qwen team) changes one thing in GRPO: the importance ratio. Instead of a ratio per token, it uses one ratio per response, the geometric mean of the token ratios, and clips whole responses. The paper argues per-token ratios are noisy single-sample weights that build up over long answers and destabilize training, especially for Mixture-of-Experts (MoE) models whose routing changes between updates. It reports more stable and more efficient training than GRPO, and says GSPO was used to train Qwen3.
Key idea
Section titled “Key idea”GRPO multiplies each token’s gradient by its own ratio and clips it per token. GSPO replaces this with a sequence ratio, normalized by length so responses of different lengths share one clip range:
with the usual group advantage . The gradient (eq. 10) is : every token in a response gets the same weight , where GRPO gives each token its own .
A small example. Token ratios give a mean log-ratio of and . GRPO’s per-token clip at clips nothing here, but each token is weighted differently. GSPO’s clip range is , several hundred times narrower, because a geometric mean stays very close to 1. With a negative advantage this response is already below the lower bound, so it is clipped as a whole. A single token whose probability triples (for example after an MoE routing change) moves of a 1,000-token answer by only about 0.1%.
GSPO-token. For settings like multi-turn RL that need per-token advantages, ( is stop-gradient). Its value equals , and with equal advantages it is identical to GSPO.
Results. The paper trains a cold-start model fine-tuned from Qwen3-30B-A3B-Base, with each rollout batch split into four minibatches, against a tuned GRPO baseline (clip 0.2 / 0.27, with Routing Replay). It reports training curves only: GSPO trains stably and reaches higher training reward, AIME24 avg@32, LiveCodeBench and CodeForces Elo at the same compute (Fig. 1). It also argues that sequence likelihoods tolerate small precision differences between training and inference engines, so likelihoods from the inference engine could be used directly. There are no tables, seeds or code, and the main experiment is one MoE model, so the size of the gain on dense models is not established. The claim that GSPO powers Qwen3 is the authors’ own.
Connections
Section titled “Connections”- The objective it modifies: DeepSeekMath / GRPO, and the clipped ratio from PPO.
- Other GRPO fixes that keep token-level ratios: DAPO (clip-higher, token-level loss) and Dr. GRPO (removing the length and std normalizations).
- A different route to stability on long answers, with a critic: VAPO.
- Token-level entropy control, the opposite granularity: The Entropy Mechanism.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
A 4-token response has token ratios π_θ/π_old of 1.10, 0.95, 1.02 and 0.90. Compute the GSPO sequence ratio s. With GSPO's clip range (1 − 3e-4, 1 + 4e-4), say whether the response is clipped when its advantage is positive and when it is negative. Then compare with GRPO's per-token clip at (0.8, 1.27).
What a strong answer covers
- Log-ratios ≈ 0.095, −0.051, 0.020, −0.105; mean ≈ −0.0104; s = exp(−0.0104) ≈ 0.990.
- s is below 1 − 3e-4. For A > 0, min(s·A, clip(s)·A) = s·A, so the response still gets gradient (the clip only stops ratios that already moved in the advantage's direction). For A < 0, the clipped term is the min, so the whole response gets no gradient.
- Under GRPO every token ratio lies inside (0.8, 1.27), so no token is clipped, but each token's gradient is weighted by its own ratio (0.90 to 1.10).
- Because s is a geometric mean, it stays very close to 1, which is why GSPO's clip range is several hundred times narrower than GRPO's.
- Mechanism
Explain the paper's argument that a per-token importance ratio does not correct for off-policy data, and why this matters more for Mixture-of-Experts models and long responses. Why does a sequence-level ratio help?
What a strong answer covers
- Importance sampling corrects a distribution mismatch by averaging weights over many samples from the behavior distribution; GRPO uses one sampled token per next-token distribution, so each weight is a single noisy draw rather than a correction.
- The token weights multiply each token's gradient and the noise adds up over thousands of tokens; the paper reports collapses it could not recover from by reverting checkpoints.
- In Qwen3-30B-A3B about 10% of activated experts change after each update, so individual token probabilities jump and token ratios swing; GRPO needed Routing Replay (reusing old routing) to converge.
- The reward is given per sequence, so GSPO uses the sequence likelihood ratio, length-normalized: one token's jump of ×3 in a 1,000-token answer changes s by only about 0.1%. All tokens of a response then get the same weight s.
- Critique
What evidence does the paper give that GSPO is better than GRPO, and what would you need to see before switching a dense-model RL pipeline to it?
What a strong answer covers
- Evidence is training curves for one cold-start Qwen3-30B-A3B model (AIME24, LiveCodeBench, CodeForces) and a statement that GSPO was used for Qwen3; no tables, seeds or open code.
- The GRPO baseline needs Routing Replay for MoE, so part of the gain is specific to MoE routing; dense models do not have this problem.
- GSPO clips about 100× more tokens yet is reported as more efficient; this is suggestive but does not separate the effect of the ratio from the effect of the clip range.
- The gradient still has a 1/|y| factor per response (eq. 10), so the length weighting that Dr. GRPO and DAPO discuss is unchanged.
- Before switching: same-compute comparisons on a dense model with several seeds, against DAPO-style token-level baselines, plus the clip fraction and length curves.