Paper Breakdown: DeepSeek-V3.2

Summary: DeepSeek-V3.2 introduces DeepSeek Sparse Attention (DSA) for efficient long-context (128K), a scalable GRPO RL framework (post-training compute >10% pre-training), and large-scale agentic task synthesis (1800 environments, 85K prompts). V3.2-Speciale (relaxed length constraints) achieves gold medals in IMO 2025, IOI 2025, ICPC WF 2025 and matches Gemini-3.0-Pro.


1. Key Contributions

# Contribution Section Details
1 DSA (DeepSeek Sparse Attention) 2.1 Lightning indexer + token selector; learns sparse pattern; instantiated under MLA MQA mode
2 Scalable RL (GRPO) 3.1 Unbiased KL estimate, Off-Policy Sequence Masking, Keep Routing, Keep Sampling Mask
3 Agentic Task Synthesis 3.2 1800 synthesized envs + 85K prompts (search, code, interpreter, general agents)
4 V3.2-Speciale 4.2 Extended thinking; gold medals IMO/IOI/ICPC; matches Gemini-3.0-Pro

2. Architecture: DSA (§2.1)

Lightning Indexer + Token Selector

h_t (query) → Indexer heads q^I, k^I, w^I → ReLU(q^I · k^I) · w^I → Index score I_{t,s}
                                                         ↓
                                          Top-k selector on I_{t,s}
                                                         ↓
                                       Sparse attention on selected KV

Index score: I_{t,s} = sum_{j=1}^{H^I} w_{t,j}^I · ReLU(q^I_{t,j} · k^I_{s})

  • H^I small (8 heads); FP8 efficient
  • ReLU for throughput

Attention: u_t = Attn(h_t, \{c_s mid I_{t,s} ∈ Top-k(I_{t,:})\})

DSA under MLA (MQA Mode)

  • Each latent vector (MLA KV entry) shared across all query heads
  • Kernel-level sharing for efficiency
  • Open-source impl provided

Continued Pre-Training (§2.1.1)

Stage Steps Tokens LR Objective
Dense Warm-up 1,000 2.1B 10^{-3} KL: L^I = sum_t D_{KL}(p_{t,:} | Softmax(I_{t,:})); freeze main model
Sparse Training 15,000 943.7B 7.3 × 10^{-6} KL on selected S_t + LM loss; detach indexer opt

Efficiency (Fig 3)

  • Core attention: O(L^2) to O(Lk) (k ll L)
  • Indexer: still O(L^2) but much smaller (few heads, FP8)
  • End-to-end speedup on H800: measured at 2 USD/GPU-hr

3. Post-Training: Scalable RL (§3)

GRPO Baseline (§3.1)

  • Group Relative Policy Optimization
  • Advantage: hat{A}_{i,t} = R_i - mean(R) (normalized per group)
  • KL penalty with reference policy

Stabilization Techniques (§3.1)

Technique Mechanism Effect
Unbiased KL Estimate Importance-sampling corrected KL Eliminates gradient noise when pi_theta ll pi_ref
Off-Policy Sequence Masking Mask negative-advantage sequences with high KL(pi_old|pi_theta) Tolerates rollout/training framework mismatch
Keep Routing Preserve expert routing from inference in training Stabilizes MoE RL
Keep Sampling Mask Preserve top-p/top-k masks from pi_old to pi_theta Fixes action space mismatch

Specialist Distillation (§3.1)

6 specialist domains: math, code, reasoning, general agent, agentic coding, agentic search

  • Each specialist: RL from base checkpoint
  • Distill → domain data → final RL on unified data
  • Performance gap eliminated by subsequent RL

Mixed RL Training (§3.1)

  • Single GRPO stage: reasoning + agent + human alignment
  • Avoids catastrophic forgetting from multi-stage
  • Rule-based rewards (reasoning/agent), generative RM (general)

4. Agentic Training (§3.2)

