arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.06599cs.CLcs.AI

上下文如何塑造真相:LLMs中语句级真相表示的几何变换

How Context Shapes Truth: Geometric Transformations of Statement-level Truth Representations in LLMs

University of Copenhagen(哥本哈根大学)

Shivam Adarsh, Maria Maistro, Christina Lioma

AI总结:

研究LLMs中上下文如何改变真相向量,发现早期层正交、中层收敛,上下文增加向量幅度,大模型通过方向变化区分相关与无关上下文。

摘要:

大型语言模型(LLMs)通常将语句是否为真编码为其残差流激活中的向量。这些向量,也称为真相向量,已在先前工作中被研究,然而当引入上下文时它们如何变化仍未被探索。我们通过测量(1)有上下文和无上下文时真相向量之间的方向变化($\ heta$)以及(2)添加上下文后真相向量的相对幅度来研究这一问题。在四个LLM和四个数据集上,我们发现:(1)真相向量在早期层大致正交,在中层收敛,在后期层可能稳定或继续增加;(2)添加上下文通常增加真相向量的幅度,即激活空间中真与假表示之间的分离被放大;(3)较大模型主要通过方向变化($\ heta$)区分相关与无关上下文,而较小模型通过幅度差异显示这种区分。我们还发现与参数知识冲突的上下文比参数对齐的上下文产生更大的几何变化。据我们所知,这是首个提供上下文如何在LLMs激活空间中变换真相向量的几何特征描述的工作。

英文摘要:

Large Language Models (LLMs) often encode whether a statement is true as a vector in their residual stream activations. These vectors, also known as truth vectors, have been studied in prior work, however how they change when context is introduced remains unexplored. We study this question by measuring (1) the directional change ($θ$) between the truth vectors with and without context and (2) the relative magnitude of the truth vectors upon adding context. Across four LLMs and four datasets, we find that (1) truth vectors are roughly orthogonal in early layers, converge in middle layers, and may stabilize or continue increasing in later layers; (2) adding context generally increases the truth vector magnitude, i.e., the separation between true and false representations in the activation space is amplified; (3) larger models distinguish relevant from irrelevant context mainly through directional change ($θ$), while smaller models show this distinction through magnitude differences. We also find that context conflicting with parametric knowledge produces larger geometric changes than parametrically aligned context. Collectively, these findings provide a geometric characterization of how context transforms the truth vector in the activation space of LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