A new algorithmic approach for finding flat minima: critically damped Polyak stepsizes

Francesco Caporali, Jason M. Altschuler, Boris HaninarXiv 2026 · arXiv

In the world of deep learning, not all solutions are created equal. While many different sets of model weights can achieve zero training loss, those that lie in "flat" regions of the loss landscape—where the curvature is low—tend to generalize much better to new data.

A new paper from researchers at Princeton University, "A new algorithmic approach for finding flat minima: critically damped Polyak stepsizes," introduces a surprisingly simple way to find these elusive flat minima. By slightly modifying a classic optimization rule, they’ve created an optimizer that naturally "drifts" toward flatter regions of the parameter space.

TL;DR

The authors propose Critically Damped Polyak (CDP) stepsizes, a simple adaptive learning rate rule that biases gradient descent toward flatter minima. By operating at the "edge of stability," the algorithm causes iterates to oscillate around the solution manifold, creating a natural drift toward regions of lower curvature, with proven theoretical guarantees and strong results in fine-tuning Large Language Models (LLMs).

What Problem Does This Paper Address?

Overparameterized models, like modern neural networks, have a "manifold" of global minima—a continuous set of points where the training loss is zero. However, some points on this manifold are "sharp" (high curvature), while others are "flat" (low curvature). Flat minima are highly desirable because they are more robust to small perturbations and generally perform better on test data.

Existing methods to find flat minima, such as Sharpness-Aware Minimization (SAM), often require multiple gradient evaluations per step or complex modifications to the objective function. The challenge is to find a first-order optimizer that can navigate the manifold of solutions toward flatter regions using only standard gradient information.

Methods

The core of the paper is the Critically Damped Polyak (CDP) stepsize rule:

$$\eta_\kappa = 4 e^{-\kappa \mathcal{L}(\theta)} \frac{\mathcal{L}(\theta)}{\|\nabla \mathcal{L}(\theta)\|^2}$$

This formula builds on the classical Polyak stepsize but introduces two critical changes:

  1. The Factor of 4: While standard Polyak rules use a factor of 1 or 2 to converge directly to a minimum, the factor of 4 is "critical." it intentionally overshoots, causing the iterates to oscillate (or "equioscillate") across the manifold of solutions.
  2. The Damping Factor ($e^{-\kappa \mathcal{L}}$): This term gradually slows down the oscillations as the loss $\mathcal{L}$ decreases, eventually allowing the model to converge onto the manifold.

As shown in Figure 1, these oscillations aren't just noise; they align the model's movement with the direction of greatest curvature. This tension between oscillating and converging creates a "slow drift" along the manifold toward flatter regions.

Figure 1. CDP dynamics near the manifold of loss minima M. Here θ0 is the initial iterate, p0 its nearest point on M, and n0 = θ0 −p0 the normal displacement. Oscillations bias the iterates toward flatter minima, but this drift slows as the loss decreases. Our stepsizes exploit this tension, damping the oscillations gradually to reduce the loss while sustaining motion along M.

Datasets

The researchers validated CDP across a range of tasks:

  • Toy Models: Visualizable 2D loss landscapes to confirm the "flatness drift."
  • Student-Teacher Networks: Synthetic regression tasks using both ReLU and smooth (tanh) activations to test the theory in controlled neural network settings.
  • LLM Fine-tuning: Fine-tuning pre-trained Large Language Models, specifically GPT-2 and Qwen2.5-1.5B/0.5B, on the WikiText-2 dataset.

