Understanding the intricate non-convex training dynamics of softmax-based models is crucial for explaining the empirical success of transformers. In this article, we analyze the gradient flow dynamics of the value-softmax model, defined as ${L}(\mathbf{V} σ(\mathbf{a}))$, where $\mathbf{V}$ and $\mathbf{a}$ are a learnable value matrix and attention vector, respectively. As the matrix times softmax vector parameterization constitutes the core building block of self-attention, our analysis provides direct insight into transformer's training dynamics. We reveal that gradient flow on this structure inherently drives the optimization toward solutions characterized by low-entropy outputs. We demonstrate the universality of this polarizing effect across various objectives, including logistic and square loss. Furthermore, we discuss the practical implications of these theoretical results, offering a formal mechanism for empirical phenomena such as attention sinks and massive activations.


翻译:理解基于softmax模型的复杂非凸训练动态对于解释Transformer架构的经验性成功至关重要。本文分析了值-softmax模型(定义为${L}(\mathbf{V} σ(\mathbf{a}))$,其中$\mathbf{V}$和$\mathbf{a}$分别为可学习的值矩阵和注意力向量)的梯度流动态。由于矩阵乘以softmax向量的参数化构成了自注意力机制的核心构建模块,我们的分析为Transformer的训练动态提供了直接洞见。我们揭示了该结构上的梯度流本质上会驱动优化过程趋向于以低熵输出为特征的解。我们证明了这种极化效应在包括逻辑损失和平方损失在内的多种目标函数中具有普适性。此外,我们讨论了这些理论结果的实际意义,为注意力汇聚现象和大规模激活等经验性观察提供了形式化机制。

0
下载
关闭预览

相关内容

【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
NeurIPS 2021 | 用简单的梯度下降算法逃离鞍点
专知会员服务
24+阅读 · 2021年12月6日
通过条件梯度进行结构化机器学习训练,50页ppt与视频
专知会员服务
13+阅读 · 2021年2月25日
【Nature论文】深度网络中的梯度下降复杂度控制
专知会员服务
41+阅读 · 2020年3月9日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
博客 | 机器学习中的数学基础(凸优化)
AI研习社
14+阅读 · 2018年12月16日
自定义损失函数Gradient Boosting
AI研习社
14+阅读 · 2018年10月16日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
《通过小型无人机系统将情报能力“作战化”》
专知会员服务
3+阅读 · 今天7:28
消耗优势:美军的“精确规模化”概念
专知会员服务
7+阅读 · 6月15日
《离线语言支持系统:面向空战战术决策》
专知会员服务
8+阅读 · 6月15日
俄乌战场地面机器人如何改写战争规则
专知会员服务
9+阅读 · 6月14日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员