arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.00340cs.LGcs.AIcs.CL
收藏

稀疏注意力分解应用于电路追踪

Sparse Attention Decomposition Applied to Circuit Tracing

Boston University(波士顿大学)

Gabriel Franco, Mark Crovella

AI总结:

本研究提出基于注意力头矩阵奇异向量的稀疏注意力分解方法,分离识别GPT-2 small中注意力头通信特征,在IOI任务电路追踪中发现更多冗余路径细节与通信特征。

摘要:

已有诸多研究表明,注意力头会协同工作以执行复杂任务。学界通常假设,注意力头之间的通信是通过向词元残差中添加特定特征实现的。本研究旨在分离并识别GPT-2 small中注意力头之间用于实现通信与协调的特征。我们解决该问题的核心切入点是证明这些特征通常以稀疏方式编码在注意力头矩阵的奇异向量中。我们针对间接宾语识别(Indirect Object Identification, IOI)任务,表征了GPT-2 small各注意力头中这类信号的维度与出现情况。注意力头奇异向量提供的信号稀疏编码,可高效将信号从残差背景中分离,并直接识别注意力头之间的通信路径。我们通过追踪IOI任务所用电路的部分结构,探索了该方法的有效性。我们的追踪结果揭示了此前研究未发现的大量细节,阐明了GPT-2中冗余路径的特性;且我们的追踪超越了此前研究,识别出了执行IOI任务时注意力头之间用于通信的特征。

英文摘要:

Many papers have shown that attention heads work in conjunction with each other to perform complex tasks. It's frequently assumed that communication between attention heads is via the addition of specific features to token residuals. In this work we seek to isolate and identify the features used to effect communication and coordination among attention heads in GPT-2 small. Our key leverage on the problem is to show that these features are very often sparsely coded in the singular vectors of attention head matrices. We characterize the dimensionality and occurrence of these signals across the attention heads in GPT-2 small when used for the Indirect Object Identification (IOI) task. The sparse encoding of signals, as provided by attention head singular vectors, allows for efficient separation of signals from the residual background and straightforward identification of communication paths between attention heads. We explore the effectiveness of this approach by tracing portions of the circuits used in the IOI task. Our traces reveal considerable detail not present in previous studies, shedding light on the nature of redundant paths present in GPT-2. And our traces go beyond previous work by identifying features used to communicate between attention heads when performing IOI.

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

↑