2025-10-16 · 专家 · 自然语言处理 · 机器学习

Attention Illuminates LLM Reasoning: The Preplan-and-Anchor Rhythm Enables Fine-Grained Policy Optimization

这篇论文通过分析注意力机制,揭示了大型语言模型(LLMs)推理中的内在节奏,并提出了一种基于此的细粒度强化学习策略,以优化LLMs的推理过程。

更新于 2025-10-17。作者:Yang Li、Zhichen Dong、Yuhan Sun、Weixun Wang、Shaopan Xiong、Yijia Luo、Jiashun Liu、Han Lu、Jiamang Wang、Wenbo Su、Bo Zheng、Junchi Yan。

中文摘要

大型语言模型(LLMs)的推理模式仍然难以理解,强化学习(RL)通常在整个生成过程中给予统一的信用分配,模糊了关键步骤和常规步骤之间的区别。这项工作将注意力定位为一种特权基础,使得LLMs的内部逻辑变得可读,而不仅仅是计算的副产品,而是推理本身的机制蓝图。我们首先区分了注意力头在局部和全局信息处理之间的差异,并揭示出局部关注的头部在斜对角线附近产生锯齿状模式,指示短语块,而全局关注的头部则暴露出对后续标记产生广泛影响的标记。我们用两个指标将这些现象形式化:1)窗口平均注意力距离,衡量在剪裁窗口内向后注意力的程度;2)未来注意力影响,量化一个标记的全球重要性,即它从后续标记那里平均接收到的注意力。将这些信号综合起来,揭示了一个反复出现的预规划-锚定机制,其中模型首先执行长距离上下文参考以生成介绍性标记,随后立即跟随或与组织后续推理的语义锚定标记相吻合。利用这些洞察,我们引入了三种新的RL策略,这些策略动态地对关键节点(预规划标记、锚定标记及其时间耦合)进行针对性的信用分配,并在各种推理任务中显示出一致的性能提升。通过将优化与模型的内在推理节奏对齐,我们旨在将不透明的优化转化为可操作的结构感知过程,希望为LLMs推理的更透明和有效的优化提供一个可能的步骤。

英文摘要

The reasoning pattern of Large language models (LLMs) remains opaque, and Reinforcement learning (RL) typically applies uniform credit across an entire generation, blurring the distinction between pivotal and routine steps. This work positions attention as a privileged substrate that renders the internal logic of LLMs legible, not merely as a byproduct of computation, but as a mechanistic blueprint of reasoning itself. We first distinguish attention heads between locally and globally focused information processing and reveal that locally focused heads produce a sawtooth pattern near the diagonal indicating phrasal chunks, while globally focused heads expose tokens that exert broad downstream influence over future tokens. We formalize these with two metrics: 1) Windowed Average Attention Distance, which measures the extent of backward attention within a clipped window; 2) Future Attention Influence, which quantifies a token's global importance as the average attention it receives from subsequent tokens. Taken together, these signals reveal a recurring preplan-and-anchor mechanism, where the model first performs a long-range contextual reference to generate an introductory token, which is immediately followed by or coincides with a semantic anchor token that organizes subsequent reasoning. Leveraging these insights, we introduce three novel RL strategies that dynamically perform targeted credit assignment to critical nodes (preplan tokens, anchor tokens, and their temporal coupling) and show consistent performance gains across various reasoning tasks. By aligning optimization with the model's intrinsic reasoning rhythm, we aim to transform opaque optimization into an actionable structure-aware process, hoping to offer a potential step toward more transparent and effective optimization of LLM reasoning.

解读

一句话总结

这篇论文通过分析注意力机制,揭示了大型语言模型(LLMs)推理中的内在节奏,并提出了一种基于此的细粒度强化学习策略,以优化LLMs的推理过程。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源