Mechanistic Interpretability › The Linear Representation Hypothesis
Language AI HandbookAll chapters Mechanistic Interpretability › The Linear Representation HypothesisOne section · Sections in this chapter7 / 12 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Underlying much of mechanistic interpretability is an empirical observation called the linear representation hypothesis: that concepts in neural networks are represented as linear directions in the activation space, and that the model implements computations by performing linear operations on these directions.
Evidence for the linear representation hypothesis includes:
- Word2Vec arithmetic: The classic observation that
king - man + womanapproximately equalsqueenin word embedding space, which works because the "royalty" direction and the "gender" direction are approximately linear. - Representation steering: Interventions that add a linear vector to activations can predictably change model behavior (covered in the Activation Steering chapter).
- Probing classifiers: Linear probes (from Chapter 4) can decode many properties from neural representations with high accuracy, suggesting those properties are linearly encoded.
The hypothesis is more than an observation about embeddings; it extends to intermediate representations throughout the network. Researchers have found linear directions encoding grammatical number, verb tense, sentiment, factual attributes (like "is this a city in France"), and even more abstract properties. When these directions are identified (through probing or SAE decomposition), they can be used to construct mechanistic explanations of model behavior.
If representations are linear, then circuits can be described as matrix operations on feature vectors, which makes the algebra tractable. The residual stream decomposition above relies on this: if attention head outputs add linearly, and if features are encoded linearly, then the composition of circuits is also approximately linear. This linearity assumption enables the QK and OV circuit analysis described earlier, because those analyses express the head's computation as matrix multiplication, which is inherently linear.
The linear representation hypothesis has important caveats. It holds approximately, not exactly. Some computations in neural networks are nonlinear (the MLP layers implement nonlinear functions). And the hypothesis is harder to verify for higher-level, abstract concepts than for simple lexical properties. The direction encoding "is this token a number?" is easier to find and use than a direction encoding "is this sentence expressing irony?" partly because irony involves complex contextual dependencies that may not reduce to a single direction.
A subtler issue is that even when representations are linear, the computations performed by the model may not be. A circuit that reads a linear feature direction and then passes it through an MLP may produce a nonlinear function of that feature. The linear representation hypothesis enables the first step (reading the feature) but does not guarantee that the full computation is linear. Researchers increasingly combine linear representation analysis with function-level analysis of MLP neurons to handle this complexity.