arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.02682cs.AIcs.LGcs.SYeess.SYmath.DSmath.OC
收藏

Transformer中注意力机制的新近行为

The Asymptotic Behavior of Attention in Transformers

Department of Applied Mathematics, ICAI School of Engineering, Comillas Pontifical University(应用数学系,ICAI工程学院,科利斯大学);Department of Electrical and Computer Engineering, University of California, Los Angeles(电气与计算机工程系,加州大学洛杉矶分校)

Álvaro Rodríguez Abella, João Pedro Silvestre, Paulo Tabuada

AI总结:

本研究通过微分方程和控制理论证明,随着深度增加,Transformer中所有令牌渐近收敛到单一簇,可能导致模型崩溃,并将分析扩展到自回归模型以推广理论保证。

摘要:

Transformer架构已成为现代大型语言模型(LLMs)的基础,但其理论性质仍未被充分理解。与经典神经网络一样,改进这些模型的一种常见方法是增加其规模和深度。然而,此类策略可能并非最优,因为多项研究表明,增加更多层会产生越来越少的收益。更重要的是,先前的研究表明,增加深度可能导致模型崩溃,即所有令牌收敛到单一簇,从而削弱LLMs生成多样化输出的能力。基于Transformer动力学的微分方程模型,我们证明了随着深度增加,Transformer中的所有令牌渐近收敛到一个簇。在技术层面,我们利用控制理论中的工具,包括流形上的共识动力学和输入-状态稳定性(ISS)。然后,我们将分析扩展到自回归模型,利用其结构进一步推广理论保证。

英文摘要:

The transformer architecture has become the foundation of modern Large Language Models (LLMs), yet its theoretical properties are still not well understood. As with classic neural networks, a common approach to improve these models is to increase their size and depth. However, such strategies may be suboptimal, as several works have shown that adding more layers yields increasingly diminishing returns. More importantly, prior studies have shown that increasing depth may lead to model collapse, i.e., all the tokens converge to a single cluster, undermining the ability of LLMs to generate diverse outputs. Building on differential equation models for the transformer dynamics, we prove that all the tokens in a transformer asymptotically converge to a cluster as depth increases. At the technical level we leverage tools from control theory, including consensus dynamics on manifolds and input-to-state stability (ISS). We then extend our analysis to autoregressive models, exploiting their structure to further generalize the theoretical guarantees.

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

↑