arXiv:2410.20526cs.LGcs.CL2024-10被引 148

用稀疏自编码器从Llama-3.1-8B提取百万级特征,助力模型可解释性研究

Llama Scope: Extracting Millions of Features from Llama-3.1-8B with Sparse Autoencoders

  • 构建256个稀疏自编码器,覆盖Llama-3.1-8B每层与子层,每层设32K/128K特征
  • 验证基座模型训练的SAE在长上下文和微调模型中仍具泛化能力
  • 发现特征分裂现象,支持新语义特征的自动挖掘,适合研究模型内部机制者

稀疏自编码器(SAEs)已成为从语言模型中提取稀疏表征的强大无监督方法,但其可扩展训练仍是关键挑战。本文构建了256个SAE,分别在Llama-3.1-8B-Base模型各层与子层上训练,每层配置32K或128K特征。对当前先进变体Top-K SAEs进行多维度改进评估,重点检验基座模型训练的SAE在长上下文及微调模型中的泛化能力。同时分析学习到的隐空间几何结构,确认‘特征分裂’机制能促成新特征的发现。相关SAE检查点已公开发布于Hugging Face:https://huggingface.co/fnlp/Llama-Scope,配套可扩展训练、解释与可视化工具开源在GitHub:https://github.com/OpenMOSS/Language-Model-SAEs。这些成果旨在推动开源稀疏自编码器生态发展,减少重复训练需求,支持机制可解释性研究。

原文摘要 · Abstract (English)

Sparse Autoencoders (SAEs) have emerged as a powerful unsupervised method for extracting sparse representations from language models, yet scalable training remains a significant challenge. We introduce a suite of 256 SAEs, trained on each layer and sublayer of the Llama-3.1-8B-Base model, with 32K and 128K features. Modifications to a state-of-the-art SAE variant, Top-K SAEs, are evaluated across multiple dimensions. In particular, we assess the generalizability of SAEs trained on base models to longer contexts and fine-tuned models. Additionally, we analyze the geometry of learned SAE latents, confirming that \emph{feature splitting} enables the discovery of new features. The Llama Scope SAE checkpoints are publicly available at~\url{https://huggingface.co/fnlp/Llama-Scope}, alongside our scalable training, interpretation, and visualization tools at \url{https://github.com/OpenMOSS/Language-Model-SAEs}. These contributions aim to advance the open-source Sparse Autoencoder ecosystem and support mechanistic interpretability research by reducing the need for redundant SAE training.

稀疏自编码器模型可解释性语言模型

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