arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2507.04742cs.AIcs.LG
收藏

思维链压缩的激活引导

Activation Steering for Chain-of-Thought Compression

University of Southern California(南加州大学)

Seyedarmin Azizi, Erfan Baghaei Potraghloo, Massoud Pedram

AI总结:

提出激活引导压缩(ASC),通过提取引导向量在推理时压缩思维链,无需训练,在MATH500和GSM8K上缩减长度达67.43%,并保持准确性,加速推理2.73倍。

摘要:

大型语言模型(LLMs)在包含中间步骤(即“思维链”,CoTs)时擅长复杂推理。然而,这些推理过程往往过于冗长,即使对于简单问题也是如此,导致上下文浪费、延迟增加和能耗升高。我们观察到,冗长的、以英语为主的思维链与简洁的、以数学为中心的思维链在模型的残差流激活空间中占据不同区域。通过提取并注入“引导向量”以在这两种模式之间转换,我们可以可靠地将生成转向更简洁的推理,从而无需重新训练即可有效压缩思维链。我们将这种方法形式化为激活引导压缩(ASC),这是一种推理时技术,通过直接修改隐藏表示来缩短推理轨迹。此外,我们提供了ASC对输出分布影响的理论分析,该分析源自一个封闭形式的KL散度有界约束,用于调节引导强度。仅使用100对配对的冗长和简洁示例,ASC在MATH500和GSM8K数据集上实现了高达67.43%的思维链长度缩减,同时在7B、8B和32B参数模型中保持准确性。作为一种无需训练的方法,ASC引入了可忽略的运行时开销,并且在MATH500上,在8B模型上实现了端到端推理墙钟时间平均2.73倍的加速。这使得ASC成为在延迟敏感或成本敏感环境中简化推理型LLM部署的实用且高效的工具。代码可在以下网址获取:https://github.com/ArminAzizi98/ASC

英文摘要:

Large language models (LLMs) excel at complex reasoning when they include intermediate steps, known as "chains of thought" (CoTs). However, these rationales are often overly verbose, even for simple problems, leading to wasted context, increased latency, and higher energy consumption. We observe that verbose, English-heavy CoTs and concise, math-centric CoTs occupy distinct regions in the model's residual-stream activation space. By extracting and injecting a "steering vector" to transition between these modes, we can reliably shift generation toward more concise reasoning, effectively compressing CoTs without retraining. We formalize this approach as Activation-Steered Compression (ASC), an inference-time technique that shortens reasoning traces by directly modifying hidden representations. In addition, we provide a theoretical analysis of the impact of ASC on the output distribution, derived from a closed-form KL-divergence-bounded constraint to regulate steering strength. Using only 100 paired verbose and concise examples, ASC achieves up to 67.43% reduction in CoT length on MATH500 and GSM8K datasets, while maintaining accuracy across 7B, 8B, and 32B parameter models. As a training-free method, ASC introduces negligible runtime overhead and, on MATH500, delivers an average 2.73x speedup in end-to-end reasoning wall-clock time on an 8B model. This makes ASC a practical and efficient tool for streamlining the deployment of reasoning-capable LLMs in latency- or cost-sensitive settings. The code is available at: https://github.com/ArminAzizi98/ASC

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