---
title: 'OSGM-Best: Adaptive Heavy-Ball Optimizer'
url: https://www.emergentmind.com/topics/osgm-best
type: topic
---

# OSGM-Best: Adaptive Heavy-Ball Optimizer

OSGM-Best is a practical instantiation of the Online Scaled Gradient Methods (OSGM) framework in which step-size selection is treated as an online convex optimization problem in preconditioner space rather than as a fixed hyperparameter choice. Within this framework, OSGM-Best is the momentum-enhanced variant introduced in Part II of the OSGM project. It combines hypergradient-type feedback, heavy-ball momentum, a lookahead landscape action, and online adaptation of both a matrix step-size \(P_k\) and a scalar momentum coefficient \(\beta_k\). Its role is to translate the theoretical guarantees developed for OSGM in smooth convex and strongly convex settings into a robust first-order method whose empirical behavior matches quasi-Newton variants while using less memory and cheaper iterations [2509.11007][2505.23081].

## 1. Position within the OSGM framework

OSGM is a family of first-order methods in which the step-size, or more generally the preconditioner, is itself learned online. The foundational construction couples an optimization process on \(x\) with an online learner acting in the space of candidate step-size matrices \(P_k\). The key perspective is that step-size selection is treated as an online learning problem in the step-size space, and regret guarantees are then converted into convergence guarantees for the primal iterates [2505.23081].

In Part I, two central feedback families are developed. The ratio feedback
\[
r_x(P) := \frac{f(x - P \nabla f(x)) - f(x^*)}{f(x) - f(x^*)}
\]
measures contraction in suboptimality, while the hypergradient feedback
\[
h_x(P) := \frac{f(x - P \nabla f(x)) - f(x)}{\|\nabla f(x)\|^2}
\]
measures normalized decrease in objective value. OSGM-Best is built on the hypergradient branch, specifically on the analysis of OSGM-H, but modifies that branch to address practical deficiencies identified in Part II: OSGM-H is theoretically sound yet exhibits spiky behavior and limited practical speed [2509.11007].

Part II therefore introduces OSGM-Best as the practical “best” variant of the framework. It couples OSGM with heavy-ball momentum, uses a potential rather than bare function decrease as the monitored quantity, employs a lookahead correction, and updates both \(P_k\) and \(\beta_k\) online. This suggests that OSGM-Best is best understood not as an isolated optimizer but as a specific operationalization of the more general OSGM principle.

## 2. Algorithmic construction

The base iteration of OSGM-Best is a heavy-ball update,
\[
x_{k+1} = x_k - P_k \nabla f(x_k) + \beta_k (x_k - x_{k-1}),
\]
where \(P_k \in \mathbb{R}^{n\times n}\) is a matrix step-size and \(\beta_k \in \mathbb{R}\) is a momentum coefficient. In contrast to plain heavy-ball, both quantities are adapted online by the scheduler [2509.11007].

Because plain heavy-ball does not ensure monotonic decrease of \(f(x_k)\), OSGM-Best uses the Lyapunov potential
\[
\Phi_w(x,x^{-}) = f(x) - f^* + w\|x-x^{-}\|^2,
\]
with \(w>0\) chosen appropriately. The state is written as \(z=(z_1,z_2)=(x,x^{-})\), and the heavy-ball proposal is
\[
z^{+}(P,\beta) := (x^{+}(P,\beta),x), \qquad x^{+}(P,\beta)=x-P\nabla f(x)+\beta(x-x^{-}).
\]

The landscape then applies a lookahead correction on the potential. After the scheduler proposes \(z_{k+1/2}\), the lookahead action is
\[
z_{\mathrm{look}} := \Bigl(z_{1,k+1/2}-\frac{1}{L+w}\nabla_{z_1}\Phi_w(z_{k+1/2}),\, z_{2,k+1/2}\Bigr).
\]
A monotone landscape action follows:
\[
z_{k+1}=\arg\min\{\Phi_w(z_{\mathrm{look}}),\Phi_w(z_k)\}.
\]
This null-step mechanism ensures that \(\Phi_w\) is monotone nonincreasing [2509.11007].

The online feedback used by the scheduler is the heavy-ball potential-based quantity
\[
h_z(P,\beta)
:=
\frac{\Phi_w(z^{+}(P,\beta))-\Phi_w(z)}
{\|\nabla f(x)\|^2+\|x-x^{-}\|^2}.
\]
Negative values correspond to stronger normalized decrease. The scheduler then performs online gradient updates,
\[
P_{k+1}=P_k-\eta_P\nabla_P h_{z_k}(P_k,\beta_k), \qquad
\beta_{k+1}=\beta_k-\eta_\beta\nabla_\beta h_{z_k}(P_k,\beta_k).
\]

