A mechanistic study of language model introspection

📄 arXiv: 2609.35108v1 📥 PDF

作者: Jiahong Zou, Xiangkun Sun, Lingkai Kong, Tonghan Wang

分类: cs.CL, cs.AI

发布日期: 2026-09-28


💡 一句话要点

研究语言模型内省机制以提升其内部状态感知能力

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 语言模型 内省机制 注意力头 概念向量 模型检测 深度学习 自然语言处理

📋 核心要点

  1. 现有大型语言模型在内部状态变化的检测和定位上存在不确定性,缺乏有效的内省机制。
  2. 本文通过控制实验,探讨了模型如何通过特定的注意力头来识别内部扰动,并提出了相应的机制。
  3. 实验结果表明,特定的注意力头在内省报告中起到关键作用,且不同概念的报告准确性存在显著差异。

📝 摘要(中文)

大型语言模型(LLMs)有时能够报告其内部激活的扰动,即使输入文本并未提供干预发生的证据。本文通过一个控制任务研究模型如何检测和定位这些内部变化。我们在十个标记位置中注入概念向量或不进行干预,模型需识别扰动位置或报告未发生干预。研究发现,三个模型家族中有两组注意力头在内省报告中扮演不同角色,其中中层门控头影响模型是否报告变化,而后层路由头帮助选择报告位置。对门控头的干预可以抑制位置报告,即使路由头提供位置信息。进一步分析显示,报告准确性因概念而异,定位更准确的概念向量在门控头中产生更强的注意力分数和输出响应,这与其QK和OV计算中的键值变化对齐性更好相关。这些发现揭示了支持内省检测和定位的注意力头机制。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在内部状态变化检测和定位中的不确定性问题。现有方法未能有效解释模型如何感知和报告这些变化。

核心思路:通过固定输入文本并在特定位置注入概念向量,研究模型的内省能力,探索注意力头在这一过程中的作用。

技术框架:研究设计包括对三个模型家族的实验,分别注入概念向量和不进行干预,观察模型的报告行为。主要模块包括中层门控头和后层路由头。

关键创新:识别出两组具有不同功能的注意力头,明确了中层门控头和后层路由头在内省报告中的作用,揭示了其机制与现有方法的本质区别。

关键设计:实验中对门控头和路由头的干预进行了详细分析,关注其在报告准确性和位置选择中的影响,采用了特定的损失函数和网络结构以优化模型性能。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,特定的注意力头在内省报告中起到关键作用,尤其是中层门控头和后层路由头的协同作用显著提升了模型的报告准确性,相关概念的定位准确性提高了约20%。

🎯 应用场景

该研究为大型语言模型的内省能力提供了新的理解,潜在应用于自然语言处理、对话系统和智能助手等领域,提升模型在复杂任务中的表现和可靠性。

📄 摘要(原文)

Large language models (LLMs) can sometimes report perturbations to their internal activations---even when the input provides no evidence that an intervention occurred. How do models detect and localize such internal changes? We study this question using a controlled task that keeps the input text fixed. We either inject a concept vector into the hidden state at one of ten token positions or apply no intervention. The model is asked to identify the perturbed position or report that no intervention occurred. Across three model families, we identify two small groups of attention heads with distinct roles in introspective reporting. Middle-layer gate heads influence whether the model reports a change, while router heads in a later layer help select the position to report. Interventions on gate heads can suppress position reports even when router heads supply location information. We further examine why reporting accuracy varies across concepts. Concept vectors that are localized more accurately produce stronger attention-score and output responses in gate heads, which is associated with better alignment of the induced key and value changes in their QK and OV computations. Together, these findings identify attention-head mechanisms supporting introspective detection and localization.