AI Inventory information may be inaccurate or out of date. Verify it with reliable sources before relying on it.
Catalog Home/Research & Literature/arXiv:2501.12948
arXiv:2501.12948Landmark PublicationarXiv preprint25 min read12,480 citations

DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning

Pure Reinforcement Learning Without Supervised Warm-Up for Mathematical & Code Reasoning

Authors:DeepSeek-AI (DeepSeek)
Date: 2025-01-20
Category: reasoning-rl
Executive Summary & Core Thesis

Frontier reasoning models traditionally required thousands of expensive human chain-of-thought demonstrations before RL. DeepSeek-R1 proves that pure large-scale reinforcement learning directly on base models naturally incentivizes self-reflection, verification, and spontaneous aha moments.

Conceptual Intuition

Imagine a student solving difficult math puzzles. Instead of having a professor explain each step beforehand, the student simply guesses, checks if the final answer is right, and reflects on what worked. Over hundreds of thousands of tries, the student spontaneously discovers logic, double-checking, and error recovery on their own.

1Zero-SFT Bootstrapping (DeepSeek-R1-Zero)

Direct reinforcement learning on base language models without prior human instruction fine-tuning.

2Group Relative Policy Optimization (GRPO)

Eliminates value critic networks by sampling a group of answers and scoring advantages relative to group mean and variance.

3Distillation to Dense Architectures

Transferring reasoning traces from 671B Mixture-of-Experts into compact Qwen-1.5B/7B/14B/32B models.

1. What Existed Before: Heavy Human Supervised Fine-Tuning (SFT)

Prior to DeepSeek-R1, the industry consensus was that neural networks could only reason by imitating human chain-of-thought demonstrations curated at immense human labor costs.

Models trained primarily through imitation suffer from ceiling effects: they mimic the syntax of human thought without genuinely verifying intermediate states, frequently leading to hallucinated leaps of logic that look superficially plausible.

Furthermore, traditional PPO (Proximal Policy Optimization) required maintaining a separate Critic model of comparable size to the actor, doubling GPU memory requirements during training.

The Actor-Critic Memory Wall

For a 671B Mixture-of-Experts model, running both an Actor policy and a Critic value network requires over 2.6 Terabytes of memory just for weight residency and optimizer states, rendering standard PPO intractable.

\text{Memory}_{PPO} = \text{Mem}_{\text{Actor}} + \text{Mem}_{\text{Critic}} + \text{Mem}_{\text{Ref}} + \text{Mem}_{\text{Reward}}

2. The Core Problem: How to Learn Reasoning Without Human Guidance

Can reasoning capabilities emerge purely through environment incentives, without showing the model how humans solve problems?

The key bottleneck was designing rule-based verifiable reward systems (for math accuracy and code unit-test execution) that avoid reward hacking while maintaining output readability and language consistency.

The Fundamental Bottleneck: How to prevent a pure-RL model from degenerating into gibberish or language-mixing while incentivizing long chain-of-thought exploration.

3. The Mechanism: Group Relative Policy Optimization (GRPO)

GRPO abandons the critic network entirely. For each prompt q, it generates a group of G outputs {o_1, o_2, ..., o_G}, calculates each answer reward r_i, and normalizes the advantage by the group mean and standard deviation.

Algorithmic Execution DAG

n8n WORKFLOW

Sequential computational flow across inference and verification states

4 NODES CONNECTED
STAGE Step 01TRIGGER / INPUT

Group Sampling Without Value Network

For each input prompt, sample G candidate trajectories in parallel, recording token logits.

Deterministic Execution
▶
STAGE Step 02TRANSFORM / INFERENCE

Verifiable Rule-Based Rewards

Evaluate correctness with exact symbolic checkers (math answer accuracy, compiler output), bypassing fallible reward models.

Deterministic Execution
▶
STAGE Step 03VERIFY / GATE

Relative Advantage Normalization

Compute advantage A_i = (r_i - mean(r)) / std(r). If one trajectory found the right answer while others failed, update the policy toward the successful reasoning steps.

Deterministic Execution
▶
STAGE Step 04TERMINAL / OUTPUT

Multi-Stage SFT Warmup & Distillation

