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

稀疏自编码器的低秩适配模型

Low-Rank Adapting Models for Sparse Autoencoders

Matthew Chen, Joshua Engels, Max Tegmark

AI总结:

本研究提出用低秩适配(LoRA)微调语言模型以适配稀疏自编码器(SAE),显著降低插入SAE时的交叉熵损失差距,并加速训练,同时改善下游指标,实现帕累托改进。

摘要:

稀疏自编码器(SAEs)将语言模型表示分解为稀疏的线性潜向量集合。近期研究利用语言模型梯度改进SAEs,但这些技术在训练期间需要大量昂贵的反向传播,并且当SAE重建插入模型时仍会导致交叉熵损失显著增加。在本工作中,我们通过采取根本不同的方法改进这些局限:我们使用低秩适配(LoRA)对语言模型本身进行微调,以适配先前训练的SAE。我们在Gemma Scope系列SAE上,分析了我们的方法在不同SAE稀疏度、SAE宽度、语言模型大小、LoRA秩和模型层下的表现。在这些设置中,我们的方法在前向传播期间插入SAE时,将交叉熵损失差距减少了30%至55%。我们还发现,与端到端(e2e)SAEs相比,我们的方法在Gemma上实现相同的下游交叉熵损失快3倍至20倍,在Llama上快2倍至10倍。我们进一步表明,我们的技术改善了下游指标,并能同时适配多个SAE,而不损害通用语言模型能力。我们的结果表明,提高模型可解释性不仅限于事后SAE训练;通过直接优化模型本身也能实现帕累托改进。

英文摘要:

Sparse autoencoders (SAEs) decompose language model representations into a sparse set of linear latent vectors. Recent works have improved SAEs using language model gradients, but these techniques require many expensive backward passes during training and still cause a significant increase in cross entropy loss when SAE reconstructions are inserted into the model. In this work, we improve on these limitations by taking a fundamentally different approach: we use low-rank adaptation (LoRA) to finetune the \textit{language model itself} around a previously trained SAE. We analyze our method across SAE sparsity, SAE width, language model size, LoRA rank, and model layer on the Gemma Scope family of SAEs. In these settings, our method reduces the cross entropy loss gap by 30\% to 55\% when SAEs are inserted during the forward pass. We also find that compared to end-to-end (e2e) SAEs, our approach achieves the same downstream cross entropy loss 3$\times$ to 20$\times$ faster on \gemma and 2$\times$ to 10$\times$ faster on \llama. We further show that our technique improves downstream metrics and can adapt multiple SAEs at once without harming general language model capabilities. Our results demonstrate that improving model interpretability is not limited to post-hoc SAE training; Pareto improvements can also be achieved by directly optimizing the model itself.

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

↑