Thinking Context Management (Fig 4)

  • Retain reasoning across tool calls (only discard on new user message)
  • Preserve tool call history when reasoning removed
  • Incompatible with frameworks simulating tools via user messages (Roo Code, Terminus)

Cold Start (§3.2.2)

  • Prompt engineering: reasoning data (with <thinking>) + agentic data (tool calls)
  • System prompt guides multi-tool-call reasoning
  • Provides initial trajectories for RL

Large-Scale Agentic Tasks (§3.2.3)

Task Type Environments Prompts Source
Search Agent Real Synthesized 50,275
Code Agent Real (GitHub issues) Extracted 24,667
Code Interpreter Real (Jupyter) Curated 5,908
General Agent Synthesized (1,827) Synthesized 4,417

General Agent Synthesis (Fig. S3):

  1. Given category + sandbox → agent retrieves web data → stores in DB
  2. Agent synthesizes task-specific tools (functions)
  3. Iterative: propose task + solution + verifier → increase difficulty
  4. Result: 1,827 (env, tools, task, verifier) tuples, 4,417 tasks
  5. RL retains only non-zero pass@100

Context Management for Search (§4.4)

When >80% context used:

Strategy Method BrowseComp
Summary Summarize overflow + re-init 60.2
Discard-75% Drop first 75% tool history
Discard-all Reset context (like Opus 4.5 new context) 67.6

Discard-all: best efficiency + scalability.


5. Evaluation (§4)

Main Results (Table 2)

Benchmark GPT-5 High Gemini-3.0 Pro Kimi-K2 DeepSeek-V3.2
MMLU-Pro 88.2 90.1 84.6 85.0
GPQA Diamond 85.7 91.9 84.5 82.4
HLE Text 26.3 37.7 23.9 25.1
LiveCodeBench 84.5 90.7 82.6 83.3
Codeforces 2537 2708 2386
AIME 2025 94.6 95.0 94.5 93.1
HMMT Feb 2025 88.3 97.5 89.4 92.5
IMOAnswerBench 76.0 83.3 78.6 78.3
SWE Verified 77.2 76.2 71.3 73.1
BrowseComp 54.9 51.4 / 67.6*
MCP-Mark 50.9 43.1 20.4 38.0

*Context management

V3.2-Speciale (Table 3-4)

Benchmark V3.2 V3.2-Speciale Gain
AIME 2025 93.1 (16k) 96.0 (23k) +2.9%
HMMT Feb 92.5 (19k) 99.2 (27k) +6.7%
IMOAnswerBench 78.3 (27k) 84.5 (45k) +6.2%
LiveCodeBench 83.3 (16k) 88.7 (27k) +5.4%
Codeforces 2386 (42k) 2701 (77k) +315

Competition Gold Medals:

  • IMO 2025: 35/42 (7/7 on P1-P5, 0 on P6)
  • CMO 2025: 102/126
  • IOI 2025: 492/600 (rank 10)
  • ICPC WF 2025: 10/12 problems (rank 2)

6. Limitations & Future Work (§5)

  1. World knowledge gap vs Gemini-3.0-Pro (fewer pre-training FLOPs)
  2. Token efficiency: V3.2 needs longer CoT than Gemini-3.0-Pro for same quality
  3. Complex task solving still inferior to frontier closed models

7. My Takeaways for Research

Insight Relevance
DSA learns sparse pattern → applicable to ViT (my project) vision-transformer-dsa-integration
GRPO stabilization techniques (unbiased KL, off-policy mask, keep routing/mask) Reusable for any RL post-training
Agentic synthesis (1800 envs) → data generation pattern Could adapt for visual reasoning envs
Context management (Discard-all) → practical for long-context agents Relevant for VQA with many images
Speciale: relaxed length → gold medals Suggests current length constraints limit reasoning

Related Wiki Pages


Sources

  • arxiv-2512.02556: DeepSeek-V3.2 paper (full)