In the search for the "perfect" optimizer, the Polyak step size stands out as a mathematically elegant ideal. Proposed by Boris Polyak in 1963, the rule suggests that the optimal step size $\eta$ at any point is:
$$\eta_t = \frac{f(x_t) - f^*}{\|\nabla f(x_t)\|^2}$$
where $f(x_t)$ is the current loss and $f^*$ is the global minimum value of the function. Intuitively, this rule scales the step size by the "suboptimality gap"—if you are far from the minimum, take a big step; if you are close, take a small one.
The catch is that for almost all real-world deep learning problems, we have no idea what $f^*$ is. Recent research has focused on turning this theoretical ideal into a practical algorithm by dynamically estimating $f^*$ during training.
The Interpolation Shortcut
The simplest way to use the Polyak rule is to assume the problem is "easy." In modern deep learning, models are often so large that they can perfectly fit the training data, a phenomenon known as interpolation. In this regime, the training loss can reach exactly zero.
Andrew Zisserman and Leonard Berrada exploited this in their algorithm ALI-G (Training Neural Networks for and by Interpolation). By setting $f^* = 0$, the Polyak formula becomes a closed-form expression that requires no manual learning rate tuning. While highly effective for overparameterized networks, this assumption fails when the data is noisy or the model capacity is limited, as the true $f^*$ is likely much greater than zero.
Tracking the Moving Target
To move beyond the interpolation assumption, researchers have developed methods to "learn" $f^*$ on the fly. The core intuition is that $f^*$ must be lower than any loss value we have seen so far, but not so low that the resulting step sizes cause the optimizer to diverge.
Several distinct strategies have emerged for this estimation:
- Running Minimums: Algorithms like $L^4$ (Practical loss-based stepsize adaptation for deep learning) by Georg Martius and Michal Rolínek maintain a dynamic estimate of the minimum achievable loss based on the lowest values observed during training.
- Momentum-Based Modeling: The MoMo optimizer (Momentum Models for Adaptive Learning Rates), developed by Fabian Schaipp, Aaron Defazio, and Robert M. Gower, uses momentum to build a local model of the loss function. It bootstraps the lower bound during training, allowing it to work in settings like language modeling where the optimal loss is non-zero and unknown.
- Moving Targets: Robert M. Gower and colleagues also introduced MOTAPS (Stochastic Polyak Stepsize with a Moving Target), which uses past loss values to iteratively update a global target variable. This "moving target" prevents the optimizer from stalling when it reaches a plateau.
Detecting Stalls and Violations
A more formal approach to estimating $f^*$ involves monitoring the progress of the optimization. If the loss isn't decreasing despite large gradients, the current estimate of $f^*$ is likely too low (the gap $f(x) - f^*$ is too large, leading to overshooting).
Sham M. Kakade demonstrated in Revisiting the Polyak step size that one can maintain a lower bound on $f^*$ and update it whenever progress stalls. Similarly, Anbang Liu and Mikhail A. Bragin proposed using "violation detectors" to recalibrate the estimate of the optimum, preventing the oscillations that occur when the step size is based on an inaccurate $f^*$ (Accelerating Level-Value Adjustment for the Polyak Stepsize).
Beyond Euclidean Geometry
The utility of the Polyak step size isn't limited to standard gradient descent. Researchers like Jun-Kai You and Yen-Huan Li have extended these adaptive rules to Mirror Descent (Minimizing Quantum Renyi Divergences via Mirror Descent with Polyak Step Size). By estimating $f^*$ on the fly in non-Euclidean spaces, they have solved complex problems in quantum information and finance where the optimal values were previously unknown.
Why It Works: The Feedback Loop
The success of these methods lies in a self-correcting feedback loop:
- Act: Use the current estimate of $f^*$ to calculate a Polyak step.
- Observe: Check if the resulting update actually reduced the loss.
- Update: If the update was successful, $f^*$ might be even lower; if it failed or caused oscillations, $f^*$ is likely higher than the current estimate.
By treating the global minimum not as a static constant to be guessed, but as a latent variable to be learned, these algorithms remove the need for manual learning rate schedules and bring us closer to truly autonomous optimization.