用新方法找出大模型中可解释的提示特异性注意力机制
Finding Interpretable Prompt-Specific Circuits in Language Models
- 基于注意力因果通信原理,单次前向传播即可定位关键信号与组件
- 发现多数信号能用自然语言描述,且提示结构决定注意力路径
- 适用于分析跨语言任务中的共享与差异机制,适合模型可解释性研究者
理解语言模型内部解决任务的机制仍是可解释性研究的核心挑战。关键在于厘清每个注意力头为何关注特定词元。为此,我们提出ACC++,一种基于注意力因果通信(ACC)原理的改进型电路追踪方法,能识别引发注意力的低维子空间信号。ACC++仅需一次前向传播,无需替换模型或插值。所提取的电路包含对注意力决策起因果作用的组件及其间传递的信号。我们首先阐述其相对于以往工作的概念进步;随后发现,在多个模型中,大量ACC++信号具有可解释性:许多信号可被简明自然语言描述。进一步分析揭示:在间接宾语识别(IOI)任务中,提示特异性电路形成清晰聚类,不同聚类中注意力头接收系统性不同的信号,对应不同识别机制。在多语言IOI中,虽组件跨语言复用,但信号常具语言特异性;四语言案例显示,跨语言电路距离与语言亲缘关系一致。这些结果表明,ACC++可深入揭示模型行为的多样性。
原文摘要 · Abstract (English)
Understanding the internal circuits that language models use to solve tasks remains a central challenge in mechanistic interpretability. A crucial part of finding circuits is understanding why each attention head attends where it does. To this end, we introduce ACC++, an improved circuit-tracing method based on the principle of attention-causal communication (ACC) [1], which identifies signals, i.e., contents of low dimensional subspaces that cause attention on a token pair. ACC++ extracts circuits from a single forward pass, without replacement models or patching. Circuits identified by ACC++ consist of components that are causal for the model's attention decisions, together with the low-dimensional signals used to communicate between them. Here, we first detail the conceptual advances that ACC++ makes over previous work. We then show that across multiple models, a substantial portion of ACC++ signals are interpretable: many signals admit a short natural-language description. We next present a number of new insights into model behavior obtained via ACC++. First, we use ACC++'s interpretable circuits to characterize the sensitivity of indirect object identification (IOI) circuits to prompt structure. We find that prompt-specific circuits form well-defined clusters, and across clusters, heads receive systematically different signals corresponding to distinct mechanisms for identifying the IO name. Next, in multilingual IOI, ACC++ circuits show that while model components are reused across languages, signals are often language-specific. In a four-language IOI case study, cross-language circuit distances are consistent with linguistic relatedness. Together, these results show that ACC++ can shed light on a broad spectrum of model behaviors.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。