arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.08744cs.CLcs.LG
收藏

Transformer语言模型中跨任务的电路组件复用

Circuit Component Reuse Across Tasks in Transformer Language Models

Brown University(布朗大学);University of Tübingen(蒂宾根大学)

Jack Merullo, Carsten Eickhoff, Ellie Pavlick

AI总结:

本文通过分析间接宾语识别与彩色物体任务中电路的重用情况,证明语言模型行为可由少量任务通用的可解释算法组件构成,并通过干预实验将彩色物体任务准确率从49.6%提升至93.7%。

摘要:

近期机制可解释性方面的工作表明,语言模型中的行为可以通过电路分析被成功逆向工程。然而,一个常见的批评是,每个电路都是任务特定的,因此这种分析无法有助于在更高层面上理解模型。在这项工作中,我们提出证据表明,洞察(既包括关于特定注意力头的低层次发现,也包括关于通用算法的高层次发现)确实可以跨任务泛化。具体来说,我们研究了Wang等人(2022)为间接宾语识别(IOI)任务发现的电路,并1)表明该电路在一个更大的GPT2模型上可以复现,2)该电路大部分被复用来解决一个看似不同的任务:彩色物体(Colored Objects,Ippolito & Callison-Burch,2023)。我们提供证据表明,这两个任务背后的过程在功能上非常相似,并且在电路内的注意力头中约有78%的重叠。我们进一步提出了一个概念验证干预实验,在该实验中,我们调整中间层的四个注意力头,以“修复”彩色物体电路并使其表现得像IOI电路。通过这样做,我们将彩色物体任务上的准确率从49.6%提升到93.7%,并解释了大多数错误来源。该干预以IOI电路中注意力头之间相互作用所预测的特定方式影响下游注意力头,表明该子电路行为对不同任务输入具有不变性。总体而言,我们的结果提供证据表明,或许仍有可能用相对较少的可解释的任务通用算法构建块和计算组件来解释大型语言模型的行为。

英文摘要:

Recent work in mechanistic interpretability has shown that behaviors in language models can be successfully reverse-engineered through circuit analysis. A common criticism, however, is that each circuit is task-specific, and thus such analysis cannot contribute to understanding the models at a higher level. In this work, we present evidence that insights (both low-level findings about specific heads and higher-level findings about general algorithms) can indeed generalize across tasks. Specifically, we study the circuit discovered in Wang et al. (2022) for the Indirect Object Identification (IOI) task and 1.) show that it reproduces on a larger GPT2 model, and 2.) that it is mostly reused to solve a seemingly different task: Colored Objects (Ippolito & Callison-Burch, 2023). We provide evidence that the process underlying both tasks is functionally very similar, and contains about a 78% overlap in in-circuit attention heads. We further present a proof-of-concept intervention experiment, in which we adjust four attention heads in middle layers in order to 'repair' the Colored Objects circuit and make it behave like the IOI circuit. In doing so, we boost accuracy from 49.6% to 93.7% on the Colored Objects task and explain most sources of error. The intervention affects downstream attention heads in specific ways predicted by their interactions in the IOI circuit, indicating that this subcircuit behavior is invariant to the different task inputs. Overall, our results provide evidence that it may yet be possible to explain large language models' behavior in terms of a relatively small number of interpretable task-general algorithmic building blocks and computational components.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