Synthesize verified reasoning traces from R1-Zero, filter for readability, and distill knowledge into compact 1.5B-32B dense architectures.

Deterministic Execution
Step 01

Group Sampling Without Value Network

For each input prompt, sample G candidate trajectories in parallel, recording token logits.

Step 02

Verifiable Rule-Based Rewards

Evaluate correctness with exact symbolic checkers (math answer accuracy, compiler output), bypassing fallible reward models.

Step 03

Relative Advantage Normalization

Compute advantage A_i = (r_i - mean(r)) / std(r). If one trajectory found the right answer while others failed, update the policy toward the successful reasoning steps.

Step 04

Multi-Stage SFT Warmup & Distillation

Synthesize verified reasoning traces from R1-Zero, filter for readability, and distill knowledge into compact 1.5B-32B dense architectures.

Group Advantage Normalization Invariance

GRPO replaces scalar reward models with group-normalized relative scores, guaranteeing that positive policy gradient updates strictly correspond to trajectories exceeding the group mean outcome.

\mathcal{J}_{\text{GRPO}}(\theta) = \mathbb{E}_{q \sim P(Q), \{o_i\}_{i=1}^G} \left[ \frac{1}{G} \sum_{i=1}^G \min \left( \frac{\pi_\theta(o_i|q)}{\pi_{\text{old}}(o_i|q)} \hat{A}_i, \text{clip}\left( \frac{\pi_\theta(o_i|q)}{\pi_{\text{old}}(o_i|q)}, 1-\epsilon, 1+\epsilon \right) \hat{A}_i \right) \right]

4. Benchmark Measurements & Reasoning Audits

Evaluated across AIME 2024, MATH-500, Codeforces, and SWE-bench against OpenAI o1 and Claude 3.5 Sonnet.

MetricStandard BaselineWith Proposed MethodMeasured DeltaCondition
AIME 2024 (Pass@1)15.6% (Base 671B)79.8% (DeepSeek-R1)+511% relative gainMatches OpenAI o1 performance
MATH-500 (Pass@1)52.8%97.3%+84.2% accuracyState of the art mathematical solving
Codeforces Percentile43.2 percentile96.3 percentile (2029 Rating)Grandmaster tierCompetitive algorithmic programming
Inference Cost per 1M Tokens$15.00 (Frontier Closed)$0.55 (DeepSeek API)27x lower costFull open-weights release under MIT License

5. Production Implementation & Verification

Deploy DeepSeek-R1 or distilled variants using vLLM or SGLang with native FP8 / INT4 quantization.

# Production Inference with vLLM
from vllm import LLM, SamplingParams

llm = LLM(
    model="deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
    tensor_parallel_size=2,
    max_model_len=32768,
    trust_remote_code=True
)

prompt = "A sequence of numbers satisfies a_1 = 1, a_{n+1} = a_n + 1/a_n. Prove a_{1000} > 44."
sampling_params = SamplingParams(temperature=0.6, max_tokens=8192)

outputs = llm.generate([prompt], sampling_params)
print(outputs[0].outputs[0].text)
Edge Cases: When This Method Degrades or Fails
  • •Language mixing: Early R1-Zero models mixed English and Chinese in the same reasoning chain.
  • •Infinite reflection loops: When faced with ambiguous problems, reasoning models can spiral into repetitive validation.
Hardware Recommendation: Distilled 32B model runs on 2x RTX 4090 or single A100 (80GB). Full 671B MoE requires 8x H100 GPUs.

6. Curator Assessment & Architectural Context

"DeepSeek-R1 is arguably the most influential AI research breakthrough of 2025. It broke the assumption that frontier reasoning models must be closed-source monopolies by releasing open-weights with reproducible reinforcement learning methodologies."
Strategic Implications for AI Builders
→Incentivizing Over Instructing: Pure RL unlocks reasoning behaviors that human demonstrators cannot easily curate.
→Distillation is Unusually Effective: Small models (7B and 14B) can absorb reasoning traces from large RL models with minimal loss.
Next Landmark Paper in Literature Archive
FlashAttention-3: Fast and Accurate Attention with Asynchrony (arXiv:2407.08608)
Explore FlashAttention-3
🚀 SEO Audit
✅ 0
⚠️ 0
❌ 0
0