GRPO & DeepSeek-R1
Group-relative advantage and critic-free RL
Papers: DeepSeekMath (GRPO) — Shao et al., 2024 · DeepSeek-R1 — DeepSeek-AI, 2025
This chapter brings together an algorithm for critic-free policy optimization (GRPO) and a prominent open reasoning report, DeepSeek-R1. GRPO can be paired with learned or rule-based rewards; DeepSeek-R1-Zero used rule-based rewards on selected reasoning tasks. Neither report provides a complete reproduction of OpenAI o1’s undisclosed pipeline.
GRPO: throw away the critic
Recall PPO from chapter 17. To compute the advantageadvantageHow much better an action was than the baseline expectation: A = reward − value. Positive advantage pushes an action’s probability up, negative pushes it down.See in glossary → (“was this action better or worse than expected?”), PPO trains a second network alongside the policy: a value functioncriticA model trained to predict the value function. PPO uses an actor (the policy) and a critic; GRPO drops the critic and uses a group average instead.See in glossary → that estimates expected return at each token. That critic is roughly the same size as the policy, must be trained in lockstep, and doubles the memory and a big chunk of the compute of the whole RL run. For a giant LLM, the critic is a brutal tax.
GRPO (Group Relative Policy Optimization), introduced by Shao et al. (2024) in DeepSeekMath, asks: what if we just delete the critic? The critic only ever existed to provide a baselinebaselineA reference value subtracted from the reward to reduce gradient variance without adding bias. Can be a learned critic, a group mean (GRPO), or a leave-one-out average (RLOO).See in glossary →: a reference point to subtract from each reward so we know whether a sample was above or below average. GRPO gets that baseline a completely different way: sampling.
For each prompt, GRPO samples a group of completions from the current policy. Each completion receives a reward from a reward model or rule-based verifier. The group mean supplies a baseline. For outcome supervision, the group-relative advantagegroup-relative advantageGRPO’s advantage estimate: a response’s reward minus the mean reward of its group of siblings (often divided by their standard deviation), replacing a learned value function.See in glossary → is the centered reward normalized by the group’s spread:
That’s the whole trick. A completion that scored above the group average gets a positive advantage and is reinforced; one below average gets a negative advantage and is suppressed. The group is its own baseline. No value network, ever.
The GRPO objective
GRPO keeps PPO’s stabilizers. It’s PPO with the advantage swapped out. For each token in completion , let be the importance ratio (new-policy probability over old-policy probability for that token). The objective is the familiar clipped surrogateclipped surrogate objectivePPO’s loss: maximize the probability-ratio-weighted advantage, but clip the ratio to [1−ε, 1+ε] so a single update can’t move the policy too far.See in glossary →, using the group-relative advantage , plus a KLKL divergenceKullback–Leibler divergence — a measure of how far one probability distribution is from another. Used in post-training as a "leash" that keeps a model close to a reference policy.See in glossary → penalty to a frozen referencereference modelA frozen copy of the policy (usually the SFT model) that RLHF and DPO stay close to via a KL penalty, preventing the optimized policy from drifting into degenerate text.See in glossary → model:
The /clip is exactly PPO’s trust-region trick: don’t let the policy move too far in one step. The KL term is the leash to the reference model that keeps the policy from drifting into degenerate text. The only structural change from PPO is that comes from the group mean instead of a critic, and that single change removes an entire network from the training loop.
Try it
Below, sample a group of completions, see each one’s verifier reward, watch the group mean become the baseline, and see the resulting normalized advantages: positive for above-average samples, negative for below. Toggle the critic on and off to feel what GRPO removes.
DeepSeek-R1-Zero: reasoning from nothing
In January 2025, DeepSeek-AI reported DeepSeek-R1-Zero. It took DeepSeek-V3-Base, a pre-trained base model, and applied RL without an SFT cold start. For math, coding, and logic, it used rule-based accuracy rewards plus a format reward requiring reasoning tags; it did not use a learned outcome or process reward model for those reasoning tasks.
The report observed chains of thought growing longer during training, plus reflective and alternative-solution behaviors. These are empirical behaviors reported by DeepSeek, not proof that the model acquired a human-like general reasoning process. On AIME 2024, the report shows R1-Zero rising from 15.6% to 77.9% pass@1; self-consistency decoding reached 86.7% in the reported evaluation. These are report-specific benchmark results, not a general guarantee from pure RL.
DeepSeek-R1: cold-start for readability
R1-Zero proved the principle, but it had warts. Pure-RL reasoning traces were powerful yet unreadable: mixed languages, chaotic formatting, chains that worked but no human would want to read. So the full DeepSeek-R1 added a small amount of supervised cold-startcold-start dataA small amount of high-quality SFT data used to "warm up" a base model before RL, so reasoning RL is more stable and readable. DeepSeek-R1 adds it; R1-Zero skips it.See in glossary → data: a curated set of clean, well-formatted long chain-of-thought examples used to fine-tune the base model before the GRPO stage. Cold-start gave the model a readable, well-behaved starting point; GRPO then drove its reasoning ability up from there, followed by a final alignment pass for helpfulness and safety.
The report compared DeepSeek-R1 competitively with o1 on several reasoning benchmarks, while results varied by benchmark. DeepSeek released weights and a detailed technical report, but the o1 training recipe remains undisclosed, so R1 should not be described as a full reproduction of it.
The whole arc, reassembled
Stand back and look at the relationship across this section. STaR used correctness as a filter. PRM/ORM work sharpened the credit-assignment question. o1 highlighted test-time compute, while DeepSeek-R1-Zero demonstrated that a base model plus group-relative RL and rule-based rewards can develop longer, more reflective traces on the reported tasks. Verifiers are useful only insofar as their specifications are reliable, and these results do not establish a universal route to reasoning.
This is the climax of the reinforcement-learning story this explainer has been building since the preference era. We began by imitating good answers (SFT), moved to learning human preferences (RLHF), and arrive here: a model improving its own thinking against the bedrock of verifiable truth, inventing strategies no one taught it. The remaining chapters refine the algorithm (DAPO, Dr.GRPO, and friends), scale the recipe across the open ecosystem, and push it into agentic, tool-using, multi-turn settings. But the conceptual summit is this one: the moment reasoning stopped being something we wrote into a model, and became something a model could learn for itself.