大模型提前规划推理强度,靠激活向量控制思考深度。
On Reasoning Strength Planning in Large Reasoning Models
- 模型在生成前通过激活向量预估问题难度并规划推理长度。
- 删除该向量减少思考次数,添加可增强表现,验证其因果作用。
- 可用于检测过度思考或优化简单任务的推理效率。
近期研究发现,大推理模型(LRMs)能自动为难题分配更多推理标记数,表现出对难度的感知能力。尽管这一现象广泛观察到,其内在机制仍不清楚。本文从模型激活角度解释该现象:我们发现LRMs在生成前就已通过激活中的预分配方向向量预先规划推理强度,且该向量的大小直接决定推理长度。实验表明,仅凭问题激活就能用线性探测器预测推理标记数,说明模型提前估算所需推理强度。进一步揭示,该方向向量嵌入在模型激活中,其幅度调控推理长度;移除向量导致推理标记减少和性能下降,增加则提升推理长度甚至改善性能。该方向始终正向预测推理长度,并通过调节结束推理标记</think>的logits影响推理终止。最后,我们展示了两项应用:检测过度思考行为、在简单问题上实现高效推理。本工作揭示了大模型内部推理机制,提供了控制推理行为的实用工具。代码开源:https://github.com/AlphaLab-USTC/LRM-plans-CoT。
原文摘要 · Abstract (English)
Recent studies empirically reveal that large reasoning models (LRMs) can automatically allocate more reasoning strengths (i.e., the number of reasoning tokens) for harder problems, exhibiting difficulty-awareness for better task performance. While this automatic reasoning strength allocation phenomenon has been widely observed, its underlying mechanism remains largely unexplored. To this end, we provide explanations for this phenomenon from the perspective of model activations. We find evidence that LRMs pre-plan the reasoning strengths in their activations even before generation, with this reasoning strength causally controlled by the magnitude of a pre-allocated directional vector. Specifically, we show that the number of reasoning tokens is predictable solely based on the question activations using linear probes, indicating that LRMs estimate the required reasoning strength in advance. We then uncover that LRMs encode this reasoning strength through a pre-allocated directional vector embedded in the activations of the model, where the vector's magnitude modulates the reasoning strength. Subtracting this vector can lead to reduced reasoning token number and performance, while adding this vector can lead to increased reasoning token number and even improved performance. We further reveal that this direction vector consistently yields positive reasoning length prediction, and it modifies the logits of end-of-reasoning token </think> to affect the reasoning length. Finally, we demonstrate two potential applications of our findings: overthinking behavior detection and enabling efficient reasoning on simple problems. Our work provides new insights into the internal mechanisms of reasoning in LRMs and offers practical tools for controlling their reasoning behaviors. Our code is available at https://github.com/AlphaLab-USTC/LRM-plans-CoT.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。