Sparse Autoencoder Features for Classifications and Transferability

Jack Gallifant, Shan Chen, Kuleen Sasse, Hugo J. W. L. Aerts, Thomas Hartvigsen, Danielle S. Bitterman · DOI

Abstract

Sparse Autoencoders (SAEs) have emerged as a powerful tool in mechanistic interpretability, offering a method to decompose the dense, polysemantic activations of Large Language Models (LLMs) into sparse, monosemantic features. This paper systematically evaluates the practical utility of these features for safety-critical classification tasks. By analyzing the Gemma 2 model family, we establish best practices for SAE-based feature extraction, including the efficacy of middle-layer activations and threshold binarization. Our results demonstrate that SAE features not only provide superior classification performance over traditional baselines but also exhibit significant transferability across languages and modalities, enabling new paradigms for scalable oversight.

Introduction

While Large Language Models (LLMs) demonstrate remarkable capabilities, their internal decision-making processes remain largely opaque. A primary challenge in Mechanistic Interpretability (MI) is polysemanticity, where individual neurons activate for multiple, unrelated concepts, making direct interpretation difficult. Sparse Autoencoders (SAEs) address this by "up-projecting" dense activations into a high-dimensional space where features are sparse and ideally represent single, human-understandable concepts.

Despite the theoretical appeal of SAEs, their practical application in classification tasks—such as toxicity detection or jailbreak prevention—has lacked systematic study. This research fills that gap by developing a reproducible pipeline for SAE-based classification and testing the robustness of these features across diverse datasets and model scales.

Methodology

Feature Extraction and Processing

The study utilized pretrained SAEs from the "Gemma Scope" suite, targeting the residual streams of Gemma 2 (2B, 9B, and 9B-IT) models. To transform token-level SAE activations into sentence-level representations, the researchers compared several aggregation methods, ultimately finding that summing activations across tokens provided the most robust signal.

Threshold Binarization

A significant contribution of this work is the introduction of threshold binarization. Instead of utilizing continuous activation values, the features are converted into a binary state (0 or 1) based on a specific activation threshold. This non-linear filtering highlights only the most salient features, simplifying the representation without sacrificing predictive power. Classification is then performed using simple Logistic Regression (linear probing) on these aggregated, binarized features.

Experimental Setup

The framework was evaluated across 12+ datasets spanning three primary domains:

  1. Safety & Toxicity: Including Multilingual Toxicity (5 languages), Jailbreak Classification, and Reject Prompts.
  2. Intent & Knowledge: Utilizing MASSIVE Intent, Banking77, and NQ-Swap (factual correctness).
  3. Multimodal: Testing vision-language capabilities via PaliGemma 2 on datasets like CIFAR-100 and Oxford Flowers.

Key Insights

The Middle Layer Advantage

Across nearly all tasks, features extracted from the middle layers of the LLM yielded the highest classification accuracy. These layers appear to represent a "sweet spot" where the model has moved beyond low-level syntactic processing but has not yet specialized into the specific output-head logic of the final layers.

Binarization as a "Free Lunch"

Binarizing SAE features proved to be highly effective, performing as well as or better than more complex feature selection techniques. This suggests that the mere presence or absence of a concept (the binary signal) is often more informative for classification than the specific magnitude of the activation.

Scalable Oversight

The research highlights a promising path for "scalable oversight." SAE features from a smaller 2B model were found to predict the correctness of a much larger 9B-IT model with high accuracy. This suggests that smaller, more interpretable models can serve as effective monitors or "auditors" for larger, more complex systems.

Cross-Modal and Cross-Lingual Transfer

SAE features demonstrated surprising versatility. Features trained on English text-only SAEs transferred to other languages (such as Spanish or Russian) with only a 15-20% decline in F1 score. Furthermore, text-based SAE features were successfully applied to image classification tasks in PaliGemma 2, indicating that SAEs capture abstract, high-level concepts that transcend specific input modalities.

Results and Performance

SAE-derived features consistently outperformed both raw hidden-state probes and traditional Bag-of-Words (TF-IDF) baselines, achieving macro F1 scores exceeding 0.8 on most tasks. Notably, the performance gap between SAE features and baselines remained stable even when training data was restricted to 10% of the original size, demonstrating the robustness of the sparse representations.

Limitations and Future Work

While promising, the study notes several areas for further exploration:

  • Architectural Scope: The findings are currently centered on the Gemma 2 family; further testing on Llama or Mistral architectures is required to ensure universality.
  • Interpretability Verification: While features are statistically effective, the automated labels assigned to SAE features (auto-interp) are not always perfectly accurate, requiring human-in-the-loop validation.
  • Distribution Shift: Future research should investigate how these features perform when moving between disparate domains, such as from formal news text to informal social media content.

Summary updated

BibTeX
@misc{gallifant2025sparse,
  author = {Jack Gallifant and Shan Chen and Kuleen Sasse and Hugo J. W. L. Aerts and Thomas Hartvigsen and Danielle S. Bitterman},
  title = {{Sparse Autoencoder Features for Classifications and Transferability}},
  year = {2025},
  eprint = {2502.11367},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.11367},
}
Figure