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 M to leading order. Damping provably drives convergence to 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(∇2L) along 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 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 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.
Figures & tables
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 .
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.
Figure 3. GD, CDP, and hybrid trajectories for L(θ)=21(θ(1)θ(2)−1)2 , starting from θ0=(2,1) for 100 steps. The hybrid schedule uses 5 GD steps followed by 95 CDP steps. CDP induces drift along the manifold of minima M toward θ⋆=(1,1) , where sharpness is minimized.
Figure 4. Analog of Fig. 3 for two other losses. CDP induces drift toward lower sharpness along the manifold of minima M . Left: M is the diagonal, with sharpness decreasing outward along it and no finite flattest minimum. Right: M is the circle, with a flattest minimum at θ⋆=(1,0) .
Figure 5. CDP trajectories with κ=0.1 for 2000 steps on eq. 5 , from two different initializations. Left: trajectories over loss contours, with the minimizer manifold M shown dashed. Right: sharpness λ1 along M , parametrized by θ=(θ(1),sin(θ(1))) . Depending on initialization, CDP approaches either a global or a strict local minimum of sharpness.
Figure 6. Validation loss (left) and top eigenvalue of the validation-loss Hessian (right) for a fully connected ReLU student-teacher network with N0=8 , N2=1 , N1teacher=8 , N1student=512 , and 4096 training examples. Training uses SGD with batch size 256 and η=0.06 for 2000 steps, followed by 104 steps with CDP stepsizes ( κ=20 ) and the same batch size. The validation loss decreases in both phases, whereas sharpness decreases only after switching to CDP.
Figure 7. Test loss (left) and top eigenvalue of the test-loss Hessian (right) for smooth tanh student-teacher networks, with varying CDP switching thresholds τ and damping parameters κ . Earlier switching with weaker damping slows loss decreases, but accelerates sharpness decrease.
Figure 8. Fine-tuning Qwen2.5-1.5B on WikiText-2 (training sequence length 512 , sliding-window test evaluation, 10 seeds). Left: test perplexity, with a zoom on the final 500 steps. Right: top test-loss Hessian eigenvalue λ1 , estimated by Lanczos. Adam( η=10−5 ) is compared with 500 CDP steps ( κ∈{4,4.5,5} ) followed by 2500 Adam steps. The CDP phase lowers λ1 substantially and the gap persists throughout the Adam phase, at the cost of ≈1% higher final test perplexity.
optimizer
λ1 ( k=50 )
λ1 ( k=400 )
Lvalidation
AdamW( η=5×10−5 )
1302
486
3.18
NGD( η=10−2 )
1819
1977
3.46
CDP( κ=1 , ηmax=0.1 )
732
27
3.28
CDP( κ=0.5 , ηmax=0.3 )
570
110
3.57
Table 1. Top Hessian eigenvalue λ1 and validation loss when fine-tuning GPT-2 on WikiText-2 for 400 steps at sequence length 256 , reporting mean over 3 seeds. At initialization, λ1=1475 and Lvalidation=3.73 . λ1 is reported after partial fine-tuning ( k=50 ) and completion ( k=400 ). The step cap ηmax bounds the per-step parameter movement under CDP.
Figure 9. Schematic CDP dynamics near M . Left: θk=pk+nk oscillates across the manifold, with decreasing normal distance and tangential drift toward lower sharpness. Right: the initial alignment condition selects cones about ±v1(p0) .
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 10. Proof structure of Appendix A . In addition, Lemma A.5 transfers estimates between damping rules.
Figure 11. CDP dynamics for L(p,n)=21(1+p4)n2 over 106 steps, starting from (0.5,0.1) with κ=1 . Left, loss. Right, sharpness gap λ1(pk)−λ1(p⋆)=pk4 . The constant c is chosen to match the final sharpness gap. The loss decays as k−1 , while the sharpness gap decays only as (logk)−2 .
Figure 12. Sharpness dynamics over 1000 CDP steps with κ=0 starting from (p0,n1,0,n2,0)=(−0.12,0,0.03) , without noise (left) and with independent centered Gaussian noise of standard deviation 10−3 in n1 and n2 (right). After the eigenvalue crossing, the noiseless trajectory remains on the same branch and sharpness increases, whereas noise allows switching and keeps sharpness near its minimum.
Figure 13. Trajectories of the tangential and normal coordinates pk and nk . CDP with κ=0 reaches the flat region quickly but keeps a visible period- 2 oscillation in nk , while a mild damping κ=0.12 contracts the oscillation and retains the same tangential drift. By contrast, GD with η=0.08 reaches interpolation with much less tangential motion and therefore remains near a sharper point.
Figure 14. Trajectories of the curvature λ1(pk) together with the quadratic Morse-Bott surface and the interpolation manifold M={L=0} . The CDP trajectories first approach the manifold and then drift along it toward flatter interpolating points, with κ=0 showing the expected period- 2 normal oscillations and κ=0.12 smoothing it out.
Figure 15. Analog of Fig. 6 for a residual ReLU student-teacher network with 4 hidden layers, Nℓteacher=32 and Nℓstudent=128 for ℓ=1,…,4 , and residual branches scaled by 0.3 . The SGD learning rate is η=0.012 , and CDP stepsizes use κ=30 . As in the fully connected architecture, validation loss decreases in both phases, whereas sharpness decreases only after switching to CDP.
Figure 16. Optimizer comparison for the ReLU models in Figs. 6 and 15 . Top, fully connected. Bottom, residual. Curves show mean test loss (left) and sharpness (right). CDP followed by Adam is competitive with state-of-the-art sharpness-aware methods, reducing test loss and sharpness in both models.
Figure 17. Test loss and test sharpness for the batch-size experiment. After a GD warmup, the CDP phase decreases λ1test(θk) while keeping the test loss small, with similar behavior for batch sizes 256 , 512 , and 1024 .
Figure 18. Analogous to Fig. 8 , with training sequence length 128 and test evaluation without a sliding window ( 10 seeds). The optimizer settings and the 500 -step CDP phase followed by 2500 Adam steps are unchanged. Left: test perplexity, with a zoom on the final 500 steps. Right: the top Hessian eigenvalue. The lower sharpness persists after the switch to Adam.
Figure 19. Qwen2.5-0.5B fine-tuned on WikiText-2 . Left: test perplexity. Right: mean of the top Hessian eigenvalues on 16 fixed test sequences, each estimated with 20 Lanczos iterations in fp32 . CDP followed by Adam reaches nearly the same final perplexity as Adam alone, with about 7 times smaller final sharpness.
optimizer
ppltest
λ1test
Adam( η=10−5 )
12.159
15819.432
NGD( η=0.03 )
12.323
1693.407
SAM( η=1.5×10−5 , ρ=0.01 )
12.172
3237.732
CDAT( σ=1 , β=0 )
12.474
1717.565
CDP( κ=1.5 ) + Adam( η=10−5 )
12.165
2137.903
Appendix
Table 2. Final test perplexity and sharpness with the same initialization, data, precision, and 2610 -update budget (SAM is implemented using Adam as the base optimizer). Sharpness averages the top Hessian eigenvalues on 16 fixed test sequences of length 1024 , each estimated with 20 Lanczos iterations over all parameters in fp32 .
quantization
/
RTN
GPTQ
AWQ
NF4
SINQ
A-SINQ
group_size
/
64
128
64
128
64
128
/
64
64
Adam( η=10−5 )
12.159
16.222
18.535
13.837
14.340
13.980
14.858
14.172
14.416
14.360
NGD( η=0.03 )
12.323
15.199
16.479
13.651
14.094
13.561
14.141
13.769
13.734
13.762
SAM( η=1.5×10−5 , ρ=0.01 )
12.172
15.111
17.154
13.614
14.080
13.458
14.020
13.636
13.691
13.718
CDAT( σ=1 , β=0 )
12.474
16.254
17.912
13.823
14.241
13.761
14.358
14.150
14.032
14.242
CDP( κ=1.5 ) + Adam( η=10−5 )
12.165
15.181
16.567
13.518
13.971
13.473
14.108
13.603
13.705
13.699
Appendix
Table 3. Test perplexity before and after 4 -bit quantization of the final checkpoints compared in Tab. 2 , lower is better (values within 0.02 of the minimum in each column are highlighted). GPTQ and AWQ average two calibration draws.
The training of neural networks often entails objective functions that are not globally L-smooth. For these functions, it is both theoretically and practically difficult to reply to the question: what is the largest possible step size that ensures the convergence of gradient descent (GD)? We address this longstanding open question in deep learning by providing a unifying definition of "large" step sizes that requires only local Lipschitz (or even Hölder) continuity of the gradient. We design first-order adaptive methods that provably yield large step sizes and show that they operate at the edge of stability (EoS) right from the start of the training. In particular, the loss decreases nonmonotonically and the product between the step size and sharpness, i.e., the largest eigenvalue of the Hessian, stays above the EoS threshold of 2 throughout training. Using our method, we are also able to minimize the sharpness all the way down to its global minimum. Contrary to expectation, we find that encountering globally-flat regions too early in the training may both slow down convergence and jeopardize the generalization ability of the network. Exploiting a self-stabilization argument, we allow GD to enter slightly sharper valleys and turn unsuccessful training runs into very successful ones.
The sharpness-aware minimization (SAM) algorithm and its variants, including gap guided SAM (GSAM), have been successful at improving the generalization capability of deep neural network models by finding flat local minima of the empirical loss in training. Meanwhile, it has been shown theoretically and practically that increasing the batch size or decaying the learning rate avoids sharp local minima of the empirical loss. In this paper, we consider the GSAM algorithm with increasing batch sizes or decaying learning rates, such as cosine annealing or linear learning rate, and theoretically show its convergence. Moreover, we numerically compare SAM (GSAM) with and without an increasing batch size and conclude that using an increasing batch size { achieves a lower worst-case ℓ∞ adaptive sharpness} than compared with using a constant batch size and learning rate.
An important quantity in the theory of gradient descent (GD) is the sharpness, defined as the largest eigenvalue of the objective Hessian. Classical analyses typically require the step size to be uniformly smaller than twice the reciprocal of the sharpness, but this condition is frequently violated in the training of deep neural networks. Recent work bridges this gap in the setting of overparametrised least-squares with a single scalar output, providing a normal form for large-step GD in a neighbourhood of an isolated flat minimum and establishing three corresponding convergence results. In this paper, we extend this theory in two directions: (1) to overparametrised least-squares with vector-valued outputs (including regression with arbitrarily many observations), and (2) to a neighbourhood of a manifold of flat minima (which we show is essential for applications such as matrix factorisation). We generalise both the normal form and all three convergence theorems of \cite{macdonaldeos} to this broader setting, overcoming several technical challenges, including the solution of a singular partial differential equation via a novel method that may be of independent interest. We further show that our framework applies to deep matrix factorisation under mild assumptions, yielding several new structural results. In particular, we prove that the set of flat minima forms a fibre bundle over a product of spheres, and that the sharpness is Morse-Bott along this manifold.
Lachlan Ewen MacDonald, René Vidal
Innovation in Data Engineering and Science (IDEAS) · University of Pennsylvania Pennsylvania, PA 19104