[论文解读] Why are Adaptive Methods Good for Attention Models?
本文表明重尾梯度噪声会使 SGD 相对于自适应方法表现不佳,并引入基于裁剪的分析与 ACClip,以改善对 BERT 等注意力模型的优化。
While stochastic gradient descent (SGD) is still the \emph{de facto} algorithm in deep learning, adaptive methods like Clipped SGD/Adam have been observed to outperform SGD across important tasks, such as attention models. The settings under which SGD performs poorly in comparison to adaptive methods are not well understood yet. In this paper, we provide empirical and theoretical evidence that a heavy-tailed distribution of the noise in stochastic gradients is one cause of SGD's poor performance. We provide the first tight upper and lower convergence bounds for adaptive gradient methods under heavy-tailed noise. Further, we demonstrate how gradient clipping plays a key role in addressing heavy-tailed gradient noise. Subsequently, we show how clipping can be applied in practice by developing an \emph{adaptive} coordinate-wise clipping algorithm (ACClip) and demonstrate its superior performance on BERT pretraining and finetuning tasks.
研究动机与目标
- 研究在注意力模型训练中(例如 BERT)为何 SGD 相对于自适应方法表现较差。
- 刻画相关任务中的梯度噪声分布(重尾)。
- 开发并分析在重尾噪声下能稳定优化的基于裁剪的算法。
- 提出并验证一种自适应坐标裁剪方法(ACClip),以改进 BERT 的预训练和微调。
提出的方法
- 对 ImageNet(ResNet)与 BERT 训练中的梯度噪声分布进行实证分析,以识别重尾行为。
- 在有界 α-矩(α ∈ (1,2])下,给出在重尾噪声条件下自适应梯度方法的理论收敛界。
- 引入并分析梯度裁剪(GClip),在重尾噪声下获得最优收敛速度。
- 扩展到坐标裁剪(CClip),以消除维度相关性,并开发具有在线 moment 估计的自适应坐标裁剪(ACClip)。
- 在 BERT 预训练和 SQuAD v1.1 微调上对 ACClip 的实证评估,显示相较于 Adam 的改进。
实验结果
研究问题
- RQ1重尾梯度噪声是否解释了在注意力模型训练中 SGD 与自适应方法之间的相对性能差距?
- RQ2梯度裁剪是否能在重尾噪声下恢复收敛并达到最优阶?
- RQ3在现实的高维噪声下,坐标裁剪是否优于全局裁剪?
- RQ4自适应坐标裁剪算法(ACClip)是否在 BERT 的预训练与微调任务中优于 Adam?
主要发现
- BERT 预训练中的梯度噪声具有重尾特性,而在 ImageNet/ResNet 中则较为集中。
- 裁剪梯度方法(GClip)在重尾噪声下实现了最优收敛速度并稳定训练。
- 坐标裁剪(CClip)消除了维度依赖性,且可能优于全局裁剪。
- 具备在线 moment 估计的自适应裁剪方法(ACClip)在 BERT 预训练和 SQuAD v1.1 微调中,跨模型规模均超越 Adam。
- ACClip 在 BERT Base 6/12 层和 BERT Large 24 层上比 Adam 拿到更低的预训练损失和更高的 masked-LM 精度;ACClip 还提升了 SQuAD EM/F1 分数。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。