Abstract
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 feature splitting enables the discovery of new features. The Llama Scope SAE checkpoints are publicly available at Hugging Face, alongside our scalable training, interpretation, and visualization tools.
Introduction
Modern Large Language Models (LLMs) like Llama-3.1-8B are often viewed as "black boxes." While information is represented as high-dimensional vectors, these vectors exhibit superposition, where multiple semantic concepts (features) are compressed into the same dimensions. This phenomenon complicates mechanistic interpretability, as individual neurons rarely map to single, understandable concepts.
Sparse Autoencoders (SAEs) address this by "un-cramming" these representations into a much larger, sparser set of features. However, training SAEs at the scale of 8B parameter models is resource-intensive. Llama Scope provides a comprehensive, open-source suite of 256 SAEs designed to map the internal representations of Llama-3.1-8B, creating a "common language" for the interpretability community.
Methodology
The Llama Scope suite covers every layer and sublayer of the model, including the residual stream, attention outputs, MLP outputs, and transcoders.
Key technical innovations include:
- Improved Top-K SAEs: Moving beyond standard L1 regularization, the authors utilize a "Top-K" approach where only the $K$ most active features fire. They improved stability by incorporating the decoder's 2-norm directly into the Top-K selection process.
- K-Annealing: To facilitate convergence, the model starts with a high number of active features, gradually "annealing" down to a target $K$ (typically 50) during the initial 10% of training.
- JumpReLU Post-Processing: Trained models are converted into a JumpReLU-like variant, allowing for more flexible feature activation during inference.
- Online Activation Generation: To mitigate the storage bottleneck of saving trillions of activations, activations are generated on-the-fly using a mixed-parallelism infrastructure.
Datasets and Evaluation
The SAEs were trained on activations from SlimPajama. Evaluation focused on two critical dimensions:
- Long-Context Stability: Using the L-Eval dataset, performance was tested on sequences up to 8,192 tokens, significantly beyond the 1,024-token training window.
- Base-to-Instruct Generalization: Using the Wildchat dataset, they assessed whether SAEs trained on the "Base" model could interpret the "Instruct" version.
Analysis and Results
The study yielded several key insights into the nature of learned representations:
- Architectural and Scale Improvements: The modified Top-K architecture achieved reconstruction quality comparable to vanilla SAEs but with significantly higher sparsity, reducing active features from approximately 150 to 50.
- Generalization: A major finding is that SAEs trained on the Base model generalize remarkably well to the Instruct version. This suggests that fine-tuning primarily re-weights existing "primitive" features.
- Feature Splitting: By comparing 32K and 128K feature counts, the authors confirmed "feature splitting." For instance, a general "Historical Movements" feature might split into more granular features like "Brexit" in a larger model.
- Semantic Clustering: UMAP visualizations revealed that features with high cosine similarity share deep semantic links, such as a cluster focused on global threats (wars, pandemics).
Conclusion and Future Work
Llama Scope represents a significant advancement in open-source mechanistic interpretability. While it provides a high-resolution map of an 8B parameter model, challenges remain in computational efficiency and scaling to frontier-scale models (e.g., Llama-3-70B). Future work will explore Mixture-of-Experts (MoE) SAEs to further reduce the cost of scaling feature counts and improve automated interpretability scoring.
Summary updated