解锁未来:探索大语言模型中的前瞻规划机制可解释性
Unlocking the Future: Exploring Look-Ahead Planning Mechanistic Interpretability in Large Language Models
AI总结:
本研究从信息流与内部表征视角探索大语言模型前瞻规划机制,发现中间层MHSA可解码决策、其信息来自目标与近期步骤、中上层编码短期未来决策,为LLM规划相关研究提供支撑。
摘要:
规划作为智能体的核心模块,在具身智能体、网页导航、工具使用等诸多领域至关重要。随着大语言模型(LLMs)的发展,部分研究者将大语言模型视作智能体,以激发并评估其规划能力。然而,规划的内在机制仍不明确。本研究从信息流与内部表征的视角出发,探索大语言模型中的前瞻规划机制。首先,我们通过分析最后一个token处的多层感知机(MLP)与多头自注意力(MHSA)组件,研究规划在内部是如何完成的。我们发现,中间层最后一个token处的MHSA输出在一定程度上可直接解码出决策。基于这一发现,我们进一步通过信息流追溯MHSA的信息来源,揭示出MHSA主要从目标状态与最近步骤的文本片段中提取信息。依据信息流,我们继续研究其中编码了何种信息。具体而言,我们探究未来决策是否已提前编码在信息流的表征中。我们证实,当规划成功时,中上层在一定程度上编码了少量短期未来决策。总体而言,本研究分析了大语言模型的前瞻规划机制,为未来大语言模型执行规划任务的相关研究提供了助力。
英文摘要:
Planning, as the core module of agents, is crucial in various fields such as embodied agents, web navigation, and tool using. With the development of large language models (LLMs), some researchers treat large language models as intelligent agents to stimulate and evaluate their planning capabilities. However, the planning mechanism is still unclear. In this work, we focus on exploring the look-ahead planning mechanism in large language models from the perspectives of information flow and internal representations. First, we study how planning is done internally by analyzing the multi-layer perception (MLP) and multi-head self-attention (MHSA) components at the last token. We find that the output of MHSA in the middle layers at the last token can directly decode the decision to some extent. Based on this discovery, we further trace the source of MHSA by information flow, and we reveal that MHSA mainly extracts information from spans of the goal states and recent steps. According to information flow, we continue to study what information is encoded within it. Specifically, we explore whether future decisions have been encoded in advance in the representation of flow. We demonstrate that the middle and upper layers encode a few short-term future decisions to some extent when planning is successful. Overall, our research analyzes the look-ahead planning mechanisms of LLMs, facilitating future research on LLMs performing planning tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。