Advanced
GRPO & RL on verifiable rewards
Group-relative policy optimization compares sampled solutions within a prompt and is especially useful when outcomes can be checked programmatically.
Updated
1
Concept
Preference models are useful when quality is subjective, but some tasks have outcomes a program can check. A math expression can be normalized and compared with a known answer. Code can run against tests in a sandbox. A formal proof can be checked by a verifier. A game has rules and a score. These verifiable rewards replace “does this sound good?” with a narrower question whose answer is repeatable.
Reinforcement learning is attractive here because the model can sample many candidate solutions and receive feedback on outcomes without a human writing the exact desired reasoning trace. A correct response earns reward even if its path differs from a reference demonstration. This gives the policy room to discover strategies rather than merely imitate one solution.
Group Relative Policy Optimization (GRPO), introduced in the 2024 DeepSeekMath work, samples a group of outputs for the same prompt. Let their rewards be . A simplified group-relative advantage standardizes a sample against the group:
Outputs above the group baseline receive positive advantage; those below receive negative advantage. The exact implementation can include token-level policy ratios, clipping, KL regularization, and multiple reward components. The key distinction from classic PPO pipelines is that the group statistics provide a baseline, so a separate learned value model is not required in the basic design.
Relative comparison helps when raw reward scales differ across prompts. Solving one unusually hard problem can still be reinforced against unsuccessful peers, even if rewards are sparse. But groups consume generation compute. If every sample receives the same reward, the normalized learning signal vanishes. Group size, sampling diversity, and prompt difficulty curriculum influence how often useful contrast appears.
Verifiability is not the same as correctness of the entire solution. An exact final-answer checker can accept lucky guesses or reasoning with invalid intermediate claims. Public unit tests can be hard-coded. A code agent may exploit filesystem, timing, or network access if the sandbox is weak. A proof checker validates formal syntax and rules, not whether the theorem represents the user’s intent. Reward design must define the real boundary.
Multiple rewards are often combined: correctness, format validity, tool constraints, and perhaps a learned style score. Their weights create incentives. A formatting reward can overwhelm sparse correctness; a length penalty can suppress necessary reasoning; a judge can reintroduce reward hacking. Log each component separately so a rising total cannot hide a falling primary success rate.
Training also risks reward overfitting. If prompts and checkers have narrow templates, the policy can learn superficial strategies that fail on fresh distributions. Hold out problem generators, mutate tests, include adversarial cases, and evaluate final answers and reasoning independently. Contamination between training problems and evaluation sets is especially damaging because repeated answers can mimic reasoning improvement.
GRPO is one member of a wider family, and the acronym should not obscure the principle: compare sampled behavior, estimate which actions performed relatively well, and update conservatively. It is particularly compelling when a high-precision checker supplies scalable feedback. It is less suitable when the desired outcome is inherently plural, value-laden, or impossible to reduce to a robust programmatic test.
The durable mental model is a tournament with an audited referee. The group creates local competition; the verifier supplies scores; policy optimization increases the probability of winners. Better learning follows only when the referee checks what users actually care about and the tournament covers the situations the model will face.
2
Explain it like I am five
A math coach gives the same problem to a study group, checks every final answer with an answer key, and asks which attempts did better than the group's average. The coach need not predict the value of every half-written line in advance. GRPO similarly samples a group for one prompt, computes relative advantages from their rewards, and updates the policy—while the answer key supplies a verifiable signal that fluent bluffing cannot easily fake.
3
Teach it back
Explain group-relative advantages in GRPO and distinguish a verifiable reward from a learned judge, including one failure mode.
Minimum: 80 characters and 15 words. Your text stays only in this browser.
Saved only on this device.
Show a model answer
GRPO samples several outputs for the same prompt and normalizes their rewards within the group, so an output is reinforced according to how it performs relative to its peers without requiring a separate learned value model in the basic setup. A verifiable reward comes from a checker such as exact-answer validation, tests, or a formal proof verifier. It is less vulnerable to stylistic persuasion, but a weak checker can still be gamed or reward a correct final answer reached through invalid reasoning.
4
Check your understanding
Complete the teach-back and answer the quiz correctly to finish this lesson.
Sources
- Zhihong Shao et al. (2024). DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models.