大语言模型中一种新发现的神经元功能:输入输出减弱机制
Weakening Neurons: An Input-Output Functionality in Transformers with Outsize Influence
这是篇关于大模型内部工作机制的论文,作者发现了一种新发现的神经元功能,可能会帮助理解模型的行为模式。
研究人员分析了GLU神经元在大型语言模型中的输入输出行为,发现了一种名为“减弱神经元”的新机制。这种神经元主要出现在模型的后层,虽然数量不多,但激活频率高且对模型行为有重大影响。当门控值为负时,它们对模型输出有显著作用。
Weakening Neurons: An Input-Output Functionality in Transformers with Outsize Influence
We analyze the learned input-output behavior of GLU-based neurons in large language models (LLMs). We propose a simple analysis method: For each neuron, we compute the cosine similarities between its input (reading) and output (writing) weight vectors. In this scheme, a strong negative cosine similarity indicates the neuron weakens the direction it detects in the residual stream, so we call this a weakening neuron. This allows us to gain a number of novel insights. First, we show that nine different LLMs have similar patterns: weakening neurons appear mostly in late layers whereas their counterparts, (conditional) strengthening neurons, are frequent in early-middle layers. Second, we find that weakening neurons display surprising behavior: even though there are few, they activate often and have a large influence on model behavior. Third, weakening neurons have a strong effect on model output when gate values are negative -- which is surprising since negative gate values are not expected to encode functionality.