TL;DR
This paper introduces two novel methods to dynamically modulate learning rate schedules by performing a local quadratic optimization for each minibatch. By adding a single extra forward pass to estimate the loss curvature, these methods speed up convergence and improve the monotonicity of training for ResNets on image classification tasks.
What Problem Does This Paper Address?
Selecting the right learning rate (LR) is arguably the most critical hyperparameter decision in deep learning. While researchers have developed sophisticated global schedules like cosine decay, these schedules are "blind" to the specific characteristics of the data in a given minibatch.
Existing adaptive methods like the Stochastic Polyak Stepsize (SPS) attempt to solve this by using local loss information. However, SPS is notoriously unstable; it often produces massive "spikes" in the learning rate, especially early in training when the loss is high but gradients are small. As illustrated in Figure 1, linear approximations of convex, strictly positive functions (like cross-entropy) tend to significantly overestimate the optimal step size.
The authors ask: Can we inspect a minibatch's properties to decide if we should nudge the scheduled learning rate up or down to improve training speed and final accuracy?
Methods
The authors propose two distinct philosophies for estimating the ideal local stepsize ($\eta$):
- Second-Order Outer Approximated Stepsize (so-dz): This method uses a quadratic Taylor approximation of the minibatch loss. To make this computationally feasible, it employs an "outer approximation" of the Hessian, focusing on the derivatives of the logits (preactivations) while neglecting their second derivatives.
- Closest Softmax Stepsize (cs-dq): This approach linearizes the softmax values and selects a stepsize that minimizes the Euclidean distance between the predicted probabilities and the target one-hot labels.
Crucially, both methods use a "test point" strategy. They perform a small "probe" update with a fixed learning rate to see how the model's outputs change. This allows them to estimate the necessary derivatives with just one extra forward pass.
Rather than replacing the learning rate schedule entirely, the authors use these local estimates to modulate an existing schedule (like cosine decay). They average the local estimates over a window of 50 batches and use an arctan function to smoothly perturb the reference learning rate, ensuring the changes aren't too drastic.
Datasets
The methods were evaluated using the following standard benchmarks:
- CIFAR-10: A dataset of 60,000 32x32 color images in 10 classes.
- CIFAR-100: Similar to CIFAR-10, but with 100 classes.
- Models: The experiments primarily utilized ResNet-18 and ResNet-34 architectures.
Key Insights and Ideas
- Convergent Results: Despite being derived from different mathematical starting points—one focusing on loss minimization and the other on softmax probability distance—both
so-dzandcs-dqproduce remarkably similar stepsize values throughout training (see Figure 2). - Stability through Averaging: By modulating a reference schedule and using a moving average of local estimates, the authors avoid the instability and "spiking" issues that plague traditional Polyak stepsizes.
- Outlier Removal: The authors found that training is stabilized by ignoring "outlier" samples in a minibatch where the softmax values do not seem to improve during the probe step.
Key Results
- Faster Convergence: The proposed modulations significantly speed up the reduction of training loss, particularly during the middle phase of the training process.
- Improved Monotonicity: The training curves are noticeably smoother and more monotonic compared to standard SGD or the Lookahead optimizer.
- Accuracy Gains: On CIFAR-10, the methods provided a small but consistent boost in test accuracy. For example, ResNet-18 with
so-dzreached 95.399% accuracy compared to 95.256% for standard SGD. - Computational Overhead: The extra forward pass increases runtime by about 33%. However, the authors demonstrated that by subsampling only 20 inputs from the minibatch for the probe step, this overhead can be reduced to approximately 21% without sacrificing performance.
Limitations and Future Work
- CIFAR-100 Performance: While the methods excelled on CIFAR-10, the improvements on CIFAR-100 were less clear, with the authors noting that results there "look random" or provide no reliable improvement in test accuracy.
- Compute Cost: Even with subsampling, a 21% increase in compute is a trade-off that might not be acceptable for all practitioners, especially when training massive models.
- Scalability: The paper focuses on ResNets and smaller image datasets. Whether these local quadratic modulations translate effectively to Large Language Models (LLMs) or transformer architectures remains an open question for future research.
Summary updated