AdaptiveK: Complexity-Driven Sparse Autoencoders for Interpretable Language Model Representations

Yifei Yao, Hanrong Zhang, Mengnan Du

TL;DR

Standard Sparse Autoencoders (SAEs) use a fixed feature budget for every input, wasting capacity on simple text and starving complex concepts. This paper introduces AdaptiveK SAE, a framework that uses a linear probe to detect text complexity directly from language model activations and dynamically scales the active feature budget ($k$) accordingly. This approach consistently outperforms fixed-sparsity baselines across multiple model scales while eliminating the need for expensive hyperparameter tuning.

What Problem Does This Paper Address?

In mechanistic interpretability, researchers use Sparse Autoencoders (SAEs) to untangle the dense, messy activation spaces of Large Language Models (LLMs) into interpretable, "monosemantic" concepts. However, current SAE architectures rely on a uniform sparsity constraint. Whether using a fixed threshold like TopK or a penalty-based method, they apply a "one-size-fits-all" feature budget to every token or context.

This creates a fundamental inefficiency: a simple phrase (e.g., a repetitive list or basic grammar) receives the same representational capacity as a dense, multi-layered scientific proof. For simple inputs, this introduces representational noise and overfitting; for complex inputs, it results in insufficient feature allocation and poor reconstruction fidelity. Finding the right balance traditionally requires training dozens of models with different hyperparameter settings, which is computationally exhausting.

Methods

The authors propose AdaptiveK SAE, which dynamically adjusts the number of active features based on the semantic complexity of the input text. The pipeline consists of four main steps:

  1. Complexity Annotation: The authors use the GPT-4o-mini API to score text contexts on a scale from 0 to 10 across six linguistic dimensions: lexical complexity, syntactic complexity, conceptual density, domain specificity, logical structure, and contextual dependencies.
  2. Linear Probing: They discover that text complexity is linearly encoded within the LLM's activation space. They train a simple ridge regression linear probe on the hidden states of the last token of a context to predict the complexity score.
  3. Sigmoid Mapping: The predicted complexity score is mapped to an adaptive sparsity level ($k_{adp}$) using a sigmoid-based transformation bounded by user-defined minimum ($k_{min}=20$) and maximum ($k_{max}=320$) feature limits.
  4. Adaptive TopK Activation: The SAE encoder processes the activation, but instead of keeping a fixed $k$ features, it dynamically retains the top $k_{adp}$ largest activations, setting the rest to zero.
Overall pipeline of the AdaptiveK SAE framework

To ensure stability, the architecture is trained in three phases: pretraining the linear probe, training the SAE with a frozen probe, and finally, a joint fine-tuning phase that uses a deviation penalty to prevent the SAE's reconstruction objective from degrading the probe's accuracy.

Datasets

  • Training & Evaluation Data: Contexts extracted from the pile-uncopyrighted dataset. The corpus consists of 250,000 training contexts and 10,000 test contexts, with each context containing up to 1024 tokens during probe training and evaluated up to 2048 tokens.
  • Downstream Evaluation Benchmarks: The models were evaluated using standard interpretability tasks from SAEBench, including Feature Absorption, Spurious Correlation Removal (SCR), Targeted Probe Perturbation (TPP), and RAVEL.

Key Insights and Ideas

  • Complexity is a Linear Feature: One of the most striking findings is that text complexity—despite being a multifaceted, high-level linguistic property—is encoded linearly within LLM representations. The linear probe performed on par with highly expressive non-linear models like MLPs and XGBoost.
  • Dynamic Allocation Transcends the Pareto Frontier: By allocating more features to complex text and fewer to simple text, AdaptiveK achieves a better global trade-off between sparsity ($L_0$) and reconstruction error ($L_2$ loss) than any single fixed-$k$ baseline can manage.
  • Preventing Feature Absorption: Fixed-sparsity models often suffer from "feature absorption," where a single latent feature is forced to represent a combination of concepts (e.g., "Concept A except Concept B") just to save active slots. Dynamically expanding the slot budget for complex text preserves the conceptual purity of individual features.

Key Results

  • Better Reconstruction Across Scales: AdaptiveK was tested across ten diverse language models (including Pythia, Gemma-2, Llama-3.1, Qwen-3, and Phi-4). It consistently outperformed fixed-sparsity baselines on reconstruction fidelity, explained variance, and cosine similarity.
Feature activation scaling dynamically with context complexity compared to fixed TopK baselines
  • Massive Training Speedups: Because AdaptiveK automatically adapts to the data's complexity, it eliminates the need to sweep across multiple fixed-$k$ values to find the optimal sparsity-fidelity trade-off. Compared to training six separate fixed-sparsity models ($k=20$ to $640$), AdaptiveK delivers a greater than 6-fold reduction in total training time.
  • Superior Interpretability: On downstream metrics like Spurious Correlation Removal (SCR) and Targeted Probe Perturbation (TPP), AdaptiveK demonstrated cleaner concept separation and more structurally organized latent spaces than standard TopK or Gated SAEs.

Limitations and Future Work

  • Data Scale Constraints: Due to the financial cost of annotating text via commercial LLM APIs, the authors restricted their training set to 250,000 contexts. This is significantly smaller than the hundreds of millions of tokens typically used to train production-grade SAEs.
  • Token-Level Granularity: While the paper demonstrates that context-level complexity can be effectively predicted using the last token's activation, extending this seamlessly to token-by-token generation without introducing computational overhead during inference remains an open engineering challenge.

Summary updated

BibTeX
@inproceedings{yao2026adaptivek,
  author = {Yifei Yao and Hanrong Zhang and Mengnan Du},
  title = {{AdaptiveK: Complexity-Driven Sparse Autoencoders for Interpretable Language Model Representations}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.findings-acl.1187},
}
Figure