Part XVI's PPO chapter needed a critic network to estimate a baseline — how good a state "should" be — so the policy only gets credit for beating expectations. Training a whole second network just to produce one number per state is expensive. What if the samples you already drew could supply that baseline themselves?
Five sampled responses to one math problem, each with its own binary verifiable reward from the previous chapter. Toggle to the group-relative advantage and watch it appear — computed entirely from these five numbers, no separate network trained anywhere.
GRPO (short for Group Relative Policy Optimization) samples a GROUP of responses to the same prompt, then normalizes each one's reward against that group's own statistics:
- — the advantage assigned to sampled response .
- — response 's own reward (e.g. RLVR's binary verifiable reward from the previous chapter).
- , — the mean and standard deviation of all rewards in the group.
- The baseline comes from the samples themselves
PPO's baseline is a learned prediction of expected return. GRPO's baseline is just the group's own mean — no network, no separate training signal, no value-function bias to worry about.
- The scale comes from the samples too
Dividing by the group's standard deviation keeps the advantage's scale comparable across prompts of very different difficulty:
- A group where everyone agrees produces small, tightly-scaled advantages
- A group with wildly different rewards produces larger ones
- No critic network, anywhere
That's GRPO's entire pitch: PPO's clipped policy-gradient update, unchanged, but fed an advantage computed in closed form from one batch of samples instead of a trained critic's guess.
Same formula, two different groups. On the easy problem, four of five responses are correct — being the one that's wrong is expensive: advantage , far below the four correct responses' modest each. On the hard problem, only one of five is correct — now being right is what's rare and valuable: advantage , while each of the four wrong responses only drops to . The exact same rewards, interpreted relative to two different groups, produce two very different training signals.
Five sampled responses to an easy problem, rewards — four correct, one wrong:
- Group statistics
- Mean
- This is a Bernoulli group, so variance
- Advantage for a correct response
.
- Advantage for the one wrong response
— four times the magnitude of the reward for getting it right, purely because being wrong was rare in this group.
For the hard-problem group, find the response with the largest group-relative advantage.
GRPO's entire innovation is replacing a trained critic's baseline with one computed directly from a group of samples — mean for the baseline, standard deviation for the scale. It's the exact combination that made scaling RLVR to reasoning models practical: no second network to train and keep in sync, just statistics over whatever batch of responses was already sampled. The next chapter goes one level deeper than a single final-answer reward: scoring each individual reasoning STEP, not just the finished response.