Manuscript Offprint

arXiv:2610.27375

Shaped SAEs: Expanding the Toolkit for Mechanistic Interpretability

Oveys Delafrooz Noroozi, Bhagyashree Puranik, Upamanyu Madhow

Abstract

Sparse autoencoders (SAEs) seek to decompose the dense activations of large language models (LLMs) into sparse, potentially interpretable features using a learned overcomplete dictionary. In this work, we ask whether it is possible to enhance the semantic selectivity of the learned dictionary atoms by linearly shaping the dense activations prior to learning an SAE. We explore rank-reducing transformations based on the recently introduced J-space corresponding to the averaged Jacobian from the current layer to the LLM output, projecting activations onto the “live” subspace spanned by eigenmodes of the Jacobian with larger singular values (which we expect to be more semantically relevant). We also introduce a new approach for training SAEs in which (a) an affine shaping transformation is learned along with the dictionary atoms, (b) the atom selection mechanism is based on the TopK projections along the one-dimensional subspace spanned by the atoms, and (c) reconstruction is carried out using the same atoms. We call this approach a Matched Filter SAE (MF-SAE) based on analogies with communication theory. The promise of shaping is demonstrated via evaluations against dense activations and state-of-the-art SAEs on benchmarks including SAEBench and SAE Probes.

1 Introduction

Mechanistic interpretability seeks to develop insight into the internal representations and computations of large language models (LLMs). A key challenge is that model activations are high-dimensional dense representations encoding many concepts at once (i.e., they are “polysemantic”), making it difficult to isolate individual concepts and computational variables, and to relate them to model behavior. Sparse autoencoders (SAEs) have been proposed as a practical approach for replacing dense neural activations with potentially more interpretable feature vectors corresponding to their sparse representation with respect to an overcomplete dictionary [Cunningham et al., 2023, Bricken et al., 2023, Templeton et al., 2024]. Significant effort has been devoted to developing a variety of SAE formulations Gao et al. [2025], Bussmann et al. [2024], Rajamanoharan et al. [2024a,b], Bussmann et al. [2025], along with benchmarks assessing semantic selectivity Karvonen et al. [2025], Kantamneni et al. [2025].

Our broad objective is to investigate whether the toolkit for mechanistic interpretability using SAEs can be expanded by asking a simple question: can we enhance the semantic selectivity of the learned dictionary atoms by allowing ourselves the freedom to shape activations prior to learning an SAE? We make two key contributions that answer this question in the affirmative:

(1) J-space Shaping: Using the recently introduced Jacobian method Gurnee et al. [2026], we shape activations accounting for their impact on downstream transmission. Locally, the Jacobian of a downstream mapping describes how perturbations to a residual-stream activation propagate through the model. Its leading right singular vectors therefore identify source-space directions with high sensitivity under that mapping. We use the leading singular vectors of a corpus-averaged Jacobian to divide the residual stream into a high-transmission live subspace and its orthogonal quiet complement. The terminology is deliberately relative: quiet directions are less transmitted by the selected average Jacobian, but they are not necessarily an exact null space, devoid of semantic information, or irrelevant in every context. However, we do expect the live directions to be more semantically relevant, and therefore investigate the impact of shaping activations by projecting them onto the live subspace.

(2) Matched Filter SAE (MF-SAE): We introduce a new SAE formulation in which we apply a learnable affine transformation prior to encoding and decoding with an overcomplete dictionary, with the affine transformation and dictionary atoms learned jointly based on reconstruction loss. The encoder outputs are TopK rectified projections along the unit-norm atoms, while the decoder uses the same atoms and projections for reconstruction. We are inspired by the concept of matched filters from communication theory to learn atoms corresponding to dominant directions in the data, but noting that matched filters are only optimal when the noise is white, we insert a linear transformation up front as a learnable “whitening” transformation. The bias term is motivated as a learnable centering mechanism that minimizes the energy of the atoms needed to represent the data, similar to the centering routinely used in signal constellations in communication systems.

We show that our proposed methods lead to improved per-arXiv preprint

performance on standard benchmark tasks on semantic feature extraction under a constrained feature budget on SAEBench and SAE Probes. We make the following high-level observations regarding performance on SAEBench:

• Semantically shaped dense activations (prior to learning an SAE) perform better than original dense activations.

• The MF-SAE applied to standard dense activations performs better than state-of-the-art SAEs as well as dense activations on SAEBench.

• The MF-SAE applied to semantically shaped activations performs slightly better than the MF-SAE at very tight feature budgets, but does not appear to improve performance at higher budgets. Thus, the problem of how best to combine semantic shaping with sparse coding remains open.

