Swapping ReLU and L1 regularization for a TopK activation function and an auxiliary dead-latent loss lets sparse autoencoders scale cleanly to 16 million latents on GPT-4 activations with only 7% dead features, compared to up to 90% dead latents in unmitigated wide runs. By fixing the active latent count k directly per token and training purely on reconstruction mean-squared error (MSE), Leo Gao, Tom Dupré la Tour, Jeffrey Wu, and colleagues on OpenAI’s Superalignment team eliminated L1 activation shrinkage, uncovered clean power-law scaling, and proved that wider dictionaries recover more hypothesized concepts and produce sparser downstream effects.

  • 7% dead latents at 16M scale: Initializing W_enc = W_dec^T and adding an AuxK reconstruction term over the top k_aux = 512 dead latents (alpha = 1/32, roughly 10% compute overhead) prevents dead-feature collapse across 40 billion GPT-4 tokens.
  • 10% of GPT-4 compute recovered in LM loss: Splicing the 16M-latent autoencoder into GPT-4’s residual stream yields language-modeling cross-entropy matching 10% of GPT-4 pretraining compute (98.2% on the traditional zero-ablation metric).
  • Over 1.5x better explanation recall: Evaluated with Neuron-to-Graph (N2G) n-gram tries on GPT-2 small, TopK achieves over 1.5x higher recall at over 0.9x precision relative to ReLU baselines at matched n and L0.
  • Up to 6x theoretical kernel speedup: Exploiting k-sparsity with DenseSparseMatmul and MatmulAtSparseIndices leaves only the encoder forward pass dense, making 512-way sharding at batch size 131,072 feasible.
OpenAI’s TopK scaling recipe and what each component fixes
TopK encoder

Keeps only the k largest pre-activations and drops the L1 penalty, fixing activation shrinkage and locking exact L0 = k.

Tied init + AuxK

Initializes encoder weights parallel to decoder columns and trains dead latents (inactive 10M tokens) on residual error.

Sparse GPU kernels

Batch size 131,072, learning rate scaled as 1/sqrt(n), and sparse matmul kernels cut memory and compute up to 6x.

Source: Gao et al. (2024), Sections 2, A, and D.

How It Works

Standard sparse autoencoders penalize lambda * ||z||_1, which introduces two confounds: L1 systematically pulls nonzero activations toward zero (shrinkage), and tuning lambda shifts L0 unpredictably across widths n. To prove shrinkage empirically, the authors froze each model’s active latent mask and ran projected gradient descent to optimize nonzero values for MSE; refined values shifted sharply positive for ReLU SAEs, while TopK refinements stayed centered around zero.

TopK keeps only the k highest encoder pre-activations per token (z = TopK(W_enc(x - b_pre))), optimizing pure L2 MSE. Inputs come from normalized 64-token residual stream activations (5/6 depth in GPT-4 models, layer 8 of 12 in GPT-2 small). To stop up to 90% of latents from dying during training, latents inactive for 10 million tokens receive an AuxK loss reconstructing the main model’s residual error e = x - x_hat, alongside W_enc = W_dec^T initialization, unit-norm decoder renormalization, and an exponential moving average (0.999) of weights.

Key Findings

Holding k fixed reveals clean power laws with an irreducible error term: compute-optimal loss on GPT-4 follows L(C) = 0.09 + 0.056 * C^(-0.084), while tokens to convergence scale sublinearly as Theta(n^0.6) on GPT-2 small and Theta(n^0.65) on GPT-4, with optimal learning rate scaling as 1 / sqrt(n). Larger subject models shift the curve upward, demanding wider dictionaries for the same normalized MSE. Comparing architectures at n = 32,768 and L0 = 128, TopK beats ReLU and ProLU on both MSE and downstream cross-entropy and slightly edges out Gated SAEs.

Because MSE alone can be gamed by dense trivial codes, the paper evaluates four interpretability proxies:

Four quality checks beyond MSE as total latents n and sparsity k scale
Evaluation metricWhat it measuresEffect of larger n and k
Downstream LM lossDelta cross-entropy when splicing SAEPower law with MSE; 16M reaches 10% GPT-4 compute
1D probes (61 tasks)Best single-latent logistic lossImproves with n; beats residual baseline (0.600)
N2G precision & recallWildcard n-gram trie fidelityLarger n and smaller k help; TopK beats ReLU 1.5x recall
Ablation logit sparsityVocab tokens shifted by ablating 1 latent10-14% vs 60% for raw channels; breaks at k = 512

Source: Gao et al. (2024), Section 4.

The authors also find that standard TopK overfits to its training k when evaluated at larger k', failing to form a progressive code. Training with Multi-TopK (L(k) + L(4k) / 8) fixes that overfitting and lets practitioners swap in a dynamic JumpReLU threshold at inference time with minimal loss. SVD-UMAP analysis further hints at structure inside GPT-2’s residual stream: roughly 25% of latents project onto 25% of dimensions with higher encoder norms and fire on fewer than 100 vocabulary tokens, while the remaining 75% span up to 1,000 tokens.

Caveats and Builder Takeaway

Forcing every token to spend exactly k latents is rigid: simple tokens waste slots while dense contexts starve, and raising k near d_model (such as k = 512 on d_model = 768) pushes the dictionary toward dense, uninterpretable principal components. Follow-up methods like BatchTopK and JumpReLU address that fixed-budget bottleneck while keeping shrinkage near zero.

Two experimental limits matter when reading the headline numbers. Compute limits stopped the 16M GPT-4 run before full L(N) convergence, and all training used 64-token contexts, which is too short to capture long-horizon reasoning behaviors (and first-token attention sinks with over 10x larger residual norms distorted layer-wise MSE). As Anthropic’s 34M Claude 3 Sonnet study also noted, scale improves recovery without making every latent cleanly monosemantic: N2G only captures surface n-grams, and the authors still observed “opposite latent” pairs canceling spurious activations. Use TopK with AuxK when you need predictable L0 and fast scaling sweeps, and pair MSE with downstream ablation and precision checks before trusting individual latents.