The Geometry of Categorical and Hierarchical Concepts in Large Language Models

Kiho Park, Yo Joong Choe, Yibo Jiang, Victor Veitch

Executive Summary

This paper extends the "Linear Representation Hypothesis"—the idea that large language models (LLMs) store concepts as directions—by demonstrating that concepts are more accurately understood as vectors and polytopes. The authors prove and empirically validate that hierarchical relationships (e.g., Animal → Mammal → Dog) are encoded as orthogonal subspaces, providing a surprisingly simple and elegant geometric map of how LLMs organize knowledge.

The Problem: Beyond Binary Directions

For years, researchers have explored the Linear Representation Hypothesis (LRH): the notion that semantic concepts (like gender or royalty) exist as linear directions in an LLM's high-dimensional representation space. While this framework works well for binary contrasts (e.g., male vs. female), it struggles with "unary" features (e.g., "is this an animal?") or complex, multi-class categories (e.g., {mammal, bird, fish, reptile}).

Furthermore, the field has lacked a clear geometric explanation for hierarchy. If an LLM knows a dog is a mammal and a mammal is an animal, how is that nested logic reflected in the mathematics of its hidden states? This paper fills that gap by moving beyond simple directions to a more robust framework of vectors and polytopes.

Methodology

The authors build their framework on three key pillars:

  1. The Causal Inner Product: They utilize a "whitening" transformation to unify the embedding and unembedding spaces. This creates a "canonical" representation space where Euclidean geometry directly aligns with the model's semantic logic.
  2. From Directions to Vectors: Instead of defining a concept merely as a line in space, they define it as a specific vector. This subtle shift allows them to use vector addition and subtraction to compose complex concepts.
  3. Linear Discriminant Analysis (LDA): To locate these vectors in a real model, they employ a variant of LDA. This technique finds the projection that minimizes the variance within a concept (making all "dog" tokens look mathematically similar) while maximizing the distance between different concepts.

To test these ideas, the study relies primarily on WordNet, extracting over 900 hierarchically related noun and verb concepts. They also used ChatGPT-4 to generate clean sets of tokens for specific high-level categories to manually verify their findings.

Key Insights and Ideas

Hierarchical concepts represented as geometric additions of orthogonal subspaces.
  • Hierarchy is Orthogonality: The authors prove that if concept B is a sub-category of concept A (e.g., Mammal is a sub-category of Animal), the vector representing the "extra" information in B is perpendicular (orthogonal) to the vector for A. Geometrically, the model adds a new, independent dimension for every step down the taxonomic ladder.
  • Categories as Polytopes: A categorical concept (like "Types of Vertebrates") is represented as a polytope (a multi-dimensional shape like a simplex or tetrahedron). Each vertex of the shape represents a specific sub-category (Mammal, Bird, Fish, etc.).
  • The "Is-A" Geometry: Because of this orthogonality, the representation of a specific item (like a "Golden Retriever") is essentially the sum of the orthogonal vectors of all its ancestors in the hierarchy (Animal + Mammal + Dog).
  • Universality: These geometric structures appear consistently across different model families (Gemma and LLaMA-3), suggesting this is a fundamental way transformer-based LLMs organize information.

Key Results

Empirical 2D and 3D projections showing orthogonality and polytope clustering of concepts.
  • Empirical Validation: In Gemma-2B and LLaMA-3-8B, the authors successfully estimated vectors for 900+ WordNet concepts. Projections of "test" words onto these vectors were near 1.0, while random words were near 0.0, confirming the vectors truly captured the intended features.
  • Orthogonality in Action: The authors demonstrated that intervening on a "parent" concept (e.g., adding the Animal vector to a hidden state) significantly changed the probability of animal-related tokens but had almost zero effect on the relative probabilities of sub-categories (like Dog vs. Cat). This confirms that sub-category information lives in a separate, orthogonal space.
  • Visual Proof: The paper provides striking 3D visualizations showing tokens for different animals clustering precisely at the vertices of a tetrahedron, perfectly illustrating the polytope theory in practice.

Limitations and Future Work

  • The "Final Layer" Focus: The study focuses almost exclusively on the final layer of the LLM (the softmax layer). It remains to be seen if this clean geometric structure holds up in the "messy" intermediate layers where the bulk of computation occurs.
  • Whitening Requirement: The results depend heavily on the "whitening" transformation of the representation space. Computing this transformation for internal layers is non-trivial and remains an area for future research.
  • Hyperbolic vs. Euclidean: While some previous work suggested hierarchical data should live in hyperbolic space, this paper finds a highly successful Euclidean (linear) interpretation. Reconciling these two views is a promising theoretical direction.

Summary updated

BibTeX
@inproceedings{park2025geometry,
  author = {Kiho Park and Yo Joong Choe and Yibo Jiang and Victor Veitch},
  title = {{The Geometry of Categorical and Hierarchical Concepts in Large Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=bVTM2QKYuA},
}
Figure