Performance trends on the SAE Probes benchmark are more variable, as we discuss in more detail in our results section (Section 6). We evaluate on Gemma-2-2B at layers 12 and 20, and on GPT-2 Small at layers 7 and 8 (Appendix E). On SAEBench, the MF-SAEs outperform the available baseline SAEs for both models, while on SAE Probes the gains are marginal. Probing accuracy is higher on Gemma-2-2B than on GPT-2 Small on both benchmarks, which we attribute to model scale: the tasks of SAE Probes in particular are more complex and benefit from a larger model.

References (45)

  • Decomposing language models with dictionary learning, 2023
  • Batchtopk sparse autoencoders
  • Learning multi-level features with matryoshka sparse autoencoders
  • Synthsaebench: Evaluating sparse autoencoders on scalable realistic synthetic data (opens arXiv in a new tab)
  • A is for absorption: Studying feature splitting and absorption in sparse autoencoders
  • From flat to hierarchical: Extracting sparse representations with matching pursuit
  • Sparse autoencoders find highly interpretable features in language models
  • arXiv:2309.08600, 2023. URL https://arxiv.org/abs/2309.08600. (opens arXiv in a new tab)
  • Jacobian sparse autoencoders: Sparsify computations, not just activations
  • The Pile: An 800GB Dataset of Diverse Text for Language Modeling
  • Scaling and evaluating sparse autoencoders
  • Gemma 2: Improving Open Language Models at a Practical Size
  • Verbalizable representations form a global workspace in language models
  • Are sparse autoencoders useful? a case study in sparse probing
  • SAEBench: A comprehensive benchmark for sparse autoencoders in language model interpretability
  • Gemma scope: Open sparse autoencoders everywhere all at once on gemma 2
  • Decoupled weight decay regularization
  • Matching pursuits with time-frequency dictionaries (opens the publisher in a new tab)
  • MIB: A mechanistic interpretability benchmark
  • Position: Use sparse autoencoders to discover unknowns
  • Qwen2.5 Technical Report
  • Language models are unsupervised multitask learners
  • Improving sparse decomposition of language model activations with gated sparse autoencoders
  • Jumping ahead: Improving reconstruction fidelity with jumprelu sparse autoencoders (opens arXiv in a new tab)
  • Scaling monosemanticity: Extracting interpretable features from Claude 3 Sonnet
  • Axbench: Steering LLMs? even simple baselines outperform sparse autoencoders
  • JumpReLU SAEs have no fixed sparsity; their L0 is the average number of active latents per token, and we pair each MF-SAE with the JumpReLU SAE of closest average L0
  • Across sparsity levels, $k = 320$ gives the best MF-SAE on SAE Probes in every setting, while on SAEBench it is among the best sparsity levels but not always the best (Figures 7 and 8)
  • The linear encoder and decoder significantly improve probing accuracy on both the raw and the live space (Figure 19), consistent with Section 4: they are the only mechanism that lets the encoder of the MF-SAE differ from its decoder
  • At layer 7 we train both the raw and the live MF-SAE, with the Jacobian estimated as in Section 5.1 and r = 512 live directions; at layer 8 we train only the raw MF-SAE
  • ><tr><td>Layer</td><td>SAE</td><td>Architecture</td><td>Width</td><td>Sparsity</td></tr><tr><td rowspan=
  • SB-Acc against $k_{\mathrm{probe}}$ for the MF-SAE at $k \in \{40, 80, 160, 320\}$
  • Mean test accuracy against $k_{probe}$ for the MF-SAE at $k \in \{40, 80, 160, 320\}$, with the same layout as Figure 7
  • SB-Acc against $k_{probe}$ for the raw and live MF-SAEs, the SAEBench Top-K SAE at the same k, and the Gemma Scope 16K SAE of closest average L0
  • Mean test accuracy against $k_{probe}$, with the same methods and layout as Figure 9
  • SB-Acc against $k_{probe}$ for the raw and live MF-SAEs and the Gemma Scope 16K SAE of closest average L0 (38, 71, 139 and 294 for k = 40, 80, 160, 320)
  • Mean test accuracy against $k_{probe}$, with the same methods and layout as Figure 11
  • SB-Acc against $k_{probe}$ for the MF-SAE at $k \in \{40, 80, 160, 320\}$
  • Mean test accuracy against $k_{probe}$ for the MF-SAE at $k \in \{40, 80, 160, 320\}$, with the same layout as Figure 13
  • SB-Acc against $k_{probe}$ for the raw and live MF-SAEs, the Gemma Scope 32K SAE of closest average L0, and, in (a), the Matryoshka SAE
  • Mean test accuracy against $k_{\mathrm{probe}}$, with the same methods and layout as Figure 15
  • SB-Acc against $k_{\mathrm{probe}}$ for the raw and live MF-SAEs and, in (a), the Matryoshka SAE. No SAEBench or Gemma Scope 32K SAEs are available at this layer
  • Mean test accuracy against $k_{probe}$, with the same methods and layout as Figure 17
  • SB-Acc against $k_{probe}$ for the raw and live MF-SAEs with and without the linear projections
  • Probe accuracy against $k_{probe}$