In the theory, the parameter choices are
\[
w=3L,\qquad T=16L^2,\qquad \eta_P=\eta_\beta=\frac{1}{2(L+w)},
\]
and the standard initialization is
\[
P_1=\frac{1}{L}I,\qquad \beta_1=\frac{1}{2}.
\]
Part II brands this heavy-ball OSGM variant with lookahead and monotone potential as **OSGM-Best** [2509.11007].

## 3. Feedback geometry and online adaptation

The central technical reason OSGM-Best is analyzable is that its feedback is constructed to be compatible with online convex optimization. For convex \(f\) and suitably large \(T\), the heavy-ball feedback \(h_z(P,\beta)\) is jointly convex in \((P,\beta)\) and \((L+w)\)-smooth with respect to the joint norm
\[
\|(P,\beta)\| := \sqrt{\|P\|_F^2 + T\beta^2},
\]
with dual norm
\[
\|(P,\beta)\|^* := \sqrt{\|P\|_F^2 + \frac{1}{T}\beta^2}.
\]
This extends the Part I principle—online learning in step-size space—to a joint matrix-and-momentum space [2509.11007][2505.23081].

The explicit gradient is given by
\[
\nabla h_z(P,\beta)=
\left(
\begin{array}{l}
-\dfrac{[\nabla f(z^{+}) + w(-P\nabla f(z_1) + \beta(z_1-z_2))]\nabla f(z_1)^\top}{\|\nabla f(z_1)\|^2+\|z_1-z_2\|^2} \\[1.0em]
\dfrac{\bigl(\nabla f(z^{+}) + w(-P\nabla f(z_1)+\beta(z_1-z_2)),\, z_1-z_2\bigr)}{\|\nabla f(z_1)\|^2+\|z_1-z_2\|^2}
\end{array}
\right).
\]
As in Part I, the scheduler’s update is an online gradient descent step driven by a feedback function explicitly tied to progress rather than by gradient-magnitude statistics alone.

This distinguishes OSGM-Best from AdaGrad, Adam, and RMSProp. Those methods adapt learning rates from accumulated gradient information, whereas OSGM-Best adapts \((P_k,\beta_k)\) by minimizing a convex surrogate of potential decrease. It also distinguishes OSGM-Best from classic hypergradient descent. Part II states that the classic hypergradient ordering updates the step-size and then uses it immediately in the current primal step; on quadratics this can stabilize the method on a poor spectral orbit where the step-size is “optimal” but convergence remains slow in direction. OSGM-Best instead uses the OSGM ordering—update \(x_k\) using \(P_k\), then update \(P_k\) using feedback—and combines that with potential monotonicity so that bad orbits are unstable rather than attractors [2509.11007].

## 4. Convergence guarantees

The convergence analysis of OSGM-Best proceeds through a potential-reduction quantity
\[
b_k :=
\frac{\Phi_w(z_k)-\Phi_w(z_{k+1})}
{\|\nabla f(z_{1,k})\|^2+\|z_{1,k}-z_{2,k}\|^2}.
\]
For any monotone sequence \(\{\Phi_w(z_k)\}\), the heavy-ball reduction theorem converts aggregate progress in \(\{b_k\}\) into primal convergence [2509.11007].

In the convex case, Theorem 2.3 gives a simplified rate
\[
f(x_{K+1})-f^* \le \frac{8L[f(x_1)-f^*]}{K},
\]
which is an \(O(1/K)\) bound. In the strongly convex case, for suitable benchmark and initialization \((P_1,B_1)=((1/L)I,1/2)\), the paper simplifies the bound to
\[
f(x_{K+1})-f^*
\le
[f(x_1)-f^*](1-1/\kappa)^K,
\]
with \(\kappa=L/\mu\). Part II describes this as linear convergence at the optimal gradient-descent rate for smooth strongly convex problems [2509.11007].

The mechanism behind these guarantees follows the OSGM logic from Part I. There, no-regret control of feedback implies that the learned step-size sequence is asymptotically no worse than the best static preconditioner in hindsight, and trajectory-dependent bounds compare against slowly varying benchmark sequences through dynamic regret [2505.23081]. OSGM-Best inherits this architecture, but replaces the single-parameter step-size view with joint online learning of a matrix preconditioner and a momentum scalar under a heavy-ball Lyapunov potential. A plausible implication is that OSGM-Best serves as the practically stabilized counterpart of the more abstract OSGM-H theory.

