[论文解读] The Geometry of Categorical and Hierarchical Concepts in Large Language Models
本文提出了一种几何框架,用于理解大型语言模型(LLMs)中类别和层次概念的编码方式。该研究扩展了线性表征假说,表明类别概念在表征空间中形成单纯形,层次关系通过子空间之间的正交性编码,而复杂概念则作为单纯形的直和形成的多面体——该结论在Gemma模型上使用WordNet概念进行了实证验证。
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.
研究动机与目标
- 理解大型语言模型的向量空间中,如'animal'这样的高级语义概念是如何表征的。
- 研究层次关系(如'dog is a kind of mammal')在LLM表征中如何以几何方式编码。
- 将线性表征假说从二元概念扩展到类别和层次结构。
- 通过在Gemma LLM中对表征进行实证估计,验证理论框架。
提出的方法
- 通过将线性表征假说从方向扩展到向量,将类别概念表示为表征空间中的向量。
- 使用其向量表征所张成的子空间之间的正交性,来定义概念之间的层次关系。
- 将类别概念(如'animal')的表征构建为构成其二元特征(如'mammal', 'bird')的凸包(多面体),在自然条件下表明其形成单纯形。
- 使用白化去嵌入层来估计表征,以使表征空间与语义结构对齐。
- 通过从WordNet中提取957个具有层次关系的概念,并测量其在Gemma模型中的向量表征,来验证几何结构。
- 使用热图和几何分析确认,层次子结构对应于正交子空间和类似单纯形的配置。
实验结果
研究问题
- RQ1大型语言模型的嵌入空间中,类别概念如'animal'是如何表征的?
- RQ2概念之间的层次关系(如'dog'作为'mammal'的子类型)在LLM表征中如何以几何方式编码?
- RQ3线性表征假说能否从二元概念(如'male' ↔ 'female')扩展到多类别类别和层次概念?
- RQ4表征空间中多面体和正交性的几何结构在多大程度上反映了WordNet的语义层次?
- RQ5该理论框架能否在像Gemma这样的真实LLM中得到实证验证?
主要发现
- 类别概念如'animal'在Gemma LLM的表征空间中被表示为单纯形,其顶点对应于其构成类别,如'mammal'和'bird'。
- 具有层次关系的概念(如'animal'和'mammal')被编码在正交子空间中,且该正交性在WordNet层次结构中具有可实证测量性和一致性。
- 复杂概念的表征是通过单纯形的直和构造的多面体,反映了语义类别的层次分解。
- 在957个WordNet概念上的实证结果表明,表征的几何结构与已知的语义层次高度一致,与理论预测的偏差极小。
- 该几何结构在Gemma模型的最终层表征中稳定且可观测,支持了结构化、可解释的语义几何的存在。
- 研究结果表明,可解释性方法应优先考虑层次向量分解(如'mammal - animal'的差异),而非单一整体特征,以实现更好的解耦。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。