Papers
Topics
Authors
Recent
Search
2000 character limit reached

CWGD-Cosine: Curvature-Aware Cosine Annealing

Updated 5 July 2026
  • CWGD-Cosine is a curvature-aware learning rate schedule that combines cosine annealing with gradient diversity weighted by Hessian curvature.
  • It modulates the cosine envelope by scaling the learning rate based on a noise measure that penalizes directions with high curvature, ensuring effective noise control.
  • Empirical results on strongly-convex quadratics show about a 20% improvement in final suboptimality, with theoretical guarantees on a reduced asymptotic noise floor.

CWGD-Cosine is a global learning-rate schedule that augments standard cosine annealing with an online scalar noise signal, Curvature-Weighted Gradient Diversity (CWGD). Introduced in "Curvature-Weighted Gradient Diversity: A Noise Measure for Geometry-Adaptive SGD Schedules" (Hamza et al., 29 Jun 2026), it is designed to measure mini-batch gradient variability after whitening by curvature, so that directions with large Hessian eigenvalues contribute less to the noise signal because stochastic gradient descent is already constrained to take small steps there. Within the paper’s supported regime—synthetic strongly-convex quadratics with diagonal or near-diagonal curvature—the method is presented as a geometry-aware alternative to scalar variance heuristics for modulating the amplitude of a cosine learning-rate envelope.

1. Conceptual basis and optimization motivation

The starting point is a criticism of the standard convergence analysis of mini-batch SGD. In that analysis, gradient noise is summarized by a single variance term that treats all parameter directions equally. The paper argues that this is too crude because it ignores the interaction between stochasticity and curvature: in a high-curvature direction with eigenvalue λk\lambda_k, stability already forces η1/L\eta \lesssim 1/L, so stochastic displacement there is naturally suppressed (Hamza et al., 29 Jun 2026).

This motivates a curvature-weighted notion of effective noise. Rather than measuring raw gradient variability, CWGD rescales per-sample gradient differences by the inverse square root of the Hessian. The consequence is directional asymmetry: a perturbation along eigen-direction kk is weighted by 1/λk1/\sqrt{\lambda_k}, and hence contributes 1/λk1/\lambda_k in squared norm. In this formulation, directions with low curvature dominate the noise proxy because they are the directions in which a fixed global learning rate is least constrained.

The paper further introduces an aspirational curvature-adaptive improvement ratio,

ρ(κ)  =  dμtr(H1),\rho(\kappa) \;=\; \frac{d}{\mu\,\operatorname{tr}(H^{-1})},

and states that for log-spaced spectra in [μ,L][\mu,L], ρ(κ)\rho(\kappa) scales like κ/logκ\kappa/\log\kappa. The reported values are ρ(κ)=2.0,2.5,3.1,3.9\rho(\kappa)=2.0,2.5,3.1,3.9 for η1/L\eta \lesssim 1/L0. The paper is explicit that this is not its theorem, but an aspirational target showing why Hessian weighting is desirable.

2. Formal definition of CWGD

Let η1/L\eta \lesssim 1/L1 be twice differentiable, let η1/L\eta \lesssim 1/L2 be positive-definite, let the mini-batch be η1/L\eta \lesssim 1/L3, and let per-sample gradients be η1/L\eta \lesssim 1/L4. Definition 1 / Eq. η1/L\eta \lesssim 1/L5 defines

η1/L\eta \lesssim 1/L6

The η1/L\eta \lesssim 1/L7 factor is the central construction. It makes CWGD a geometry-aware diversity measure rather than a raw dispersion statistic. In the diagonal case η1/L\eta \lesssim 1/L8, the paper gives the exact simplification

η1/L\eta \lesssim 1/L9

CWGD is therefore literally a curvature-weighted sum of per-coordinate sample variances.

Under isotropic additive gradient noise,

kk0

Proposition 1 states

kk1

This makes explicit that the expected signal depends on the inverse curvature spectrum rather than on a direction-agnostic variance scalar.

The contrast with the usual scalar variance floor is one of the paper’s main interpretive claims. The classic bound

kk2

depends on the worst curvature kk3 and ignores how noise is distributed across eigendirections. CWGD is introduced precisely to replace that isotropic view with a curvature-aware proxy for the optimization noise actually felt by a global-step SGD iterate.

3. CWGD-Cosine schedule and estimation machinery

Algorithm 1 combines CWGD with standard cosine annealing through the per-step rule

kk4

