让语言模型自带可解释性,通过TopK机制直接生成稀疏激活特征。
TopK Language Models
- 在模型中引入TopK激活函数,使隐藏状态等价于稀疏自编码器的潜在特征。
- 无需事后训练即可实现与SAE相当的可解释性,且特征稳定可靠。
- 适合关注模型内部机制、概念学习过程的研究者使用。
稀疏自编码器(SAEs)已成为分析和解释基于Transformer的语言模型(LMs)激活空间的重要工具。然而,由于SAEs是事后训练的,无法判断某一概念未被发现是因模型本身缺乏表征能力,还是因自编码器自身缺陷。此外,训练条件和架构选择会影响所学特征,导致特征不稳定,难以跨检查点比较。为此,我们提出一种改进的Transformer架构,在特定层引入TopK激活函数,使模型的隐藏状态等价于一个TopK SAE的潜在特征。该方法无需事后训练,同时保持与SAE相当的可解释性。实验表明,由TopK LMs学习到的稀疏表示支持有效的定向神经元干预,并能详细分析不同检查点和层间神经元形成过程。这些特性使TopK LMs成为理解语言模型如何学习和表征概念的稳定可靠工具,有望显著推动未来对模型可解释性和可控性的研究。
原文摘要 · Abstract (English)
Sparse autoencoders (SAEs) have become an important tool for analyzing and interpreting the activation space of transformer-based language models (LMs). However, SAEs suffer several shortcomings that diminish their utility and internal validity. Since SAEs are trained post-hoc, it is unclear if the failure to discover a particular concept is a failure on the SAE's side or due to the underlying LM not representing this concept. This problem is exacerbated by training conditions and architecture choices affecting which features an SAE learns. When tracing how LMs learn concepts during training, the lack of feature stability also makes it difficult to compare SAEs features across different checkpoints. To address these limitations, we introduce a modification to the transformer architecture that incorporates a TopK activation function at chosen layers, making the model's hidden states equivalent to the latent features of a TopK SAE. This approach eliminates the need for post-hoc training while providing interpretability comparable to SAEs. The resulting TopK LMs offer a favorable trade-off between model size, computational efficiency, and interpretability. Despite this simple architectural change, TopK LMs maintain their original capabilities while providing robust interpretability benefits. Our experiments demonstrate that the sparse representations learned by TopK LMs enable successful steering through targeted neuron interventions and facilitate detailed analysis of neuron formation processes across checkpoints and layers. These features make TopK LMs stable and reliable tools for understanding how language models learn and represent concepts, which we believe will significantly advance future research on model interpretability and controllability.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。