arXiv:2410.13928cs.LGcs.CL2024-10ICML被引 108

用大模型自动解释上百万个神经元特征,让深层模型更可理解。

Automatically Interpreting Millions of Features in Large Language Models

  • 用大模型自动生成和评估稀疏自编码器特征的自然语言解释。
  • 发现相邻层的特征语义高度相似,且解释效果优于传统方法。
  • 提出低成本评分新方法,适合大规模自动化分析,适合模型可解释性研究者。

深度神经网络中神经元激活通常难以人工理解,而稀疏自编码器(SAEs)可将其映射到更易解释的高维潜在空间。然而,这些 SAE 可能包含数百万个独立特征,人工逐个解释不可行。本文构建了一个开源自动化管道,利用大语言模型(LLMs)生成并评估 SAE 特征的自然语言解释。我们在两种不同开源大模型上,对多种规模、激活函数与损失函数训练的 SAE 进行测试。提出五种更低成本的解释质量评分技术,其中干预评分能识别出传统方法遗漏的可解释特征。我们还提出生成优质解释的指导原则,并讨论现有评分方法的缺陷。利用解释结果度量独立训练的 SAE 间语义相似性,发现残差流中邻近层的 SAE 特征高度相似。大规模分析证实,即使对神经元进行 top-k 稀疏化后,SAE 潜在特征仍显著更易解释。代码已开源:https://github.com/EleutherAI/sae-auto-interp,解释数据集见:https://huggingface.co/datasets/EleutherAI/auto_interp_explanations。

原文摘要 · Abstract (English)

While the activations of neurons in deep neural networks usually do not have a simple human-understandable interpretation, sparse autoencoders (SAEs) can be used to transform these activations into a higher-dimensional latent space which may be more easily interpretable. However, these SAEs can have millions of distinct latent features, making it infeasible for humans to manually interpret each one. In this work, we build an open-source automated pipeline to generate and evaluate natural language explanations for SAE features using LLMs. We test our framework on SAEs of varying sizes, activation functions, and losses, trained on two different open-weight LLMs. We introduce five new techniques to score the quality of explanations that are cheaper to run than the previous state of the art. One of these techniques, intervention scoring, evaluates the interpretability of the effects of intervening on a feature, which we find explains features that are not recalled by existing methods. We propose guidelines for generating better explanations that remain valid for a broader set of activating contexts, and discuss pitfalls with existing scoring techniques. We use our explanations to measure the semantic similarity of independently trained SAEs, and find that SAEs trained on nearby layers of the residual stream are highly similar. Our large-scale analysis confirms that SAE latents are indeed much more interpretable than neurons, even when neurons are sparsified using top-$k$ postprocessing. Our code is available at https://github.com/EleutherAI/sae-auto-interp, and our explanations are available at https://huggingface.co/datasets/EleutherAI/auto_interp_explanations.

模型解释稀疏自编码器大模型

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