Abstract
Optimization in deep learning heavily relies on the manual tuning of learning rates, a process that is both computationally expensive and labor-intensive. While Stochastic Line Search (SLS) methods offer a theoretical path to automation via the Armijo condition, they typically suffer from instability due to mini-batch noise and high computational overhead. This paper introduces Stable Armijo Line Search Adaptation (SaLSa), a novel approach that stabilizes the line search criterion using momentum and optimizes efficiency through adaptive search frequency. SaLSa eliminates the need for manual learning rate tuning while maintaining a negligible 3% computational overhead, outperforming tuned Adam and SGD baselines across diverse NLP and Vision benchmarks.
Introduction
In the current deep learning paradigm, the learning rate (LR) is arguably the most critical hyperparameter. Finding the optimal LR or an effective learning rate schedule usually requires expensive grid searches and significant expert intuition. While "Stochastic Line Search" (SLS) methods have been proposed to automate this by checking the Armijo condition—a rule that ensures the step size leads to a sufficient decrease in loss—they have historically suffered from two major flaws:
- Mini-batch Noise: Because the line search is performed on a small subset of data, "noisy" batches can cause the learning rate to fluctuate wildly or drop to near-zero, effectively stalling training.
- Computational Cost: Traditional line searches require multiple forward passes per update, often increasing training time by 30% or more.
SaLSa (Stable Armijo Line Search Adaptation) is designed to resolve these stability and efficiency issues, making line search practical for large-scale, modern architectures like Transformers and ResNets.
Methodology
SaLSa modifies the standard Armijo line search through three primary technical innovations:
Momentum-based Criterion
Instead of evaluating the Armijo condition on a single, noisy mini-batch, SaLSa applies Exponential Moving Average (EMA) smoothing to both sides of the inequality. This acts as a "memory" of the loss landscape, preventing the optimizer from overreacting to an outlier batch. This smoothing is the key to preventing the drastic drops in step size that previously crippled SLS on large datasets.
Adaptive Search Frequency
The authors observed that the optimal step size does not change drastically at every single iteration. SaLSa tracks the rate of change of the step size; if the step size remains stable, the algorithm performs the line search less frequently (up to every 10 steps). This optimization reduces the computational overhead from approximately 30% to just 3%.
Preconditioned Support
SaLSa is designed to work not just with SGD, but also with preconditioned optimizers like Adam. It replaces the standard gradient norm with a preconditioned version to maintain compatibility with Adam's internal state, allowing it to be dropped into existing workflows with minimal friction.
Experimental Setup
The researchers rigorously tested SaLSa across diverse domains to ensure robustness:
- Natural Language Processing (NLP): Fine-tuning BERT on the GLUE benchmark (MNLI, QNLI, MRPC, SST2) and training GPT-2 on the Shakespeare dataset.
- Computer Vision: Training ResNet34 on CIFAR-10 and CIFAR-100, and ResNet50 on the ImageNet dataset (approx. 1 million samples).
Key Results and Insights
Performance and Generalization
SaLSa optimizers achieved an average 1.5% accuracy boost and a 50% lower average log loss at the end of training compared to manually tuned Adam and SGD baselines. This challenges the "no-free-lunch" myth in hyperparameter automation, showing that an automated LR can actually yield better generalization than a manually tuned schedule.
Efficiency and Stability
The adaptive frequency mechanism successfully brought computational overhead down to roughly 3%, making it nearly as fast as standard training while saving hours of human time. Crucially, SaLSa remained stable on ImageNet, whereas previous SLS implementations often produced excessively large or infinitesimally small step sizes that led to convergence failure.
Hyperparameter Robustness
While SaLSa introduces its own parameters—such as the smoothing factor $\beta_3$ and the Armijo constant $c$—the authors found that a single setting ($c=0.3, \beta_3=0.99$) worked optimally across almost all architectures and datasets. This provides a significant advantage over tuning a learning rate from scratch for every new model.
Limitations and Future Work
Despite its empirical success, SaLSa has areas for further development. While the authors provide a convergence proof for the full-batch setting, the theoretical guarantees for the smoothed stochastic version (using EMA) remain more empirical than formal. Additionally, the current work focuses on first-order optimizers; exploring how SaLSa interacts with second-order methods is a promising avenue for future research. Finally, while a PyTorch package is available, the method requires specific handling of forward passes to maintain efficiency, which may require minor refactoring for non-standard training loops.
Conclusion
SaLSa represents a significant step toward truly automated deep learning. By addressing the noise and cost issues of traditional line searches, it provides a stable, efficient, and high-performing alternative to manual learning rate tuning, proving that we can achieve superior results with significantly less human intervention.
Summary updated