Abstract
Training deep learning models traditionally relies on a "monotone" approach, where the loss function is required to decrease at every optimization step. However, this constraint can be overly restrictive in the complex, non-convex landscapes of modern neural networks. This paper introduces PoNoS (POlyak NOnmonotone Stochastic), a novel optimizer that relaxes the monotonicity requirement. By allowing the loss to temporarily increase relative to a historical reference value, PoNoS enables larger, more effective step sizes. Our results demonstrate that PoNoS achieves faster convergence, improved generalization, and superior wall-clock efficiency compared to standard SGD and Adam across a variety of tasks, including image classification and language modeling.
Introduction
Selecting an optimal learning rate is one of the most challenging aspects of training deep neural networks. A learning rate that is too large leads to divergence, while one that is too small results in agonizingly slow convergence. While classical optimization utilizes "line search" to automate this selection, adapting these techniques to Stochastic Gradient Descent (SGD) has proven difficult.
Existing stochastic line search methods are typically monotone, requiring the loss on a specific mini-batch to decrease at every iteration. This approach faces two primary hurdles in deep learning:
- Complex Landscapes: The loss landscapes of deep models are highly non-convex and "bumpy." Forcing a decrease at every step can trap the optimizer into taking tiny, inefficient steps to navigate local fluctuations.
- Stochastic Noise: Because SGD operates on mini-batches, forcing a decrease on a specific subset of data does not necessarily correlate with improving the overall model performance.
PoNoS addresses these issues by permitting "nonmonotone" behavior—allowing the loss to occasionally rise—without sacrificing the mathematical guarantees of convergence.
The PoNoS Framework
The PoNoS algorithm (POlyak NOnmonotone Stochastic line search) integrates three key components to optimize the training process:
1. Nonmonotone Line Search
Rather than comparing the new loss directly to the current loss, PoNoS compares it to a reference value ($C_k$). This reference value is a weighted average of recent losses. This mechanism allows the optimizer to accept a step even if the loss increases slightly, provided the new value remains below the historical average. This flexibility prevents the optimizer from getting "stuck" by minor local peaks.
2. Polyak Initial Step Size
PoNoS begins each search iteration with a "Polyak step." This technique uses the current loss and gradient magnitude to estimate the distance to the global minimum. By providing a mathematically grounded starting guess rather than a fixed constant, the algorithm significantly reduces the number of search iterations required.
3. Adaptive Resetting Technique
Line searches can be computationally expensive due to "backtracking" (retrying with smaller steps when a guess fails). PoNoS employs a resetting rule that adjusts the current initial guess based on the number of backtracks performed in the previous iteration. In practice, this allows the optimizer to skip extra computations for the majority of training steps, maintaining high efficiency.
Experimental Evaluation
The researchers benchmarked PoNoS against standard optimizers (SGD, Adam) and existing line search methods (SLS, SPS) across several domains:
- Image Classification: Evaluated on MNIST, CIFAR-10/100 (using ResNet-34 and DenseNet-121), FashionMNIST, and SVHN.
- Convex/Kernel Models: Tested on binary classification tasks using RBF kernels (e.g., mushrooms, rcv1).
- Language Modeling: Training Transformers (Transformer-XL) on the PTB and Wikitext2 datasets.
Key Results
- Superior Convergence: PoNoS reached target training losses (e.g., $10^{-6}$) significantly faster than its competitors in nearly every test case.
- Wall-Clock Efficiency: Despite the overhead of a line search (which requires an additional forward pass), PoNoS proved more efficient in total runtime than SGD and Adam. This is due to the effectiveness of the resetting rule and the larger steps taken.
- Generalization and Stability: By selecting larger step sizes, PoNoS helps the model find flatter minima. This aligns with the "edge of stability" theory, which suggests that larger steps improve performance on unseen test data. Furthermore, the nonmonotone buffer prevents numerical "crashes" where step sizes plummet due to cancellation errors in near-identical loss values.
Discussion and Limitations
While PoNoS represents a significant advancement in automated optimization, it relies on the interpolation assumption—the premise that the model is powerful enough to achieve zero training loss. While this holds for most over-parameterized modern networks, it may not apply to smaller models or extremely noisy datasets.
Additionally, while PoNoS reduces the need for learning rate tuning, it introduces a new hyperparameter $\xi$ to control the degree of nonmonotonicity. Future work will focus on auto-tuning these parameters and further integrating nonmonotone search with Adam-like preconditioning for even broader applicability in large-scale transformer training.
Summary updated