arXiv:2504.01002cs.CLcs.AI2025-04NeurIPS被引 18

发现语言模型的词嵌入不满足流形假设,影响模型推理稳定性。

Token embeddings violate the manifold hypothesis

  • 提出基于纤维丛结构的统计检验方法,判断词嵌入局部是否平滑。
  • 在多个开源大模型中频繁拒绝原假设,表明词嵌入非流形结构。
  • 揭示含特定词的提示会导致输出更不稳定,适用于模型鲁棒性研究者。

理解大语言模型(LLM)的行为需基于对其输入词嵌入空间的正确认识。若该空间与假设不符,对模型的理解和结论可能出错。本文从实证和理论角度揭示了词嵌入的结构特征,提出一种新统计检验:以每个词周围邻域具有相对平坦光滑结构为零假设,即“纤维丛假设”(fiber bundle hypothesis)。该假设是带边界的流形的推广,可划分为小半径与大半径两种空间区域。若在某词ψ处拒绝零假设,则表明ψ邻域内存在词子空间的不规则性。在多个具有独特词嵌入的开源大模型上进行测试,发现零假设常被拒绝,说明词嵌入空间并非纤维丛,因而也非流形。因此,当一个语义等价的提示中包含被检测出异常的词时,其生成结果的稳定性将显著降低。

原文摘要 · Abstract (English)

A full understanding of the behavior of a large language model (LLM) requires our grasp of its input token space. If this space differs from our assumptions, our comprehension of and conclusions about the LLM will likely be flawed. We elucidate the structure of the token embeddings both empirically and theoretically. We present a novel statistical test assuming that the neighborhood around each token has a relatively flat and smooth structure as the null hypothesis. Failing to reject the null is uninformative, but rejecting it at a specific token $ψ$ implies an irregularity in the token subspace in a $ψ$-neighborhood, $B(ψ)$. The structure assumed in the null is a generalization of a manifold with boundary called a \emph{smooth fiber bundle} (which can be split into two spatial regimes -- small and large radius), so we denote our new hypothesis test as the ``fiber bundle hypothesis.'' By running our test over several open-source LLMs, each with unique token embeddings, we find that the null is frequently rejected, and so the evidence suggests that the token subspace is not a fiber bundle and hence also not a manifold. As a consequence of our findings, when an LLM is presented with two semantically equivalent prompts, if one prompt contains a token implicated by our test, the response to that prompt will likely exhibit less stability than the other.

大模型嵌入空间流形假设稳定性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。