Key Insights and Ideas

  • Embracing the Edge of Stability: Most optimizers try to avoid oscillations. CDP uses them as a compass. By oscillating in the "sharpest" direction, the optimizer naturally feels a pressure to move toward areas where those oscillations are less violent—i.e., flatter regions.
  • Implicit Bias via Stepsize: Unlike SAM, which changes the direction of the gradient, CDP only changes the length of the step. The "flatness bias" emerges purely from how the stepsize reacts to local curvature.
  • Uniform-in-Time Guarantees: A major theoretical contribution is proving that CDP reduces both loss and sharpness simultaneously over the entire training run. Many previous analyses of similar "drift" effects only held for short periods.
  • Convergence to Interpolation: Unlike "Normalized Gradient Descent," which requires adding noise to move along the manifold, CDP's steps naturally shrink as the loss goes to zero, allowing it to settle into a specific, high-quality solution.

Key Results

The empirical results demonstrate that CDP is highly effective at reducing "sharpness" (the top eigenvalue of the Hessian, $\lambda_1$):

  • LLM Sharpness Reduction: In GPT-2 fine-tuning, CDP reduced the sharpness from an initial 1475 down to 27. For comparison, the popular AdamW optimizer only reached a sharpness of 486.
  • Hybrid Schedules: The authors found that using CDP as a "warmup" phase followed by Adam works best. On Qwen2.5, this hybrid approach achieved nearly the same perplexity as Adam alone but with 7x lower sharpness.
  • Quantization Robustness: Models trained with CDP were more robust to 4-bit quantization. Because the minima were flatter, "rounding" the weights during quantization caused less damage to the model's performance.
Figure 2. Optimizer trajectories in the (p, n) plane (left) and sharpness at their projections (pk, 0) onto the manifold of minimizers M = {n = 0} (right), starting from θ0 = (−6, 0.675) for 1500 updates. CDP stepsizes sustain motion toward flatter minima as the loss decreases.

Limitations and Future Work

  • Zero-Loss Assumption: The current theory and stepsize rule assume the global minimum loss is zero (common in overparameterized regression). Adapting this to cross-entropy loss (where loss doesn't hit zero) requires careful tuning of the damping parameter.
  • Hyperparameter Sensitivity: The "step cap" (limiting how much a parameter can change in one step) was found to be important for LLM stability, suggesting CDP might be sensitive to initialization in very complex landscapes.
  • Stochasticity: While the paper explores minibatch gradients, the core theory is deterministic. Extending the "uniform-in-time" proofs to the fully stochastic setting is a promising next step.

Summary updated

Abstract

We present a new adaptive stepsize rule that biases gradient descent toward flatter minima in both theory and practice, and establish the first uniform-in-time guarantees for both sharpness and loss reduction for a broad class of locally quadratic objectives. Our critically damped Polyak (CDP) stepsizes multiply the classical Polyak rule by $4$ and a mild damping factor. The factor $4$ is critical in that it produces equioscillations around the manifold of minimizers $\mathcal{M}$ to leading order. Damping provably drives convergence to $\mathcal{M}$. CDP thus operates at the edge of stability by adapting its stepsizes to local curvature. Once the loss is small, its projected iterates follow gradient descent on $\log{λ_1(\nabla^2 \mathcal{L})}$ along $\mathcal{M}$ to leading order, paralleling the flatness bias of normalized gradient descent (Arora et al., 2022). Unlike normalized gradient descent, CDP step lengths shrink with the distance to $\mathcal{M}$, enabling convergence to an interpolating solution that locally minimizes sharpness at finite learning rate. We establish our theory for a broad class of non-negative losses with locally quadratic Morse-Bott structure near $\mathcal{M}$, capturing regular interpolation regimes in smooth overparameterized neural networks. Empirically, CDP stepsizes produce a flattening effect similar to that of Sharpness-Aware Minimization (SAM, Foret et al., 2021), reducing sharpness even in settings beyond our theory, including nonlinear teacher-student networks and fine-tuning of pre-trained LLMs.
BibTeX
@misc{caporali2026new,
  author = {Francesco Caporali and Jason M. Altschuler and Boris Hanin},
  title = {{A new algorithmic approach for finding flat minima: critically damped Polyak stepsizes}},
  year = {2026},
  eprint = {2611.26475},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.26475},
}
Figure