CWGD therefore does not change the cosine phase, period, or floor directly. It multiplicatively modulates the amplitude, or instantaneous scale, of the cosine envelope. When current diversity kk5 is high relative to the initial reference kk6, the step size shrinks; when diversity is low, the schedule follows the cosine baseline more closely. The hyperparameter kk7 controls modulation strength, and kk8 recovers plain cosine annealing exactly (Hamza et al., 29 Jun 2026).

The algorithmic workflow is stated explicitly. First, estimate kk9. Second, compute 1/λk1/\sqrt{\lambda_k}0 on the first mini-batch. Third, at each step 1/λk1/\sqrt{\lambda_k}1, compute per-sample gradients 1/λk1/\sqrt{\lambda_k}2, compute 1/λk1/\sqrt{\lambda_k}3, set 1/λk1/\sqrt{\lambda_k}4, and update with the mini-batch mean gradient.

Because the schedule requires curvature weights, the paper uses the estimator

1/λk1/\sqrt{\lambda_k}5

with stabilizer 1/λk1/\sqrt{\lambda_k}6. The diagonal Hessian entries are estimated by a Hutchinson-style construction with 1/λk1/\sqrt{\lambda_k}7 Rademacher probes 1/λk1/\sqrt{\lambda_k}8: 1/λk1/\sqrt{\lambda_k}9 where 1/λk1/\lambda_k0 is approximated by the finite difference

1/λk1/\lambda_k1

For quadratic objectives with diagonal 1/λk1/\lambda_k2, this estimator is exact for any 1/λk1/\lambda_k3 and any 1/λk1/\lambda_k4, because 1/λk1/\lambda_k5. For near-diagonal 1/λk1/\lambda_k6, the paper gives

1/λk1/\lambda_k7

The paper also identifies and corrects a degenerate curvature estimator from an earlier draft: 1/λk1/\lambda_k8 Because this collapses to a constant, it contains no curvature or noise information. The corrected construction separates curvature estimation from mini-batch diversity estimation and combines them only in Eq. (9).

One point remains unresolved in the paper’s presentation. The Algorithm / computational-cost discussion says Hutchinson may be refreshed periodically, quoting 1/λk1/\lambda_k9 and refresh interval ρ(κ)  =  dμtr(H1),\rho(\kappa) \;=\; \frac{d}{\mu\,\operatorname{tr}(H^{-1})},0 epochs for roughly 40% overhead, whereas the compute-normalized appendix states that in the quadratic setting the Hessian is constant, so the ρ(κ)  =  dμtr(H1),\rho(\kappa) \;=\; \frac{d}{\mu\,\operatorname{tr}(H^{-1})},1 probes are computed once at initialization, giving only ρ(κ)  =  dμtr(H1),\rho(\kappa) \;=\; \frac{d}{\mu\,\operatorname{tr}(H^{-1})},2 extra compute. For the main quadratic experiments, the latter appears to be the relevant setup.

4. Theoretical guarantees on strongly-convex quadratics

The theoretical analysis is explicitly restricted to a strongly-convex quadratic with diagonal Hessian,

ρ(κ)  =  dμtr(H1),\rho(\kappa) \;=\; \frac{d}{\mu\,\operatorname{tr}(H^{-1})},3

with stochastic gradients

ρ(κ)  =  dμtr(H1),\rho(\kappa) \;=\; \frac{d}{\mu\,\operatorname{tr}(H^{-1})},4

and batch size ρ(κ)  =  dμtr(H1),\rho(\kappa) \;=\; \frac{d}{\mu\,\operatorname{tr}(H^{-1})},5. In the theorem section, the schedule is analyzed in the simplified form

ρ(κ)  =  dμtr(H1),\rho(\kappa) \;=\; \frac{d}{\mu\,\operatorname{tr}(H^{-1})},6

The main theorem states

ρ(κ)  =  dμtr(H1),\rho(\kappa) \;=\; \frac{d}{\mu\,\operatorname{tr}(H^{-1})},7

Hence the asymptotic floor is reduced relative to the unmodulated case ρ(κ)  =  dμtr(H1),\rho(\kappa) \;=\; \frac{d}{\mu\,\operatorname{tr}(H^{-1})},8 by the exact factor

ρ(κ)  =  dμtr(H1),\rho(\kappa) \;=\; \frac{d}{\mu\,\operatorname{tr}(H^{-1})},9

