Gated sparse autoencoders eliminate L1 activation shrinkage (gamma near 1.0) and routinely cut the number of active features per token (L0) roughly in half at matched cross-entropy fidelity across models up to Gemma-7B. Senthooran Rajamanoharan, Arthur Conmy, Lewis Smith, Tom Lieberum, Vikrant Varma, János Kramár, Rohin Shah, and Neel Nanda achieve this by splitting the encoder into two weight-tied paths: one branch decides which features fire (where the L1 penalty applies) and a second branch estimates their magnitudes without L1 bias.

  • Halved L0 at compute parity: Even against baseline ReLU SAEs given 50% more dictionary features (196,608 vs 131,072 on Gemma-7B) to match training compute, Gated SAEs Pareto-dominate across MLP, attention, and residual stream sites.
  • Shrinkage eliminated: On Gemma-7B layer 20 residual stream, baseline relative reconstruction bias gamma drops to 0.773 at L0 = 10.4 (91.87% loss recovered), while Gated stays unbiased at gamma = 1.003 at L0 = 10.0 (96.70% loss recovered).
  • Not just post-hoc rescaling: Freezing a baseline SAE and fitting rescale-and-shift parameters (gamma -> 1) recovers only a small fraction of the Gated SAE Pareto gain, proving Gated training also learns better encoder and decoder directions.
  • Comparable human interpretability: In a double-blind human evaluation (150 Pythia-2.8B features, 192 Gemma-7B features), raters scored Gated features at least as interpretable as baseline (+0.13 on a 0–2 scale, p = 0.060), with the clearest edge on MLP outputs (+0.40, p = 0.003).
How Gated SAEs decouple feature detection from magnitude estimation
1. Gating path (L1 applied)
Decides which features turn on via a Heaviside step function.
f_gate(x) = 1[(W_gate(x - b_dec) + b_gate) > 0]
Trained via L1 and auxiliary reconstruction on ReLU(pi_gate) using a stop-gradient decoder copy so L1 never biases W_dec.
2. Magnitude path (no L1)
Shares directions with W_gate via a learned per-feature scale exp(r_mag).
f_mag(x) = ReLU((exp(r_mag) * W_gate)(x - b_dec) + b_mag)
Multiplied elementwise by f_gate(x) before decoding, adding only 2M parameters and collapsing at inference into a single JumpReLU layer.

Source: Rajamanoharan et al. (2024), Section 3.2, Figures 3 and 4.

How It Works

In a standard ReLU sparse autoencoder, the encoder matrix must handle two conflicting jobs at once: deciding whether a feature is present and estimating how strongly it fires. Because the training loss combines squared reconstruction error with an L1 penalty (lambda * ||f(x)||_1), the optimizer can always lower total loss by shrinking active coefficients toward zero. In the paper’s one-feature toy example (lambda = 1), minimizing (1 - f)^2 + f pushes the reconstructed activation down to 1/2 instead of 1, even when exact reconstruction is trivial.

Gated SAEs separate those two jobs. A gating branch f_gate(x) outputs a binary 0/1 mask via a Heaviside step function, while a magnitude branch f_mag(x) outputs a standard ReLU activation. Multiplying them elementwise passes unshrunk magnitudes only for gated-on features. To avoid increasing parameter count and inference FLOPs by 50%, the authors tie the encoder weights so W_mag[i, j] = exp(r_mag[i]) * W_gate[i, j], adding just 2M scalars (r_mag and b_mag). Under this tying, inference reduces algebraically to a single linear projection followed by a discontinuous JumpReLU activation with per-feature threshold theta = b_mag - exp(r_mag) * b_gate.

Because the step function has zero gradient everywhere else, the authors apply the L1 penalty to ReLU(pi_gate(x)) (the rectified gating pre-activations) and train W_gate and b_gate with an auxiliary MSE loss that decodes ReLU(pi_gate(x)) through a stop-gradient copy of the decoder (x_hat_frozen). Freezing the decoder inside L_aux prevents the L1 penalty from distorting W_dec or b_dec.

Key Findings

The authors benchmark Gated SAEs across GELU-1L, Pythia-2.8B (five layers), and Gemma-7B (four layers) across residual stream, MLP output, and attention pre-linear sites. To offset the 1.5x training-step FLOP cost of running the decoder twice (once for main reconstruction, once for L_aux), baseline SAEs receive 50% wider dictionaries (196,608 latents vs 131,072 on Gemma-7B; 49,152 vs 32,768 on Pythia-2.8B residual streams).

Gemma-7B layer 20 residual stream: matched ~97.7% to 98.0% loss recovered (lower L0 is sparser; gamma = 1.00 is unbiased)
Baseline ReLU SAE (196,608 width, 97.95% CE recovered)L0 = 46.4 | shrinkage gamma = 0.874
Gated SAE (131,072 width, 97.70% CE recovered)L0 = 15.6 | shrinkage gamma = 0.997

Source: Rajamanoharan et al. (2024), Appendix Tables 1 and 3 (1,024-token sequences).

Ablations on GELU-1L confirm every piece of the recipe matters: unfreezing the decoder inside L_aux degrades the Pareto frontier, removing r_mag slightly hurts fidelity, and completely untying W_gate and W_mag adds 50% more parameters and inference FLOPs while performing slightly worse than the weight-tied design. Inference-time optimization with Gradient Pursuit (Appendix A) also shows Gated decoders consistently outperform baseline decoders at tight target sparsities, confirming the gains come from cleaner learned feature directions rather than magnitude rescaling alone.

Caveats & Builder Takeaway

  • Training compute tax: Evaluating the frozen decoder pass in L_aux increases training-step compute by 50% (1.5x), though wall-clock slowdown is often smaller when generating activations on the fly or streaming from disk dominates runtime.
  • Discontinuity breaks path integrals: The step gate introduces a hard discontinuity that complicates attribution methods like integrated gradients, and the paper only tested base models up to 7B parameters (no chat, MoE, or multimodal models).
  • Superseded in practice by simpler siblings: Subsequent work showed direct L0-trained JumpReLU SAEs and batch-level BatchTopK SAEs match or beat Gated SAEs without the extra auxiliary decoder pass.

Gated SAEs marked the turning point where the field stopped treating L1 shrinkage as an unavoidable tax. For builders today, their tied-weight JumpReLU equivalence is the lasting takeaway: separate detection thresholds from magnitude scaling during training, and run a single fast thresholded projection at inference.