Interpretability

sparse autoencoders (for LLMs)

A sparse autoencoder is a tool for undoing superposition. It is a small extra network bolted onto a layer of a frozen LLM: it takes the layer's tangled activation vector, expands it into a much wider list of features, forces almost all of them to be zero at once, and then reconstructs the original vector from the few that remain. Because only a handful may be active, each one is pressured to stand for a single, clean concept.

Mechanically it learns an overcomplete dictionary. The encoder maps an activation to thousands or millions of sparse feature coefficients; the decoder rebuilds the activation as a sparse sum of learned feature directions. Training minimizes reconstruction error plus a sparsity penalty. When it works, inspecting the top examples that fire each feature reveals startlingly interpretable units — a feature for legal language, for the Golden Gate Bridge, for code that opens a file.

SAEs have become the workhorse of modern mechanistic interpretability because they turn an opaque vector into a readable list of present concepts. But they are imperfect: features can be split or merged depending on dictionary size, reconstruction is lossy, and a clean-looking feature still needs causal validation before you trust that the model truly uses it.

\min_{E,D} \; \| x - D\,f \|_2^2 + \lambda \|f\|_1, \quad f = \mathrm{ReLU}(E x)

Reconstruct activation x from sparse codes f (L1 penalty λ encourages sparsity).

Also called
SAEsdictionary learning