At the recommended [μ,L][\mu,L]0, this yields the claimed factor-of-two improvement in the asymptotic error floor (Hamza et al., 29 Jun 2026).

The proof tracks the Lyapunov quantity

[μ,L][\mu,L]1

With mini-batch averaged noise [μ,L][\mu,L]2, the recursion becomes

[μ,L][\mu,L]3

Near the optimum, Proposition 1 implies [μ,L][\mu,L]4, so [μ,L][\mu,L]5 and therefore

[μ,L][\mu,L]6

Balancing contraction and injected noise at steady state yields

[μ,L][\mu,L]7

The paper stresses two interpretive points. First, this theorem is weaker than the earlier aspirational curvature-adaptive factor [μ,L][\mu,L]8. Second, it is stronger than what is observed at finite [μ,L][\mu,L]9: the theorem gives ρ(κ)\rho(\kappa)0 at ρ(κ)\rho(\kappa)1, whereas experiments show about ρ(κ)\rho(\kappa)2 (ρ(κ)\rho(\kappa)3) in finite-horizon loss. The authors attribute the gap to finite-horizon effects and slower transient progress. They also state monotonicity in ρ(κ)\rho(\kappa)4: the residual floor decreases strictly with ρ(κ)\rho(\kappa)5, though in practice they recommend ρ(κ)\rho(\kappa)6, with ρ(κ)\rho(\kappa)7 best among tested values.

5. Empirical results on synthetic quadratics

All reported experiments are on synthetic strongly-convex quadratics of the form

ρ(κ)\rho(\kappa)8

with ρ(κ)\rho(\kappa)9, log-spaced eigenvalues in κ/logκ\kappa/\log\kappa0, κ/logκ\kappa/\log\kappa1, κ/logκ\kappa/\log\kappa2, and per-sample stochastic gradient κ/logκ\kappa/\log\kappa3. The default noise model is κ/logκ\kappa/\log\kappa4 with κ/logκ\kappa/\log\kappa5; the default optimization settings are κ/logκ\kappa/\log\kappa6, κ/logκ\kappa/\log\kappa7, κ/logκ\kappa/\log\kappa8, and κ/logκ\kappa/\log\kappa9 (Hamza et al., 29 Jun 2026).

Across ρ(κ)=2.0,2.5,3.1,3.9\rho(\kappa)=2.0,2.5,3.1,3.90, using 20 runs per setting, CWGD-Cosine consistently outperforms plain cosine annealing by about ρ(κ)=2.0,2.5,3.1,3.9\rho(\kappa)=2.0,2.5,3.1,3.91 in final suboptimality, with all paired ρ(κ)=2.0,2.5,3.1,3.9\rho(\kappa)=2.0,2.5,3.1,3.92-tests satisfying ρ(κ)=2.0,2.5,3.1,3.9\rho(\kappa)=2.0,2.5,3.1,3.93.

ρ(κ)=2.0,2.5,3.1,3.9\rho(\kappa)=2.0,2.5,3.1,3.94 CWGD-Cosine vs cosine annealing Reported factor
ρ(κ)=2.0,2.5,3.1,3.9\rho(\kappa)=2.0,2.5,3.1,3.95 ρ(κ)=2.0,2.5,3.1,3.9\rho(\kappa)=2.0,2.5,3.1,3.96 vs ρ(κ)=2.0,2.5,3.1,3.9\rho(\kappa)=2.0,2.5,3.1,3.97 ρ(κ)=2.0,2.5,3.1,3.9\rho(\kappa)=2.0,2.5,3.1,3.98
ρ(κ)=2.0,2.5,3.1,3.9\rho(\kappa)=2.0,2.5,3.1,3.99 η1/L\eta \lesssim 1/L00 vs η1/L\eta \lesssim 1/L01 η1/L\eta \lesssim 1/L02
η1/L\eta \lesssim 1/L03 η1/L\eta \lesssim 1/L04 vs η1/L\eta \lesssim 1/L05 η1/L\eta \lesssim 1/L06
η1/L\eta \lesssim 1/L07 η1/L\eta \lesssim 1/L08 vs η1/L\eta \lesssim 1/L09 η1/L\eta \lesssim 1/L10

The gain is therefore stable at roughly η1/L\eta \lesssim 1/L11, substantially smaller than the theorem’s asymptotic factor-of-two floor reduction. The paper interprets this difference as a finite-horizon phenomenon rather than a contradiction of the asymptotic analysis.

