arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.02124cs.LGcs.AI
收藏

自适应稀疏分配与互选及特征选择稀疏自编码器

Adaptive Sparse Allocation with Mutual Choice & Feature Choice Sparse Autoencoders

MATS

Kola Ayonrinde

AI总结:

针对TopK SAEs固定每token活跃特征数的局限,提出特征选择与互选SAEs,实现自适应稀疏分配,并引入aux_zipf_loss减少死特征,提升重建质量。

摘要:

稀疏自编码器(SAEs)是一种从神经网络中提取特征的有前景的方法,能够实现模型可解释性以及对模型内部进行因果干预。SAEs 通过一个稀疏化激活函数生成稀疏特征表示,该函数隐式定义了一组 token-特征匹配。我们将 token-特征匹配视为一个受总稀疏度上界约束的资源分配问题。例如,TopK SAEs 在额外约束每个 token 最多匹配 k 个特征的条件下解决该分配问题。在 TopK SAEs 中,每个 token 的 k 个活跃特征约束在所有 token 间是相同的,尽管某些 token 比其他 token 更难重建。为了解决这一局限,我们提出了两种新的 SAE 变体:特征选择 SAEs(Feature Choice SAEs)和互选 SAEs(Mutual Choice SAEs),它们各自允许每个 token 具有可变数量的活跃特征。特征选择 SAEs 在额外约束每个特征最多匹配 m 个 token 的条件下解决稀疏分配问题。互选 SAEs 解决无限制的分配问题,其中总稀疏度预算可以在 token 和特征之间自由分配。此外,我们引入了一个新的辅助损失函数 aux_zipf_loss,它推广了 aux_k_loss 以缓解死特征和利用不足的特征。我们的方法使得 SAEs 具有更少的死特征,并且在等效稀疏度水平下,由于固有的自适应计算,重建损失得到改善。更准确且可扩展的特征提取方法为更好地理解和更精确地控制基础模型提供了途径。

英文摘要:

Sparse autoencoders (SAEs) are a promising approach to extracting features from neural networks, enabling model interpretability as well as causal interventions on model internals. SAEs generate sparse feature representations using a sparsifying activation function that implicitly defines a set of token-feature matches. We frame the token-feature matching as a resource allocation problem constrained by a total sparsity upper bound. For example, TopK SAEs solve this allocation problem with the additional constraint that each token matches with at most $k$ features. In TopK SAEs, the $k$ active features per token constraint is the same across tokens, despite some tokens being more difficult to reconstruct than others. To address this limitation, we propose two novel SAE variants, Feature Choice SAEs and Mutual Choice SAEs, which each allow for a variable number of active features per token. Feature Choice SAEs solve the sparsity allocation problem under the additional constraint that each feature matches with at most $m$ tokens. Mutual Choice SAEs solve the unrestricted allocation problem where the total sparsity budget can be allocated freely between tokens and features. Additionally, we introduce a new auxiliary loss function, $\mathtt{aux\_zipf\_loss}$, which generalises the $\mathtt{aux\_k\_loss}$ to mitigate dead and underutilised features. Our methods result in SAEs with fewer dead features and improved reconstruction loss at equivalent sparsity levels as a result of the inherent adaptive computation. More accurate and scalable feature extraction methods provide a path towards better understanding and more precise control of foundation models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