arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2412.05571cs.CL
收藏

极坐标系表征大语言模型中的句法

A polar coordinate system represents syntax in large language models

ENS, PSL University(巴黎文理研究大学(ENS));Meta AI

Pablo Diego-Simón, Stéphane D'Ascoli, Emmanuel Chemla, Yair Lakretz, Jean-Rémi King

AI总结:

该研究提出极坐标探针,从词嵌入的距离和方向读取句法关系,发现LLM中间层低维子空间存在极坐标系,能显式表征语言学符号结构,性能远超结构探针。

摘要:

句法树最初以符号表征形式被形式化定义,它也可以在大语言模型(LLM)的激活中得到有效表征。实际上,“结构探针(Structural Probe)”可以找到神经激活的一个子空间,在该子空间中,句法相关的词彼此相对接近。然而,这种句法编码仍不完整:结构探针词嵌入之间的距离可以表征句法关系的存在,但无法表征句法关系的类型和方向。在此,我们提出假设:句法关系实际上是由邻近嵌入之间的相对方向编码的。为验证该假设,我们提出了“极坐标探针(Polar Probe)”,该探针经训练后可从词嵌入之间的距离和方向两方面读取句法关系。我们的方法得出了三项主要发现。第一,我们的极坐标探针成功恢复了句法关系的类型和方向,性能比结构探针高出近两倍。第二,我们证实这种极坐标系存在于许多大语言模型中间层的低维子空间中,且在最新的前沿模型中精度越来越高。第三,我们通过一个新基准证明,相似的句法关系在句法树的嵌套层级中以相似方式编码。总体而言,这项工作表明,大语言模型会自发学习一种神经激活几何结构,该结构可显式表征语言学理论中的主要符号结构。

英文摘要:

Originally formalized with symbolic representations, syntactic trees may also be effectively represented in the activations of large language models (LLMs). Indeed, a 'Structural Probe' can find a subspace of neural activations, where syntactically related words are relatively close to one-another. However, this syntactic code remains incomplete: the distance between the Structural Probe word embeddings can represent the existence but not the type and direction of syntactic relations. Here, we hypothesize that syntactic relations are, in fact, coded by the relative direction between nearby embeddings. To test this hypothesis, we introduce a 'Polar Probe' trained to read syntactic relations from both the distance and the direction between word embeddings. Our approach reveals three main findings. First, our Polar Probe successfully recovers the type and direction of syntactic relations, and substantially outperforms the Structural Probe by nearly two folds. Second, we confirm that this polar coordinate system exists in a low-dimensional subspace of the intermediate layers of many LLMs and becomes increasingly precise in the latest frontier models. Third, we demonstrate with a new benchmark that similar syntactic relations are coded similarly across the nested levels of syntactic trees. Overall, this work shows that LLMs spontaneously learn a geometry of neural activations that explicitly represents the main symbolic structures of linguistic theory.

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

↑