Not All Tokens Are What You Need In Thinking

Hang Yuan, Bin Yu, Haotian Li, Shijun Yang, Christina Dan Wang, Zhou Yu, Xueyin Xu, Weizhen Qi, Kai ChenarXiv 2025 · DOI

Introduction

Chain-of-Thought (CoT) reasoning has significantly enhanced the performance of large language models (LLMs) like DeepSeek-R1 and OpenAI’s o1. However, these models are often notoriously verbose, leading to high latency and "overthinking." This verbosity manifests as "computational waste"—redundant steps, filler phrases, and circular logic that increase inference costs without necessarily aiding the final answer.

This paper introduces Conditional Token Selection (CTS), a framework designed to identify and prune redundant reasoning tokens. Unlike existing methods that treat tokens in isolation, CTS evaluates token importance in the context of both the specific question and the final answer. This approach not only saves compute but can also improve accuracy by up to 9.1% while reducing reasoning tokens by over 13%.

Methodology: Conditional Token Selection (CTS)

The core philosophy of CTS is that the importance of a reasoning token is relative to the goal. A token that appears insignificant in a vacuum might be a critical logical bridge for a specific answer.

The CTS framework workflow: from problem and full CoT to compressed data via a trained Reference Model (RM).

The CTS framework operates in three main stages:

  1. Reference Modeling: A "Reference Model" (RM) is fine-tuned on a curated dataset of high-quality reasoning (8 million tokens distilled from DeepSeek-R1). The RM learns to identify essential variables and logical symbols.
  2. Conditional Importance Scoring: CTS calculates an importance score based on the distribution shift caused by the answer. It measures how much more likely a reasoning token becomes when the correct answer is known.
  3. Iterative Pruning & Fine-Tuning: The CoT is partitioned into segments, and pruning occurs within these segments at a target ratio ($\alpha$). A student model (e.g., Qwen2.5 or Llama-3.1) is then fine-tuned on this compressed data to generate leaner reasoning paths natively.

Experimental Setup

The study evaluates CTS across several high-difficulty benchmarks:

  • MATH500 & AIME24: Mathematical reasoning.
  • GPQA Diamond: Hard science questions.
  • HumanEval & MBPP: Python coding tasks.

The models were fine-tuned on a 9.3K subset of the MATH dataset with reasoning traces from DeepSeek-R1.

Key Results and Insights

CTS consistently outperforms baseline methods like TokenSkip and LLMLingua. A critical finding is that task-agnostic compression often removes "termination tokens," causing models to enter infinite repetitive loops. CTS avoids this by using the answer as a conditional signal.

Accuracy vs. Compression Ratio on the MATH500 dataset. CTS consistently maintains higher accuracy than TokenSkip across various model sizes (7B, 8B, 14B).

Efficiency and Accuracy Gains

  • Performance Boost: On Qwen2.5-14B, CTS achieved a 13.2% reduction in reasoning tokens while boosting GPQA accuracy by 9.1%. This suggests that pruning acts as a regularizer, filtering out the "noise" of overthinking.
  • Extreme Compression: Even at a 42% reduction in training tokens, the model yielded a 75.8% reduction in inference tokens with only a marginal 5% accuracy drop.
  • Cross-Domain Robustness: The logic of importance learned in the math domain generalized effectively to coding tasks in HumanEval.
  • Economic Viability: For a Qwen-7B model, the inference savings offset the upfront training costs of the Reference Model after approximately 27,500 calls.

Conclusion and Future Work

While CTS shows significant promise, it currently depends on a well-trained Reference Model and uses fixed compression ratios. Future research may explore dynamic ratios—pruning more aggressively for simple queries and less for complex ones—and expanding the RM's training data to include diverse fields like law or medicine.

Summary updated

BibTeX
@misc{yuan2025not,
  author = {Hang Yuan and Bin Yu and Haotian Li and Shijun Yang and Christina Dan Wang and Zhou Yu and Xueyin Xu and Weizhen Qi and Kai Chen},
  title = {{Not All Tokens Are What You Need In Thinking}},
  year = {2025},
  eprint = {2505.17827},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.17827},
}
Figure