Introduction
In the field of mechanistic interpretability, researchers utilize Sparse Autoencoders (SAEs) to decompose the complex, dense activations of Large Language Models (LLMs) into interpretable "features," such as references to specific locations or grammatical structures. Traditionally, SAEs are trained on a single layer, creating a "silo" problem: if a concept is processed across multiple layers, researchers must manually find correspondences between separate models. This fragmentation makes it difficult to study the continuous flow and evolution of information through a model's depth.
To address this, the authors introduce the Multi-Layer Sparse Autoencoder (MLSAE). This approach treats the transformer's residual stream—the primary highway of information—as a unified space, training a single model to identify features regardless of the layer in which they appear.
Methodology
The core innovation of the MLSAE is the data-stacked approach. Instead of training separate models or concatenating layers into a single high-dimensional vector, the authors treat activations from every layer as individual training examples for a single SAE. The architecture employs a standard $k$-sparse autoencoder (specifically a TopK SAE), which forces the model to explain inputs using only a small number of active "latents."
To account for "representation drift"—the shift in the residual stream's basis as information moves through the model—the researchers experimented with applying a Tuned Lens. This pre-trained transformation aligns activations from any layer into the basis of the final layer before they are passed to the SAE. Evaluation metrics included Fraction of Variance Unexplained (FVU) for reconstruction quality and the increase in cross-entropy loss to ensure the identified features remain functionally relevant to the model's performance.
Datasets and Models
The MLSAE models were trained on 1 billion tokens from the Pile, a diverse open-source dataset. Results were validated using a 10-million-token test set across several architectures, including the Pythia suite (70M to 2.8B parameters), Gemma 2 2B, Llama 3.2 3B, and GPT-2 small.
Key Insights: Localization and Drift
A central finding of the paper is the distinction between aggregate and instance-level feature activity. When analyzed across millions of tokens, a specific feature might appear active across many layers. However, for any single specific token, that feature typically "switches on" at one specific layer and remains localized. The apparent "spread" seen in aggregate data is primarily a result of the feature appearing at different layers depending on the context.
Furthermore, the residual stream is not static. As information moves through the transformer, it undergoes drift. The authors found that in larger models, adjacent layers exhibit higher cosine similarity, which leads to features being active across more layers simultaneously.
Interestingly, the researchers noted a "Tuned Lens Paradox": while aligning layers to a common vocabulary basis improved reconstruction accuracy, it did not significantly increase the "multi-layer-ness" of the features, suggesting that feature directions are relatively stable even as the basis rotates.
Results and Scaling Effects
MLSAEs achieve reconstruction errors and downstream loss increases comparable to traditional single-layer SAEs, proving that a single model can effectively summarize the entire depth of a transformer. Quantitatively, the variance of latent activations over layers is roughly two orders of magnitude greater when aggregating over many tokens compared to a single token, confirming that feature timing is highly context-dependent.
Scaling analysis shows that as models grow, the degree to which latents are active at multiple layers increases. For example, features in Pythia-2.8B are more "spread out" across layers than those in Pythia-70M, likely due to the higher inter-layer similarity in larger models.
Discussion and Future Work
While the MLSAE is a powerful tool, it relies on the "data-stacked" assumption, which treats all layers as separate examples. This might not capture "cross-layer superposition," where multiple layers work together to represent a single concept in a non-linear fashion. Future work could explore more complex transformations to better align the semantic meaning of different layers and apply MLSAEs to full circuit discovery to map how features interact to perform complex tasks.
Summary updated