arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.08348cs.CL
收藏

下一词预测中的语义几何:优化如何隐式组织语言表征

Geometry of Semantics in Next-Token Prediction: How Optimization Implicitly Organizes Linguistic Representations

Department of Electrical and Computer Engineering(电气与计算机工程系);University of British Columbia(不列颠哥伦比亚大学)

Yize Zhao, Christos Thrampoulidis

AI总结:

本文通过数学模型和实验证明,下一词预测的优化过程隐式地通过奇异值分解组织语义结构,形成从宽泛到细粒度的层级,并据此提出基于象限的聚类方法以识别可解释的语义类别。

摘要:

我们研究了下一词预测(NTP)优化如何引导语言模型从文本中提取并组织语义结构。我们的分析基于一个易于处理的数学模型和受控的合成数据,揭示了NTP隐式地引导模型通过奇异值分解(SVD)来分解一个编码上下文到下一词共现模式的中心化支持矩阵。虽然模型从未显式地构造该矩阵,但学习到的词嵌入和上下文嵌入会收敛到其SVD因子,其中奇异向量通过其符号模式编码潜在的语义概念。我们证明了对应于较大奇异值的概念在训练过程中被更早地学习,从而产生一种自然的语义层级,其中宽泛的类别先于细粒度的类别出现。这一见解启发了基于象限的聚类方法,该方法结合概念符号来识别可解释的语义类别。我们在合成数据集和预训练语言模型上验证了我们的发现,恢复了多样的语义结构,如语法类别、命名实体类型和主题区分(医学、娱乐)。我们的工作弥合了经典分布语义学与神经坍缩几何之间的鸿沟,刻画了基于梯度的优化如何隐式地决定编码语义结构的矩阵表示和分解方法。

英文摘要:

We investigate how next-token prediction (NTP) optimization leads language models to extract and organize semantic structure from text. Our analysis, based on a tractable mathematical model and controlled synthetic data, reveals that NTP implicitly guides models to factor a centered support matrix encoding context-to-next-token co-occurrence patterns via singular value decomposition (SVD). While models never explicitly construct this matrix, learned word and context embeddings converge to its SVD factors, with singular vectors encoding latent semantic concepts through their sign patterns. We demonstrate that concepts corresponding to larger singular values are learned earlier during training, yielding a natural semantic hierarchy where broad categories emerge before fine-grained ones. This insight motivates orthant-based clustering, a method that combines concept signs to identify interpretable semantic categories. We validate our findings on synthetic datasets and pretrained language models, recovering diverse semantic structures such as grammatical categories, named entity types, and topical distinctions (medical, entertainment). Our work bridges classical distributional semantics and neural collapse geometry, characterizing how gradient-based optimization implicitly determines both the matrix representation and factorization method that encode semantic structure.

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

↑