Abstract
In this paper, we propose a simple, fast and easy to implement algorithm LOSSGRAD (locally optimal step-size in gradient descent), which automatically modifies the step-size in gradient descent during neural networks training. Given a function $f$, a point $x$, and the gradient $\nabla_x f$ of $f$, we aim to find the step-size $h$ which is (locally) optimal, i.e. satisfies:
Introduction
In deep learning, the learning rate (or step size) is arguably the most critical hyperparameter. If it’s too large, training becomes unstable and diverges; if it’s too small, progress is agonizingly slow and can get stuck in sub-optimal areas. While adaptive optimizers like Adam, AdaGrad, and RMSProp have become industry standards, they often still require a well-chosen initial learning rate or complex scheduling. LOSSGRAD aims to eliminate this manual tuning by finding a locally optimal step size based on the geometry of the loss function.
Methodology
The core idea behind LOSSGRAD is to treat the loss function $f$ along the direction of the gradient as a one-dimensional curve. The algorithm seeks a step size $h$ that minimizes this curve using a quadratic approximation. It defines a ratio, $r_h$, which measures the discrepancy between the actual loss value after a step and the value predicted by a simple linear model (the tangent line).
If the actual loss is much higher than the linear prediction ($r_h > 0.5$), it means the loss surface is "curving up" sharply, and the step was likely too large. If the loss is close to or lower than the linear prediction ($r_h \le 0.5$), the step was conservative, and there is room to increase the learning rate. The algorithm uses a small adjustment factor $c$ (typically 1.05) to scale the learning rate up or down accordingly. This requires two forward passes but only one backward pass per iteration, making it computationally efficient.
Experimental Evaluation
The authors evaluated LOSSGRAD across several standard benchmarks to prove its versatility:
- MNIST & Fashion-MNIST: For basic image classification and autoencoder tasks.
- CIFAR-10: Used to test a convolutional neural network and the ResNet-56 architecture.
- IMDb Movie Reviews: Used to test an LSTM model for sentiment analysis.
- CelebA: Used to evaluate a Wasserstein Auto-Encoder (WAE).
Key Insights and Results
The most striking finding is LOSSGRAD's resilience to initialization. In experiments on CIFAR-10, initial rates ranging from $10^{-1}$ to $10^{-6}$ all eventually converged to the same optimal step size (around 0.025). This effectively removes the "initial learning rate" from manual hyperparameter tuning.
On CIFAR-10 with ResNet-56, LOSSGRAD achieved a test accuracy of 90.0%, outperforming standard SGD and WNGRAD. Unlike algorithms that track historical gradients (like Adam), LOSSGRAD makes decisions based on the current local geometry, allowing it to react quickly to changes in the loss landscape. The algorithm is remarkably easy to implement, requiring only about 12 lines of pseudocode.
Limitations and Future Work
The authors noted occasional "spikes" in the loss, particularly on MNIST, likely due to the learning rate growing too large before the quadratic check pulls it back. Furthermore, the current version is designed for vanilla Gradient Descent. Integrating momentum is a crucial next step for making the algorithm competitive with state-of-the-art optimizers like Adam in all scenarios. While the method works in stochastic settings, the quadratic approximation is noisier than in deterministic settings, which remains an area for future refinement.
Summary updated