arXiv:2410.14670cs.LG2024-10被引 47

发现稀疏自编码器中一半误差可由初始激活线性预测,揭示模型未解释部分的本质。

Decomposing The Dark Matter of Sparse Autoencoders

  • 用线性回归预测自编码器误差,发现近半误差来自初始激活
  • 大模型自编码器重构能力与小模型相似,误差规模具可预测性
  • 非线性误差部分更难学习,影响下游任务性能

稀疏自编码器(SAEs)能将语言模型激活分解为可解释的线性特征,但仍有大量未解释的方差存在,称为“暗物质”。本文首次将暗物质本身作为研究对象。结果发现,约一半的误差向量及其超过90%的范数可被初始激活向量线性预测。此外,每令牌级别的自编码器误差范数具有显著可预测的缩放规律:更大模型的重构困难与小模型并无本质区别。基于线性表示假设,提出可能的激活建模机制。进一步实证表明:不可线性预测的“非线性误差”包含更少未学习特征,训练其上的SAE表现更差,且在插入模型后导致成比例的交叉熵损失上升。最后评估两种减少非线性误差的方法:推理时梯度追踪仅小幅降低误差,而使用前层SAE输出的线性变换则带来更显著改善。

原文摘要 · Abstract (English)

Sparse autoencoders (SAEs) are a promising technique for decomposing language model activations into interpretable linear features. However, current SAEs fall short of completely explaining model performance, resulting in "dark matter": unexplained variance in activations. This work investigates dark matter as an object of study in its own right. Surprisingly, we find that much of SAE dark matter -- about half of the error vector itself and >90% of its norm -- can be linearly predicted from the initial activation vector. Additionally, we find that the scaling behavior of SAE error norms at a per token level is remarkably predictable: larger SAEs mostly struggle to reconstruct the same contexts as smaller SAEs. We build on the linear representation hypothesis to propose models of activations that might lead to these observations. These insights imply that the part of the SAE error vector that cannot be linearly predicted ("nonlinear" error) might be fundamentally different from the linearly predictable component. To validate this hypothesis, we empirically analyze nonlinear SAE error and show that 1) it contains fewer not yet learned features, 2) SAEs trained on it are quantitatively worse, and 3) it is responsible for a proportional amount of the downstream increase in cross entropy loss when SAE activations are inserted into the model. Finally, we examine two methods to reduce nonlinear SAE error: inference time gradient pursuit, which leads to a very slight decrease in nonlinear error, and linear transformations from earlier layer SAE outputs, which leads to a larger reduction.

自编码器模型解释暗物质线性预测

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。