基于辅助变量的平均场Transformer中的反模式坍缩
Anti Mode-Collapse in Mean-Field Transformer via Auxiliary Variables
AI总结:
本研究利用平均场Transformer模型从理论上证明位置编码等辅助变量能防止自注意力机制的模式坍缩,并揭示其表示普适性与亚稳态性质。
摘要:
我们使用基于平均场的Transformer模型从理论上研究辅助变量(如位置编码)如何防止自注意力机制的模式坍缩。近年来,由于平均场Transformer能够全面分析token交互,利用其分析自注意力机制性质的方法引起了广泛关注。然而,对该简单模型的分析表明,在长推理(即多层)过程中会出现模式坍缩,即token分布退化为单点,这与实际情况不符。本研究考察了该平均场Transformer模型,并证明引入辅助变量(如位置编码)可作为对抗理论模式坍缩的反作用力。具体而言,我们表明在理论框架中,能量最大化分布不会退化为单点,而是由辅助变量分布的推前(pushforward)刻画,从而避免集中于Dirac测度。我们的主要例子是位置编码和固定提示插入,它们被视为并行辅助变量机制。此外,我们证明位置编码和提示插入在极限情况下具有表示普适性,即推理的极限分布可以精确表示一大类分布。我们还分析了位置编码和亚稳态的几个关键性质,并通过数学实验验证了我们的理论结果。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。