Reasoning Efficiently Through Adaptive Chain-of-Thought Compression: A Self-Optimizing Framework

📅 2025-09-17
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Chain-of-Thought (CoT) reasoning improves large language models’ accuracy and robustness but incurs substantial computational overhead—increased latency, KV cache bloat, and heightened risk of output truncation—particularly detrimental in deterministic domains like software engineering. This work empirically demonstrates, for the first time, that excessively long reasoning chains degrade performance: failed instances exhibit significantly longer chains (up to 5× higher latency than successful ones). To address this, we propose a self-optimizing CoT framework that dynamically adjusts compression thresholds via pre-inference prediction, integrating Best-of-N sampling with task-aware adaptive filtering to jointly optimize reasoning length and accuracy. Experiments show our method compresses reasoning chains by 42.1% on average, markedly reducing truncation rates and infinite-loop occurrences while improving accuracy and decreasing KV cache memory footprint—achieving both efficiency and robustness under resource constraints.

Technology Category

Application Category

📝 Abstract
Chain-of-Thought (CoT) reasoning enhances Large Language Models (LLMs) by prompting intermediate steps, improving accuracy and robustness in arithmetic, logic, and commonsense tasks. However, this benefit comes with high computational costs: longer outputs increase latency, memory usage, and KV-cache demands. These issues are especially critical in software engineering tasks where concise and deterministic outputs are required. To investigate these trade-offs, we conduct an empirical study based on code generation benchmarks. The results reveal that longer CoT does not always help. Excessive reasoning often causes truncation, accuracy drops, and latency up to five times higher, with failed outputs consistently longer than successful ones. These findings challenge the assumption that longer reasoning is inherently better and highlight the need for adaptive CoT control. Motivated by this, we propose SEER (Self-Enhancing Efficient Reasoning), an adaptive framework that compresses CoT while preserving accuracy. SEER combines Best-of-N sampling with task-aware adaptive filtering, dynamically adjusting thresholds based on pre-inference outputs to reduce verbosity and computational overhead. We then evaluate SEER on three software engineering tasks and one math task. On average, SEER shortens CoT by 42.1%, improves accuracy by reducing truncation, and eliminates most infinite loops. These results demonstrate SEER as a practical method to make CoT-enhanced LLMs more efficient and robust, even under resource constraints.
Problem

Research questions and friction points this paper is trying to address.

Reducing computational costs of Chain-of-Thought reasoning
Addressing accuracy drops from excessive reasoning steps
Optimizing CoT length while maintaining performance accuracy
Innovation

Methods, ideas, or system contributions that make the work stand out.

Adaptive CoT compression framework
Best-of-N sampling with filtering
Dynamic threshold adjustment pre-inference
🔎 Similar Papers
No similar papers found.
K
Kerui Huang
The State Key Laboratory of Blockchain and Data Security, Zhejiang University, China
S
Shuhan Liu
The State Key Laboratory of Blockchain and Data Security, Zhejiang University, China
X
Xing Hu
The State Key Laboratory of Blockchain and Data Security, Zhejiang University, China
T
Tongtong Xu
State Key Laboratory for Novel Software Technology, Nanjing University, China
Lingfeng Bao
Lingfeng Bao
Zhejiang University
Software Engineering
X
Xin Xia
The State Key Laboratory of Blockchain and Data Security, Zhejiang University, China