Part II also emphasizes robustness. The monotone potential action allows nonmonotone objective values while preserving monotone Lyapunov decrease, which is precisely the setting in which momentum methods are usually difficult to control analytically.

## 5. Empirical behavior and comparison with related methods

The empirical study in Part II evaluates OSGM-Best on 38 LIBSVM datasets for SVM classification objectives and logistic regression, and on 47 unconstrained problems from CUTEst. Each algorithm is run with maximum 1000 gradient calls in the convex setting or 2000 in the nonconvex setting, the same starting point, and stopping criterion \(\|\nabla f(x)\|\le 10^{-3}\) [2509.11007].

On convex SVM and logistic regression tasks, OSGM-Best’s number of solved problems is described as comparable to L-BFGS-M10. In the reported plots, its function value gap and gradient norm decay are significantly faster than GD, GD-HB, and AGD variants, much better than AdaGrad and often Adam, and often overlap with or lie slightly below L-BFGS-M5 and L-BFGS-M10 curves. On nonconvex CUTEst problems, it significantly outperforms Adam and AdaGrad and is comparable to L-BFGS with larger memory in both function-value and gradient-norm reduction [2509.11007].

Memory and per-iteration cost are central to the method’s positioning. Practical OSGM-Best uses about 7 vectors of length \(n\), similar to L-BFGS with memory 1 and much less than L-BFGS-M10. Its numerical cost is dominated by gradient computation, and updates of \(P_k\) and \(\beta_k\) are cheap scalar or vector operations without matrix factorizations or line searches. The paper therefore characterizes the method as matching quasi-Newton variants while requiring less memory and cheaper iterations [2509.11007].

A common misconception is to regard OSGM-Best as a quasi-Newton method in disguise. Part II does not support that characterization. OSGM-Best does not build secant-based curvature approximations and does not form Hessians or quasi-Newton matrices. Its preconditioning is produced by online gradient steps on a scalar-valued convex feedback function. Another misconception is that it is merely heavy-ball with an adaptive learning rate. The defining feature is instead the joint use of online convex optimization, a Lyapunov potential, a lookahead correction, and a monotone landscape action.

## 6. Scope, extensions, and open problems

Part II extends OSGM to smooth nonconvex optimization by regularizing the hypergradient feedback,
\[
h_x^\lambda(P) := h_x(P) + \frac{\lambda}{2}\left\|P-\frac{1}{L}I\right\|_F^2,
\]
so that it becomes convex in step-size space when \(\lambda\) dominates the local weak convexity induced by nonconvexity. Under this construction, OSGM-H with regularized feedback achieves the standard nonconvex stationarity bound
\[
\min_{1\le k\le K}\|\nabla f(x_k)\|^2
\le
\frac{2L[f(x_1)-f^*]}{K},
\]
and the PL-case linear bound
\[
f(x_{K+1})-f^*
\le
[f(x_1)-f^*](1-1/\kappa)^K
\]
relative to the baseline \(P=(1/L)I\) [2509.11007].

For OSGM-Best itself, the nonconvex heavy-ball extension is not fully re-analyzed. Part II explicitly states that the robust behavior observed in experiments suggests more is possible, but that a full heavy-ball nonconvex theory remains open. This delimits the scope of current guarantees: the main construction of OSGM-Best is in the convex setting, and the strongest formal guarantees are convex and strongly convex rather than fully general nonconvex ones.

The paper identifies several open directions. One is whether OSGM-R can achieve the same \(O(\kappa\log(1/\varepsilon))\) complexity without knowledge of \(f^*\). Another is whether computable potentials for accelerated methods such as AGD can be generated systematically and then incorporated into the OSGM design. Additional questions concern composite and nonsmooth optimization, the Barzilai–Borwein connection viewed through implicit online learning, and a complete nonconvex analysis for heavy-ball OSGM variants [2509.11007].

Within the OSGM program as a whole, OSGM-Best therefore occupies a specific position: it is the practical, heavy-ball, potential-based realization of online learned preconditioning, designed to preserve the framework’s regret-driven adaptivity while addressing the stability and performance requirements of large-scale deterministic optimization.

Source: https://www.emergentmind.com/topics/osgm-best