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

预测中心是大型语言模型中的上下文信息频繁词元

Prediction hubs are context-informed frequent tokens in LLMs

Technical University of Denmark(丹麦技术大学);Universitat Pompeu Fabra(庞培法布拉大学);ICREA(加泰罗尼亚高等研究院)

Beatrix M. G. Nielsen, Iuri Macocco, Marco Baroni

AI总结:

本研究证明LLM中预测中心源于上下文频繁词元而非有害现象,并指出使用欧氏或余弦距离比较表示时需警惕有害中心。

摘要:

中心性(Hubness)是指少数点成为不成比例数量的其他点的最近邻的趋势,这种现象通常在对高维数据应用标准距离度量时出现,并常对基于距离的分析产生负面影响。由于自回归大型语言模型(LLMs)在高维表示上运行,我们探究它们是否也受到中心性的影响。我们首先证明,LLMs执行的大规模表示比较操作,即上下文向量与解嵌入向量之间的比较以确定续接概率,并不具备通常导致有害中心性出现的距离集中现象的特征。随后,我们通过实验表明,这种比较仍然会导致高度的中心性,但此情况下的中心并不构成干扰。它们反而是上下文调制的频繁词元经常出现在下一词元预测的候选池中的结果。然而,当使用其他距离来比较LLM表示时,我们不具备相同的理论保证,并且确实观察到有害中心的出现。主要有两点启示。第一,中心性虽然在高维空间中普遍存在,但在LLMs用于下一词元预测时,并非需要缓解的负面属性。第二,当使用欧几里得距离或余弦距离比较LLMs的表示时,存在有害中心的高风险,实践者应在相关情况下使用缓解技术。

英文摘要:

Hubness, the tendency for a few points to be among the nearest neighbours of a disproportionate number of other points, commonly arises when applying standard distance measures to high-dimensional data, often negatively impacting distance-based analysis. As autoregressive large language models (LLMs) operate on high-dimensional representations, we ask whether they are also affected by hubness. We first prove that the only large-scale representation comparison operation performed by LLMs, namely that between context and unembedding vectors to determine continuation probabilities, is not characterized by the concentration of distances phenomenon that typically causes the appearance of nuisance hubness. We then empirically show that this comparison still leads to a high degree of hubness, but the hubs in this case do not constitute a disturbance. They are rather the result of context-modulated frequent tokens often appearing in the pool of likely candidates for next token prediction. However, when other distances are used to compare LLM representations, we do not have the same theoretical guarantees, and, indeed, we see nuisance hubs appear. There are two main takeaways. First, hubness, while omnipresent in high-dimensional spaces, is not a negative property that needs to be mitigated when LLMs are being used for next token prediction. Second, when comparing representations from LLMs using Euclidean or cosine distance, there is a high risk of nuisance hubs and practitioners should use mitigation techniques if relevant.

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

↑