定位与编辑 Mamba 中的事实关联
Locating and Editing Factual Associations in Mamba
AI总结:
本文通过因果追踪、秩一编辑、线性分析和注意力剔除四组实验,系统研究了 Mamba 状态空间模型中的事实回忆机制,发现其与同规模自回归 transformer 语言模型在事实回忆的局部化和可编辑性上高度相似。
摘要:
我们研究了 Mamba 状态空间模型中事实回忆的机制。我们的工作受到先前关于自回归 transformer 语言模型的研究发现的启发,这些发现表明其知识回忆被局部化到特定 token 位置的特定模块;因此我们探究 Mamba 中的事实回忆是否也能被类似地局部化。为此,我们在 Mamba 上进行了四组实验。首先,我们应用因果追踪或互换干预来定位 Mamba 内部负责回忆事实的关键组件,结果表明中间层内的特定组件在主语最后一个 token 处表现出强烈的因果效应,而对更靠后层的干预在提示的最后一个 token 处因果效应最为显著,这与先前在自回归 transformer 上的发现一致。其次,我们表明秩一模型编辑方法可以在特定位置成功插入事实,这同样与 transformer 语言模型上的发现相似。第三,我们检验了 Mamba 对事实关系表示的线性程度。最后,我们将注意力剔除技术适配到 Mamba 上,以剖析事实回忆过程中的信息流。我们将 Mamba 与规模相近的自回归 transformer 语言模型直接比较,并得出结论:尽管在架构方法上存在显著差异,但在事实回忆方面,这两种架构具有许多相似之处。
英文摘要:
We investigate the mechanisms of factual recall in the Mamba state space model. Our work is inspired by previous findings in autoregressive transformer language models suggesting that their knowledge recall is localized to particular modules at specific token locations; we therefore ask whether factual recall in Mamba can be similarly localized. To investigate this, we conduct four lines of experiments on Mamba. First, we apply causal tracing or interchange interventions to localize key components inside Mamba that are responsible for recalling facts, revealing that specific components within middle layers show strong causal effects at the last token of the subject, while the causal effect of intervening on later layers is most pronounced at the last token of the prompt, matching previous findings on autoregressive transformers. Second, we show that rank-one model editing methods can successfully insert facts at specific locations, again resembling findings on transformer LMs. Third, we examine the linearity of Mamba's representations of factual relations. Finally we adapt attention-knockout techniques to Mamba in order to dissect information flow during factual recall. We compare Mamba directly to a similar-sized autoregressive transformer LM and conclude that despite significant differences in architectural approach, when it comes to factual recall, the two architectures share many similarities.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。