The Geometry of Categorical and Hierarchical Concepts in Large Language Models
Kiho Park, Yo Joong Choe, Yibo Jiang, Victor Veitch
TL;DR
This work generalizes the linear representation hypothesis from simple binary directions to vector and polytope representations, linking semantic hierarchy to orthogonality in LLM representation spaces. By unifying embedding and unembedding spaces via a causal inner product, it defines vector representations for binary features and polytope representations for categorical concepts, and proves that hierarchical relations manifest as orthogonal subspaces. Empirically, the authors validate the theory on Gemma and LLaMA-3 using WordNet, showing that WordNet hierarchies are linearly represented and that manipulations along feature-vectors affect target concepts without disturbing off-target ones. The findings offer a foundational, geometrically grounded lens for interpreting LLM semantics and point toward hierarchy-aware interpretability tools and future work on internal-layer geometry.
Abstract
The linear representation hypothesis is the informal idea that semantic concepts are encoded as linear directions in the representation spaces of large language models (LLMs). Previous work has shown how to make this notion precise for representing binary concepts that have natural contrasts (e.g., {male, female}) as directions in representation space. However, many natural concepts do not have natural contrasts (e.g., whether the output is about an animal). In this work, we show how to extend the formalization of the linear representation hypothesis to represent features (e.g., is_animal) as vectors. This allows us to immediately formalize the representation of categorical concepts as polytopes in the representation space. Further, we use the formalization to prove a relationship between the hierarchical structure of concepts and the geometry of their representations. We validate these theoretical results on the Gemma and LLaMA-3 large language models, estimating representations for 900+ hierarchically related concepts using data from WordNet.
