arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.01799cs.LGcs.AIcs.ITmath.IT
收藏

扩展器稀疏自编码器:面向机械可解释性的参数高效字典

Expander Sparse Autoencoders: Parameter-Efficient Dictionaries for Mechanistic Interpretability

Independent Researcher(独立研究者)

Rodrigo Mendoza-Smith

AI总结:

提出Expander SAEs,利用左d-正则扩展器掩码支持解码器和编码器,仅学习dn个解码器值,在保持稀疏编码问题不变的情况下大幅降低存储和计算成本,实验表明在多种模型上实现了存储-保真度前沿。

摘要:

稀疏自编码器(SAEs)通过拟合过完备字典 $\mathbf{W}\in\mathbb{R}^{m\times n}$($m<n$)并从 $\mathbf{h}\approx\mathbf{W}\mathbf{x}$ 推断稀疏编码 $\mathbf{x}\in\mathbb{R}^n$,将神经网络的内部激活分解为学习到的特征的稀疏线性组合。该推断问题与压缩感知的标准设置非常相似,但密集解码器需要 $O(mn)$ 个学习值,在特征数量较大时成本高昂。我们引入Expander SAEs:其解码器和绑定编码器由左 $d$ 正则扩展器掩码支持,其中 $d\ll m$,仅学习 $dn$ 个解码器值,同时保持稀疏编码问题 $(m,n,k)$ 不变。相同的结构减少了存储,并将OMP中的匹配追踪相关步骤 $\mathbf{W}^\top \mathbf{r}$ 转化为 $O(dn)$ 的收集-规约操作。我们的实验表明,在Pythia-70M/160M、Qwen2.5-3B和Llama-3.2-1B的残差流激活上,改变 $d$ 会描绘出一致的存储-保真度前沿,并且在最压缩的现代LM设置中,Qwen2.5-3B在 $d=7$ 时使用的学习解码器值比全密集解码器少 $293$ 倍,同时保留了密集CE损失恢复的 $84\\%$。控制实验表明,存储-保真度权衡的改进是由稀疏、多样的解码器支持结构驱动的,而非更少的学习解码器值;当稀疏和密集解码器在匹配参数数量下进行比较时,剩余差距的一部分来自编码器摊销。在理论方面,我们证明了扩展性和列平坦性足以识别无噪声的 $k$ 稀疏编码,并推导了OMP精确恢复支持的补充充分条件。

英文摘要:

Sparse autoencoders (SAEs) decompose internal activations of neural networks into sparse linear combinations of learned features by fitting an overcomplete dictionary $\mathbf{W}\in\mathbb{R}^{m\times n}$ with $m<n$, and inferring a sparse code $\mathbf{x}\in\mathbb{R}^n$ from $\mathbf{h}\approx\mathbf{W}\mathbf{x}$. This inference problem closely resembles the canonical setup of compressed sensing, but dense decoders requires $O(mn)$ learned values, which becomes costly at large feature counts. We introduce Expander SAEs: TopK SAEs whose decoder and tied encoder are supported on a left-$d$-regular expander mask with $d\ll m$, learning only $dn$ decoder values while keeping the sparse-coding problem $(m,n,k)$ fixed. The same structure reduces storage and turns the matching-pursuit correlation step $\mathbf{W}^\top \mathbf{r}$ in OMP into an $O(dn)$ gather-and-reduce operation. Our experiments show that across Pythia-70M/160M, Qwen2.5-3B, and Llama-3.2-1B residual-stream activations, varying $d$ traces a consistent storage--fidelity frontier, and that at the most compressed modern-LM setting, Qwen2.5-3B with $d=7$ uses $293\times$ fewer learned decoder values than the full dense decoder while retaining $84$% of dense CE-loss recovered. Control experiments show that the improved storage--fidelity tradeoff is driven by sparse, diverse decoder support structure rather than by fewer learned decoder values, and that when sparse and dense decoders are compared at matched parameter count, part of the remaining gap comes from encoder amortisation. On the theoretical side, we show that expansion and column flatness are sufficient for identifiability of noiseless $k$-sparse codes, and we derive complementary sufficient conditions under which OMP recovers the support exactly.

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

↑