arXiv:2605.06610cs.LGcs.CV2026-05被引 1

让自编码器自动调节激活特征数,更精准捕捉输入复杂度

SoftSAE: Dynamic Top-K Selection for Adaptive Sparse Autoencoders

论文配图:SoftSAE: Dynamic Top-K Selection for Adaptive Sparse Autoencoders
图 1 · 摘自论文原文
  • 用可微软Top-K动态调整每条输入的激活特征数量
  • 在真实数据上提升特征可解释性,避免固定稀疏度带来的误差
  • 适合需要精细解释模型内部机制的研究者使用

稀疏自编码器(SAEs)已成为理解大语言模型(LLMs)和视觉变压器(ViTs)内部表示的重要工具,通过将多义激活分解为稀疏的单义特征集,帮助将神经网络计算转化为人类可理解的概念。然而,常见的TopK SAE架构采用固定的稀疏度,对所有输入强制相同的活跃特征数(K),忽略了真实数据中不同样本的复杂度差异。自然数据常位于具有可变局部内在维度的流形上,意味着相关因素数量在样本间可能显著变化。因此,固定稀疏度并非最优选择:简单输入仅需少数特征,复杂输入则需更强表达能力。固定K值在简单情形下引入噪声,在复杂情形下可能遗漏关键结构。为此,本文提出SoftSAE,一种具备动态Top-K选择机制的稀疏自编码器。该方法使用可微软Top-K算子学习输入相关的稀疏度k,使模型可根据每个输入的复杂度动态调整活跃特征数。结果表明,该方法不仅能发现有意义的特征,还能为每个概念选择合适的特征数量。代码已开源:https://github.com/St0pien/SoftSAE。

原文摘要 · Abstract (English)

Sparse Autoencoders (SAEs) have become an important tool in mechanistic interpretability, helping to analyze internal representations in both Large Language Models (LLMs) and Vision Transformers (ViTs). By decomposing polysemantic activations into sparse sets of monosemantic features, SAEs aim to translate neural network computations into human-understandable concepts. However, common architectures such as TopK SAEs rely on a fixed sparsity level. They enforce the same number of active features (K) across all inputs, ignoring the varying complexity of real-world data. Natural data often lies on manifolds with varying local intrinsic dimensionality, meaning the number of relevant factors can change significantly across samples. This suggests that a fixed sparsity level is not optimal. Simple inputs may require only a few features, while more complex ones need more expressive representations. Using a constant K can therefore introduce noise in simple cases or miss important structure in more complex ones. To address this issue, we propose SoftSAE, a sparse autoencoder with a Dynamic Top-K selection mechanism. Our method uses a differentiable Soft Top-K operator to learn an input-dependent sparsity level k. This allows the model to adjust the number of active features based on the complexity of each input. As a result, the representation better matches the structure of the data, and the explanation length reflects the amount of information in the input. Experimental results confirm that SoftSAE not only finds meaningful features, but also selects the right number of features for each concept. The source code is available at: https://github.com/St0pien/SoftSAE.

稀疏自编码器可解释性动态稀疏

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