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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Huang, Kerui, Liu, Shuhan, Hu, Xing, Xu, Tongtong, Bao, Lingfeng, Xia, Xin
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917326732918784
author Huang, Kerui
Liu, Shuhan
Hu, Xing
Xu, Tongtong
Bao, Lingfeng
Xia, Xin
author_facet Huang, Kerui
Liu, Shuhan
Hu, Xing
Xu, Tongtong
Bao, Lingfeng
Xia, Xin
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2509_14093
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Reasoning Efficiently Through Adaptive Chain-of-Thought Compression: A Self-Optimizing Framework
Huang, Kerui
Liu, Shuhan
Hu, Xing
Xu, Tongtong
Bao, Lingfeng
Xia, Xin
Software Engineering
Artificial Intelligence
Computation and Language
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.
title Reasoning Efficiently Through Adaptive Chain-of-Thought Compression: A Self-Optimizing Framework
topic Software Engineering
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2509.14093