Manuscript Offprint

arXiv:2610.19907

Sparse Transformer: a Controlled Testbed for Mechanistic Interpretability

Anton Korznikov, Alexey Dontsov, Elena Tutubalina

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Mechanistic interpretability aims to decompose neural network computations into human-understandable features, yet progress is limited by the absence of ground-truth units to evaluate against. We address this with a Sparse Transformer (ST): a 5-layer language model trained on TinyStories whose wide, TopK-sparse MLP forces neuron specialization. We show that ST neurons are highly interpretable: they outperform a loss-matched dense transformer by 43% on AutoInterp, and circuits of a median of 12 neurons suffice to reproduce individual model predictions. This testbed allows us to directly compare feature learning methods: Transcoder, which approximates the MLP input-output mapping, recovers ST's neuron vectors with 52.6% higher cosine similarity than Sparse Autoencoder, which only reconstructs outputs. Furthermore, the ST enables a controlled study of polysemanticity: distilling its sparse MLP into a dense counterpart reveals how compression leads to feature superposition. These results show how a known reference basis sharpens evaluation and understanding, a role we hope the ST can serve for the field.

1 Introduction

Language model neurons are polysemantic: each responds to many unrelated inputs, making them resistant to human interpretation (Elhage et al., 2022b; Olah et al., 2020). Mechanistic interpretability aims to address this, yet the field faces a persistent methodological bottleneck: the absence of a reliable ground-truth (Sharkey et al., 2025; Chanin and Garriga-Alonso, 2026). When Sparse Autoencoder (SAE) (Bricken et al., 2023) decomposes a model's residual stream into a sparse sum of monosemantic features, we cannot know whether those features correspond to genuine computational units or are artifacts of the decomposition method (Korznikov et al., 2026; Leask et al., 2025). Similarly, when a circuit is identified as responsible for a behavior, faithfulness metrics remain proxies, as the true circuit is never known (Sutter et al., 2026).

Existing attempts to obtain ground truth rely on toy models with hand-crafted tasks (Elhage et al., 2022b; Nanda et al., 2023; Huben, 2024; Sharkey et al., 2022), which do not process natural language, leaving it unclear how findings transfer to real models. A more principled approach is to train a model whose internal structure is interpretable by design, so that its known units can serve as a reference for interpretability methods on natural language.

We propose the Sparse Transformer (ST) as such a model. ST is a decoder-only transformer whose MLP layers apply a TopK gate after the ReLU nonlinearity: at each forward pass, only K out of N=M⋅dmodelN = M \cdot d_{model} neurons activate (M is the width multiplier). When M is large and K is small, each neuron must specialise, with sparsity acting as an inductive bias towards monosemanticity. Thus, ST provides an operational ground truth in two complementary senses. The first is structural: because exactly K neurons fire per pass, the MLP output is a sum of K known value vectors from a known active set, matching the sparse decomposition that SAEs and Transcoders are designed to recover. The second is semantic: we verify empirically that these neurons are monosemantic and human-interpretable. Together, these properties make the ST a controlled testbed for evaluating feature-recovery methods on natural language.

We make the following contributions:

• We show that our primary ST model is highly interpretable: it scores 0.866 on AutoInterp (vs. 0.605 for a loss-matched dense transformer) and admits compact circuits that reproduce individual model predictions.

• In Case Study #1, we use the ST’s known neuron basis to compare SAEs and Transcoders,

∗^{*}Correspondence: korznikovantona@gmail.com

Figure

Figure 1: An interpretable 11-neuron circuit. Given the prompt “Jack was hungry so he went looking for something to”, nodes are MLP neurons grouped by layer (L0–L4); edges indicate causal influence. (top right) Neuron dashboards show top activating contexts for 3 circuit nodes. (bottom right) Faithfulness and completeness as neurons are added by beam search; 11 neurons suffice to reach faithfulness ≥\geq 0.95.

finding that Transcoders reconstruct MLP outputs 3.8×3.8 \times more accurately (NMSE) and recover true neurons with 52.6% higher cos-sim.

• In Case Study #2, we distil the ST’s MLP into a dense counterpart and study polysemanticity in a controlled setting, finding each dense neuron superposes ∼\sim150 sparse neurons with its weight vectors reflecting this mixture.

• Additionally, we report an empirical width–sparsity trade-off suggesting that strong sparsity can be offset by moderate width expansion, showing a path toward larger interpretable LLMs.

Together, these contributions establish the ST as a testbed that bridges the gap between toy models and production LLMs: trained on natural language, yet with known computational units at every layer. We publicly release all 35 models trained across the width–sparsity grid, along with checkpoints at every 10% of training, to support systematic study of feature formation, circuit emergence, and interpretability methods evaluation.

References (100)

Couldn't load all references. Reload the page to try again.