The ablation results reinforce the same pattern. In the η1/L\eta \lesssim 1/L12 sweep at η1/L\eta \lesssim 1/L13, performance improves monotonically from η1/L\eta \lesssim 1/L14 at η1/L\eta \lesssim 1/L15 to η1/L\eta \lesssim 1/L16 at η1/L\eta \lesssim 1/L17. Across batch sizes η1/L\eta \lesssim 1/L18, the improvement remains stable at η1/L\eta \lesssim 1/L19 to η1/L\eta \lesssim 1/L20, with all η1/L\eta \lesssim 1/L21. Under aligned noise η1/L\eta \lesssim 1/L22 with η1/L\eta \lesssim 1/L23, gains are slightly larger, η1/L\eta \lesssim 1/L24 in both reported cases, than under isotropic noise, η1/L\eta \lesssim 1/L25.

Estimator robustness is reported as very strong in the supported setting. On diagonal quadratics, relative error is η1/L\eta \lesssim 1/L26. Under a η1/L\eta \lesssim 1/L27 rotated Hessian at η1/L\eta \lesssim 1/L28, the relative error in the resulting CWGD is reported as η1/L\eta \lesssim 1/L29 in Table 4, while the text also mentions η1/L\eta \lesssim 1/L30. The paper therefore contains a small inconsistency in the reported worst-case value.

The compute-normalized comparison uses a one-time η1/L\eta \lesssim 1/L31 initialization cost. Under that accounting, CWGD-Cosine at 4000 steps is compared against plain cosine at 4020 steps, and the result remains η1/L\eta \lesssim 1/L32 vs η1/L\eta \lesssim 1/L33, a η1/L\eta \lesssim 1/L34 improvement with η1/L\eta \lesssim 1/L35.

6. Scope, failure modes, and relation to other adaptive methods

The paper is unusually explicit about scope. Its theory applies only to strongly-convex quadratics, diagonal Hessians, and isotropic noise. It does not claim a general nonconvex result (Hamza et al., 29 Jun 2026). The principal practical concern is Hessian staleness: in nonconvex training, a curvature estimate η1/L\eta \lesssim 1/L36 computed at time η1/L\eta \lesssim 1/L37 can rapidly become uncorrelated with the true Hessian later, so the weighting in CWGD is wrong. The authors report that on nonconvex classification models this caused CWGD-Cosine to underperform plain cosine by η1/L\eta \lesssim 1/L38 to η1/L\eta \lesssim 1/L39, though no full tables are given. On Rosenbrock, CWGD-Cosine also fails because a static diagonal proxy cannot capture rapidly changing off-diagonal curvature.

Even within quadratics, the method is not presented as a universal accelerator. At extreme ill-conditioning η1/L\eta \lesssim 1/L40, standard cosine performs better at η1/L\eta \lesssim 1/L41 because optimization is still in the transient phase and CWGD’s conservative modulation slows descent before the asymptotic noise floor matters. The method is therefore framed as an asymptotic variance-reduction schedule, not a guaranteed accelerator of early training.

Its relation to alternatives is correspondingly narrow and specific. Compared to Adam, AdaGrad, and AdaHessian, CWGD-Cosine does not precondition parameters or maintain per-parameter adaptive steps; it remains a single scalar global learning-rate modulator on top of cosine annealing. Compared to gradient diversity measures such as η1/L\eta \lesssim 1/L42, its novelty is the curvature weighting via η1/L\eta \lesssim 1/L43. Compared to EigenCurve or LANTON, it uses curvature as an online noise signal, not just schedule design metadata. The paper also clearly prefers the Hutchinson-based construction over the abandoned naive estimator because the latter provably degenerates to a constant and carries no useful signal.

Within the supported regime, the practical takeaway is correspondingly restricted. CWGD-Cosine is a cosine annealing schedule multiplied by η1/L\eta \lesssim 1/L44, where η1/L\eta \lesssim 1/L45 is mini-batch gradient diversity measured after inverse-square-root Hessian whitening. In strongly-convex quadratics with diagonal or near-diagonal curvature, it is simple to implement, essentially exact with Hutchinson diagonal estimation, and reduces final loss by about η1/L\eta \lesssim 1/L46 empirically while enjoying a proven η1/L\eta \lesssim 1/L47 reduction in the asymptotic noise floor. The main caveats are finite-horizon slowdown, sensitivity to stale curvature estimates in nonconvex problems, and lack of theory beyond the quadratic setting.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to CWGD-Cosine.