Learning-Rate-Free Learning by D-Adaptation

Aaron Defazio, Konstantin Mishchenko · DOI

Abstract

Hyperparameter tuning, particularly the selection of an optimal learning rate, remains one of the most computationally expensive and labor-intensive aspects of training machine learning models. We present D-Adaptation, a novel optimization framework that eliminates the need for manual learning rate tuning by mathematically estimating the distance to the optimal solution. By tracking a lower bound on this distance during training, D-Adaptation automatically matches the performance of hand-tuned learning rates across a wide array of tasks, including large-scale vision and language modeling, with negligible computational overhead.

Introduction

In stochastic optimization, the learning rate (or step size) is the primary determinant of convergence speed and model stability. A learning rate that is too high leads to divergence, while one that is too low results in agonizingly slow progress. Theoretically, the optimal learning rate for standard methods like Stochastic Gradient Descent (SGD) is governed by two parameters: the Lipschitz constant $G$, representing the function's steepness, and $D$, the initial distance to the optimal solution ($D = \|x_0 - x_*\|$). While adaptive methods like AdaGrad successfully manage $G$, the value of $D$ remains unknown in practice, necessitating expensive grid searches or random sweeps that consume significant GPU resources.

Methodology: Estimating the Distance to Optimum

The core innovation of this work is D-Adaptation, a technique that maintains a running estimate $d_k$ of the true distance $D$. Unlike traditional adaptive optimizers (e.g., Adam, AdaGrad) that primarily adapt to the geometry of the loss surface via gradient scaling, D-Adaptation focuses on the scale of the problem itself.

The D-Adaptation Mechanism

The algorithm utilizes a rearrangement of classical convergence bounds for convex optimization. By monitoring empirical quantities—specifically the weighted sum of gradients and the trajectory of the iterates—the algorithm detects if the current distance estimate is insufficient to explain the observed progress. If the model's progress is disproportionately small relative to the gradients encountered, the algorithm increases $d_k$. This allows the learning rate to "learn" its own scale dynamically.

Several variants of the algorithm were developed to ensure broad applicability:

  • Dual Averaging with D-Adaptation: The foundational theoretical version providing optimal convergence.
  • D-Adapted AdaGrad: A coordinate-wise version estimating distance within the $\ell_\infty$ norm.
  • Practical SGD & Adam Variants: Modified versions incorporating momentum and weight decay, specifically engineered for the stochastic, non-convex landscapes typical of deep learning.

Experimental Evaluation

To demonstrate the general-purpose utility of D-Adaptation, the authors conducted extensive benchmarking across diverse domains:

  • Convex Optimization: 12 benchmark problems from the LIBSVM repository (e.g., Sensorless, DNA, Breast Cancer).
  • Image Classification: Standard benchmarks including CIFAR-10, CIFAR-100, and ImageNet 2012 using architectures such as ResNet, Wide ResNet, and DenseNet.
  • Natural Language Processing: German-to-English translation (IWSLT14) using LSTMs, and large-scale transformer pre-training (RoBERTa and GPT) on the Book-Wiki corpus.
  • Advanced Vision and Specialized Tasks: Object detection on COCO 2017 (Faster-RCNN), medical image reconstruction (fastMRI), and recommendation systems (Criteo Kaggle dataset using DLRM).

Key Insights

  1. Scale vs. Geometry: D-Adaptation is unique in its ability to adapt to the scale of the problem (the distance to the goal) rather than just the geometry of the gradients.
  2. Theoretical Efficiency: The method achieves the optimal $O(1/\sqrt{n})$ convergence rate for convex functions without the logarithmic slowdown factors common in other parameter-free methods.
  3. Robustness to Initialization: While the algorithm requires an initial guess $d_0$, it is remarkably robust to this value. Experiments show that even if $d_0$ is set as low as $10^{-16}$, the algorithm rapidly scales up to the appropriate range.
  4. Zero Overhead: Because the method relies on existing gradient information and does not require extra function evaluations or backtracking, it introduces virtually no computational cost compared to standard Adam or SGD.

Results

The empirical results demonstrate that D-Adaptation consistently matches or exceeds the performance of meticulously hand-tuned learning rates:

  • ImageNet: D-Adapted SGD reached 76.43% top-1 accuracy, compared to 76.09% for the tuned baseline.
  • NLP: For RoBERTa and GPT, D-Adapted Adam matched the test perplexity of tuned baselines without any manual intervention.
  • Recommendation Systems: On the DLRM model, the method achieved 0.7905 accuracy, effectively identical to the 0.7906 achieved by the tuned baseline.

Limitations and Future Work

While D-Adaptation performs exceptionally well in practice, its mathematical proofs are currently rooted in convex optimization. The theoretical guarantees do not yet fully extend to the non-convex regimes of deep learning, despite empirical success. Additionally, the method showed slight sensitivity in Vision Transformer (ViT) training, where specific warmup schedules are critical. Future research will focus on extending high-probability convergence bounds to stochastic settings and further refining the method for highly sensitive architectures like ViTs.

Summary updated

BibTeX
@inproceedings{defazio2023learning,
  author = {Aaron Defazio and Konstantin Mishchenko},
  title = {{Learning-Rate-Free Learning by D-Adaptation}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=GXZ6cT5cvY},
}
Figure