Abstract
The learning rate is an important tuning parameter for stochastic gradient descent (SGD) and can greatly influence its performance. However, appropriate selection of a learning rate schedule across all iterations typically requires a non-trivial amount of user tuning effort. To address this, we introduce AutoSGD: an SGD method that automatically determines whether to increase or decrease the learning rate at a given iteration and then takes appropriate action. We introduce theory supporting the convergence of AutoSGD, along with its deterministic counterpart for standard gradient descent. Empirical results suggest strong performance of the method on a variety of traditional optimization problems and machine learning tasks.
Introduction: The Learning Rate Challenge
In deep learning, the learning rate (LR) is a critical hyperparameter. It presents a classic "Goldilocks" problem: a rate that is too high causes the model to diverge, while a rate that is too low results in prohibitively slow training. While adaptive optimizers like Adam or AdaGrad adjust rates for individual parameters, they still rely on a well-chosen initial learning rate or a manually designed decay schedule. Finding these optimal settings often requires extensive trial-and-error.
AutoSGD aims to provide a "set it and forget it" optimizer. It automatically handles learning rate tuning throughout the training process, even in the presence of noisy gradients, reducing the need for manual intervention.
The AutoSGD Algorithm
The core of the proposed method is a decision-making process that adapts the step size to the local geometry of the loss landscape. The algorithm operates in "episodes" rather than making adjustments at every single step.
- Parallel Streams: During each episode, AutoSGD runs three parallel SGD streams from the same starting point. These streams use a "middle" rate ($\gamma$), a "lower" rate ($c\gamma$), and an "upper" rate ($C\gamma$).
- Statistical Decision Process: The algorithm tracks the performance of these streams using a Z-statistic based on the average reduction of the objective function relative to its variance. This allows it to determine when one stream is significantly outperforming the others.
- Adaptive Actions: Based on the performance, the algorithm chooses one of four actions for the next episode: Increase (shift the grid up), Stay (keep the current grid), Decrease (shift the grid down), or Restart (backtrack if all streams diverge).
The authors provide theoretical convergence guarantees for both AutoSGD and its deterministic counterpart, AutoGD, using Markov Chain Monte Carlo (MCMC) theory. They demonstrate that the algorithm eventually finds and remains within a "good" region of learning rates.
Key Insights and Empirical Performance
Empirical evaluations across classical optimization tasks and modern machine learning benchmarks (ResNet-18 on CIFAR and RoBERTa on GLUE) reveal several key advantages of AutoSGD:
- Automatic Discovery of Heuristics: AutoSGD naturally discovers common training patterns, such as "warming up" the learning rate early in training and decaying it as it approaches an optimum.
- Robustness to Initialization: A standout feature is the algorithm's ability to converge efficiently even when initialized with a learning rate several orders of magnitude away from the optimal value.
- Safety through Backtracking: The "Restart" mechanism acts as a safety net, allowing the algorithm to aggressively test higher learning rates without the risk of permanent divergence.
While the three-stream approach increases memory overhead (roughly 3x), modern GPUs can often handle these parallel streams with minimal impact on wall-clock time, provided sufficient VRAM is available.
Conclusion
AutoSGD offers a robust solution to the persistent challenge of learning rate tuning. By automating the selection of schedules and providing a built-in mechanism for recovery from divergence, it matches or exceeds the performance of hand-tuned optimizers across a variety of tasks. Future work may explore more complex proposal grids to further refine the efficiency of this "parameter-free" approach.
Summary: AutoSGD is a new optimization algorithm that automates learning rate selection by running small parallel test streams. It adapts its step size to the local loss landscape, matching or beating hand-tuned optimizers while significantly reducing user tuning effort.
Summary updated