Efficient Long CoT Reasoning in Small Language Models

Zhaoyang Wang, Jinqi Jiang, Tian Qiu, Hui Liu, Xianfeng Tang, Huaxiu Yao

TL;DR

Large reasoning models like DeepSeek-R1 excel by generating lengthy chains of thought, but their traces are riddled with redundant "overthinking" that small language models (SLMs) struggle to learn. This paper introduces an efficient pruning strategy—combining $O(\log n)$ binary cutting with backtracking and on-policy validation by the target SLM itself—followed by SFT and DPO. The result: SLMs match or outperform full-distillation baselines while cutting reasoning token counts by up to 75%.

What Problem Does This Paper Address?

Recent reasoning models (such as OpenAI o1 and DeepSeek-R1) generate extended Chain-of-Thought (CoT) traces to solve complex problems. When practitioners distill these capabilities into smaller open-source models (~7B–14B parameters), they hit two major bottlenecks:

  1. Overthinking and Redundancy: Long CoT traces frequently spend hundreds of tokens second-guessing, re-verifying, or redundantly re-deriving already correct intermediate steps—even for trivial problems.
  2. Capacity Mismatch: SLMs have limited parameter budgets and struggle to model unnecessarily convoluted reasoning trajectories. Furthermore, generating thousands of reasoning tokens at test time destroys inference efficiency.

Reinforcement learning approaches (like length-penalized GRPO) are computationally expensive to train, while naive prefix-search methods are slow and ignore the target SLM's specific capabilities.

Methods

The authors propose a data curation and fine-tuning pipeline tailored to the target SLM:

  • Binary Cutting with Backtracking: Instead of linearly stepping through reasoning steps ($O(n)$ search complexity), the authors use binary search ($O(\log_2 n)$). They aggressively bisect the reasoning chain (delimited by double newlines \n\n). If a truncated prefix fails to produce the right answer, a backtracking binary search upward recovers essential intermediate steps that were over-pruned.
  • On-Policy Validation: Rather than using an expensive external LLM or "oracle" judge to verify truncated steps, the target SLM itself serves as the validator. Given the question and candidate prefix, the SLM is prompted to output the final answer directly. If it succeeds, the prefix is deemed sufficient for that specific SLM's inductive biases.
  • Two-Stage Alignment (SFT + DPO):
  • Supervised Fine-Tuning (SFT): The SLM is trained on the curated concise prefixes.
  • Direct Preference Optimization (DPO): The model is trained to prefer the pruned, concise reasoning path ($Y$) over the bloated original path ($R$), using a small auxiliary SFT loss weight to prevent likelihood collapse.
Full CoT Traces (DeepSeek-R1)
         │
         ▼
[ Binary Cutting + Backtracking ] ◄── Validated on-policy by target SLM
         │
         ▼
Curated Dataset (Concise vs. Bloated Pairs)
         │
         ▼
[ SFT ] ──► [ DPO with SFT regularization ] ──► Fast, Accurate SLM

Datasets

  • Training Data: Subsampled from OpenR1-Math-220k (derived from NuminaMath 1.5, with reasoning traces from DeepSeek-R1). Filtering out failed problems and chains $>200$ steps or $>4096$ tokens yielded a ~40k sample training dataset.
  • Evaluation Benchmarks:
  • GSM8K: Grade-school arithmetic word problems.
  • MATH: A 500-problem subset of challenging high-school competition mathematics.
  • AIME (1983–2025): Highly challenging American Invitational Mathematics Examination problems evaluating extreme reasoning depth and generalization.

Key Insights and Ideas

  • Most CoT tokens are fluff: Analysis revealed that roughly 40% of DeepSeek-R1 reasoning traces can have over 50% of their tokens cut without losing the core derivation. In fact, over 61% of solutions already have the necessary deduction in place long before the chain concludes.
  • The model being trained should be its own judge: Different SLMs have different intrinsic capabilities. By using the target SLM as an on-policy validator, the pruning algorithm keeps exactly the prefix length that that specific model needs to bridge the gap to the final answer.
  • DPO acts as an effective length suppressor: While SFT teaches the model how to reason concisely, DPO directly penalizes the habit of rambling, dramatically shrinking token counts without degrading accuracy.

Key Results

Experiments on Llama-3.1-8B, Qwen2.5-7B, and Qwen2.5-14B show substantial efficiency gains with minimal performance loss (and occasional accuracy gains):

  • Significant Token Reductions:
  • For Qwen2.5-14B on MATH, SFT+DPO dropped the reasoning length from 3,950 tokens (Full SFT) down to 942 tokens (a 76.1% reduction) while boosting accuracy from 79.20% to 83.80%.
  • On AIME, Qwen2.5-14B token usage dropped from 10,144 tokens to 2,382 tokens (a 76.5% reduction) while keeping accuracy nearly flat (34.73% vs. 33.44%).
  • For Llama-3.1-8B on GSM8K, token usage dropped by 58.2% (from 1,049 to 438 tokens) with virtually no accuracy change (87.11% vs. 86.20%).
  • Superiority over First-Correct Solutions (FCS): FCS (linear cutting) often broke down on complex benchmarks like MATH (Qwen-7B FCS achieved only 39.40% vs. 75.20% for this paper's SFT method), proving that binary cutting with backtracking preserves critical logical continuity.

Limitations and Future Work

  • Failure on Tiny Models (<7B): When tested on Llama-3.2-3B, the method failed severely (GSM8K accuracy collapsed from 67.85% to 47.38%). The authors note that 3B models lack the latent capacity to leap from concise reasoning steps to final answers.
  • Benchmark Scope: Evaluations are limited strictly to mathematical reasoning benchmarks; performance on code synthesis, creative tasks, or open-ended multi-step logic remains unverified.
  • Single Source Model: Distillation data was generated exclusively using DeepSeek-R1.

Summary updated

BibTeX
@inproceedings{wang2025efficient,
  author = {Zhaoyang Wang and Jinqi Jiang and Tian Qiu and Hui Liu and Xianfeng Tang and Huaxiu Yao},
  title = {{Efficient Long CoT Reasoning in Small Language Models}},
  booktitle = {ER @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=CrcG1GUg7m},
}
Figure