[论文解读] The Linear Representation Hypothesis and the Geometry of Large Language Models
该论文通过输入与输出空间的反事实formalizes线性概念表示,提出因果内积以统一嵌入与去嵌入空间,并在LLaMA-2实验中验证了线性概念方向与可控干预的存在性。
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.
研究动机与目标
- 使用嵌入(输入)和去嵌嵌入(输出)空间中的反事实对来形式化“线性表示”的含义。
- 将线性表示与解释(测量)和控制(干预)通过形式化定理联系起来。
- 引入并论证一个因果内积,使因果上可分离的概念正交并统一表示。
- 开发用于估计内积和构建探针与驾驭向量的实用方法。
- 在LLaMA-2上进行经验验证,展示线性概念方向和干预效果。
提出的方法
- 将概念形式化为二元变量,在嵌入(输入)和去嵌嵌入(输出)空间中给出反事实输出Y(W=w)。
- 证明联系:去嵌嵌入表示与测量相关;嵌入表示与干预相关。
- 在去嵌嵌入空间引入因果内积,使因果上可分离的概念正交并建立去嵌嵌入表示与嵌入表示之间的Riesz同构。
- 给出使用Cov(γ)的因果内积的显式形式,并展示如何得到使嵌入与去嵌嵌入对齐的规范表示g和l。
- 在实践中估计内积并从反事实对构建探针和驾驭向量;通过对LLaMA-2(7B)的实验进行验证。
- 通过实验展示概念方向存在、可作为线性探针、实现干预,以及内积选择的重要性。
实验结果
研究问题
- RQ1在嵌入和去嵌嵌入空间中,概念线性表示究竟意味着什么?
- RQ2如何通过反事实对形式化线性表示并将其与测量和干预联系起来?
- RQ3哪种内积最好地捕捉语义结构并统一嵌入/去嵌嵌入表示?
- RQ4我们是否能够在真实的LLM中经验性地检测线性概念方向并执行干预?
主要发现
- 概念作为去嵌嵌入空间中的方向来表示,可从反事实词对推断。
- 推导出的概念方向在嵌入空间中作为目标概念的线性探针(测量)。
- 嵌入表示对应干预表示,能够对目标概念分布进行受控的改变。
- 因果内积通过Riesz同构统一嵌入与去嵌嵌入表示,并可从数据中估计(如 Cov(γ)^{-1})。
- 规范表示g和l在选定内积下使嵌入与去嵌嵌入表示对齐,变换后可使用欧几里得工具。
- 对LLaMA-2的实证结果表明,在估计的因果内积下,因果上可分离的概念大致正交,支持理论,但存在某些词义歧义等例外。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。