Group Relative Policy Optimization replaces PPO's learned value baseline with the mean reward of a group of samples for the same prompt. That one design choice fixes memory, but it creates a budgeting question every team running RL with verifiable rewards has to answer: for a fixed number of rollouts, should you sample many completions for few prompts, or few completions for many prompts? We built a small, fully reproducible simulation to isolate that trade-off, and to look at the standard-deviation normalisation that recent work argues is a source of bias.
The GRPO advantage, and where it vanishes#
For a prompt , GRPO samples completions from the current policy and scores each with a reward . The advantage of completion is its reward standardised within the group (Shao et al., 2024):
The policy gradient is a sum of terms, clipped and KL-regularised as in PPO. With binary verifiable rewards — the SQL ran and returned the right rows, the unit tests passed — there is an obvious failure mode. If every completion in the group fails, or every one succeeds, all rewards are equal, the numerator is zero for every , and the prompt contributes nothing to the update.
If the policy solves prompt with probability , the chance that a group of independent samples is uninformative is
For a prompt the model solves 5% of the time, a group of 8 is all-fail with probability . Two thirds of the rollouts you pay for on that prompt are, for the gradient, wasted. Larger groups help — at it falls to 0.19 — but each of those groups costs four times as much.
The same function as a surface over pass rate and group size makes the trade-off visible: the "valley" of informative groups widens as G grows, but every step along the G axis doubles the cost of a group.
Simulation setup#
We wanted the simplest model in which group size has both of its real effects: more samples per prompt (fewer zero-variance groups, lower-variance advantages) and fewer prompts per step (less coverage). The model is deliberately tabular.
- Prompts. 2,000 prompts. Prompt has its own success logit ; the policy solves it with probability . Initial pass rates are drawn from a Beta distribution: a hard set (Beta(0.6, 2.4), mean ≈ 20%) and a mixed set (Beta(1, 1), mean ≈ 50%).
- Budget. Every step spends exactly 512 rollouts: prompts are sampled without replacement and each gets rollouts. Every run spends 204,800 rollouts in total.
- Update. For a Bernoulli policy, , so the per-prompt update is with .
- Variants. With std normalisation (as above) and without it (), the change proposed in Dr. GRPO (Liu et al., 2025).
- Seeds. 8 seeds per cell; standard deviations of the final pass rate across seeds are below 0.8 points everywhere, so the differences below are not noise.
Results#
Under a fixed budget, smaller groups won in every configuration we ran. On the hard set with std normalisation, lifted the mean pass rate from 19.9% to 65.1%, while reached only 24.1% for the same number of rollouts.
| G | Zero-variance groups | Mean pass rate | Initially-hard prompts (p₀ < 0.1) |
|---|---|---|---|
| 2 | 78.5% | 19.9% → 65.1% | 29.0% |
| 4 | 58.0% | 19.9% → 61.1% | 23.2% |
| 8 | 37.8% | 19.9% → 49.7% | 12.6% |
| 16 | 26.2% | 19.9% → 36.9% | 7.1% |
| 32 | 18.9% | 19.9% → 28.4% | 5.1% |
| 64 | 12.9% | 19.9% → 24.1% | 4.3% |
Hard set, std-normalised. "Zero-variance groups" is the fraction of all groups sampled during training whose rewards were all equal.
Two things in the table are worth pausing on. First, the zero-variance fraction at is 78.5% — most pairs carry no signal — and still wins. Wasted groups are cheap when groups are small, and coverage matters more: at every prompt is visited roughly 51 times during training; at , fewer than twice. Second, the hard prompts are where the gap is largest: 29.0% versus 4.3%.
What std normalisation is doing#
Removing the std term lowered the final pass rate everywhere in this model — on the hard set at , from 49.7% to 33.6%. It is tempting to read that as "std normalisation is good". The mechanism says something more specific.
With binary rewards and successes in a group of , the group std is with . A single success in a group of 8 gets a normalised advantage of
Dividing by the std multiplies the update for rare successes on hard prompts — and rare failures on easy ones — by up to about 3×. In a tabular model, where a bigger step on a hard prompt is pure gain, that looks like an improvement. It is the same effect Liu et al. (2025) describe as a question-level difficulty bias: prompts are weighted by how close to 0% or 100% the policy is, not by how much they matter. In a real model with shared parameters, that reweighting changes what the whole network learns, and they report that removing it (along with the per-response length normalisation) improves token efficiency without losing accuracy.
Our simulation can't adjudicate that debate, because it has no shared parameters. It does show the size of the effect: normalisation is roughly a 2–3× learning-rate multiplier concentrated on the hardest and easiest prompts.
What to do with this in a real run#
- Measure your zero-variance rate. Log the fraction of groups with identical rewards every step. If it is above ~50%, you are paying for rollouts that do nothing. POFE plots it next to the reward curve by default.
- Filter prompts by current pass rate. Prompts the policy always solves or never solves contribute little. Dynamic sampling — resample or skip groups with zero variance, as in DAPO (Yu et al., 2025) — keeps the batch full of informative groups.
- Don't default to large groups. 8–16 is a reasonable starting point for LLMs because cross-prompt generalisation rewards lower-variance advantages, but our results show the coverage cost is real. If you have many diverse prompts, try a smaller with more prompts per step before buying more rollouts.
- Treat std normalisation as a weighting choice. If hard prompts are the ones you care about, it helps. If response length is drifting upward or easy prompts dominate, try the Dr. GRPO variant.
Read the methods background in SFT vs DPO vs GRPO, the glossary entries for GRPO and reward hacking, or try a GRPO run in the workspace demo.
Frequently asked questions#
What group size should I use for GRPO?
There is no universal answer. Under a fixed rollout budget, smaller groups give more prompt coverage; larger groups reduce zero-variance groups and advantage noise. For LLMs, 8 to 16 is a common starting point. Measure the fraction of zero-variance groups and the pass-rate distribution of your prompts before increasing G.
Why does GRPO sometimes stop learning?
If the policy solves a prompt every time or never, all rewards in its group are equal and the advantage is zero. When most prompts are too easy or too hard, most groups carry no gradient. Filtering prompts by current pass rate or resampling zero-variance groups fixes this.
Should I normalise GRPO advantages by the standard deviation?
It is a weighting choice. Std normalisation up-weights prompts the model almost always fails or almost always solves. Liu et al. (2025) argue this is a bias and remove it in Dr. GRPO; in our tabular simulation it acted like a 2–3× larger step on those prompts.
research/grpo_sim.py in our research repository (Python, numpy, fixed seeds). See the methodology notes.References#
- Shao, Z. et al. (2024). DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models. arXiv:2402.03300. arxiv.org/abs/2402.03300
- Liu, Z. et al. (2025). Understanding R1-Zero-Like Training: A Critical Perspective. arXiv:2503.20783. arxiv.org/abs/2503.20783
- Yu, Q. et al. (2025). DAPO: An Open-Source LLM Reinforcement Learning System at Scale. arXiv:2503.14476. arxiv.org/abs/2503.14476
- Schulman, J. et al. (2017). Proximal Policy Optimization Algorithms. arXiv:1707.06347. arxiv.org/abs/1707.06347