arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.01034cs.CLcs.AIcs.LG
收藏

少即是多:上下文语言模型的局部内在维度

Less is More: Local Intrinsic Dimensions of Contextual Language Models

Faculty of Mathematics and Natural Sciences, Heinrich Heine University Düsseldorf(明斯特大学数学与自然科学学院);Institute of AI for Health, Helmholtz Munich(健康人工智能研究所);Technical University of Munich(慕尼黑技术大学);University of Fribourg(弗里堡大学)
Benjamin Matthias Ruppik, Julius von Rohrscheidt, Carel van Niekerk, Michael Heck, Renato Vukovic, Shutong Feng, Hsien-chin Lin, Nurul Lubis, Bastian Rieck, Mar… 展开作者

Benjamin Matthias Ruppik, Julius von Rohrscheidt, Carel van Niekerk, Michael Heck, Renato Vukovic, Shutong Feng, Hsien-chin Lin, Nurul Lubis, Bastian Rieck, Marcus Zibrowius, Milica Gašić

AI总结:

本文通过测量上下文语言模型潜在空间的局部内在维度,揭示训练与微调中的动态变化,并提出局部维度均值降低可预测性能提升的实用启发式方法。

摘要:

理解大型语言模型(LLMs)的内部机制仍然是一项具有挑战性且复杂的任务。即使是诸如微调如何影响模型行为这样的基本问题,也常常需要大量的实证评估。在本文中,我们引入了一种基于上下文潜在嵌入几何性质的新视角,以研究训练和微调的效果。为此,我们测量了上下文语言模型潜在空间的局部维度,并分析了它们在训练和微调过程中的变化。我们表明,局部维度能够提供对模型训练动态和泛化能力的洞察。具体而言,局部维度的均值可以预测模型训练能力何时耗尽(如对话状态跟踪任务所示)、过拟合(如情感识别任务所示)以及顿悟(grokking)现象(如算术任务所示)。此外,我们的实验提出了一种实用的启发式方法:局部维度均值的降低往往伴随着并预示着后续的性能提升。通过这一探索,我们旨在让从业者更深入地理解微调对嵌入空间的影响,从而在针对特定应用配置模型时做出明智的决策。这项工作的结果通过弥合内在模型机制与相应嵌入中几何性质之间的差距,为关于LLMs可解释性、适应性和泛化性的持续讨论做出了贡献。

英文摘要:

Understanding the internal mechanisms of large language models (LLMs) remains a challenging and complex endeavor. Even fundamental questions, such as how fine-tuning affects model behavior, often require extensive empirical evaluation. In this paper, we introduce a novel perspective based on the geometric properties of contextual latent embeddings to study the effects of training and fine-tuning. To that end, we measure the local dimensions of a contextual language model's latent space and analyze their shifts during training and fine-tuning. We show that the local dimensions provide insights into the model's training dynamics and generalization ability. Specifically, the mean of the local dimensions predicts when the model's training capabilities are exhausted, as exemplified in a dialogue state tracking task, overfitting, as demonstrated in an emotion recognition task, and grokking, as illustrated with an arithmetic task. Furthermore, our experiments suggest a practical heuristic: reductions in the mean local dimension tend to accompany and predict subsequent performance gains. Through this exploration, we aim to provide practitioners with a deeper understanding of the implications of fine-tuning on embedding spaces, facilitating informed decisions when configuring models for specific applications. The results of this work contribute to the ongoing discourse on the interpretability, adaptability, and generalizability of LLMs by bridging the gap between intrinsic model mechanisms and geometric properties in the respective embeddings.

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

↑