arXiv:2503.17272cs.LG2025-03被引 5

微调少量数据即可让稀疏自编码器大幅提升语言模型解释力。

Revisiting End-To-End Sparse Autoencoder Training: A Short Finetune Is All You Need

  • 仅对最后2500万词元做短时KL+MSE微调,显著提升重建精度。
  • 交叉熵损失差距降低20%-50%,计算开销几乎可忽略。
  • 方法简单通用,适用于不同架构,适合模型可解释性研究。

稀疏自编码器(SAEs)广泛用于解释语言模型激活。关键评估指标是用SAE重构激活后,原模型输出与重构模型输出之间的交叉熵损失增量。传统方法仅使用均方误差(MSE)训练,且在打乱的预计算激活上进行。近期工作提出直接联合使用KL散度与MSE进行端到端训练(“端到端SAE”),虽显著提升重建精度,但计算成本大幅增加,限制了广泛应用。本文提出仅对最后2500万训练词元进行简短的KL+MSE微调(仅占典型训练预算的几百分之一),即可实现相当的改进,使交叉熵损失差距减少20%-50%,同时计算开销极低。进一步发现,多种微调方法(KL微调、LoRA适配器、线性适配器)带来相似且非叠加的交叉熵改善,表明MSE训练的SAE存在共同且易纠正的误差源。我们提出一种简便方法,在不同规模的KL与MSE损失间有效转移超参数和稀疏惩罚。尽管ReLU与TopK SAE均显著降低交叉熵损失,但在监督式SAEBench评估中表现不一:部分指标提升,部分下降,具体取决于SAE结构与下游任务。然而,该方法在电路分析等可解释性应用中仍可能带来实质性改进,且额外成本极小。

原文摘要 · Abstract (English)

Sparse autoencoders (SAEs) are widely used for interpreting language model activations. A key evaluation metric is the increase in cross-entropy loss between the original model logits and the reconstructed model logits when replacing model activations with SAE reconstructions. Typically, SAEs are trained solely on mean squared error (MSE) when reconstructing precomputed, shuffled activations. Recent work introduced training SAEs directly with a combination of KL divergence and MSE ("end-to-end" SAEs), significantly improving reconstruction accuracy at the cost of substantially increased computation, which has limited their widespread adoption. We propose a brief KL+MSE fine-tuning step applied only to the final 25M training tokens (just a few percent of typical training budgets) that achieves comparable improvements, reducing the cross-entropy loss gap by 20-50%, while incurring minimal additional computational cost. We further find that multiple fine-tuning methods (KL fine-tuning, LoRA adapters, linear adapters) yield similar, non-additive cross-entropy improvements, suggesting a common, easily correctable error source in MSE-trained SAEs. We demonstrate a straightforward method for effectively transferring hyperparameters and sparsity penalties between training phases despite scale differences between KL and MSE losses. While both ReLU and TopK SAEs see significant cross-entropy loss improvements, evaluations on supervised SAEBench metrics yield mixed results, with improvements on some metrics and decreases on others, depending on both the SAE architecture and downstream task. Nonetheless, our method may offer meaningful improvements in interpretability applications such as circuit analysis with minor additional cost.

稀疏自编码器模型解释微调语言模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。