Closing the Generalization Gap of Adaptive Gradient Methods in Training Deep Neural Networks
Jinghui Chen, Dongruo Zhou, Yiqi Tang, Ziyan Yang, Yuan Cao, Quanquan Gu
TL;DR
The paper addresses the generalization gap observed when using adaptive gradient methods (e.g., Adam, Amsgrad) versus SGD with momentum in training deep networks. It introduces Padam, a partially adaptive momentum method with a parameter $p \in [0,1/2]$ that blends Adam/Amsgrad with SGD-Momentum, recovering SGD-Momentum at $p=0$ and Amsgrad at $p=1/2$, thereby mitigating the small learning rate dilemma. The authors provide a convergence guarantee for Padam in stochastic nonconvex optimization and derive a rate bound that yields $\mathbb{E}[\|\nabla f(\mathbf{x}_{\text{out}})\|_2^2] = O\left(\frac{d^{1/2}}{T^{3/4 - s/2}} + \frac{d}{T}\right)$ under suitable conditions, with $s$ capturing gradient sparsity. Empirically, Padam demonstrates fast convergence comparable to Adam while achieving generalization comparable to SGD-Momentum across CNNs and language models, outperforming several modern adaptive methods and suggesting practitioners can safely employ adaptive methods for faster training without sacrificing generalization.
Abstract
Adaptive gradient methods, which adopt historical gradient information to automatically adjust the learning rate, despite the nice property of fast convergence, have been observed to generalize worse than stochastic gradient descent (SGD) with momentum in training deep neural networks. This leaves how to close the generalization gap of adaptive gradient methods an open problem. In this work, we show that adaptive gradient methods such as Adam, Amsgrad, are sometimes "over adapted". We design a new algorithm, called Partially adaptive momentum estimation method, which unifies the Adam/Amsgrad with SGD by introducing a partial adaptive parameter $p$, to achieve the best from both worlds. We also prove the convergence rate of our proposed algorithm to a stationary point in the stochastic nonconvex optimization setting. Experiments on standard benchmarks show that our proposed algorithm can maintain a fast convergence rate as Adam/Amsgrad while generalizing as well as SGD in training deep neural networks. These results would suggest practitioners pick up adaptive gradient methods once again for faster training of deep neural networks.
