arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.10469math.OCstat.ML
收藏

交叉熵训练下多头自注意力的平均场分析

A Mean-Field Analysis of Multi-Head Self-Attention under Cross-Entropy Training

The Chinese University of Hong Kong(香港中文大学);University of Macau(澳门大学)

Cheng Huan, Hongfwei Yuan

AI总结:

针对交叉熵最小化训练的单层因果多头自注意力模型,建立平均场理论,证明有限头近似界、刻画全局极小元、建立传播混沌估计,并研究偏微分方程的长时间行为。

摘要:

本文针对通过交叉熵最小化训练的简化单层因果多头自注意力模型,发展了一套平均场理论。每个注意力头被视为参数空间中的一个粒子,头的经验律被用作大头状态变量。在无限头极限下,平均注意力logits定义了概率测度上的风险泛函,其一阶变分生成非线性Wasserstein梯度流方程。与通常关注平方损失回归的浅层网络经典平均场分析不同,本模型包含交叉熵目标中的softmax残差以及掩码自注意力的查询-键-值结构。我们证明了最优风险的静态有限头近似界,通过变分支撑条件刻画了全局极小元,并建立了将有限头随机梯度下降与极限偏微分方程进行比较的定量有限时间传播混沌估计。然后我们研究了偏微分方程的长时间行为:能量耗散、在紧致性下收敛到平稳集、在拓扑或Kurdyka--Łojasiewicz假设下收敛到单个平稳测度、以及在梯度主导条件下的显式收敛速率。最后,我们在Wasserstein强单调性条件下证明了局部指数稳定性,并给出了Dirac平稳测度的可验证稳定性和不稳定性判据。这些结果为注意力头训练提供了一个严格的基线平均场框架,并阐明了从平稳性到收敛性和稳定性所需的额外紧致性、景观和曲率假设。

英文摘要:

This paper develops a mean-field theory for a simplified single-layer causal multi-head self-attention model trained by cross-entropy minimization. Each attention head is treated as a particle in parameter space, and the empirical law of the heads is used as the large-head state variable. In the infinite-head limit, the averaged attention logits define a risk functional on probability measures, whose first variation generates a nonlinear Wasserstein gradient-flow equation. Unlike classical mean-field analyses of shallow networks that often focus on square-loss regression, the present model contains the softmax residual from the cross-entropy objective and the query-key-value structure of masked self-attention. We prove a static finite-head approximation bound for the optimal risk, characterize global minimizers through a variational support condition, and establish a quantitative finite-time propagation-of-chaos estimate comparing finite-head stochastic gradient descent with the limiting PDE. We then study the long-time behavior of the PDE: energy dissipation, convergence to the stationary set under compactness, convergence to a single stationary measure under topological or Kurdyka--Łojasiewicz assumptions, and explicit convergence rates under gradient-domination conditions. Finally, we prove local exponential stability under a Wasserstein strong-monotonicity condition and give verifiable stability and instability criteria for Dirac stationary measures. The results provide a rigorous baseline mean-field framework for attention-head training and clarify the additional compactness, landscape, and curvature assumptions needed to pass from stationarity to convergence and stability.

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

↑