Sparse autoencoder

A neural network trained to rebuild a model's internal activations from a small number of active features, used to find human-interpretable directions inside AI models.

Roadmap step 4 of 4: Looking inside the model. Try it: SAE features of GPT-2, layers 2, 8 and 11 ↗

What it is

A sparse autoencoder (SAE) is a small network with an encoder and a decoder. It takes activations from inside a larger model, maps them into a much wider set of features where only a few are active at once, and then reconstructs the original activations. The sparsity constraint pushes each feature to represent one narrower, more distinct pattern. SAEs are a common tool in interpretability research.

Why it matters

Individual neurons in a language model often respond to many unrelated things, which makes them hard to read. SAEs offer a way to break activations into features that people can often label, such as a topic or a style of text. This helps researchers inspect what a model represents, audit behavior, and test ways to steer or monitor it for safety.

How it works

The SAE is trained on activations collected from a chosen layer, such as the residual stream or an MLP output, while the model runs on lots of text. The loss combines a reconstruction error term with a penalty that encourages few active features, or uses a hard limit on how many can be active. After training, researchers look at which inputs make each feature fire and what happens when the feature is amplified or suppressed. This approach is motivated by superposition, where a model packs more concepts than it has neurons.