揭示随机初始化如何防止注意力机制中令牌坍缩为单点。
Clustering in Deep Stochastic Transformers
- 引入随机初始化噪声,构建基于粒子系统的动态模型。
- 证明在无限层数下,令牌趋向反向配置而非聚集于一点。
- 适合研究注意力机制理论或模型稳定性的读者。
Transformer 在多个领域革新了深度学习,但其令牌动态的精确理解仍是理论难题。现有带层归一化的深层 Transformer 理论通常预测令牌会聚于单一点,但依赖确定性权重假设,无法捕捉 Transformer 的标准初始化方式。本文分析值矩阵随机初始化带来的噪声,结合扩散标度与逐令牌 RMS 归一化,证明当层数趋于无穷时,离散令牌动态收敛到球面上的相互作用粒子系统,其中令牌受共同矩阵值布朗噪声驱动。该极限下,初始噪声可防止确定性模型预测的坍缩现象。对两个令牌,我们证明相变由交互强度和令牌维度决定:不同于确定性注意力流,反向配置以正概率成为吸引态。数值实验验证了该相变,显示多令牌亦存在反向结构,且抑制内在噪声会降低模型精度。
原文摘要 · Abstract (English)
Transformers have revolutionized deep learning across various domains but understanding the precise token dynamics remains a theoretical challenge. Existing theories of deep Transformers with layer normalization typically predict that tokens cluster to a single point; however, these results rely on deterministic weight assumptions, which fail to capture the standard initialization scheme in Transformers. In this work, we show that accounting for the intrinsic stochasticity of random initialization alters this picture. More precisely, we analyze deep Transformers where noise arises from the random initialization of value matrices. Under diffusion scaling and token-wise RMS normalization, we prove that, as the number of Transformer layers goes to infinity, the discrete token dynamics converge to an interacting-particle system on the sphere where tokens are driven by a \emph{common} matrix-valued Brownian noise. In this limit, we show that initialization noise prevents the collapse to a single cluster predicted by deterministic models. For two tokens, we prove a phase transition governed by the interaction strength and the token dimension: unlike deterministic attention flows, antipodal configurations become attracting with positive probability. Numerical experiments confirm the predicted transition, reveal that antipodal formations persist for more than two tokens, and demonstrate that suppressing the intrinsic noise degrades accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。