Do Sparse Autoencoders Generalize? A Case Study of Answerability

Lovis Heindrich, Philip Torr, Fazl Barez, Veronika Thost

TL;DR

Sparse autoencoders (SAEs) are widely celebrated for decomposing language model activations into interpretable, monosemantic features, but do these features truly represent high-level, generalizable concepts? By probing for answerability—a model's internal sense of whether a question can be answered—across diverse datasets in Gemma 2, the authors find that SAE generalization is erratic, ranging from near-random to outperforming dense residual probes. Standard feature search frequently fails to identify universally generalizable features, highlighting significant obstacles for SAE-based interpretability in safety and alignment.

What Problem Does This Paper Address?

In mechanistic interpretability, SAEs are trained to reconstruct transformer activations through a sparse bottleneck, extracting human-interpretable directions from dense neural representations. However, most prior evaluations test SAEs on simple lexical, multilingual, or syntactic patterns (e.g., gender bias, language identification, or subject-verb agreement).

This paper investigates whether SAE features can capture complex, domain-invariant abstract concepts—specifically answerability (detecting whether a given question has an answer given context). Crucially, the authors test whether an SAE feature discovered to track answerability on one distribution actually generalizes to entirely different tasks and domains out-of-distribution (OOD).

Methods

  • Target Model & SAEs: The authors study the instruction-tuned Gemma 2 using the open-source Gemma Scope JumpReLU SAEs with a width of 131,072 features at intermediate and late layers (Layer 20 and Layer 31), focusing on pre-activation values at the prompt's final token.
  • 1-Sparse SAE Probes: Rather than training multi-dimensional classifiers, the authors fit single-feature linear probes (scale and bias) via 5-fold cross-validation on an in-domain dataset to find individual SAE features that predict answerability.
  • Dense Residual Stream Baselines: They train standard linear regression probes on raw residual stream activations across 10 random seeds with L2-regularization sweeps.
  • N-Sparse SAE Probes: They iteratively greedily combine up to 5 top-performing SAE features to test if multi-feature combinations improve generalization.
  • Feature Similarity: Cosine similarities are measured between individual SAE encoder directions and the weight vectors learned by residual stream probes.
       [ Context + Question ] 
                 │
           Transformer
                 │
    ┌────────────┴────────────┐
    ▼                         ▼
Residual Stream         Sparse Autoencoder
    │                         │
Dense Linear Probe     1-Sparse Feature Probing
    │                         │
    └───────────┬─────────────┘
                ▼
  Evaluate OOD Generalization
  (Equations, Celebrity, BoolQ, IDK)

Datasets

Probes are primarily trained on in-domain data and evaluated on OOD distributions (all datasets balanced 50/50 between answerable and unanswerable):

  • SQuAD (In-Domain Training): 2,000 training and 1,800 test context-question pairs.
  • BoolQ 3L (OOD / Alternative Train): 2,000 yes/no questions with answerable and unanswerable subsets.
  • IDK (ACE-whQA subset): 484 reading comprehension examples with unanswerable questions.
  • Math Equations (Novel Synthetic): 2,000 examples contrasting solvable systems of equations with equations containing undefined variables.
  • Celebrity Recognition (Novel Synthetic): 600 examples testing context-based queries about popular IMDb actors versus randomly generated non-celebrity names.
  • Controls: 5 prompt phrasing variations of SQuAD and a Spanish translation of SQuAD.

Key Insights and Ideas

  • Abstract features exist everywhere, but transfer poorly: When searched for directly, high-performing 1-sparse SAE features (>80% accuracy) exist individually inside every tested dataset. However, top features chosen via SQuAD frequently fail when transferred to other datasets.
  • Drastic, domain-dependent transfer: Transfer is wildly inconsistent. Features generalized exceptionally well to Math Equations (>95% accuracy) and Celebrity data, yet collapsed to near-random performance (~50%) on BoolQ.
  • SAEs can beat dense probes out-of-distribution: While dense residual probes achieve superior in-domain accuracy (~90% vs. ~80%), their generalization is fragile (e.g., dropping to ~55% on Celebrity queries). Top SAE features often generalized better than dense probes on Equation and Celebrity datasets.
  • Feature splitting fragments abstract concepts: Residual stream probes trained across random seeds converge to virtually identical directions (cosine similarity $\sim 0.7$). In contrast, top predictive SAE features are largely orthogonal to each other and to the residual probe, suggesting that SAEs fragment abstract concepts into context-specific sub-features.
  • Combining features does not fix generalization: Combining 2 to 5 SAE features boosts in-domain accuracy, but fails to improve (and sometimes degrades) out-of-distribution performance over the single best generalizing feature.

Key Results

  • In-Domain vs. OOD Performance (Layer 31):
  • In-Domain SQuAD: Residual linear probe reaches ~90%; top SAE features reach ~80%.
  • Math Equations (OOD): Top SAE features exceed 95% accuracy, outperforming the residual probe (~90%).
  • Celebrity (OOD): Residual probes drop sharply to ~55–60%, while top SAE features maintain ~75–80% accuracy.
  • BoolQ (OOD): SAE generalization drops to chance levels (~50%), whereas residual probes retain ~75%.
  • Prompt Variations & Multilingual Transfer: Both SAE features and linear probes are resilient to surface-level prompt wording changes and transfer smoothly to Spanish SQuAD (<10% performance drop).

Limitations and Future Work

  • Model & Architecture Scope: Experiments were restricted to Gemma 2 because high-quality open-source SAEs for instruction-tuned models remain sparse. Preliminary tests on Llama 3 SAEs failed to surface reliable answerability features.
  • Search and Training Objectives: Current unsupervised SAE training lacks incentives to coalesce fragmented sub-features into unified, high-level abstract representations.
  • Future Work: Developing robust feature selection algorithms that identify generalizing features without requiring target-domain labels, as well as designing SAE loss functions that mitigate feature splitting on high-level cognitive concepts.

Summary updated

BibTeX
@inproceedings{heindrich2025do,
  author = {Lovis Heindrich and Philip Torr and Fazl Barez and Veronika Thost},
  title = {{Do Sparse Autoencoders Generalize? A Case Study of Answerability}},
  booktitle = {R2-FM @ ICML},
  year = {2025},
  url = {https://openreview.net/forum?id=rs3alQ5BV8},
}
Figure