DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning
TL;DR. The paper has two results that are often blurred. R1-Zero is an experiment: train DeepSeek-V3-Base with GRPO on rule-checked math, code and logic answers, with no supervised data. AIME 2024 pass@1 rises from 15.6 to 77.9, responses grow to thousands of tokens and the model starts reflecting and re-checking, but the text mixes languages and is hard to read. R1 is a product pipeline: cold-start SFT, reasoning RL, rejection-sampled SFT and a final RL stage that adds preference rewards. A third result is distillation: fine-tuning smaller Qwen and Llama models on R1’s 800K samples beats running RL on them directly.
Why it matters now. R1 is the reference point for every open reasoning-RL paper since: DAPO, Dr. GRPO and VAPO all compare against R1-Zero-style training. For search agents, it set the template that later “Search-R1”-style work copied: an outcome-checked reward, a thinking/answer format and GRPO. It is also honest about what failed (process reward models, MCTS, small bases, longer model-based reward training), which is as useful as what worked.
Key idea
Section titled “Key idea”R1-Zero: RL straight from the base model
Section titled “R1-Zero: RL straight from the base model”The objective is GRPO, written in this paper with sequence-level probabilities:
with the KL estimated by (always ). The DeepSeekMath original applies the ratio per token; GSPO later argues for a properly normalized sequence-level version.
The reward is a rule: an accuracy reward (the boxed answer matches, or the code passes tests) plus a format reward for putting the reasoning inside <think> tags, with equal weights. The paper deliberately avoids neural reward models for reasoning, because they get hacked during long training. The template only asks for reasoning and then an answer, with no content hints, so that what emerges can be attributed to RL.
Worked example. Four answers to one question: correct and formatted, two wrong but formatted, one wrong and unformatted. Rewards , mean 1, std , advantages . Once every answer is formatted, rewards are and the advantages are : exactly the 0/1 running example . Adding a constant to the whole group changes nothing, so the format reward only matters while some samples still break format.
Setup (§2, Methods). Learning rate 3e-6, KL coefficient 0.001, temperature 1, 16 samples per question, 32 questions per step. Maximum length 32,768 tokens, raised to 65,536 at step 8.2K, where length and accuracy both jump. 10,400 steps in total (1.6 epochs). Each rollout of 8,192 answers is split into 16 minibatches, so the policy takes 16 gradient steps per rollout and the clip is active. The reference model is replaced by the current policy every 400 steps, so the KL only limits drift within a window.
Why GRPO and not PPO (App. A.3)
Section titled “Why GRPO and not PPO (App. A.3)”Two arguments. First, a value model must predict the final reward from a partial chain of thought. Long chains reflect and revise, so an early mistake may still end correct; that is hard to learn, and the critic is as large as the policy. Second, PPO usually adds a per-token KL to the reward, so its total grows with length and quietly penalizes long answers. On a smaller MoE model, PPO with the default GAE was much worse than GRPO, while came close. So the real finding is that a poor critic hurts when you bootstrap from it.
R1: four stages for readability and general use
Section titled “R1: four stages for readability and general use”- Cold start. SFT on thousands of long, readable, first-person chains of thought: R1-Zero outputs filtered for correct answers and readability, then rewritten by DeepSeek-V3. This gives Dev1.
- Reasoning RL with the same rule rewards plus a language-consistency reward: the fraction of chain-of-thought words in the target language. An ablation shows it costs a little accuracy but stops language mixing. This gives Dev2.
- Rejection sampling and SFT on about 800K samples: correct reasoning traces from Dev2 plus non-reasoning data (writing, QA, translation) reused from DeepSeek-V3’s SFT data. This gives Dev3.
- General RL at temperature 0.7 for 1,700 steps, mixing rule rewards with model-based helpfulness and safety rewards. The model-based rewards are used only in the last 400 steps, because longer training against them led to reward hacking (App. B.5: reward rises while Codeforces falls).
Distillation. The same 800K samples fine-tune Qwen2.5 (1.5B–32B), Llama-3.1-8B and Llama-3.3-70B-Instruct with SFT only.
Key results
Section titled “Key results”Results below follow arXiv v2 (4 Jan 2026). Table numbers and training-cost figures refer to that revision, not to the original v1 (22 Jan 2025).
- R1-Zero (Fig. 1, Table 3). AIME 2024 pass@1 15.6 → 77.9, and 86.7 with self-consistency over 16 samples. MATH-500 95.9, Codeforces rating 1444, GPQA Diamond 75.8, but IF-Eval only 46.6 and AlpacaEval 2 24.7.
- Pipeline stages (Table 3, R1-Zero → Dev1 → Dev2 → Dev3 → R1). AIME 77.9 → 59.0 → 74.0 → 78.1 → 79.8. IF-Eval 46.6 → 71.7 → 72.0 → 78.1 → 83.3. AlpacaEval 2 24.7 → 50.1 → 55.8 → 62.1 → 87.6. Codeforces 1444 → 1534 → 1687 → 1746 → 2029. GPQA 75.8 → 66.1 → 70.7 → 71.2 → 71.5. The last RL stage mostly helps general instruction following and preference scores.
- Distillation (Table 15, AIME 2024 pass@1). Distill-Qwen 1.5B 28.9, 7B 55.5, 14B 69.7, 32B 72.6; Distill-Llama-70B 70.0. GPT-4o scores 9.3 in the same table.
- Distillation vs RL at 32B (Table 16, AIME pass@1 / cons@64). Qwen2.5-32B with R1-Zero-style RL 47.0 / 60.0; QwQ-32B-Preview 50.0 / 60.0; distilled from R1 72.6 / 83.3.
- Failures (App. G). Process reward models (hard to define steps, hackable) and MCTS (search space too large, value model hard to train) did not help. R1-Zero-style RL on 7B dense and 16B MoE bases fell into repetition.
- Cost (App. B.4.4). 64×8 H800 GPUs: about 198 h (101K GPU-hours) for R1-Zero, 5K GPU-hours to make the SFT data, about 80 h (41K GPU-hours) for R1. That is 147K GPU-hours, or about 2 per GPU-hour, excluding the base model.
Limitations & open questions
Section titled “Limitations & open questions”- R1-Zero’s success relies on a very strong base model; the paper’s own small-model attempts failed. Whether RL creates new reasoning or mainly sharpens what the base already does is debated: see Does RL really incentivize reasoning?.
- The “aha moment” (a rise in the word “wait”) appears after step 8,000, close to the step where the length limit doubled. Word frequency is weak evidence of useful reflection.
- No ablations with seed repeats for the pipeline stages; the cold start is justified by readability, not shown to be needed for accuracy.
- The paper lists its own limits: no tool use (including search), weak structured output, overthinking on easy questions, language mixing outside Chinese and English, sensitivity to prompts (few-shot prompts hurt) and limited RL for software engineering.
- Rule rewards only exist where answers are checkable. Model-based rewards were hacked within a few hundred steps, so extending this recipe to open-ended tasks (like deep research reports) remains open; see Reward hacking.
Connections
Section titled “Connections”- The algorithm: DeepSeekMath / GRPO. The PPO it replaces: PPO.
- Fixes to R1-Zero-style GRPO: DAPO, Dr. GRPO. A critic that works after all: VAPO.
- The concurrent long-CoT report: Kimi k1.5.
- The base model: DeepSeek-V3.
- Distillation as an alternative to RL: On-policy distillation.
- Test-time scaling context: Test-time compute.
- How to read pass@1, cons@64 and pass@k: Evaluating reasoning RL.
- Why rule-based rewards can still be wrong or hacked: rule vs model verifiers and noisy verifiers.
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
R1-Zero sums an accuracy reward and a format reward with equal weight. For a group of four answers (correct and well-formatted, wrong but formatted, wrong but formatted, wrong and unformatted), compute the GRPO advantages with the population std. Then recompute once all four are formatted, and explain what happens to the format reward late in training.
What a strong answer covers
- Rewards [2, 1, 1, 0]: mean 1, std √0.5 ≈ 0.707, advantages +1.41, 0, 0, −1.41.
- The formatted wrong answers get zero advantage: the format bonus exactly offsets being wrong relative to the mean.
- All formatted: [2, 1, 1, 1], mean 1.25, std ≈ 0.433, advantages +1.73, −0.58, −0.58, −0.58, the same as the 0/1 running example [1, 0, 0, 0].
- Adding a constant to every reward in a group changes nothing, so once every sample is formatted the format reward stops contributing any signal; it only matters while some samples break format.
- Derive / compute
R1-Zero samples 16 answers per question, 32 questions per step (batch 512), and each rollout of 8,192 answers is split into 16 minibatches for one pass. How many questions does one rollout cover, how many gradient steps use each rollout, and why does that make GRPO's clip active? What does replacing the reference model every 400 steps do to the KL term?
What a strong answer covers
- 8,192 / 16 = 512 questions per rollout; 8,192 / 512 = 16 minibatches, so 16 gradient steps per rollout.
- Only the first minibatch is fully on-policy (ratio 1). The other 15 are trained after the policy has moved, so the ratio differs from 1 and clipping can bind.
- With β = 0.001 and the reference reset to the current policy every 400 steps, the KL limits drift within each 400-step window rather than anchoring to the base model; over 10,400 steps the policy can go far.
- This fits the paper's argument that long-CoT RL must be allowed to move far from the starting model.
- Mechanism
Appendix A.3 gives two reasons for using GRPO rather than PPO for long chain-of-thought: one about the value model and one about where the KL penalty goes. Explain both, and interpret the finding that PPO with GAE λ = 0.95 is much worse than GRPO while λ = 1.0 nearly matches it.
What a strong answer covers
- Value model: it must predict the final reward from a partial chain of thought, but long chains reflect and revise, so an early wrong step may still end correct. Outcome-only rewards make this hard to learn, and the critic is as large as the policy.
- KL placement: PPO adds a per-token KL to the reward at every token, so the total penalty grows with length and implicitly discourages long answers. GRPO adds the KL to the loss instead.
- λ = 0.95 bootstraps from the (poor) value estimates and discounts the far-away final reward; λ = 1.0 uses the full Monte Carlo return, so a weak critic only acts as a baseline, which is close to what GRPO does.
- So the lesson is "do not rely on a bad critic", not "critics cannot work". VAPO later makes PPO work by pretraining and decoupling the critic.
- What if…
Table 3 reports R1-Zero, the three intermediate checkpoints Dev1–Dev3 and the final R1. Using AIME, IF-Eval, AlpacaEval 2 and GPQA, say what each stage buys and what it costs. What does the comparison not tell you about whether the cold start is needed?
What a strong answer covers
- Cold-start SFT (Dev1): IF-Eval 46.6 → 71.7 and AlpacaEval 24.7 → 50.1, but AIME drops 77.9 → 59.0, because the small SFT set pulls the model away from R1-Zero's long reasoning.
- RL stage 1 (Dev2): AIME back to 74.0, Codeforces 1534 → 1687; general chat changes little.
- Rejection sampling + SFT (Dev3): AlpacaEval 62.1, AIME 78.1.
- RL stage 2 (R1): AlpacaEval 87.6 and ArenaHard 92.3, small reasoning gains (AIME 79.8). GPQA stays below R1-Zero (71.5 vs 75.8).
- Missing: R1-Zero followed by the same later stages without the cold start, and seed repeats, so the cold start's value is shown for readability, not proven necessary for accuracy.
- Critique
The paper presents a sudden rise in the word "wait" as an "aha moment" of self-evolved reflection. Give two alternative explanations that the training details make plausible, and design an experiment that could distinguish them.
What a strong answer covers
- The appendix says "wait" spikes after step 8,000, close to the step (8.2K) where the maximum length was raised from 32,768 to 65,536 tokens and length and accuracy jumped; part of the change may be a response to the larger budget.
- The base model (pretrained on web data that includes reasoning text) may already produce "wait"-style reflection at low rates; RL could be amplifying it rather than inventing it.
- Word counts measure style, not whether the reflection fixes errors.
- Experiment: rerun with a fixed length cap; measure "wait" frequency and its effect in base-model samples (pass@k); test whether answers that reflect are more often corrected from wrong to right.
- Design
You have a 7B model and an academic budget, and want a strong search-and-reason agent. Using Table 16 (distilled Qwen-32B 72.6 vs RL-from-scratch 47.0 on AIME) and §G.1 (small bases failed at R1-Zero-style RL), design your training plan and say what RL should add after distillation.
What a strong answer covers
- Start with SFT on teacher trajectories (from a strong reasoning or search model), filtered for correct final answers, since distillation beats RL for small models at equal effort.
- R1-Zero-style RL directly on a small base is risky: the paper's 7B dense and 16B MoE attempts fell into repetition.
- Then run RLVR (GRPO or DAPO-style) on questions the distilled model solves sometimes, to fix its own failure modes and tool-use errors the teacher did not show.
- Measure pass@1 and pass@k against the distilled start at matched tokens and search calls, and watch for reward hacking of the answer checker.