通过残差化设计,让多层Transformer干预更高效准确。
ReSAE: Residualized Sparse Autoencoders for Multi-Layer Transformer Interventions
- 在残差流上训练稀疏自编码器,逐层处理未解释残差。
- 在Pythia-1.4B和Gemma-2-9B上减少解码冗余,提升探测与扰动效果。
- 适合做多层干预研究,尤其在教师强制和高稀疏性场景下表现优。
稀疏自编码器通常逐层训练,但Transformer的残差流在深度间强耦合,导致多层干预时不同层词典重复表示相同信息,且多层替换产生单层无法预测的交互。本文提出残差化稀疏自编码器(ReSAE),在选定层之间拟合仿射映射,并在未解释残差上训练后续层的SAE,重建结果通过拟合的仿射链映射回原始激活空间,可沿用传统干预协议。在Pythia-1.4B和Gemma-2-9B上,残差化降低了解码冗余,提升了稀疏探测与目标扰动性能。尽管重构原始激活方差较少,但在多层替换下,ReSAE恢复了更高的交叉熵,尤其在教师强制和足够稀疏条件下优势明显,表明其保留了对下游计算最相关的激活成分。结果说明,移除线性可预测的跨层结构是多层干预的有益默认策略。
原文摘要 · Abstract (English)
Sparse autoencoders are usually trained one layer at a time, even though transformer residual stream activations are strongly coupled across depth. This creates a practical problem for multi-layer interventions: different layerwise dictionaries can spend capacity representing the same carried-forward information, and replacing several layers at once can produce interactions that are not predicted by single-layer behavior. We introduce Residualized Sparse Autoencoders (ReSAEs), which fit an affine map between selected layers and train each later-layer SAE on the unexplained residual rather than on the full activation. Reconstructions are mapped back into the original activation space through the fitted affine chain, so ReSAEs can be evaluated with the same intervention protocols as ordinary SAEs. On Pythia-1.4B and Gemma-2-9B, residualization reduces decoder redundancy and improves sparse probing and targeted perturbation in most tested settings. Despite reconstructing less of the raw activation variance, ReSAEs recover more transformer cross entropy under multi-layer replacement. This gain is clearest under teacher-forcing and at sufficient sparsity online, indicating that ReSAEs preserve the components of the activation most relevant to the model's downstream computation. These results suggest that removing linearly predictable cross-layer structure is a useful default for multi-layer SAE interventions.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。