Introduction
In machine learning, selecting the optimal learning rate is notoriously challenging, often requiring exhaustive trial and error. While adaptive methods like Adam and AdaGrad have become industry standards, the Polyak Step Size (PS) offers a compelling alternative by utilizing the current function value to dynamically determine the step size.
Despite its promise, extending Polyak steps to stochastic, non-smooth optimization problems—such as training deep neural networks with ReLU activations or hinge losses—has proven difficult. Existing stochastic Polyak step size (SPS) variants typically suffer from one of three major limitations:
- Interpolation Dependence: They assume the model can achieve zero loss on every single training data point, which rarely holds in practice.
- Oracle Requirements: They require prior knowledge of the optimal loss value ($f^*$), an impossibility for real-world tasks.
- Stability Issues: When gradients vanish or become extremely small, standard Polyak formulas cause the step size to explode toward infinity. Previous workarounds involved "hard-capping" the step size, which inadvertently forces the algorithm to behave like a constant-step-size method, stripping away its adaptive benefits.
The Proposed Solution: Safeguarded SPS ($SPS_{safe}$)
To overcome these hurdles, the authors introduce Safeguarded SPS ($SPS_{safe}$). The core innovation lies in a simple yet highly effective modification to the denominator of the step size formula:
$$ \gamma_t = \frac{f_i(x^t) - \ell_i^*}{\max\{\|g_i^t\|^2, M\}} $$
Where:
- $f_i(x^t)$: The current loss on a given sample.
- $\ell_i^*$: A known lower bound on the loss (e.g., 0 for most machine learning tasks).
- $\|g_i^t\|^2$: The squared norm of the stochastic subgradient.
- $M$: The safeguard constant.
By embedding the safeguard $M$ inside the max function in the denominator, $SPS_{safe}$ prevents the step size from exploding when gradients shrink. The authors rigorously prove that this mechanism is algebraically equivalent to a form of adaptive gradient clipping, elegantly bridging Polyak updates with a stabilization technique widely used in deep learning.
Furthermore, the authors extend this approach to the Iterate Moving Average (IMA) framework. This incorporates momentum into the update rule, yielding the first convergence guarantees for an adaptive momentum method in the non-smooth regime without relying on oracle information.
Experimental Validation
The researchers evaluated $SPS_{safe}$ across a diverse set of benchmarks, ranging from synthetic convex/non-smooth tasks (Support Vector Machines with hinge loss) and non-convex/non-smooth tasks (Phase Retrieval) to complex deep learning scenarios (training ResNet-20, ResNet-32, and WideResNet-28x10 architectures on CIFAR-10 and CIFAR-100).
Key Insights and Results
- Robustness to Vanishing Gradients: In deep neural network training, gradient norms frequently collapse toward zero. While standard Polyak methods fail under these conditions, $SPS_{safe}$ maintains healthy gradient norms and entirely avoids step-size explosion.
- Superior Accuracy: On CIFAR-10 using ResNet-20, $SPS_{safe}$ achieved 90.39% accuracy, outperforming both the standard SPS (87.88%) and the best-tuned "smoothed" Polyak baseline (89.79%).
- True Adaptivity: Unlike previous "smoothed" Polyak heuristics that default to a constant step size in up to 98% of iterations, $SPS_{safe}$ remains genuinely adaptive throughout the entire training process.
- Simplified Tuning: The authors demonstrate that setting $M=1$ serves as a highly robust default for deep learning applications, drastically reducing the computational overhead associated with hyperparameter tuning.
- Theoretical Guarantees: The paper provides rigorous proofs showing that $SPS_{safe}$ converges at an $O(1/\sqrt{T})$ rate to a neighborhood of the optimal solution. The size of this neighborhood is explicitly controlled by the safeguard $M$ and the variance of the gradients.
- Momentum Gains: The momentum-enhanced variant ($IMA-SPS_{safe}$) exhibited even stronger generalization performance, confirming that the safeguard mechanism synergizes perfectly with momentum.
Limitations and Future Directions
While $SPS_{safe}$ marks a significant step forward, the authors note a few areas for future exploration. First, there remains a gap between theory and practice: the theoretical proofs assume convex Lipschitz objectives, yet the most compelling empirical results occur in non-convex deep learning environments. Bridging this theoretical gap is a crucial next step.
Additionally, the method currently converges to a neighborhood of the solution rather than the exact optimal point (unless the problem is perfectly interpolated). Finding mechanisms to decay this neighborhood radius over time without causing step-size explosion remains an open challenge. Finally, the authors highlight scaling $SPS_{safe}$ to Large Language Models (LLMs) and deploying it in federated learning settings as highly promising avenues for future research.
Summary updated