arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.11059stat.MLcs.LGmath.PR
收藏

AdamW训练变换器中的均匀缩放极限

Uniform Scaling Limits in AdamW-Trained Transformers

Mathematical Institute(数学研究所);University of Oxford(牛津大学)

William Gibson, Christoph Reisinger

AI总结:

本文研究了使用AdamW训练的变换器在深度趋近于无穷时的行为,通过将隐藏状态动态建模为相互作用粒子系统,证明了在适当缩放注意力头数下,隐藏状态和反向传播变量的联合动态以特定速率收敛到一个正向-反向ODE系统。

摘要:

我们研究了使用AdamW训练的变换器在深度趋近于无穷时的行为,通过将隐藏状态动态建模为相互作用粒子系统(IPS)并通过注意力机制耦合。在适当缩放注意力头数的情况下,我们证明了隐藏状态和反向传播变量的联合动态在$ L^2 $意义上,对初始条件均匀收敛到正向-反向ODE系统的解,收敛速率为$\mathcal O(L^{-1}+L^{-1/3}H^{-1/2})$。这里,$L$和$H$分别表示变换器的深度和注意力头数。当注意力头不包含因果掩码时,极限ODE系统可识别为麦肯纳-沃拉索夫ODE(MVODE)。通过使用与该MVODE相关的流映射并应用测度集中技术,我们获得了离散模型与连续模型差异的界,这些界在初始条件的紧集上是均匀的。由于无需使用覆盖论证,我们得到的界中的常数与token数量无关。此外,通过适当适应AdamW,这些界与token嵌入维度无关。

英文摘要:

We study the large-depth limit of transformers trained with AdamW, by modelling the hidden-state dynamics as an interacting particle system (IPS) coupled through the attention mechanism. Under appropriate scaling of the attention heads, we prove that the joint dynamics of the hidden states and backpropagated variables converge in $L^2$, uniformly over the initial condition, to the solution of a forward--backward system of ODEs at rate $\mathcal O(L^{-1}+L^{-1/3}H^{-1/2})$. Here, $L$ and $H$ denote the depth and number of heads of the transformer, respectively. The limiting system of ODEs can be identified with a McKean--Vlasov ODE (MVODE) when the attention heads do not incorporate causal masking. By using the flow maps associated with this MVODE and applying concentration of measure techniques, we obtain bounds on the difference between the discrete and continuous models that are uniform over compact sets of initial conditions. As this is achieved without resorting to a covering argument, the constants in our bounds are independent of the number of tokens. Furthermore, under a suitable adaptation to AdamW, the bounds become independent of the token embedding dimension.

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

↑