Unmixing activations with a sparsity penalty

A language model packs far more concepts into its activations than it has room to keep separate, and no single autoencoder can undo that crowding for free. Every design choice in the one built here trades sparsity against how faithfully it reconstructs what it was given.

This theme walks through that trade in full: the dictionary of learned features, the tied and untied weights, the dictionary rows that stop firing, and a reconstruction check that swaps the autoencoder's output back into the model and measures the real cost in prediction quality. Sweeping the sparsity penalty traces one smooth curve with no obvious best setting, the paper's own admission that there is no single correct decomposition, only points along it.

Cunningham et al. 2023's method is a single small autoencoder, a sparse autoencoder, and nearly every design choice in it is a position on one tradeoff. Each row of its weight matrix is a dictionary feature, and training minimizes a reconstruction loss (squared error between input and output) plus a sparsity loss, an L1 penalty on hidden-layer coefficients weighted by a coefficient alpha. The dictionary expansion factor (R) sets how overcomplete the hidden layer is; tied encoder/decoder weights halve the parameter count by forcing the two matrices to share values, though this hurts performance enough to motivate an untied variant for SAE training on the MLP sublayer, a setting where dead features, dictionary rows that never fire, become common. Reconstruction never reaches zero: the reconstruction-substitution perplexity metric shows swapping in Pythia-70M's reconstructed layer-2 activations raises Pile perplexity from 25 to 40. Sweeping alpha traces a smooth sparsity-reconstruction tradeoff with no knee, weak evidence against there being one correct decomposition, only points along a curve. The whole apparatus scales up sparse dictionary learning, the sparse-coding framework borrowed from vision and neuroscience.