TrimR: Verifier-based Training-Free Thinking Compression for Efficient Test-Time Scaling

Weizhe Lin, Xing Li, Zhiyuan Yang, Xiaojin Fu, Hui-Ling Zhen, Yaoyuan Wang, Xianzhi Yu, Wulong Liu, Xiaosong Li, Mingxuan YuanarXiv 2025 · OpenReview

Abstract

Large Reasoning Models (LRMs) demonstrate exceptional capability in tackling complex mathematical, logical, and coding tasks by leveraging extended Chain-of-Thought (CoT) reasoning. Test-time scaling methods, such as prolonging CoT with explicit token-level exploration, can push LRMs' accuracy boundaries, but they incur significant decoding overhead. A key inefficiency source is LRMs often generate redundant thinking CoTs, which demonstrate clear structured overthinking and underthinking patterns. Inspired by human cognitive reasoning processes and numerical optimization theories, we propose TrimR, a verifier-based, training-free, efficient framework for dynamic CoT compression to trim reasoning and enhance test-time scaling, explicitly tailored for production-level deployment. Our method employs a lightweight, pretrained, instruction-tuned verifier to detect and truncate redundant intermediate thoughts of LRMs without any LRM or verifier fine-tuning. Empirical evaluations on Ascend NPUs and vLLM show that our framework delivers substantial gains in inference efficiency under large-batch workloads. In particular, on the four MATH500, AIME24, AIME25, and GPQA benchmarks, the reasoning runtime of Pangu Pro MoE, Pangu-R-38B, QwQ-32B, and DeepSeek-R1-Distill-Qwen-32B is improved by up to 70% with negligible impact on accuracy.

Introduction

Large Reasoning Models (LRMs) like OpenAI’s o1 and DeepSeek-R1 have revolutionized AI performance through "test-time scaling," where models spend more time "thinking" through a Chain-of-Thought (CoT) to solve complex problems. However, this increased reasoning depth comes with a massive computational price tag.

Research identifies two primary sources of waste in these long reasoning chains: Overthinking, where a model finds the correct answer early but continues to explore redundant paths, and Underthinking, where a model oscillates between incorrect ideas or enters repetitive loops on extremely difficult problems. TrimR addresses these inefficiencies by treating the reasoning process as an optimization problem, stopping the model as soon as a stable solution is reached.

The TrimR Framework

TrimR is a training-free and non-invasive framework that acts as an intelligent monitor for LRMs. Unlike existing solutions that require expensive fine-tuning or complex Process Reward Models (PRMs), TrimR utilizes a lightweight verifier to prune redundant steps in real-time.

Overview of the TrimR framework showing the interaction between the LRM, the verifier model, and the compression logic.

The framework consists of three core components:

  1. Overthinking Compression: A lightweight verifier (typically a 7B instruction-tuned model) periodically checks intermediate thoughts for answer existence and equivalence. If the model produces the same answer $M$ times consecutively, TrimR triggers an early exit.
  2. Underthinking Compression: If the model fails to converge within a set token budget, the system terminates the process and prompts the model to summarize its current best insights.
  3. Repetition Truncation: A rolling-hash-based detector identifies token-level loops, preventing the infinite loop failure modes common in quantized models.

To ensure production viability, the Test-Time Thinking Compression System (T3CS) runs the verifier asynchronously on separate hardware, ensuring the monitoring process does not block LRM generation.

Experimental Evaluation

TrimR was evaluated across four rigorous reasoning benchmarks: MATH500, AIME24, AIME25, and GPQA Diamond. Testing spanned several state-of-the-art models, including QwQ-32B, DeepSeek-R1-Distill-Qwen-32B, and the Pangu series. The system was engineered for high-throughput industrial applications, utilizing an 8:1 LRM-to-verifier ratio to keep overhead below 1%.

Results and Discussion

Empirical results demonstrate substantial efficiency gains across all tested benchmarks. Reasoning runtime was reduced by 16% to 70%, while total generated tokens dropped by 8% to 46%.

Analysis of token generation patterns, highlighting the prevalence of overthinking and underthinking in long reasoning chains.

Crucially, accuracy was preserved within 1-2% of the baseline. In some instances, such as DeepSeek-R1 on GPQA, accuracy actually improved because TrimR truncated divergent reasoning paths that would have otherwise led the model to change a correct answer to an incorrect one. Analysis shows that TrimR effectively "squashes" the long tail of token distributions, moving average completions from over 10k tokens down to the 0-8k range.

Conclusion

TrimR provides a scalable, training-free method for optimizing LRM inference. While highly effective, future work will focus on refining threshold tuning for different architectures and exploring deeper integration with search-based test-time scaling methods like Monte Carlo Tree Search (MCTS).

Summary updated

BibTeX
@misc{lin2025trimr,
  author = {Weizhe Lin and Xing Li and Zhiyuan Yang and Xiaojin Fu and Hui-Ling Zhen and Yaoyuan Wang and Xianzhi Yu and Wulong Liu and Xiaosong Li and Mingxuan Yuan},
  title = {{TrimR: Verifier-based Training-Free Thinking Compression for Efficient Test-Time Scaling}},
  year = {2025},
  eprint = {2505.17155},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.17155},
}
Figure