谱滤波器、暗信号与注意力汇聚
Spectral Filters, Dark Signals, and Attention Sinks
AI总结:
本文扩展了logit lens方法,提出基于奇异向量分带的谱滤波器,发现频谱尾端信号导致注意力汇聚现象,且保留该现象可大幅抑制嵌入谱而不增加预训练模型损失。
摘要:
将中间表示投影到词汇表上是基于Transformer的LLM日益流行的解释工具,也称为logit lens。我们提出对该方法的定量扩展,并基于将词汇表嵌入矩阵和反嵌入矩阵的奇异向量划分为频带,定义了中间表示上的谱滤波器。我们发现频谱尾端交换的信号导致了注意力汇聚(Xiao et al. 2023),并对此提供了解释。我们发现,只要保留注意力汇聚,尽管以依赖层的方式抑制了嵌入谱的相当大部分,预训练模型的损失仍能保持在较低水平。最后,我们发现吸引众多token注意力的token表示在频谱尾端具有很大的投影。
英文摘要:
Projecting intermediate representations onto the vocabulary is an increasingly popular interpretation tool for transformer-based LLMs, also known as the logit lens. We propose a quantitative extension to this approach and define spectral filters on intermediate representations based on partitioning the singular vectors of the vocabulary embedding and unembedding matrices into bands. We find that the signals exchanged in the tail end of the spectrum are responsible for attention sinking (Xiao et al. 2023), of which we provide an explanation. We find that the loss of pretrained models can be kept low despite suppressing sizable parts of the embedding spectrum in a layer-dependent way, as long as attention sinking is preserved. Finally, we discover that the representation of tokens that draw attention from many tokens have large projections on the tail end of the spectrum.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。