Adaptive Gradient Methods with Dynamic Bound of Learning Rate

Liangchen Luo, Yuanhao Xiong, Yan Liu, Xu Sun

In the landscape of deep learning optimization, researchers and practitioners frequently face a binary choice: prioritize the rapid initial convergence of adaptive methods like Adam, or aim for the superior final generalization of Stochastic Gradient Descent (SGD). For years, a common workaround has been to start training with Adam to accelerate early progress, and then manually switch to SGD to squeeze out the final percentage points of performance.

A paper from ICLR 2019, Adaptive Gradient Methods with Dynamic Bound of Learning Rate, introduces AdaBound—an optimizer designed to deliver the speed of Adam alongside the final performance of SGD, eliminating the manual headache of switching between them.

Overview

AdaBound is a novel variant of the Adam optimizer that employs dynamic clipping on learning rates. By gradually constraining the learning rate within a tightening window, it smoothly transitions from an adaptive method to SGD. This allows the model to achieve fast initial training while maintaining high final generalization.

The Generalization Gap

Deep learning models are typically trained using first-order optimization. SGD is the classic choice; it is simple and generalizes incredibly well to unseen data. However, because it scales gradients uniformly, it can be slow and difficult to tune, especially when dealing with sparse data.

To address this, adaptive methods like AdaGrad, RMSProp, and Adam were developed. These algorithms scale the learning rate for each parameter individually based on past gradients. While Adam is the "default" for many due to its rapid early training, it often hits a performance plateau, failing to match the final test accuracy of a well-tuned SGD.

The authors argue that this "generalization gap" is caused by extreme learning rates—either too large or too small—that emerge toward the end of training. They provide a theoretical proof demonstrating that Adam can fail to converge to an optimal solution in certain convex settings because of these unstable rates.

The AdaBound Approach

The authors propose AdaBound (and its cousin AMSBound, based on AMSGrad). The core innovation is a dynamic "clipping" operation applied to the learning rate.

In standard Adam, the step size is proportional to $\alpha / \sqrt{V_t}$. In AdaBound, this step size is constrained by a lower bound $\eta_l(t)$ and an upper bound $\eta_u(t)$:

$$ \text{Clip}\left(\frac{\alpha}{\sqrt{V_t}}, \eta_l(t), \eta_u(t)\right) $$

The effectiveness of this method lies in how these bounds evolve over time:

  1. At the start: The lower bound is 0 and the upper bound is infinite. AdaBound behaves exactly like Adam, enjoying rapid initial progress.
  2. During training: The bounds gradually converge toward a final, constant step size $\alpha^*$.
  3. At the end: The window becomes so narrow that the learning rate is essentially fixed, transforming the algorithm into SGD with momentum.

This creates a smooth transition from adaptive to non-adaptive optimization, avoiding the "hard switch" required by previous hybrid methods.

Key Insights

  • Extreme Rates are the Enemy: The authors demonstrate empirically that by the end of training, Adam can produce learning rates as tiny as 0.01 or as massive as 1000 for different parameters. AdaBound prevents these outliers from sabotaging the model's convergence.
  • Complexity Matters: AdaBound’s impact grows with model complexity. While it showed slight improvements on simple MLPs, it provided significant boosts for deep ResNets and multi-layer LSTMs.
  • Hyperparameter Robustness: Unlike SGD, which is notoriously sensitive to the initial learning rate, AdaBound is highly stable. Even without careful tuning, AdaBound consistently outperformed or matched a heavily tuned SGD.
  • Theoretical Grounding: Unlike many heuristic optimizers, the authors provide a rigorous proof of convergence for AdaBound in the convex setting, ensuring it is mathematically sound.

Key Results

The authors evaluated AdaBound across several standard benchmarks, including MNIST, CIFAR-10, and the Penn Treebank, to ensure its versatility.

Training and Test Accuracy on CIFAR-10 for DenseNet-121 and ResNet-34
  • Closing the Gap: On CIFAR-10, AdaBound successfully eliminated the generalization gap. For DenseNet-121, it achieved approximately 2% higher test accuracy than its prototype, Adam.
  • Outperforming SGD: On ResNet-34, AdaBound actually surpassed the final test accuracy of SGD by about 1%.
  • Language Modeling: On the Penn Treebank task using a 3-layer LSTM, AdaBound improved perplexity (a measure of model quality) by 2.8% over Adam.
  • Speed: Across almost all tests, AdaBound maintained the rapid "early-game" training speed characteristic of Adam while avoiding "late-game" stagnation.

Limitations and Future Work

While AdaBound is a powerful tool, the authors note a few areas for further exploration:

  • Simple Models: The performance gains on very simple models (like a 1-layer MLP on MNIST) are marginal, meaning the slight overhead of the algorithm might not be necessary for trivial tasks.
  • The "Why" of SGD: While AdaBound mimics SGD's behavior to gain its benefits, the fundamental reason why SGD generalizes so well remains an open question in the broader field of deep learning theory.
  • Alternative Transitions: Clipping is just one way to transition from Adam to SGD. The authors suggest that other methods, such as specifically designed decay schedules, could be explored in future research.

For those interested in integrating this optimizer into their workflows, the authors have made their implementation available on GitHub.

Summary updated

BibTeX
@inproceedings{luo2019adaptive,
  author = {Liangchen Luo and Yuanhao Xiong and Yan Liu and Xu Sun},
  title = {{Adaptive Gradient Methods with Dynamic Bound of Learning Rate}},
  booktitle = {International Conference on Learning Representations},
  year = {2019},
  url = {https://openreview.net/forum?id=uTiNb29qDj},
}
Figure