[2311.03658] The Linear Representation Hypothesis and the Geometry of Large Language Models
Abstract:Informally, the 'linear representation hypothesis' is the idea that high-level concepts are represented linearly as directions in some representation space. In this paper, we address two closely related questions: What does "linear representation" actually mean? And, how do we make sense of geometric notions (e.g., cosine similarity or projection) in the representation space? To answer these, we use the language of counterfactuals to give two formalizations of "linear representation", one in the output (word) representation space, and one in the input (sentence) space. We then prove these connect to linear probing and model steering, respectively. To make sense of geometric notions, we use the formalization to identify a particular (non-Euclidean) inner product that respects language structure in a sense we make precise. Using this causal inner product, we show how to unify all notions of linear representation. In particular, this allows the construction of probes and steering vectors using counterfactual pairs. Experiments with LLaMA-2 demonstrate the existence of linear representations of concepts, the connection to interpretation and control, and the fundamental role of the choice of inner product.
View PDF HTML (experimental) Abstract:Informally, the 'linear representation hypothesis' is the idea that high-level concepts are represented linearly as directions in some representation space. In this paper, we address two closely related questions: What does "linear representation" actually mean? And, how do we make sense of geometric notions (e.g., cosine similarity or projection) in the representation space? To answer these, we use the language of counterfactuals to give two formalizations of "linear representation", one in the output (word) representation space, and one in the input…
saved by
related reading
- On the Origins of Linear Representations in Large Language Modelsarxiv.org
- The Linear Representation Hypothesis and the Geometry of Large Language Modelsarxiv.org
- The World Inside Neural Networksgoodfire.ai
- Verbalizable Representations Form a Global Workspace in Language Modelstransformer-circuits.pub
- Structure and Interpretation of Deep Networkssidn.baulab.info
- Tracing the thoughts of a large language model \ Anthropicanthropic.com
- The Geometry of Categorical and Hierarchical Concepts in Large Language Modelsarxiv.org
- On the Biology of a Large Language Modeltransformer-circuits.pub
- [2210.13382] Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Taskarxiv.org
- Language Models, World Models, and Human Model-Buildinglingo.csail.mit.edu
- Training Large Language Models to Reason in a Continuous Latent Spacearxiv.org
- Actually, Othello-GPT Has A Linear Emergent World Representation - Neel Nandaneelnanda.io