Skip to main content
QUICK REVIEW

[Paper Review] The Geometry of Categorical and Hierarchical Concepts in Large Language Models

Kiho Park, Yo Joong Choe|arXiv (Cornell University)|Jun 3, 2024
Natural Language Processing TechniquesComputer Science3 citations
TL;DR

This paper proposes a geometric framework for understanding how categorical and hierarchical concepts are encoded in large language models (LLMs). It extends the linear representation hypothesis by showing that categorical concepts form simplices in representation space, hierarchical relations are encoded via orthogonality between subspaces, and complex concepts emerge as polytopes from direct sums of simplices—validated empirically on Gemma using WordNet concepts.

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.

Motivation & Objective

  • To understand how high-level semantic concepts like 'animal' are represented in the vector spaces of large language models.
  • To investigate how hierarchical relationships—such as 'dog is a kind of mammal'—are encoded geometrically in LLM representations.
  • To extend the linear representation hypothesis beyond binary concepts to categorical and hierarchical structures.
  • To validate the theoretical framework using empirical estimation of representations in the Gemma LLM.

Proposed method

  • Represent categorical concepts as vectors in the representation space by extending the linear representation hypothesis from directions to vectors.
  • Define hierarchical relations between concepts using orthogonality between subspaces spanned by their vector representations.
  • Construct the representation of a categorical concept (e.g., 'animal') as the convex hull (polytope) of its constituent binary features (e.g., 'mammal', 'bird'), showing it forms a simplex under natural conditions.
  • Estimate representations using a whitened unembedding layer to align the representation space with semantic structure.
  • Validate the geometric structure by extracting 957 hierarchically related concepts from WordNet and measuring their vector representations in the Gemma model.
  • Use heatmaps and geometric analysis to confirm that hierarchical substructures correspond to orthogonal subspaces and simplex-like configurations.

Experimental results

Research questions

  • RQ1How are categorical concepts such as 'animal' represented in the embedding space of large language models?
  • RQ2How are hierarchical relationships between concepts—e.g., 'dog' as a subtype of 'mammal'—encoded geometrically in LLM representations?
  • RQ3Can the linear representation hypothesis be extended from binary concepts (e.g., 'male' ↔ 'female') to multi-class categorical and hierarchical concepts?
  • RQ4To what extent do the geometric structures of polytopes and orthogonality in representation space reflect the semantic hierarchy of WordNet?
  • RQ5Can the theoretical framework be empirically validated in a real LLM like Gemma?

Key findings

  • Categorical concepts such as 'animal' are represented as simplices in the representation space of the Gemma LLM, with vertices corresponding to their constituent categories like 'mammal' and 'bird'.
  • Hierarchically related concepts—such as 'animal' and 'mammal'—are encoded in orthogonal subspaces, with the orthogonality being empirically measurable and consistent across the WordNet hierarchy.
  • The representation of complex concepts is formed as a polytope constructed from the direct sum of simplices, reflecting the hierarchical decomposition of semantic categories.
  • Empirical results on 957 WordNet concepts show strong alignment between the geometric structure of the representations and the known semantic hierarchy, with minimal deviation from theoretical predictions.
  • The geometric structure is stable and observable in the final-layer representations of the Gemma model, supporting the existence of a structured, interpretable semantic geometry.
  • The findings suggest that interpretability methods should prioritize hierarchical vector decompositions (e.g., differences like 'mammal - animal') over monolithic features to achieve better disentanglement.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.