arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.06410cs.LGcs.AIstat.ML
收藏

BatchTopK 稀疏自编码器

BatchTopK Sparse Autoencoders

Durham University(杜伦大学)

Bart Bussmann, Patrick Leask, Neel Nanda

AI总结:

该研究提出BatchTopK稀疏自编码器,将TopK约束放宽至批次级别以实现样本自适应潜变量分配,在不降低平均稀疏度的前提下提升激活重建效果,性能优于TopK SAE且比肩JumpReLU SAE,还可直接指定平均潜变量数避免高成本超参数调优。

摘要:

稀疏自编码器(Sparse Autoencoders, SAEs)已成为通过将语言模型激活分解为稀疏、可解释特征来解释模型激活的有力工具。TopK SAE 是一种常用方法,它为每个样本使用固定数量的最活跃潜变量来重建模型激活。我们提出 BatchTopK SAEs,这是一种在 TopK SAEs 基础上改进的训练方法,通过将 top-k 约束放宽到批次级别,允许每个样本有可变数量的活跃潜变量。由此,BatchTopK 可根据样本自适应分配更多或更少的潜变量,在不牺牲平均稀疏度的前提下提升重建效果。我们表明,在重建 GPT-2 Small 和 Gemma 2 2B 的激活方面,BatchTopK SAEs 始终优于 TopK SAEs,且性能与当前最优的 JumpReLU SAEs 相当。不过 BatchTopK 的一个优势在于,可直接指定平均潜变量数量,无需通过成本高昂的超参数搜索进行近似调优。我们在 https://github.com/bartbussmann/BatchTopK 提供了训练和评估 BatchTopK SAEs 的代码。

英文摘要:

Sparse autoencoders (SAEs) have emerged as a powerful tool for interpreting language model activations by decomposing them into sparse, interpretable features. A popular approach is the TopK SAE, that uses a fixed number of the most active latents per sample to reconstruct the model activations. We introduce BatchTopK SAEs, a training method that improves upon TopK SAEs by relaxing the top-k constraint to the batch-level, allowing for a variable number of latents to be active per sample. As a result, BatchTopK adaptively allocates more or fewer latents depending on the sample, improving reconstruction without sacrificing average sparsity. We show that BatchTopK SAEs consistently outperform TopK SAEs in reconstructing activations from GPT-2 Small and Gemma 2 2B, and achieve comparable performance to state-of-the-art JumpReLU SAEs. However, an advantage of BatchTopK is that the average number of latents can be directly specified, rather than approximately tuned through a costly hyperparameter sweep. We provide code for training and evaluating BatchTopK SAEs at https://github.com/bartbussmann/BatchTopK

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

↑