Understanding R1-Zero-Like Training: A Critical Perspective
Read first: DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
TL;DR. GRPO’s loss contains two normalizers that look harmless: it averages each response’s token losses (dividing by the response length) and divides each group’s centred rewards by their standard deviation. This paper shows that the first biases training toward long wrong answers and short right ones, and the second up-weights questions that are nearly always solved or nearly never solved. Dr. GRPO (“GRPO Done Right”) deletes both. It also re-examines R1-Zero-style training and finds that base models and prompt templates explain much of what was attributed to RL.
Why it matters now. Whenever you RL-train an agent whose outputs vary in length, such as a search agent with 3 or 30 tool calls, how you average the loss decides which trajectories get reinforced. The paper also shows how to read RL claims critically. Response length rising during training and “aha” phrases appearing are not, by themselves, evidence that reasoning was learned.
Key idea
Section titled “Key idea”Start from the GRPO objective, with the two terms marked:
To see why they matter, compare with the textbook policy gradient for a reward on the whole sequence. Here is any baseline that does not depend on the sampled answer:
Every token of an answer gets the same weight , and nothing else. Take one update per batch, so the ratio is 1 and the clip is inactive. Then GRPO gives token of answer the weight
The two extra factors are the biases.
Length bias, from . The weight on an answer’s whole log-probability is , so it shrinks as the answer gets longer.
- For a correct answer (), short answers get a larger push up, which favours brevity among correct answers.
- For a wrong answer (), long answers get a smaller push down, which favours length among wrong answers.
In the running example (, rewards , so for each wrong answer), a 100-token wrong answer gets per token. A 1000-token wrong answer gets per token, a push down ten times weaker. Over many steps, failing answers drift longer.
Difficulty bias, from . With binary rewards and a fraction of the group correct, . Dividing by it multiplies each question’s gradient by . With that factor is about 3.0 when 1 or 7 answers are correct and 2.0 when 4 are correct. Questions that are almost always solved, or almost never, get more weight than the unbiased gradient would give them. The paper notes that advantage normalization is usually done across a whole batch, where it rescales all questions equally. Done per question, it reweights questions.
The fix. Dr. GRPO uses , sums token losses, and divides by a constant (the generation budget, MAX_TOKENS) instead of by each . A constant divisor only rescales the learning rate. Multiplying by gives exactly the leave-one-out baseline of RLOO (App. A). In the running example the advantages become and ; times they are RLOO’s and . The paper also sets the KL coefficient to 0, arguing that a rule-based verifier does not need the reference anchor that a learned reward model needs.
The length bias is not only in GRPO. The paper checked several open-source PPO implementations and found that all of them normalize the loss by response length (Table 2). They do this either per response (for example OpenRLHF) or per batch (for example trl and verl). So PPO runs inherit a version of the same artefact, even though the PPO objective on paper does not have it. DAPO’s “token-level” loss divides by the total number of tokens across all G answers (its eq. 12). That removes the bias between answers to the same question, but the scale still changes from group to group with the group’s total length.
Keep this separate from clipping. The clip in PPO and GRPO limits how far each token’s ratio moves; it is a different mechanism. The length bias here comes purely from how token losses are averaged, and it exists even when the clip never fires.
Key results
Section titled “Key results”- Training dynamics (Fig. 5, Qwen2.5-1.5B base, R1 template). Both methods get longer as reward rises, as in R1-Zero. GRPO keeps getting longer after reward improvement slows. Dr. GRPO’s length levels off, and its incorrect answers on benchmarks are much shorter, at similar or better accuracy.
- Ablation (App. C, Figs. 8–9). This compares GRPO, GRPO without length normalization, GRPO without std normalization, and Dr. GRPO. Removing the length divisor is what shortens responses. All three ablated variants beat vanilla GRPO on reward and accuracy. The gains are consistent over three seeds.
- Minimal recipe (Table 4). The model, Oat-Zero-7B, starts from Qwen2.5-Math-7B and trains with Dr. GRPO on MATH level 3–5 questions using the Qwen-Math template. It took about 27 hours on 8 A100s with a 3,000-token budget. Scores: AIME24 43.3, AMC 62.7, MATH500 80.0, Minerva 30.1, OlympiadBench 41.0, average 51.4. This compares with 46.6 for SimpleRL-Zero-7B, 48.0 for PRIME-Zero-7B and 45.1 for Qwen2.5-Math-7B-Instruct, all evaluated at 3,000 tokens. Two caveats: much of the lead comes from AIME24, which has only 30 problems (43.3% is 13 of them), and R1-Distill-Qwen-7B scores 54.7 when given 8,000 tokens.
- Templates and base models (§2). Qwen2.5-Math base models answer questions best without any template, which suggests they were pretrained on question–answer text. On Qwen2.5-Math-1.5B, RL from different templates ends near the same average of about 40%, given a suitable question set (Fig. 6). With the Qwen-Math template, RL on easy GSM8K questions nearly doubled accuracy on harder benchmarks.
- “Aha” in the base model (§2.3). DeepSeek-V3-Base already produces self-reflection. In DeepSeek-R1-Zero’s outputs, self-reflection was not positively correlated with accuracy.
Limitations & open questions
Section titled “Limitations & open questions”- The main ablations use small Qwen models on math with binary rewards. Whether the std term hurts with graded rewards, larger models or other domains is not settled.
- Up-weighting hard-but-solvable questions is sometimes desirable, as curriculum or prioritized sampling (see Kimi k1.5). Calling it a “bias” means it differs from the expected-reward gradient, not that it is always worse.
- A constant divisor makes the gradient grow with the number of generated tokens. Gradient clipping and Adam partly normalize this away, so the effective learning rate still depends on length.
- Length is also shaped by truncation, overlong penalties and the maximum budget. The paper isolates one factor; real runs mix several.
Connections
Section titled “Connections”- The objective being corrected: DeepSeekMath / GRPO, and its parent PPO.
- The same mean-centred advantage, derived independently: RLOO.
- A different aggregation fix, plus dynamic sampling for zero-variance groups: DAPO. A sequence-level ratio: GSPO.
- The R1-Zero claims being re-examined: DeepSeek-R1.
- Length as a reward-hacking channel: Length correlations in RLHF. Qwen-specific gains from meaningless rewards: Spurious Rewards.
- Reading length and accuracy curves fairly: Evaluating reasoning RL.
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
Running example: G = 4, rewards [1, 0, 0, 0], lengths [200, 100, 400, 1000] tokens, ratio 1. Compute the weight multiplying each token's ∇log π under GRPO (Â/|oᵢ|, population std) and under Dr. GRPO (R − mean, divided by a constant 3000). Drop the common 1/G. Which wrong answer is pushed down least under each method?
What a strong answer covers
- GRPO advantages: +1.73 and −0.58. Per-token weights: correct 1.73/200 ≈ +0.0087; wrong 100-token −0.0058; wrong 400-token −0.00145; wrong 1000-token −0.00058.
- The whole-sequence log-probability gradient of answer i is scaled by Âᵢ/|oᵢ|, so the 1000-token wrong answer is pushed down 10× less than the 100-token one.
- Dr. GRPO advantages: +0.75 and −0.25. Per-token weights: +0.75/3000 = +0.00025 and −0.25/3000 ≈ −0.000083 for every wrong token, whatever the answer length.
- Under Dr. GRPO each wrong answer's sequence gradient is pushed down with weight proportional to −0.25 per token, so longer wrong answers receive more total push-down, as in the true policy gradient Σₜ (R − b)∇log π.
- Least pushed down: the longest wrong answer under GRPO; no answer is favoured per token under Dr. GRPO.
- Derive / compute
For binary rewards with G = 8 and k correct answers (p = k/8), derive the question-level multiplier that GRPO's std division applies relative to mean-only centring. Evaluate it for k = 1, 4, 7 and 8, and compute the summed |advantage| per question under both methods for k = 1 and k = 4.
What a strong answer covers
- std = √(p(1 − p)). GRPO's advantage is the centred reward times 1/std, so the multiplier is 1/√(p(1 − p)).
- k = 1 or 7: std ≈ 0.331, multiplier ≈ 3.0. k = 4: std = 0.5, multiplier 2.0. k = 8: std = 0, the group gives no signal under either method.
- Summed |centred reward| = 2G·p(1 − p): k = 1 gives 1.75, k = 4 gives 4.0. With std: 2G·√(p(1 − p)): k = 1 gives about 5.3, k = 4 gives 8.0.
- So both methods still give a hard question less total gradient than a 50/50 one, but GRPO shrinks the gap (0.66 of the k = 4 total rather than 0.44). Lopsided questions are up-weighted relative to the unbiased gradient.
- The same 1/std also inflates tiny reward differences when rewards are graded or noisy, since a near-zero std divides them.
- Mechanism
Explain, at the level of what gradient each sequence receives, why GRPO's 1/|oᵢ| term makes incorrect responses grow longer over training while correct ones are pushed toward brevity. Why does the paper argue that some of the "emergent long chain of thought" in R1-Zero-style runs is confounded by this term?
What a strong answer covers
- The policy gradient of a sequence is (R − b)·Σₜ ∇log π(oₜ). Dividing by |oᵢ| turns this into an average, so each sequence's total weight no longer grows with its length.
- For a negative advantage, a longer wrong answer spreads the same penalty over more tokens, so each token is discouraged less and long failing behaviours survive.
- For a positive advantage, a short correct answer concentrates its credit on fewer tokens, so brevity is rewarded among correct answers.
- As accuracy saturates, wrong answers dominate the length signal, and GRPO keeps getting longer even when reward stops improving (Fig. 5). Dr. GRPO's length plateaus and its wrong answers are shorter.
- So "response length goes up with RL" is partly an optimizer artefact, not only evidence of learned reflection.
- What if…
Appendix C ablates GRPO, GRPO without length normalization, GRPO without std normalization, and Dr. GRPO on Qwen2.5-1.5B. What did each variant show about length and accuracy, and what would you still want before concluding that the std term is harmful in general?
What a strong answer covers
- Removing the 1/|o| term (alone or with std) gives shorter responses, so the length divisor drives most of the length growth (Fig. 8).
- All three ablated variants beat vanilla GRPO in training reward and evaluation accuracy, so removing either term helped here.
- Three-seed runs (Fig. 9) show Dr. GRPO's gains in token efficiency and accuracy are consistent across seeds.
- Missing: larger models, non-math tasks, graded or noisy rewards, and multiple inner epochs where clipping is active. Difficulty weighting could help as a curriculum in other regimes.
- Critique
Dr. GRPO is described as unbiased. Unbiased for which objective, and does dividing by a constant MAX_TOKENS fully remove length effects? Name one way the fixed constant or DAPO's per-group token count still changes the effective learning rate, and design an experiment that would separate the two.
What a strong answer covers
- Unbiased for the policy gradient of expected sequence reward (β = 0) with a Monte Carlo baseline; mean-centring times G/(G − 1) equals the RLOO advantage, which is unbiased.
- A constant divisor only rescales the learning rate. But the total gradient now grows with the number of generated tokens, so long batches give larger steps, which gradient clipping and Adam then partly undo.
- DAPO divides by the total tokens across the G answers: no per-response bias within a group, but the scale changes from group to group with total length.
- Experiment: train with length-matched and length-skewed batches under each aggregation, log the gradient norm and the per-sequence effective weight, and check whether accuracy and length trends differ at equal tuned learning rates.
- Design
You train a multi-turn search agent with GRPO. A trajectory has model tokens and much longer tool-output tokens (retrieved passages), the reward is answer F1, and trajectory lengths vary from 300 to 20,000 tokens. Choose the loss aggregation and advantage normalization, and justify each choice using the two Dr. GRPO biases.
What a strong answer covers
- Mask tool-output tokens: the policy did not generate them, so they get no log-probability gradient and should not count in any length divisor.
- Do not divide by each trajectory's length; otherwise long failing searches are barely penalized and the agent learns to search forever. Sum over model tokens and divide by a fixed budget.
- Answer F1 is graded and often nearly tied within a group; dividing by a tiny std inflates noise. Use mean-centring, or batch-level rather than group-level std.
- Add an explicit, measured cost for tool calls or tokens if shorter search is desired, instead of relying on a normalization artefact.
- Monitor the length of failed versus successful trajectories over training as the diagnostic Dr. GRPO uses.