分解注意力以发现上下文敏感神经元
Decomposing Attention To Find Context-Sensitive Neurons
AI总结:
本研究针对Transformer语言模型中注意力分散、内容依赖弱的注意力头,利用校准文本采样稳定的softmax分母组合头输出,仅靠权重和单份校准文本即可发现GPT2-Small第一层中数百个响应高级上下文属性的神经元。
摘要:
我们研究Transformer语言模型,分析注意力模式分散、注意力得分对内容依赖性较弱的注意力头。我们认为,当底层词元分布固定时,这些注意力头的softmax分母是稳定的。通过从“校准文本”中采样softmax分母,我们可以将GPT2-Small第一层中多个此类稳定头的输出组合在一起,用周围文本的线性摘要近似它们的组合输出。这种近似催生了一种流程:仅通过权重和单份校准文本,我们就能发现数百个对周围文本的高级上下文属性做出响应的第一层神经元,包括那些在校准文本上未被激活的神经元。
英文摘要:
We study transformer language models, analyzing attention heads whose attention patterns are spread out, and whose attention scores depend weakly on content. We argue that the softmax denominators of these heads are stable when the underlying token distribution is fixed. By sampling softmax denominators from a "calibration text", we can combine together the outputs of multiple such stable heads in the first layer of GPT2-Small, approximating their combined output by a linear summary of the surrounding text. This approximation enables a procedure where from the weights alone - and a single calibration text - we can uncover hundreds of first layer neurons that respond to high-level contextual properties of the surrounding text, including neurons that didn't activate on the calibration text.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。