arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.14925cs.LGcs.AI
收藏

通过动态注意力改进稀疏自编码器

Improving Sparse Autoencoder with Dynamic Attention

College of Computer Science and Software Engineering, Shenzhen University, China(深圳大学计算机科学与软件工程学院)

Dongsheng Wang, Jinsen Zhang, Dawei Su, Hui Huang

AI总结:

本文提出基于交叉注意力架构的新型稀疏自编码器,利用sparsemax实现动态稀疏注意力机制,有效平衡稀疏性与重建性能,在top-n分类任务中取得高质量概念生成。

摘要:

近年来,稀疏自编码器(SAEs)作为一种解释基础模型激活的有前景技术,通过将特征解耦为稀疏概念集。然而,实践中确定每个神经元的最佳稀疏水平仍具挑战性:过度稀疏会导致重建性能下降,而不足稀疏可能损害可解释性。现有激活函数如ReLU和TopK提供一定稀疏性保证,但通常需要额外稀疏性正则化或精心挑选的超参数。本文表明,通过使用sparsemax的动态稀疏注意力机制可弥合这一权衡,因其能根据数据依赖性确定激活数量。具体而言,我们首先探索了一种基于交叉注意力架构的新类SAEs,其中潜在特征作为查询,可学习字典作为键值矩阵。为鼓励稀疏模式学习,我们采用基于sparsemax的注意力策略,根据每个神经元的复杂性自动推断稀疏元素集,从而获得更灵活通用的激活函数。通过全面评估和可视化,我们展示了我们的方法在降低重建损失的同时生成高质量的概念,特别是在top-n分类任务中。

英文摘要:

Recently, sparse autoencoders (SAEs) have emerged as a promising technique for interpreting activations in foundation models by disentangling features into a sparse set of concepts. However, identifying the optimal level of sparsity for each neuron remains challenging in practice: excessive sparsity can lead to poor reconstruction, whereas insufficient sparsity may harm interpretability. While existing activation functions such as ReLU and TopK provide certain sparsity guarantees, they typically require additional sparsity regularization or cherry-picked hyperparameters. We show in this paper that dynamically sparse attention mechanisms using sparsemax can bridge this trade-off, due to their ability to determine the activation numbers in a data-dependent manner. Specifically, we first explore a new class of SAEs based on the cross-attention architecture with the latent features as queries and the learnable dictionary as the key and value matrices. To encourage sparse pattern learning, we employ a sparsemax-based attention strategy that automatically infers a sparse set of elements according to the complexity of each neuron, resulting in a more flexible and general activation function. Through comprehensive evaluation and visualization, we show that our approach successfully achieves lower reconstruction loss while producing high-quality concepts, particularly in top-n classification tasks.

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

↑