Automatically Interpreting Millions of Features in Large Language Models

Gonçalo Paulo,Alex Mallen,Caden Juang,Nora Belrose
2024-10-18
Abstract: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 <a class="link-external link-https" href="https://github.com/EleutherAI/sae-auto-interp" rel="external noopener nofollow">this https URL</a>, and our explanations are available at <a class="link-external link-https" href="https://huggingface.co/datasets/EleutherAI/auto_interp_explanations" rel="external noopener nofollow">this https URL</a>.
Machine Learning,Computation and Language
What problem does this paper attempt to address?
The problem that this paper attempts to solve is how to automatically generate and evaluate the latent feature explanations of Sparse Auto - Encoders (SAEs) in large - scale language models (LLMs). Specifically: 1. **Generating Explanations**: Since SAEs can produce millions of different latent features, it is impractical for humans to interpret them manually. Therefore, the researchers constructed an open - source automated pipeline, using large - language models (LLMs) to automatically generate natural - language explanations for these latent features. 2. **Evaluating the Quality of Explanations**: To ensure that the generated explanations are meaningful and accurate, the researchers proposed five new techniques to evaluate the quality of explanations, which are more cost - effective than existing methods. One of these techniques is called Intervention Scoring, which measures the interpretability of a feature by evaluating the effect of intervening on that feature. 3. **Optimizing the Generation of Explanations**: The researchers proposed some guidelines for generating better explanations. These guidelines aim to keep the explanations valid in a broader activation context and discuss the shortcomings of existing scoring techniques. 4. **Measuring Semantic Similarity**: The researchers used the generated explanations to measure the semantic similarity between independently - trained SAEs and found that SAEs in adjacent layers are highly similar. In conclusion, this paper aims to improve the understanding and interpretability of the internal representations of large - language models by generating and evaluating latent - feature explanations of SAEs through automated methods.