arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.05738cs.LGmath.OCstat.ML
收藏

自注意力的隐式偏差与快速收敛率

Implicit Bias and Fast Convergence Rates for Self-attention

University of Southern California(南加州大学);University of British Columbia(不列颠哥伦比亚大学)

Bhavya Vasudeva, Puneesh Deora, Christos Thrampoulidis

AI总结:

本研究通过分析梯度下降及其自适应步长变体在自注意力层训练中的隐式偏差,证明了全局收敛性并给出有限时间收敛率,揭示了在非凸设置下加速参数收敛的机制。

摘要:

我们通过分析在二分类任务中训练带有线性解码器的自注意力层时基于梯度的优化器的隐式偏差,研究了自注意力(Transformer 的定义性机制)的基本优化原理。在先前关于线性逻辑回归研究的基础上,最近的研究结果表明,梯度下降(GD)得到的键-查询矩阵 $W_t$ 在方向上收敛于 $W_{mm}$,后者最大化了序列中最优与非最优 token 之间的间隔。然而,这种收敛是局部性的,依赖于初始条件,且仅在迭代次数趋于无穷时渐近成立,同时未涉及自适应步长规则可能带来的益处。为弥补这一空白,我们首先确定了收敛可证明为全局的场景。随后,我们分析了两种自适应步长策略:归一化 GD 和 Polyak 步长,证明了 $W_t$ 到 $W_{mm}$ 的有限时间收敛率,并量化了注意力图的稀疏化速率。这些发现不仅表明在非凸设置下这些策略能比标准 GD 加速参数收敛,而且加深了对自注意力中隐式偏差的理解,将其更紧密地与线性逻辑回归中观察到的现象联系起来,尽管其具有复杂的非凸性质。

英文摘要:

We study the fundamental optimization principles of self-attention, the defining mechanism of transformers, by analyzing the implicit bias of gradient-based optimizers in training a self-attention layer with a linear decoder in binary classification. Building on prior studies in linear logistic regression, recent findings demonstrate that the key-query matrix $W_t$ from gradient-descent (GD) converges in direction towards $W_{mm}$, which maximizes the margin between optimal and non-optimal tokens across sequences. However, this convergence is local, dependent on initial conditions, only holds asymptotically as the number of iterations increases, and leaves questions about the potential benefits of adaptive step-size rules unaddressed. To bridge this gap, we first establish scenarios for which convergence is provably \emph{global}. We then analyze two adaptive step-size strategies: normalized GD and Polyak step-size, demonstrating \emph{finite-time} convergence rates for $W_t$ to $W_{mm}$, and quantifying the sparsification rate of the attention map. These findings not only show that these strategies can accelerate parameter convergence over standard GD in a non-convex setting but also deepen the understanding of the implicit bias in self-attention, linking it more closely to the phenomena observed in linear logistic regression despite its intricate non-convex nature.

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

↑