Skip to main content
QUICK REVIEW

[论文解读] Demon: Improved Neural Network Training with Momentum Decay

John Chen, C. Wolfe|arXiv (Cornell University)|Oct 11, 2019
Advanced Neural Network Applications被引用 4
一句话总结

该论文提出了一种名为Demon的新颖动量衰减调度方法,适用于随机梯度下降动量(SGDM)和Adam优化器,通过非线性衰减规则在训练过程中动态降低动量。Demon在28个多样化的深度学习任务中实现了最先进性能,超越了所有标准学习率和动量调度方法(包括余弦衰减和OneCycle),在Top-1和Top-3排名中分别取得39%和85%的优异表现,且无需额外超参数调优,计算开销可忽略不计。

ABSTRACT

Momentum is a widely used technique for gradient-based optimizers in deep learning. In this paper, we propose a decaying momentum ( extsc{Demon}) rule. We conduct the first large-scale empirical analysis of momentum decay methods for modern neural network optimization, in addition to the most popular learning rate decay schedules. Across 28 relevant combinations of models, epochs, datasets, and optimizers, extsc{Demon} achieves the highest number of Top-1 and Top-3 finishes at 39\% and 85\% respectively, almost doubling the second-placed learning rate cosine schedule at 17\% and 60\%, respectively. extsc{Demon} also outperforms other widely used schedulers including, but not limited to, the learning rate step schedule, linear schedule, OneCycle schedule, and exponential schedule. Compared with the widely used learning rate step schedule, extsc{Demon} is observed to be less sensitive to parameter tuning, which is critical to training neural networks in practice. Results are demonstrated across a variety of settings and architectures, including image classification, generative models, and language models. extsc{Demon} is easy to implement, requires no additional tuning, and incurs almost no extra computational overhead compared to the vanilla counterparts. Code is readily available.

研究动机与目标

  • 为解决深度学习优化中对超参数的敏感性问题,特别是学习率和动量调度的大量调优依赖。
  • 通过引入一种有原则的动量衰减策略,提升多样化架构和数据集上的模型泛化能力和训练稳定性。
  • 通过设计一种在无需额外调优的情况下表现一致优异的动量调度策略,降低超参数搜索的计算与人力成本。
  • 在真实世界深度学习基准中评估动量衰减相对于标准学习率调度的有效性,涵盖图像分类、语言建模和生成建模等任务。

提出的方法

  • Demon实现了一种非线性动量衰减调度,其中动量系数β_t从初始值β_init随训练时间t从0衰减至0,遵循如下公式:β_t = β_init * (1 - t/T) / [(1 - β_init) + β_init * (1 - t/T)]。
  • 该衰减规则旨在训练初期保持高动量以实现更快收敛,后期降低动量以提升泛化能力和稳定性。
  • 该方法兼容SGDM和Adam优化器,并为每种优化器分别设计了算法公式,具备广泛适用性。
  • 该方法计算高效,每轮迭代仅需额外一次计算即可获得β_t,无额外内存开销或显著性能损耗。
  • 该方法已在PyTorch中实现并公开发布,便于无缝集成到现有训练流程中。
  • 作者在28种模型-数据集-优化器-训练轮次组合上开展了大规模实证评估,将Demon与10种成熟的损失率和动量调度方法进行了对比。

实验结果

研究问题

  • RQ1非线性动量衰减调度是否在多样化的深度学习任务中,于最终模型准确率和鲁棒性方面优于标准学习率衰减调度?
  • RQ2Demon在多个基准测试中,相较于广泛使用的余弦、阶梯、线性及OneCycle等学习率调度方法,在Top-1和Top-3性能上表现如何?
  • RQ3与学习率阶梯衰减等标准调度相比,Demon在多大程度上降低了对超参数调优的敏感性?
  • RQ4Demon是否能有效应用于SGDM和Adam优化器?其性能提升是否在不同架构和数据集上保持一致?
  • RQ5Demon的性能提升源于简单的有效学习率调整,还是源于优化轨迹中更复杂的动态行为?

主要发现

  • Demon在28项实验中取得了最高数量的Top-1排名(39.29%),显著优于表现第二的余弦学习率调度方法(17.86%)。
  • Demon在Top-3排名中达到85.71%,几乎为第二名方法(余弦学习率调度的60.71%)的两倍。
  • 在CIFAR-10数据集上的ResNet-20图像分类任务中,Demon SGDM将测试误差从基线SGD ELR的8.71%降低至8.71%,实现了0.5%的性能提升。
  • 在GLUE数据集上微调的BERT-base模型中,Demon Adam在CoLA任务上实现0.6分的性能提升(79.7 vs. 79.1),在QNLI任务上提升0.5分(90.0 vs. 89.0),且无需额外调优。
  • 在MNIST数据集的VAE训练中,Demon SGDM将100轮时的泛化损失从138.29降低至136.55,而SGD ELR则出现发散,表明Demon具有更强的稳定性。
  • Demon在视觉、自然语言处理和生成建模任务中,全面超越了所有其他动量和学习率调度方法,包括OneCycle、阶梯、线性及指数衰减。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。