arXiv:2605.30229cs.LG2026-05

通过辅助变量缓解自注意力机制的模式坍缩问题。

Anti Mode-Collapse in Mean-Field Transformer via Auxiliary Variables

论文配图:Anti Mode-Collapse in Mean-Field Transformer via Auxiliary Variables
图 1 · 摘自论文原文
  • 引入位置编码等辅助变量构建均场变换器模型。
  • 理论表明辅助变量可防止分布退化为单一点。
  • 适用于研究长序列推理中的稳定性和通用表示能力。

我们使用基于均场的变压器模型,从理论上研究位置编码等辅助变量如何防止自注意力机制的模式坍缩。近年来,均场变压器因其能全面分析标记间交互而受到广泛关注。然而,该简单模型的分析表明,在长推理(即多层)过程中会发生模式坍缩,即标记分布退化为单一点,与现实存在差异。本研究针对该均场变压器模型展开分析,证明引入辅助变量(如位置编码)可作为对抗理论模式坍缩的反作用力。具体而言,在理论框架中,能量最大化分布不会退化为单一点,而是表现为辅助变量分布的前推,从而避免集中在狄拉克测度。主要例子包括位置编码和固定提示插入,二者被视为并行的辅助变量机制。此外,我们证明了位置编码和提示插入在极限情况下具有表示的普遍性,即推理的极限分布可精确表示一大类分布。我们还分析了位置编码的关键性质及亚稳态,并通过数学实验验证了理论结果。

原文摘要 · Abstract (English)

We use a mean-field-based transformer model to theoretically investigate how auxiliary variables, such as positional encoding, prevent mode collapse of self-attention mechanisms. The use of mean-field transformers to analyze the properties of self-attention mechanisms has garnered significant attention in recent years due to their ability to comprehensively analyze token interactions. However, analysis of this simple model suggests that mode collapse, where token distributions degenerate to a single point, occurs during long inferences (i.e., many layers), indicating a discrepancy with reality. This study investigates this mean-field transformer model and demonstrates that the introduction of auxiliary variables, such as positional encoding, acts as a counterforce against theoretical mode collapse. Specifically, we show that in the theoretical scheme, the energy-maximizing distribution does not degenerate to a single point; instead, it is characterized by a pushforward of the auxiliary variable distribution, thereby avoiding concentration in the Dirac measure. Our main examples are the positional encoding and the fixed prompt insertion treated as a parallel auxiliary-variable mechanism. Furthermore, we demonstrate that positional encoding and prompt insertion possess universality of representation in the limit, meaning that the limit distribution of inference can exactly represent a wide class of distributions. We also analyze several key properties of positional encoding and metastability, and validate our theoretical results through mathematical experiments.

自注意力均场理论模式坍缩位置编码

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