Abstract
The performance of gradient-based optimization methods, such as standard gradient descent (GD), greatly depends on the choice of learning rate. However, it can require a non-trivial amount of user tuning effort to select an appropriate learning rate schedule. When such methods appear as inner loops of other algorithms, expecting the user to tune the learning rates may be impractical. To address this, we introduce AutoGD: a gradient descent method that automatically determines whether to increase or decrease the learning rate at a given iteration. We establish the convergence of AutoGD, and show that we can recover the optimal rate of GD (up to a constant) for a broad class of functions without knowledge of smoothness constants. Experiments on a variety of traditional problems and variational inference optimization tasks demonstrate strong performance of the method, along with its extensions to AutoBFGS and AutoLBFGS.
Introduction
Choosing the right learning rate is a fundamental challenge in gradient-based optimization. A rate that is too high can lead to divergence, while a rate that is too low results in agonizingly slow convergence. While adaptive optimizers like Adam are popular, they often introduce additional hyperparameters and can struggle with complex mathematical landscapes. In "AutoGD: Automatic Learning Rate Selection for Gradient Descent," Nikola Surjanovic and colleagues from the University of British Columbia propose a tuning-free variant of gradient descent that adaptively selects learning rates by comparing a small set of candidates at every iteration.
The AutoGD Algorithm
The core logic of AutoGD is elegant in its simplicity. At each iteration $t$, the algorithm considers a baseline learning rate $\gamma_t$ and evaluates three proposals:
- Shrink: $c^{-1}\gamma_t$
- Stay: $\gamma_t$
- Grow: $c\gamma_t$ Typically, the scaling factor $c$ is set to 2.
The selection process relies on the Armijo Condition, which ensures the chosen rate provides a "sufficient decrease" in the objective function relative to the gradient magnitude. If none of the candidates satisfy this condition, the algorithm remains at the current position ($\gamma=0$) and aggressively shrinks the baseline rate for the next step. To avoid getting stuck at local maxima or unstable saddle points, AutoGD employs a diffuse initialization, starting with a randomized initial position and learning rate.
Key Insights and Theoretical Guarantees
AutoGD is designed to be robust across diverse optimization landscapes. Key theoretical and practical insights include:
- Optimal Convergence: The authors prove that AutoGD recovers the optimal convergence rate for $L$-smooth and $\mu$-strongly convex functions up to a constant, without requiring the user to provide the smoothness constants $L$ or $\mu$.
- Saddle Point Avoidance: By combining the Armijo condition with diffuse initialization, AutoGD almost surely avoids unstable saddle points and local maxima.
- Parallel Efficiency: Although AutoGD evaluates three learning rates per step, these evaluations are independent and can be computed in parallel on modern hardware, maintaining wall-clock times comparable to standard GD.
- Curvature Robustness: Unlike methods that estimate the Hessian via finite differences, AutoGD’s comparison-based approach is stable even when curvature changes rapidly.
Experimental Evaluation
The authors evaluated AutoGD against a wide range of benchmarks, including 26 standard test functions and 61 black-box Variational Inference (VI) problems. They also tested "extreme" synthetic functions, such as those with "fat tails" ($\log(\log(1+x^2)+1)$) or "rapid growth" ($x^{20}$), which often cause other adaptive optimizers to fail.
In the VI tasks, AutoGD and its variant AdGD2 were the only methods that remained reliable across a massive range of initial learning rate guesses (from $10^{-6}$ to $100$). Standard GD and traditional line search methods failed significantly outside a narrow "Goldilocks" zone. Furthermore, the authors extended the logic to quasi-Newton methods, creating AutoLBFGS, which achieved 10-100x speedups over first-order methods on classical problems.
Conclusion
AutoGD offers a mathematically grounded, "set it and forget it" solution for gradient-based optimization. By automating learning rate selection through a simple yet robust comparison mechanism, it removes the need for manual tuning while providing strong convergence guarantees even in challenging, non-convex landscapes. For researchers tired of babysitting loss curves, AutoGD provides a compelling path toward truly automatic optimization.
Summary updated