Towards Simple and Provable Parameter-Free Adaptive Gradient Methods

Yuanzhe Tao, Yifeng Liu, Huizhuo Yuan, Xun Zhou, Yuan Cao, Quanquan Gu

TL;DR

Researchers have introduced AdaGrad++ and Adam++, new "parameter-free" optimization algorithms that eliminate the need for manual learning rate tuning. Unlike previous attempts, these methods are simple to implement, come with rigorous theoretical convergence guarantees, and match or exceed the performance of expertly tuned Adam on tasks ranging from image classification to training Large Language Models (LLMs).

What Problem Does This Paper Address?

In the world of deep learning, the learning rate is arguably the most critical hyperparameter. Set it too high, and your model diverges; set it too low, and training takes forever. Popular adaptive methods like AdaGrad and Adam help by adjusting rates per-parameter, but they still require a "base" learning rate that must be painstakingly tuned through trial and error—a process often called the "tuning tax."

While "parameter-free" optimizers have been proposed to solve this, they usually fall into two traps: they are either mathematically complex and memory-intensive, or they lack formal proofs that they will actually converge to a solution. As shown in the table below, this paper fills a significant gap in the literature by providing both the algorithms and the proofs for the Adam family.

Comparison of parameter-free versions of AdaGrad and Adam across different research works.

Methods

The authors build on the "Distance over Gradient" (DoG) framework. The core intuition is that the optimal learning rate is related to the distance between your current position and the starting point.

The Secret Sauce: Mean Squared Displacement

The key innovation in AdaGrad++ and Adam++ is how they calculate the adaptive step size $\eta_t$. They define a quantity $r_t$ based on the maximum Euclidean distance the iterates have traveled from the starting point $x_0$, normalized by the square root of the dimension $d$: $$r_t = \frac{\|x_t - x_0\|_2}{\sqrt{d}}$$ The learning rate at each step is then set as $\eta_t = \max(\eta_{t-1}, r_t)$.

By using the $1/\sqrt{d}$ factor, the authors convert "total distance" into a "mean squared displacement," which makes the algorithm significantly more robust to the high-dimensional spaces typical of modern neural networks.

Adam++ Specifics

For Adam++, the authors incorporate techniques from AMSGrad, specifically using a "max" operation on the second-moment estimates of the gradients. This prevents the learning rate from increasing monotonically in a way that could break convergence, a known theoretical issue with standard Adam.

Datasets

The authors validated their methods across a diverse set of benchmarks:

  • Image Classification: CIFAR-10 and CIFAR-100 using ResNet-18, VGG16, and DenseNet-121 architectures. They also tested ResNet-50 on SVHN and Tiny-ImageNet.
  • Language Modeling: Pretraining GPT-2 (125M and 355M parameter versions) on the OpenWebText dataset.

Key Insights and Ideas

  • Simplicity Wins: Unlike previous parameter-free methods that require complex estimations of the distance to the optimum, these "++" variants use the distance from the initialization, which is trivial to track.
  • Dimension Matters: The explicit inclusion of the $d^{-1/2}$ factor is crucial. Without it, the "distance" term grows too large in high dimensions, leading to instability.
  • Theoretical Parity: The authors proved that these parameter-free versions achieve an $O(1/\sqrt{T})$ convergence rate in convex settings. This is the same rate achieved by standard AdaGrad/Adam with an optimally tuned learning rate, but here it happens automatically.

Key Results

The experimental results suggest that you don't have to sacrifice performance for convenience.

  • CIFAR-10: Adam++ outperformed standard Adam by 0.30% on ResNet-18 and by a staggering 3.53% on DenseNet-121 when using a constant learning rate schedule.
  • LLM Pretraining: On GPT-2 tasks, Adam++ (referred to as AdamW++ in this context) surpassed tuned AdamW by 0.02 in both training and test losses, proving it can handle the scale of modern transformer training.
  • Wall-Clock Efficiency: As seen in the training curves, Adam++ reaches high accuracy faster or at a similar rate to other state-of-the-art parameter-free optimizers like Prodigy, but with lower computational overhead.
Test accuracy and loss vs. wall-clock time for ResNet-18 and DenseNet-121.

Limitations and Future Work

While promising, the authors note a few areas for improvement:

  • Memory Overhead: These algorithms require storing the initial parameters $x_0$ throughout training, which increases memory usage slightly compared to vanilla Adam (though they are still more efficient than competitors like D-adaptation).
  • Hyperparameter Residuals: While the learning rate is gone, other hyperparameters like $\beta_1, \beta_2$ (momentum terms) and weight decay still exist. While these are generally more stable than the learning rate, the authors suggest more ablation studies are needed to see how they interact with the parameter-free logic.
  • Non-convex Theory: While empirical results on deep networks (which are non-convex) are excellent, the most robust theoretical guarantees provided are for the convex case. Expanding the high-probability convergence proofs for general non-convex landscapes remains a frontier.

Summary updated

BibTeX
@misc{tao2024towards,
  author = {Yuanzhe Tao and Yifeng Liu and Huizhuo Yuan and Xun Zhou and Yuan Cao and Quanquan Gu},
  title = {{Towards Simple and Provable Parameter-Free Adaptive Gradient Methods}},
  year = {2024},
  eprint = {2412.19444},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.19444},
}
Figure