Abstract
In deterministic optimization, line searches are a standard tool ensuring stability and efficiency. Where only stochastic gradients are available, no direct equivalent has so far been formulated, because uncertain gradients do not allow for a strict sequence of decisions collapsing the search space. We construct a probabilistic line search by combining the structure of existing deterministic methods with notions from Bayesian optimization. Our method retains a Gaussian process surrogate of the univariate optimization objective, and uses a probabilistic belief over the Wolfe conditions to monitor the descent. The algorithm has very low computational cost, and no user-controlled parameters. Experiments show that it effectively removes the need to define a learning rate for stochastic gradient descent.
Introduction: The Challenge of Stochasticity
In deterministic optimization, line searches are a fundamental tool. When a search direction is identified, a line search explores that 1D path to find a step size that ensures a sufficient decrease in the objective function. However, modern machine learning relies on stochasticity. Using mini-batches results in "noisy" estimates of the true loss surface, which causes standard deterministic line searches to fail.
Classic methods make "hard" decisions based on exact values. If a noisy gradient suggests a point is suboptimal, a deterministic search might prematurely shrink the search space and stall. Consequently, practitioners often skip line searches in deep learning, opting for manual tuning of learning rates or adaptive schedules like Adam. This paper bridges the gap by introducing a line search that explicitly models uncertainty.
Methodology: Probabilistic Line Search
The proposed method treats the 1D line search as a mini Bayesian Optimization problem. It employs a Gaussian Process (GP) Surrogate to model the 1D objective function. Specifically, an integrated Wiener process is used, resulting in a posterior mean that is a piecewise cubic spline. This allows the algorithm to analytically find local minima with minimal computational overhead.
Instead of hard thresholds, the method uses Probabilistic Wolfe Conditions. It calculates the probability that the Armijo and Curvature conditions are met. A step is accepted only if this probability exceeds a predefined threshold (e.g., $c_W = 0.3$). To decide where to evaluate next, an acquisition function combines Expected Improvement (EI) with the Wolfe probability, balancing exploration and exploitation.
The algorithm is designed to be parameter-free. It estimates noise variances ($\sigma_f, \sigma_{f'}$) directly from mini-batch statistics and standardizes the objective internally, removing the need for user-defined hyperparameters.
Experimental Evaluation
The method, dubbed SGD+ProbLS, was evaluated on several standard benchmarks including MNIST, CIFAR-10, WDBC, GISETTE, and EPSILON.
Key results include:
- Tuning-Free Performance: Across all datasets, SGD with the probabilistic line search performed as well as, or better than, the best hand-tuned constant learning rates.
- Robustness to Initialization: The algorithm quickly adapted to the optimal scale even when started with wildly incorrect initial learning rates (e.g., $10^{-4}$ vs $10^1$).
- Low Overhead: The extra steps for variance estimation and GP inference added only about 1% to the total wall-clock time in neural network training.
- Sample Efficiency: The search typically requires only 1 or 2 function evaluations per gradient step to find an acceptable point.
Discussion and Key Insights
A critical feature of the algorithm is its "Immediate Accept" logic. If the current learning rate is well-calibrated, the probabilistic framework allows for a single evaluation to confirm it, avoiding unnecessary computation. Furthermore, the algorithm is noise-aware; in high-noise areas of the loss surface, it becomes more cautious, while in smooth areas, it takes bolder steps.
Limitations and Future Work
While effective, the method has limitations. At very small mini-batch sizes (e.g., $m=10$), variance estimates can become inaccurate, potentially leading to instability. Additionally, while the line search is general, this study focused on the SGD direction. Future work could explore its performance with more complex directions like those from Adam or quasi-Newton methods. Finally, the observed "natural annealing" effect, where the line search maintains better test error despite plateauing in training error, warrants further investigation.
Summary updated