Abstract: We propose a stochastic optimization method for minimizing loss functions, expressed as an expected value, that adaptively controls the batch size used in the computation of gradient approximations and the step size used to move along such directions, eliminating the need for the user to tune the learning rate. The proposed method exploits local curvature information and ensures that search directions are descent directions with high probability using an acute-angle test and can be used as a method that has a global linear rate of convergence on self-concordant functions with high probability. Numerical experiments show that this method is able to choose the best learning rates and compares favorably to fine-tuned SGD for training logistic regression and DNNs. We also propose an adaptive version of ADAM that eliminates the need to tune the base learning rate and compares favorably to fine-tuned ADAM on training DNNs. In our DNN experiments, we rarely encountered negative curvature at the current point along the step direction in DNNs.
Introduction
In the realm of modern machine learning, training a model often feels like a balancing act. Practitioners spend countless hours tuning the learning rate (the step size) and the batch size (the amount of data processed per step). If the learning rate is too high, the model diverges; if it is too low, progress is glacial. Similarly, small batches are computationally efficient but noisy, while large batches are stable but expensive.
Most popular optimizers, such as SGD or ADAM, rely on pre-defined learning rate schedules—manual heuristics like "drop the rate by half every 30 epochs." We propose Ada-SGD, a framework designed to replace these manual interventions with a mathematically grounded, adaptive system that "senses" the optimization landscape and adjusts parameters on the fly.
The Ada-SGD Framework
Ada-SGD is built on two core pillars: adaptive step sizes derived from local curvature and a dynamic sampling strategy governed by a novel statistical test.
Curvature-Based Step Sizes
Instead of a fixed rate, Ada-SGD calculates the step size using an estimate of the local curvature (the Hessian). To maintain computational feasibility, we utilize Hessian-vector products. This technique provides essential second-order information at a cost roughly equivalent to a standard gradient evaluation, avoiding the need to compute or store the massive full Hessian matrix.
The Acute-Angle Test
To determine when to increase the batch size, we introduce the acute-angle test. This test ensures that the direction of the sampled (noisy) gradient is sufficiently aligned with the true gradient direction.
As illustrated in Figure 2, the acute-angle test defines a conical region of acceptable directions. If the sampled gradient falls outside this "cone," the algorithm automatically increases the sample size to reduce noise. This focus on direction rather than just magnitude provides a more robust signal for progress.
Empirical Performance
We evaluated Ada-SGD across a variety of tasks, from binary classification (logistic regression) on LIBSVM datasets to image classification using deep neural networks (DNNs) like ResNet18 and VGG11 on MNIST, Fashion-MNIST, and CIFAR-10.
As shown in Figure 4, Ada-SGD effectively automates the tuning process. The algorithm naturally mimics the "piece-wise" learning rate schedules that humans often spend days fine-tuning. It "knows" when to take large steps and when to settle down. Furthermore, the sample size grows dynamically as the optimization nears a solution, ensuring high-precision steps in the final stages of training.
Key Insights and Results
- No Tuning Required: Ada-SGD successfully identified near-optimal learning rates across different datasets without manual intervention.
- Outperforming Fine-Tuning: On datasets like Covertype and Webspam, Ada-SGD outperformed vanilla SGD even when the latter's learning rate was meticulously optimized via grid search.
- Negative Curvature is Rare: A surprising empirical finding was that in DNNs, the algorithm rarely encountered negative curvature along the step direction. This suggests that the local landscape of DNNs behaves more predictably along the optimization path than previously thought.
- Adaptivity for ADAM: The framework is not limited to SGD; we also demonstrated an adaptive version of ADAM that eliminates the need to tune its base learning rate.
Conclusion and Future Work
Ada-SGD offers a robust path toward automating the "black art" of optimizer tuning. While calculating curvature adds a small overhead per iteration, the algorithm often converges in fewer total iterations by taking more "informed" steps.
Future research will focus on further reducing the computational cost of Hessian-vector products and extending the theoretical convergence guarantees—currently proven for self-concordant functions—to the broader, non-convex world of deep learning.
Summary updated