betaFeedback

WorksComputer Science

SoftServe: A Scalable Quasi-Newton Method for Deep Learning

Abstract

Quasi-Newton (QN) methods have long been among the most effective methods for large-scale unconstrained convex optimization. Two obstacles have limited their use in deep learning: non-convexity and enormous parameter sizes. We introduce SoftServe, a family of QN methods designed to overcome these obstacles without line searches or ad hoc curvature corrections. SoftServe derives positivedefinite curvature estimates from the variational objective of Berglund et al. (2025), even in the presence of negative curvature. We develop diagonal and Kroneckerfactored variants that preserve positive definiteness by construction and scale to massive neural networks. Finally, SoftServe relies on the stable coupled Newton-Schulz iteration for the required matrix operations, replacing costly matrix decompositions with GPU-friendly matrix multiplications. SoftServe excels on problems that are severely ill-conditioned, including tasks such as recurrent networks, deep autoencoders, physics-informed neural networks, and a 136M-parameter physics-informed diffusion model, often achieving lower losses than established baselines including Adam, Muon, and SOAP.

Introduction

Quasi-Newton methods, such as the celebrated BFGS method [6, 12, 14, 43], are among the most effective methods for large-scale, convex deterministic optimization. Deep learning has led to renewed interest in adapting these methods to train large networks [15, 40]. However, applying these methods to deep learning requires curvature estimates that can accommodate non-convex objectives and gradient noise while remaining computationally efficient.

To see how curvature enters the optimization update, consider a generic second-order method. For parameters x∈RDx \in\mathbb{R}^{D}, second-order methods typically take steps of the form

x+=x−γHg.x^{+} = x - \gamma H g.

Here x+x^{+} is the updated parameter vector, and γ>0\gamma> 0 is the step size. The vector g∈RDg \in\mathbb{R}^{D} is the (stochastic) gradient at xx, and the matrix H∈RD×DH \in\mathbb{R}^{D \times D} is an estimate of the inverse Hessian.

Non-convexity of the objective poses a fundamental challenge for second-order optimization methods because the true Hessian could have negative eigenvalues. If the estimate HH has a negative eigenvalue, then the update direction −Hg-H g could be an ascent direction, which would increase the loss function. This is one of the reasons why first-order methods are often preferred in deep learning: one can always guarantee descent (in expectation). For a second-order method to be applicable in deep learning, the estimate HH must always be positive definite, even in the presence of directions of negative curvature.

For quasi-Newton methods, such as BFGS, maintaining positive definiteness is at odds with the main tool used to measure curvature, namely the secant equation. In the presence of negative curvature, enforcing the secant equation can inadvertently force the Hessian estimate to become indefinite, as we will show in § 2. The standard remedy is to use sophisticated line search procedures to only move in directions of positive curvature [33, 49]. But these line searches require access to the full batch loss, which is too costly and not feasible in the stochastic setting of deep learning.

Beyond the challenges arising from non-convexity and stochastic objectives, the sheer scale of modern deep learning models makes storing and updating dense curvature estimates prohibitively expensive. A standard approach for reducing this cost is the limited memory approach of L-BFGS [28], which typically uses only 10 pairs of parameter and gradient differences to implicitly build the estimate HH. But storing 10 pairs of parameters and gradients would require storing 10 copies of our model and 10 copies of the gradient, increasing the memory storage by 20-fold. This is infeasible for all but small models.

To scale to modern deep learning, it is common to approximate the matrix HH by a diagonal matrix [11, 44, 24] or a Kronecker-structured matrix [31, 16]. For quasi-Newton optimization, while Kronecker-structured updates have been proposed for applying BFGS to deep learning [15, 40], this approach still needs to be applied with mechanisms for handling non-convexity and stochasticity, limiting its applicability.

A promising new direction is to reconsider how curvature enters the quasi-Newton update. Recently, Berglund et al. [4] show that by replacing the secant equation with a soft secant penalty we can ensure that our Hessian estimate is positive definite, even in the presence of negative curvature. But Berglund et al. [4] only consider dense estimates, making their approach infeasible for deep learning.

We introduce SOFTSERVE (Soft Secant Equation Regularized with Variational Entropy), a quasi-Newton framework that combines the flexibility of a soft secant constraint [27, 4] with the computational advantages of a structured matrix approximation of the inverse Hessian. Optimizing within diagonal and Kronecker-structured families yields novel updates that preserve positive definiteness, without full batch evaluations or line searches. We develop efficient algorithms for computing these updates using modern GPU-friendly numerical linear algebra methods, such as variants of Newton-Schulz [1, 19], allowing SOFTSERVE to scale to large neural networks.

We then demonstrate the utility of SOFTSERVE on several deep learning tasks where curvature information is fundamental—such as severely ill-conditioned tasks—including recurrent networks, autoencoders, and physics-informed models (such as a 136M-parameter diffusion model). On these tasks we find that SOFTSERVE often outperforms modern methods such as Adam, Muon, and SOAP. A Python implementation of SOFTSERVE is available at https://github.com/joohwanko/SoftServe.

Quasi-Newton Preliminaries

Here we introduce our notation and review important quasi-Newton (QN) ideas that are relevant to SOFTSERVE. For simplicity, in this section we represent all parameters as a flattened vector x∈RDx \in\mathbb{R}^{D}. We introduce the setting of deep learning in subsequent sections, where parameters can be matrices.

Notation. We write S++d\mathbb{S}_{++}^{d} and S+d\mathbb{S}_{+}^{d} for the symmetric positive definite and positive semidefinite d×dd \times d matrices, IdI_d for the identity, and we define ∥v∥M2:=vTMv\lVert v \rVert_{M}^{2} := v^{\mathsf{T}} M v for M∈S++dM \in\mathbb{S}_{++}^{d}.

The BFGS algorithm

Let ff be a continuous, twice differentiable function on RD\mathbb{R}^{D}. Given iterates xtx_t and gradient evaluations ∇f(xt)\nabla f(x_t), quasi-Newton methods use the following iterate and gradient differences

st:=xt+1−xt,yt:=∇f(xt+1)−∇f(xt),\begin{aligned} s_t &:= x_{t+1} - x_t, \\ y_t &:= \nabla f(x_{t+1}) - \nabla f(x_t), \end{aligned}

to estimate curvature. Indeed, using Taylor’s theorem we have that

yt=Btst,(1)y_t = B_t s_t, \tag*{(1)}

where Bt:=∫01∇2f(xt+τst) dτB_t := \int_0^1 \nabla^2 f(x_t + \tau s_t)\,\mathrm{d}\tau is the averaged Hessian. Quasi-Newton methods use Eq. (1) to find an estimate of the inverse Hessian HH by enforcing the secant equation

Hyt=st.(2)H y_t = s_t. \tag*{(2)}

However, the secant equation is underdetermined: HH has D2D^2 unknown entries, while Eq. (2) imposes only DD constraints. Thus, to obtain a unique update, one must impose an additional regularization criterion. Quasi-Newton methods resolve this by choosing HH that both satisfies the secant equation and is close to the previous estimate HtH_t in some sense.

For instance, the BFGS method chooses the matrix HH that satisfies the secant equation and is closest to HtH_t in a weighted Frobenius norm [33]; see Appendix § 9.§ 1. We adopt an equivalent characterization of the BFGS update due to Fletcher [13], where closeness is measured by the log-determinant divergence. This formulation will be the starting point for SOFTSERVE. For P,Q∈S++dP,Q \in\mathbb{S}_{++}^{d} the log-determinant divergence is defined as

D(P;Q):=tr⁡(PQ−1)−log⁡det⁡(PQ−1)−d.(3)\mathcal{D}(P;Q) := \operatorname{tr}(P Q^{-1}) - \log\det(P Q^{-1}) - d. \tag*{(3)}

This divergence is strictly convex in PP (given fixed QQ) and also is equivalent (up to a constant) to the relative entropy, or Kullback-Leibler divergence between two Gaussians with the same mean and covariances PP and QQ. Fletcher [13] showed that, when stTyt>0s_t^\mathsf{T} y_t > 0, the BFGS update is given by the solution of the following optimization problem:

Ht+1BFGS=arg min⁡H∈S++d D(Ht;H)  subject to  Hyt=st.(4)H_{t+1}^{\mathrm{BFGS}} = \underset{H \in\mathbb{S}_{++}^{d}}{\operatorname{arg\,min}}\ \mathcal{D}(H_t;H)\ \text{ subject to }\ H y_t = s_t. \tag*{(4)}

What happens in the non-convex and stochastic setting? The requirement stTyt>0s_t^\mathsf{T} y_t > 0 is called the curvature condition and it always holds for convex objectives, but can fail for nonconvex objectives. Indeed, if stTyt<0s_t^\mathsf{T} y_t < 0, then any matrix HH satisfying the secant equation must also satisfy stTyt=ytTHyt<0s_t^\mathsf{T} y_t = y_t^\mathsf{T} H y_t < 0, and thus cannot be positive definite.

In stochastic settings, the construction of the gradient difference yty_t requires additional care. Let ∇fξ(x)\nabla f_{\xi}(x) denote a stochastic gradient evaluated with random draw ξ\xi, which specifies the minibatch and other sources of randomness such as data augmentation or dropout masks. In this case, we compute yt=∇fξ(xt+1)−∇fξ(xt)y_t = \nabla f_{\xi}(x_{t+1}) - \nabla f_{\xi}(x_t) using the same draw at both endpoints, in order to ensure that the gradient difference reflects the curvature for a single sampled loss. Enforcing the secant equation Eq. (2) in the stochastic setting is also problematic, since Eq. (2) would force HH to exactly fit the curvature of just one stochastic loss.

Soft quasi-Newton

Soft QN (quasi-Newton) builds on the alternative variational formulation of BFGS given in Eq. (4), relaxing the secant constraint by transforming it into a least-squares penalty in the objective function [4]. Given λ>0\lambda> 0 and the current estimate HtH_t, the Soft QN algorithm approximates the inverse Hessian by solving

Ht+1=arg min⁡H∈S++d ∥st−Hyt∥H−12+1λD(Ht;H).(5)H_{t+1} = \underset{H \in\mathbb{S}_{++}^{d}}{\operatorname{arg\,min}}\ \lVert s_t - H y_t \rVert_{H^{-1}}^2 + \frac{1}{\lambda}\mathcal{D}(H_t;H). \tag*{(5)}

The first term in Eq. (5) penalizes the secant residual; the second term measures how far HtH_t is from HH in log-determinant divergence Eq. (3). The parameter λ>0\lambda> 0 controls the tradeoff between the two terms.

Eq. (5) has several nice properties. First, it is scale invariant and strictly convex in H−1H^{-1}. Second, there is a closed-form solution for Ht+1H_{t+1}, given in Eq. A.4. Third, the BFGS update is also a solution to Eq. (5) in the limit as λ→∞\lambda\to\infty and stTyt>0s_t^\mathsf{T} y_t > 0 [4] and Appendix § 9.§ 2. Finally and crucially, Soft QN remains well-defined and positive definite for every finite pair, including those with negative curvature stTyt≤0s_t^\mathsf{T} y_t \leq0.

However, computing the solution of Eq. (5) costs O(D2)\mathcal{O}(D^2) operations, which is computationally expensive, and the memory cost of storing the D2D^2 matrix HH is prohibitive in deep learning. We circumvent both the operational and memory costs by restricting to structured matrices.

SoftServe: Quasi-Newton Updates over Structured Families

To scale to deep neural networks, we consider two choices for structured families H⊆S++D\mathcal{H} \subseteq\mathbb{S}_{++}^{D}: a diagonal matrix family and Kronecker-structured matrix family. SoftServe then solves Eq. (5) for an inverse Hessian approximation HH over the structured family H\mathcal{H}, instead of over dense matrices in S++D\mathbb{S}_{++}^{D}. This optimization yields novel and efficiently-computable updates, which we call SoftServe-Diag and SoftServe-Kron.

Instead of the O(D2)O(D^2) cost of Soft QN, SoftServe-Diag reduces the memory and computational cost to O(D)O(D), which is comparable to that of Adam (Kingma & Ba, [24]). SoftServe-Kron reduces the costs to O(n2+m2)O(n^2 + m^2) for each D=n×mD = n \times m parameter block, which is the cost of Shampoo (Gupta et al., [16]) and KFAC (Martens & Grosse, [31]).

Diagonal approximation

SoftServe-Diag restricts the inverse Hessian estimate HH to be diagonal. Thus we need only store one positive scale per coordinate, H=diag⁡(h)H = \operatorname{diag}(h) with h∈R++Dh \in\mathbb{R}_{++}^{D}. Both terms of the objective in Eq. (5) then split into sums over coordinates ht+1,ih_{t+1,i}. Each coordinate is a scalar problem with a unique, closed-form solution ht+1,i>0h_{t+1,i} > 0 (Lemma B.1), given by

ht+1,i=2(ht,i+λst,i2)1+1+4λyt,i2(ht,i+λst,i2),i=1,…,D.(6)h_{t+1,i} = \frac{2\left(h_{t,i} + \lambda s_{t,i}^{2}\right)}{1 + \sqrt{1 + 4\lambda y_{t,i}^{2}\left(h_{t,i} + \lambda s_{t,i}^{2}\right)}} , \qquad i = 1,\ldots,D. \tag*{(6)}

Thus, the matrix estimate is Ht+1=diag⁡(ht+1)H_{t+1} = \operatorname{diag}(h_{t+1}). Though SoftServe-Diag is inexpensive, and can perform reasonably well, it ignores all interactions between coordinates.

Kronecker-structured approximation

Neural network parameters are often naturally represented as matrices. Let X∈Rn×mX \in\mathbb{R}^{n \times m} denote a layer’s weight matrix and G:=∇Xf∈Rn×mG := \nabla_X f \in\mathbb{R}^{n \times m} denote its gradient. Thus the Hessian matrix associated with XX has n2m2n^2m^2 entries. We can reduce this storage cost by imposing a Kronecker structure:

H=L⊗R,where L∈S++m,R∈S++n.(7)H = L \otimes R, \qquad\text{where } L \in\mathbb{S}_{++}^{m}, \quad R \in\mathbb{S}_{++}^{n}. \tag*{(7)}

Here ⊗\otimes denotes the Kronecker product: if L=[aij]L = [a_{ij}], then L⊗RL \otimes R is the nm×nmnm \times nm block matrix whose (i,j)th(i,j)^{\mathrm{th}} block is aijRa_{ij}R. Storing the two factors LL and RR requires only m2+n2m^2 + n^2 entries. By Eq. B.4, applying HH to the gradient also requires only two matrix products: Hg=vec⁡(RGL)Hg = \operatorname{vec}(RGL), where g=vec⁡(G)g = \operatorname{vec}(G) and vec⁡(⋅)\operatorname{vec}(\cdot) stacks columns.

Unfortunately there is no closed-form solution when minimizing the soft quasi-Newton objective Eq. (5) over both LL and RR. But there is a unique solution if we solve for only one factor at a time. We therefore update them alternately, holding one fixed while optimizing the other. As we now show, each conditional minimization reduces to solving a quadratic matrix equation with a unique positive-definite solution (see Lemma B.3).

To see this, we first reshape the secant vectors into matrices St,Yt∈Rn×mS_t, Y_t \in\mathbb{R}^{n \times m}, with vec⁡(St)=st\operatorname{vec}(S_t) = s_t and vec⁡(Yt)=yt\operatorname{vec}(Y_t) = y_t. Holding R=RtR = R_t fixed and minimizing the terms in Eq. (5) involving LL, we obtain the conditional update

Lt+1=arg⁡min⁡L∈S++m tr⁡(ULL)+tr⁡(VLL−1)+log⁡det⁡L,(8)L_{t+1} = \underset{L \in\mathbb{S}_{++}^{m}}{\arg\min}\ \operatorname{tr}(U_L L) + \operatorname{tr}(V_L L^{-1}) + \log\det L, \tag*{(8)}

where we define the auxiliary matrices:

UL:=λnYtTRtYtandVL:=Lt+λnStTRt−1St.(9)U_L := \frac{\lambda}{n}Y_t^{\mathsf{T}}R_tY_t \quad\text{and} \quad V_L := L_t + \frac{\lambda}{n}S_t^{\mathsf{T}}R_t^{-1}S_t. \tag*{(9)}

Differentiating Eq. (8) with respect to LL and setting the derivative to zero, yields the quadratic matrix equation

LULL+L=VL.(10)L U_L L + L = V_L. \tag*{(10)}

Here, because UL⪰0U_L \succeq0 and VL≻0V_L \succ0, this equation has a unique, positive-definite solution Lt+1L_{t+1}, which we provide in Eq. (13) and discuss further in § 4.1.

We then update the factor RR by minimizing Eq. (5) in RR and holding Lt+1L_{t+1} fixed:

Rt+1=arg⁡min⁡R∈S++ntr⁡(URR)+tr⁡(VRR−1)+log⁡det⁡R,(11)R_{t+1} = \mathop{\arg\min}_{R \in\mathbb{S}_{++}^{n}} \operatorname{tr}(U_R R) + \operatorname{tr}(V_R R^{-1}) + \log\det R, \tag*{(11)}

where the auxiliary matrices are now defined as

UR:=λmYtLt+1YtTandVR:=m−1[tr⁡(LtLt+1−1)Rt+λStLt+1−1StT].(12)U_R := \frac{\lambda}{m}Y_tL_{t+1}Y_t^{\mathsf{T}} \quad\text{and} \quad V_R := m^{-1}\left[\operatorname{tr}(L_tL_{t+1}^{-1})R_t + \lambda S_tL_{t+1}^{-1}S_t^{\mathsf{T}}\right]. \tag*{(12)}

Solving Eq. (11) for Rt+1R_{t+1} reduces to solving an analogous quadratic matrix equation to Eq. (10), RURR+R=VRR U_R R + R = V_R, which again has a unique, positive-definite solution (Lemma B.3).

The alternating updates replace computations on the full inverse-Hessian estimate HH with operations on the two smaller factors LL and RR. Nevertheless, directly solving the quadratic matrix equations can be expensive for wide layers, with cost O(n3+m3+n2m+nm2)O(n^3 + m^3 + n^2m + nm^2). Instead of using a direct solver, we will use GPU-friendly Newton-Schulz approximations, as discussed in the next section. Using Newton-Schulz approximations was also central to Muon’s effectiveness at scale [1, 29].

Practical implementation of SoftServe for deep learning

Here we discuss strategies to make SoftServe practical for training deep neural networks.

Efficient Kronecker updates

SoftServe-Kron requires solving quadratic matrix equations [8], which are particular instances of the algebraic Riccati equation [25]. Here we discuss how to approximately solve this matrix equation using a GPU friendly approach. These approximations are key for scaling SoftServe up to large neural networks.

Both Kronecker factor updates in Eq. (8) and Eq. (11) reduce to solving a quadratic matrix equation of the form QUQ+Q=VQ U Q + Q = V with U⪰0U \succeq0 and V≻0V \succ0. Its unique positive-definite solution can be expressed using principal matrix square roots V1/2V^{1/2} (see Appendix § 10.§ 3):

Q=2V1/2[Id+(Id+4V1/2UV1/2)1/2]−1V1/2.(13)Q = 2V^{1/2}\left[I_d + \left(I_d + 4V^{1/2}UV^{1/2}\right)^{1/2}\right]^{-1}V^{1/2}. \tag*{(13)}

Direct evaluation of Eq. (13) requires two matrix square roots and a matrix inverse. For Kronecker updates, the coefficients admit a natural Gram matrix factorization U=FFTU = FF^{\mathsf{T}}, given in Section C.1. Our implementation exploits this structure through an equivalent Gram formulation of Eq. (13) given in Eq. B.22, which evaluates a square root of I+4FTVFI + 4F^{\mathsf{T}}VF and an inverse, which avoids the separate square roots of VV. See Appendix § 10.§ 3 and C.1 for details.

While the matrix functions in Eq. (13) can be computed using, for instance singular value decomposition (SVD), most methods for computing the SVD are not well suited for GPUs [17]. To compute the matrix square root efficiently on GPUs, we use the coupled Newton-Schulz iteration [18, 19], which is based only on matrix multiplications and additions. For a positive definite matrix MM, coupled Newton-Schulz jointly approximates its square root M1/2M^{1/2} and its inverse square root M−1/2M^{-1/2}. Matrix inverses are likewise approximated using Newton-Schulz iterations. See Appendix § 11.§ 2 for details.

Training with SoftServe

To make SoftServe practical, we make use of several now-standard practices in deep learning. The full procedure includes momentum updates, Nesterov extrapolation or bias correction [24], details of which are in Appendix § 12.§ 1.

Algorithm 1 SOFTSERVE-Kron: high-level training iteration (details in Algorithm D.1)

Require: Parameters XtX_t; factors Lt,RtL_t, R_t; momentum estimate M^t\hat{M}_t; step size γt\gamma_t; penalty λ\lambda.

  1. Take the normalized preconditioned step in Eq. (14), using

Xt+1=Xt−γtRtM^tLttr⁡(M^tTRtM^tLt)X_{t+1}=X_t-\gamma_t\frac{R_t\hat{M}_tL_t}{\sqrt{\operatorname{tr}\left(\hat{M}_t^{\mathsf{T}}R_t\hat{M}_tL_t\right)}}
  1. Evaluate stochastic gradient, difference of gradients YtY_t and difference of iterates StS_t

  2. Update Kronecker factors by solving quadratic matrix equations (via Eq. (13) or Eq. B.22):

Update Lt+1L_{t+1} by solving LULL+L=VLL U_L L + L = V_L

Update Rt+1R_{t+1} by solving RURR+R=VRR U_R R + R = V_R,

where the matrices UL,VLU_L, V_L are given in Eq. (9), and UR,VRU_R, V_R are given in Eq. (12).

  1. return Xt+1X_{t+1}

Algorithm 1 summarizes one training iteration of SOFTSERVE-Kron applied to one matrix parameter X∈Rn×mX \in\mathbb{R}^{n\times m}. SOFTSERVE-Diag follows the same procedure replacing the Kronecker updates with the diagonal update in Eq. (6), and detailed in Algorithm D.2

One of main changes we have introduced in Algorithm 1 is that we use a normalized update, see line 1. In vectorized notation, this normalized update is given by

xt+1=xt−γtHtm^t/m^tTHtm^t,(14)x_{t+1}=x_t-\gamma_t H_t\hat{m}_t/\sqrt{\hat{m}_t^{\mathsf{T}}H_t\hat{m}_t}, \tag*{(14)}

where xt=vec⁡(Xt)x_t=\operatorname{vec}(X_t), m^t=vec⁡(M^t)\hat{m}_t=\operatorname{vec}(\hat{M}_t) and Ht=Lt⊗RtH_t=L_t\otimes R_t. By Eqs. B.4 and B.5, Eq. (14) is equivalent to the matrix update on line 1 of Algorithm 1. Normalized updates are often more effective in deep learning ([23, 36, 9]), which we also confirmed in our initial experiments.

Finally, to amortize the cost of refreshing the curvature estimate, we hold HtH_t fixed for KK training steps. At the beginning of each window, we save the parameters, stochastic gradient, and random draw. At the end, we reevaluate the gradient using the saved draw, forming a secant pair from the endpoint differences, see Appendix § 12.§ 1 for details.

Related Work

Stochastic and structured Quasi-Newton. Classical QN methods enforce the secant equation while changing the metric as little as possible ([6, 12, 14, 43, 10, 33]). Stochastic variants keep a dense or limited-memory metric ([28]) and protect it from bad pairs by: using damping ([41]), curvature pairs from Hessian-vector products on large batches ([7]), damped updates ([48]), overlapping batches ([3]), diagonal rescaling ([5]), or a secant penalty ([22]). K-BFGS ([15]) uses a per-layer Kronecker factorization of BFGS, and relies on damping for a resulting positive definite curvature estimate.

Matrix-aware methods. There are now a growing number of methods which are specialized to the matrix parameters in linear layers. K-FAC ([31]), Shampoo ([16]), and SOAP ([45]) all make use of Kronecker factorizations to form a preconditioner. Muon ([23, 29]) is a steepest descent method in the matrix spectral norm.

Related variational objectives. With the mean held fixed, the covariance subproblem in batch-and-matrix variational inference ([8]) has the same form as the soft QN objective in Eq. (5), which is where the closed form in Eq. (13) originates (see Section A.3 for details). The least squares secant penalty within the soft QN objective (Eq. (5)) has also been used to design preconditioned variants of SGD called PSGD in ([26, 37]). PSGD then uses a form of multiplicative SGD applied to the secant penalty to estimate the preconditioner.

Experiments

We evaluate SoftServe on recurrent sequence learning, image reconstruction, and physics-informed learning, from a small recurrent network to a 136M-parameter diffusion model. We test whether the structured inverse Hessian estimates improve training over first-order and other preconditioned methods. We compare training losses at equal gradient-evaluation budgets, and report prediction errors and wall-clock comparisons in Appendix § 13.

Comparison protocol. Our baselines are Adam, Muon, SOAP, K-FAC, and K-BFGS(L), with L-BFGS also included for deterministic training. To assess the contribution of the learned inverse Hessian, we include SoftServe-I: the normalized momentum method Eq. (14) obtained by fixing H=IH = I. We tune each method’s learning rate separately and evaluate the selected configurations on three fresh seeds. All SoftServe runs refresh the inverse Hessian estimate every K=10K = 10 updates. Gradient counts include the additional evaluations used for secant pairs, line searches, and loss balancing. In stochastic training, SoftServe uses one extra gradient evaluation every KK updates to form a secant pair on the same batch, see detailed pseudo-code in Algorithm D.1. Task-specific settings and learning-rate sweeps are given in Appendix § 13.

RNN Adding

The Adding problem tests a recurrent network’s ability to retain information over a long sequence. Each input contains 100 numbers sampled uniformly from [0,1][0, 1] and markers identifying two positions. The network reads the full sequence and predicts the sum of the two marked numbers. We train a tanh RNN with 16 hidden units by minimizing mean squared error (MSE) on batches of 128 newly sampled sequences. Although the network is small, repeated applications of the recurrent map can cause gradients to vanish or explode [34]. The full loss Hessian in this example is numerically nearly singular at initialization across four seeds (Appendix § 13.§ 2). This makes Adding an interesting ill-conditioned small-scale test. Indeed, in Figure 1 we see that preconditioning was necessary to reach a reasonable loss, with SoftServe-Kron reaching by far the lowest training loss (Figure 1, left), outperforming our baselines on all three seeds. SoftServe-Kron mean test MSE is 6.6×10−66.6 \times10^{-6}, compared with 1.5×10−41.5 \times10^{-4} for Muon and 1.0×10−21.0 \times10^{-2} for SoftServe-I.

Figure 1. Training objectives against gradient evaluations: prediction MSE for RNN Adding (left), and reconstruction binary cross-entropy with ℓ2\ell_2 regularization for full-batch MNIST (middle) and minibatch MNIST (right). Lines show three-seed means; shading spans the seed minimum and maximum. K-BFGS(L) with failed seeds are shown as individual traces.

MNIST autoencoder

We next consider MNIST reconstruction, a standard benchmark for second-order optimization [20, 30, 15]. A 2.8M-parameter feed-forward autoencoder compresses each 28 ×\times 28 image into a 30-dimensional representation and reconstructs the input. We minimize pixelwise binary cross-entropy with ℓ2\ell_2 regularization, using either all 60,000 training images at each update or minibatches of 1,000. These two settings compare deterministic and stochastic training of the same network.

SoftServe-Kron reaches the lowest training objective with full batches and is close to Muon with minibatches (Figure 1, middle, right). It improves on SoftServe-I in both settings. Appendix § 13.§ 3 shows held-out reconstruction errors and wall-clock comparisons.

Physics-informed neural networks

Physics-informed neural networks (PINNs) approximate solutions to partial differential equations (PDEs) by mapping space–time coordinates to solution values. They are trained by penalizing the PDE residual and errors in the initial and boundary conditions. Depending on the differential operator, this loss can be very ill-conditioned, motivating the use of second-order optimization (Rathore et al. [39]). We evaluate SoftServe on both small feed-forward PINNs and the larger residual architecture PirateNet (Wang et al. [46]).

Small PINNs. We use the Wave, Convection, and Reaction problems of Rathore et al. [39]. Each network has three hidden layers of width 200 and 81,201 parameters. Training minimizes the sum of the mean squared residuals of the governing PDE and its associated initial and boundary conditions. We either fix the sampled training coordinates (collocation points) or resample them at each update. This gives six settings across the three equations.

SoftServe-Kron attains the lowest final training objective in five of the six settings, including all three with resampled points (Figure 2). On deterministic Wave, Adam and Adam+L-BFGS attain lower final losses, with Adam+L-BFGS achieving the lowest. Adam+L-BFGS, used by Rathore et al. [39], runs Adam for the first 11,000 parameter updates, followed by L-BFGS within the remaining gradient-evaluation budget. Appendix § 13.§ 4 gives solution errors and repeats the comparison in double precision.

Figure 2. PINN training objectives for Wave, Convection, and Reaction, with fixed points (top) and resampled points (bottom). Lines show three-seed means; shading spans the seed minimum and maximum. Settings with failed seeds are shown as individual traces. Horizontal extensions show the final loss after an L-BFGS run terminates.

For our remaining experiments with larger models below, we restrict the baselines to Adam, Muon, and SOAP, based on their scalability, and performance in the preceding experiments.

PirateNet. PirateNet is a PINN architecture that combines fully connected layers with skip connections to make deeper networks easier to train. We use a 0.73M-parameter model to solve the Allen–Cahn and Korteweg–de Vries (KdV) equations. Training uses 32,768 collocation points per update and adaptive weights for the loss terms. Since these weights differ across optimizers, we compare the unweighted sum of PDE and initial-condition MSE on the same fixed points. Against Adam, Muon, and SOAP, SoftServe-Kron is competitive with Muon on Allen–Cahn and reaches the lowest mean loss on KdV (Figure 3, left and middle). The PDEs and solution errors are given in Appendix § 13.§ 5.

Training loss curves for PirateNet on Allen–Cahn and KdV, and PIDM

Figure 3. PirateNet on Allen–Cahn (left) and KdV (middle), and the 136M-parameter PIDM (right). PirateNet uses unweighted PDE and initial-condition MSE on fixed points; PIDM uses the training objective on fixed examples and noise. Lines show three-seed means; shading spans the seed minimum and maximum.

Physics-informed diffusion

To test SOFTSERVE at a larger scale, we train the physics-informed diffusion model (PIDM) of Bastek et al. [2] for structural design. Given applied forces, supports, and a material budget, the model learns to place material on a two-dimensional grid to form a stiff structure. We use the 136M-parameter U-Net and 30,000 optimized training structures. The network reconstructs material-density and displacement fields from noisy inputs. Its objective combines denoising error with penalties for force imbalance, material-volume error, and compliance, a measure of structural flexibility. At 100,000 gradient evaluations, SOFTSERVE-Kron reaches a lower mean training loss than Adam, Muon, and SOAP (Figure 3, right).

Language model

Finally, we evaluate a 16M-parameter GPT-style language model (Radford et al., [38]). It has four layers, four attention heads per layer, hidden width 256, and a context length of 512 tokens. We minimize next-token cross-entropy on 200M tokens from FineWeb (Penedo et al., [35]). SOFTSERVE-Kron reaches a mean validation NLL of 4.661, lower than AdamW (4.786) but higher than Muon (4.440) and SOAP (4.416). Thus, the gains on the preceding tasks do not extend to matching Muon and SOAP on this language model.

Discussion and Limitations

We introduce SOFTSERVE, a quasi-Newton approach for deep learning. SOFTSERVE considers structured Hessian approximations that are always positive definite, GPU-friendly Newton–Schulz approximations, allowing it to scale to massive neural networks. Our experiments highlight the value of curvature on several ill-conditioned tasks, including recurrent networks, autoencoders, and physics-informed models, including the 136M-parameter PIDM.

Many future directions remain. For instance, currently we use a fixed λ\lambda within each training run. Developing adaptive λ\lambda would further optimize performance. Finally, characterizing convergence guarantees under realistic settings remains an open problem to study.

Acknowledgments

We thank Lawrence Saul for first suggesting that our work on variational inference could be used to develop a quasi-Newton method, and for helpful discussions about this project.

BFGS and Soft quasi-Newton

BFGS

Typically, the BFGS update is derived via a weighted Frobenius norm objective that seeks to find the closest symmetric matrix to the current iterate’s quasi-Newton matrix such that the secant equation is satisfied [33 Chapter 6]. That is,

Ht+1=arg⁡min⁡H∈S++ ∥H−Ht∥F(W)subject toH=HT,Hyt=st(15)H_{t+1}=\underset{H\in\mathbb{S}_{++}}{\arg\min}\ \lVert H-H_t\rVert_{F(W)}\quad\text{subject to}\quad H=H^{\mathsf{T}},\quad Hy_t=s_t \tag*{(15)}

where the norm above is the weighted Frobenius norm ∥M∥F(W)=∥W12MW12∥F\lVert M\rVert_{F(W)}=\lVert W^{\frac{1}{2}}MW^{\frac{1}{2}}\rVert_F with a weighting matrix WW that satisfies the secant equation (e.g., W=BtW=B_t).

The BFGS update is given by

Ht+1BFGS=(I−stytTytTst)Ht(I−ytstTytTst)+ststTytTst.(16)H_{t+1}^{\mathrm{BFGS}}=\left(I-\frac{s_ty_t^{\mathsf{T}}}{y_t^{\mathsf{T}}s_t}\right)H_t\left(I-\frac{y_ts_t^{\mathsf{T}}}{y_t^{\mathsf{T}}s_t}\right)+\frac{s_ts_t^{\mathsf{T}}}{y_t^{\mathsf{T}}s_t}. \tag*{(16)}

The log-determinant formulation of Fletcher [13] given in Eq. (4) recovers the same update, providing the starting point for replacing the secant equation with a soft penalty.

Soft quasi-Newton

As discussed in the main text, Soft QN [4] then considers the soft penalty, regularized by the log-determinant divergence: the Soft QN algorithm then approximates the inverse Hessian by solving

Ht+1=arg⁡min⁡H∈S++ ∥st−Hyt∥H−12+1λD(Ht;H).(17)H_{t+1}=\underset{H\in\mathbb{S}_{++}}{\arg\min}\ \lVert s_t-Hy_t\rVert_{H^{-1}}^2+\frac{1}{\lambda}\mathcal{D}(H_t;H). \tag*{(17)}

Berglund et al. [4] show that this objective has the unique, positive definite solution

Ht+1=Vt−4λVtytytTVt(1+1+4λytTVtyt)2,(18)H_{t+1}=V_t-\frac{4\lambda V_ty_ty_t^{\mathsf{T}}V_t}{\left(1+\sqrt{1+4\lambda y_t^{\mathsf{T}}V_ty_t}\right)^2}, \tag*{(18)}

where Vt:=Ht+λststTV_t:=H_t+\lambda s_ts_t^{\mathsf{T}}. Furthermore, Berglund et al. [4], Theorem 3.2 shows that the BFGS update is recovered as a limiting case: under positive curvature stTyt>0s_t^{\mathsf{T}}y_t>0, then

Ht+1→Ht+1BFGS,as λ→∞.(19)H_{t+1}\to H_{t+1}^{\mathrm{BFGS}},\qquad\text{as }\lambda\to\infty. \tag*{(19)}

Connections with Variational inference

For Gaussians with a common mean μ\mu, the log-determinant divergence defined in Eq. (3) equals twice the KL divergence, that is

D(P;Q)=2KL⁡(N(μ,P)∥N(μ,Q)).\mathcal{D}(P;Q)=2\operatorname{KL}\left(\mathcal{N}(\mu,P)\mathbin{\|}\mathcal{N}(\mu,Q)\right).

Let π=N(μ,H)\pi=\mathcal{N}(\mu,H), πt=N(μ,Ht)\pi_t=\mathcal{N}(\mu,H_t), and let pp be a differentiable positive density. With s=μ−zs=\mu-z and y=∇zlog⁡p(z)y=\nabla_z\log p(z), the Gaussian score is ∇zlog⁡π(z)=H−1s\nabla_z\log\pi(z)=H^{-1}s, so

∥∇zlog⁡π(z)−y∥H2=∥s−Hy∥H−12,2λKL⁡(πt∥π)=1λD(Ht;H).(20)\left\lVert\nabla_z\log\pi(z)-y\right\rVert_H^2=\left\lVert s-Hy\right\rVert_{H^{-1}}^2,\qquad\frac{2}{\lambda}\operatorname{KL}(\pi_t\mathbin{\|}\pi)=\frac{1}{\lambda}\mathcal{D}(H_t;H). \tag*{(20)}

Thus, the objective in Eq. A.3 is the one-score covariance objective of Cai et al. [8] with the mean fixed. The identity links the two covariance subproblems; it does not equate variational inference with quasi-Newton optimization.

SoftServe: structured updates

Recall that SoftServe solves the soft quasi-Newton objective with respect to a structured matrix family H\mathcal{H} (diagonal or Kronecker factored):

Ht+1=arg⁡min⁡H∈H ∥st−Hyt∥H−12+1λL(Ht;H).(21)H_{t+1}=\underset{H\in\mathcal{H}}{\arg\min}\ \lVert s_t-Hy_t\rVert_{H^{-1}}^2+\frac{1}{\lambda}\mathcal{L}(H_t;H). \tag*{(21)}

Diagonal update

We begin by considering the diagonal family

HDiag={diag⁡(h):h∈R++D}.\mathcal{H}_{\mathrm{Diag}}=\{\operatorname{diag}(h):h\in\mathbb{R}_{++}^{D}\}.

The lemma below derives the update.

Lemma B.1 (Exact diagonal update). Let ht∈R++Dh_t\in\mathbb{R}_{++}^{D}, Ht=diag⁡(ht)H_t=\operatorname{diag}(h_t), st,yt∈RDs_t,y_t\in\mathbb{R}^{D}, and λ>0\lambda>0. The diagonal restriction of Eq. B.1 has the unique minimizer Ht+1=diag⁡(ht+1)H_{t+1}=\operatorname{diag}(h_{t+1}), where

ht+1,i=2(ht,i+λst,i2)1+1+4λyt,i2(ht,i+λst,i2),i=1,…,D.(22)h_{t+1,i}=\frac{2\left(h_{t,i}+\lambda s_{t,i}^{2}\right)}{1+\sqrt{1+4\lambda y_{t,i}^{2}\left(h_{t,i}+\lambda s_{t,i}^{2}\right)}},\qquad i=1,\ldots,D. \tag*{(22)}

Hence ht+1∈R++Dh_{t+1}\in\mathbb{R}_{++}^{D}, regardless of the signs of st,iyt,is_{t,i}y_{t,i}.

Proof. For H=diag⁡(h)H=\operatorname{diag}(h), the terms of Eq. B.1 that depend on hh are

∑i=1D[st,i2hi+hiyt,i2+1λ(ht,ihi+log⁡hi)].\sum_{i=1}^{D}\left[\frac{s_{t,i}^{2}}{h_i}+h_i y_{t,i}^{2}+\frac{1}{\lambda}\left(\frac{h_{t,i}}{h_i}+\log h_i\right)\right].

Fix ii, set v=ht,i+λst,i2>0v=h_{t,i}+\lambda s_{t,i}^{2}>0 and b=hi−1b=h_i^{-1}, and multiply by λ\lambda. The scalar problem is

minimize⁡b>0ψ(b),ψ(b)=vb+λyt,i2b−log⁡b.\underset{b>0}{\operatorname{minimize}}\quad\psi(b),\qquad\psi(b)=vb+\frac{\lambda y_{t,i}^{2}}{b}-\log b.

Since ψ′′(b)=2λyt,i2/b3+1/b2>0\psi''(b)=2\lambda y_{t,i}^{2}/b^{3}+1/b^{2}>0 and ψ(b)→+∞\psi(b)\to+\infty as b↓0b\downarrow0 or b→∞b\to\infty, the minimizer exists and is unique. The stationarity condition λyt,i2hi2+hi−v=0\lambda y_{t,i}^{2}h_i^{2}+h_i-v=0 has the single positive root

hi=2v1+1+4λyt,i2v,h_i=\frac{2v}{1+\sqrt{1+4\lambda y_{t,i}^{2}v}},

which also covers yt,i=0y_{t,i}=0. Separability over ii proves the claim.

Kronecker update

We state standard identities for Kronecker products Horn & Johnson, [21].

Lemma B.2. For P∈Rm×mP\in\mathbb{R}^{m\times m}, Q∈Rn×nQ\in\mathbb{R}^{n\times n}, and conformable X,ZX,Z, we have:

(P1⊗Q1)(P2⊗Q2)=(P1P2)⊗(Q1Q2)(23)(P_1\otimes Q_1)(P_2\otimes Q_2)=(P_1P_2)\otimes(Q_1Q_2) \tag*{(23)}
(P⊗Q)vec⁡(X)=vec⁡(QXPT)(24)(P\otimes Q)\operatorname{vec}(X)=\operatorname{vec}(QXP^{\mathsf{T}}) \tag*{(24)}
vec⁡(X)Tvec⁡(Z)=tr⁡(XTZ)(25)\operatorname{vec}(X)^{\mathsf{T}}\operatorname{vec}(Z)=\operatorname{tr}(X^{\mathsf{T}}Z) \tag*{(25)}
tr⁡(P⊗Q)=tr⁡(P)tr⁡(Q)(26)\operatorname{tr}(P\otimes Q)=\operatorname{tr}(P)\operatorname{tr}(Q) \tag*{(26)}
det⁡(P⊗Q)=det⁡(P)ndet⁡(Q)m.(27)\det(P\otimes Q)=\det(P)^{n}\det(Q)^{m}. \tag*{(27)}

We now consider the Kronecker-structured family:

HKron={L⊗R:L∈S++m,R∈S++n}.(28)\mathcal{H}_{\mathrm{Kron}} = \{L \otimes R : L \in\mathbb{S}_{++}^{m}, R \in\mathbb{S}_{++}^{n}\}. \tag*{(28)}

Here, we derive the alternating update from § 3.2. First, we recall some notation. Write st=vec⁡(St)s_t = \operatorname{vec}(S_t), yt=vec⁡(Yt)y_t = \operatorname{vec}(Y_t), and Ht=Lt⊗RtH_t = L_t \otimes R_t. The following result establishes the properties of these conditional updates.

Lemma B.3 (Alternating Kronecker solution.). Let Lt∈S++mL_t \in\mathbb{S}_{++}^{m}, Rt∈S++nR_t \in\mathbb{S}_{++}^{n}, λ>0\lambda> 0, and St,Yt∈Rn×mS_t,Y_t \in\mathbb{R}^{n \times m}. Consider the objective given in Eq. (5) and the updates

Lt+1=arg min⁡L∈S++mtr⁡(ULL)+tr⁡(VLL−1)+log⁡det⁡L(29)L_{t+1} = \underset{L \in\mathbb{S}_{++}^{m}}{\operatorname{arg\,min}}\quad\operatorname{tr}(U_L L) + \operatorname{tr}(V_L L^{-1}) + \log\det L \tag*{(29)}
Rt+1=arg min⁡R∈S++ntr⁡(URR)+tr⁡(VRR−1)+log⁡det⁡R,(30)R_{t+1} = \underset{R \in\mathbb{S}_{++}^{n}}{\operatorname{arg\,min}}\quad\operatorname{tr}(U_R R) + \operatorname{tr}(V_R R^{-1}) + \log\det R, \tag*{(30)}

where we define the auxiliary matrices:

UL:=λnYtTRtYtandVL:=Lt+λnStTRt−1St(31)U_L := \frac{\lambda}{n}Y_t^{\mathsf{T}}R_tY_t \qquad\text{and} \qquad V_L := L_t + \frac{\lambda}{n}S_t^{\mathsf{T}}R_t^{-1}S_t \tag*{(31)}
UR:=λmYtLt+1YtTandVR:=m−1[tr⁡(LtLt+1−1)Rt+λStLt+1−1StT].(32)U_R := \frac{\lambda}{m}Y_tL_{t+1}Y_t^{\mathsf{T}} \qquad\text{and} \qquad V_R := m^{-1}\left[\operatorname{tr}(L_tL_{t+1}^{-1})R_t + \lambda S_tL_{t+1}^{-1}S_t^{\mathsf{T}}\right]. \tag*{(32)}

These updates have a unique, closed-form solution that costs O(n3+m3+n2m+nm2)O(n^3 + m^3 + n^2m + nm^2) to compute exactly. Furthermore, the updates to LL and RR monotonically decrease the soft QN objective.

Proof. Substituting H=L⊗RH = L \otimes R into the objective in Eq. B.1 and applying the identities in Eqs. B.3 to B.7, up to a constant independent of LL and RR,

Φt(L,R)=tr⁡(LYtTRYt)+tr⁡(L−1StTR−1St)+1λtr⁡(LtL−1)tr⁡(RtR−1)+1λ[nlog⁡det⁡L+mlog⁡det⁡R].(33)\begin{aligned} \Phi_t(L,R) ={}& \operatorname{tr}(LY_t^{\mathsf{T}}RY_t) + \operatorname{tr}(L^{-1}S_t^{\mathsf{T}}R^{-1}S_t) \\ &+ \frac{1}{\lambda}\operatorname{tr}(L_tL^{-1})\operatorname{tr}(R_tR^{-1}) + \frac{1}{\lambda}\left[n\log\det L + m\log\det R\right]. \tag*{(33)} \end{aligned}

This expression makes the dependence on each factor explicit. We minimize it first over LL with R=RtR = R_t, then over RR with L=Lt+1L = L_{t+1} fixed.

Holding R=RtR = R_t fixed and collecting terms in Eq. B.13 involving LL, we obtain the conditional update

Lt+1=arg min⁡L∈S++mtr⁡(ULL)+tr⁡(VLL−1)+log⁡det⁡L.(34)L_{t+1} = \underset{L \in\mathbb{S}_{++}^{m}}{\operatorname{arg\,min}}\quad\operatorname{tr}(U_L L) + \operatorname{tr}(V_L L^{-1}) + \log\det L. \tag*{(34)}

Differentiating the objective in Eq. B.14 with respect to LL and setting the derivative to zero yields the quadratic matrix equation

LULL+L=VL.(35)L U_L L + L = V_L. \tag*{(35)}

Here, because UL⪰0U_L \succeq0 and VL≻0V_L \succ0, this equation has a positive-definite solution Lt+1L_{t+1} (Lemma B.4). To establish uniqueness, we appeal to the observation that the objective is strictly convex in L−1L^{-1}.

We then update the factor RR in an analogous manner, holding Lt+1L_{t+1} fixed:

Rt+1=arg min⁡R∈S++ntr⁡(URR)+tr⁡(VRR−1)+log⁡det⁡R,(36)R_{t+1} = \underset{R \in\mathbb{S}_{++}^{n}}{\operatorname{arg\,min}}\quad\operatorname{tr}(U_R R) + \operatorname{tr}(V_R R^{-1}) + \log\det R, \tag*{(36)}

Solving Eq. B.16 for Rt+1R_{t+1} reduces to solving another quadratic matrix equation

RURR+R=VR,(37)R U_R R + R = V_R, \tag*{(37)}

which again has a unique, positive-definite solution.

Each block update minimizes the objective over one factor, holding the other factor and the reference matrix HtH_t fixed. Since the current factor is feasible, each update cannot increase the objective. Forming the coefficient products costs O(n2m+nm2)O(n^2m + nm^2); the factor inverses and two quadratic matrix equation solves cost O(n3+m3)O(n^3 + m^3).

Quadratic Matrix Equations

In the previous Section B.2 we showed that SoftServe-Kron has an alternating update for the factors LL and RR, where first we perform

Update Lt+1 by solving LULL+L=VL,(38)\text{Update }L_{t+1}\text{ by solving }LU_L L+L=V_L, \tag*{(38)}

and then we perform the update

Update Rt+1 by solving RURR+R=VR.(39)\text{Update }R_{t+1}\text{ by solving }RU_R R+R=V_R. \tag*{(39)}

Given known matrices U⪰0U \succeq0 and V≻0V \succ0, each update above involves solving a quadratic matrix equation of the form

QUQ+Q=V.(40)QUQ+Q=V. \tag*{(40)}

Cai et al. [8] show that Eq. B.21 below is the positive definite solution.

Lemma B.4 (Quadratic matrix equation). The positive definite solution to Eq. B.20 is given by

Q=2V1/2[I+(I+4V1/2UV1/2)1/2]−1V1/2.(41)Q=2V^{1/2}\left[I+\left(I+4V^{1/2}UV^{1/2}\right)^{1/2}\right]^{-1}V^{1/2}. \tag*{(41)}

When updating either Kronecker factor, LL or RR, the matrix UU in Eq. B.20 admits a Gram factorization U=FFTU=FF^{\mathsf{T}}. Cai et al. [8] (see also Modi et al. [32]) provide an equivalent expression for the solution to the quadratic matrix equation in Eq. B.20 in terms of this Gram matrix, which is given by

Q=V−VTF[12I+(FTVF+14I)1/2]−2FTV.(42)Q=V-V^{\mathsf{T}}F\left[\frac{1}{2}I+\left(F^{\mathsf{T}}VF+\frac{1}{4}I\right)^{1/2}\right]^{-2}F^{\mathsf{T}}V. \tag*{(42)}

For a matrix F∈Rd×pF\in\mathbb{R}^{d\times p}, this update takes O(d2p+p3)\mathcal{O}(d^2p+p^3) computation.

Our implementation of SoftServe-Kron, which relies on the coupled Newton-Schulz, will rely on the latter Gram form of the solution in Eq. B.22.

SoftServe: numerical computation of Kronecker updates

The Kronecker updates in § 3.2 require solving two quadratic matrix equations, one for each factor. In this section, we describe how to evaluate these updates using matrix multiplications and Newton-Schulz iterations, as outlined in § 4.1. We begin by explaining how to form the coefficients U,VU,V of the quadratic matrix equations, then we describe the Newton-Schulz procedures, and finally we explain how to apply the Newton-Schulz procedures to obtain the full Gram update, providing explicit pseudocode for the Kronecker factor updates LL and RR.

Evaluating the updates in Gram form

In this section, we show that the coefficients U=FFTU=FF^{\mathsf{T}} and VV can be written in terms of matrix multiplications and square root and inverse square root operations. Consider the Gram solution to the quadratic matrix equation in Eq. B.22. This expression requires a square root of C=FTVF+14IC=F^{\mathsf{T}}VF+\frac{1}{4}I and an inverse of 12I+C1/2\frac{1}{2}I+C^{1/2}. Overall, this solution requires fewer matrix function evaluations (i.e., square root and inverse) than the solution in Eq. B.21.

We begin by motivating the Gram update further by examining the factorization U=FFTU=FF^{\mathsf{T}}. For our Kronecker factor updates, we recall the definitions of ULU_L and URU_R in Eqs. B.11 and B.12,

UL=λnYtTRtYt(43)U_L=\frac{\lambda}{n}Y_t^{\mathsf{T}}R_tY_t \tag*{(43)}
UR=λmYtLt+1YtT.(44)U_R=\frac{\lambda}{m}Y_tL_{t+1}Y_t^{\mathsf{T}}. \tag*{(44)}
Algorithm C.1 Newton–Schulz routines
1: function NEWTONSCHULZROOTPAIR($M$, $J$)
2:   $a \leftarrow \lVert M\rVert_F$
3:   $Z \leftarrow M/a$
4:   $P \leftarrow I$
5:   for $j = 0,\ldots,J-1$ do
6:     $T \leftarrow \frac{1}{2}(3I-PZ)$
7:     $Z \leftarrow \operatorname{sym}[ZT]$
8:     $P \leftarrow \operatorname{sym}[TP]$
9:   return $(\sqrt{a}\,Z;P/\sqrt{a})$ ▷ Approximations to $M^{\frac{1}{2}},M^{-\frac{1}{2}}$
10: function NEWTONSCHULZINVERSE($M$, $J$)
11:   $E \leftarrow I/\lVert M\rVert_F$
12:   for $j = 0,\ldots,J-1$ do
13:     $E \leftarrow \operatorname{sym}[E(2I-ME)]$
14:   return $E$ ▷ Approximation to $M^{-1}$

Thus, the required factorizations arise from

UL=FLFLT,FL=λnYtTRt12.(45)U_L = F_LF_L^{\mathsf T}, \qquad F_L = \sqrt{\frac{\lambda}{n}}Y_t^{\mathsf T}R_t^{\frac{1}{2}}. \tag*{(45)}
UR=FRFRT,FR=λmYtLt+112.(46)U_R = F_RF_R^{\mathsf T}, \qquad F_R = \sqrt{\frac{\lambda}{m}}Y_tL_{t+1}^{\frac{1}{2}}. \tag*{(46)}

The remaining coefficients VLV_L and VRV_R can be formed with the corresponding inverse square roots to the square roots used above. For example, for VL=Lt+λnStTRt−1StV_L = L_t + \frac{\lambda}{n}S_t^{\mathsf T}R_t^{-1}S_t, we can form the second term using

StTRt−1St=(Rt−12St)T(Rt−12St).(47)S_t^{\mathsf T}R_t^{-1}S_t = (R_t^{-\frac{1}{2}}S_t)^{\mathsf T}(R_t^{-\frac{1}{2}}S_t). \tag*{(47)}

This construction allows us to reuse both outputs of each coupled Newton–Schulz call: the square root forms FLF_L (or FRF_R), and the corresponding inverse square root forms VLV_L (or VRV_R), avoiding a separate Newton–Schulz call to approximate the inverse Rt−1R_t^{-1}. In Algorithm C.2, we summarize how to form all of the coefficients in this manner.

Newton-Schulz for the square root and inverse

To compute the Gram solution of the quadratic matrix equation, we need an approximation for the matrix square root and the matrix inverse. We approximate the required matrix functions using Newton–Schulz iterations, which construct polynomial approximations through repeated matrix multiplications and additions. We summarize these routines in Algorithm C.1 as NEWTONSCHULZROOTPAIR and NEWTONSCHULZINVERSE, respectively.

For square roots, we use the coupled Newton–Schulz iteration, which simultaneously approximates a matrix square root and its inverse using matrix multiplications [18, 19]. For an input matrix M∈S++nM \in\mathbb{S}_{++}^{n}, let ∥M∥F\lVert M\rVert_F denote its Frobenius norm. First, we rescale the matrix ∥M∥F\lVert M\rVert_F, placing the eigenvalues between 0 and 1:

a=∥M∥F,(48)a = \lVert M\rVert_F, \tag*{(48)}
Z0=M/a,(49)Z_0 = M/a, \tag*{(49)}
P0=I.(50)P_0 = I. \tag*{(50)}

In the Newton–Schulz procedure, we then iterate j=0,…,J−1j = 0,\ldots,J-1 times through

Tj=12(3I−PjZj)(51)T_j = \frac{1}{2}(3I-P_jZ_j) \tag*{(51)}
Zj+1=sym⁡[ZjTj](52)Z_{j+1} = \operatorname{sym}[Z_jT_j] \tag*{(52)}
Pj+1=sym⁡[TjPj],(53)P_{j+1} = \operatorname{sym}[T_jP_j], \tag*{(53)}

Algorithm C.2 Kronecker updates using the Gram solution

  1. function SOLVEGRAM(FF, VV, JrootJ_{\mathrm{root}}, JinvJ_{\mathrm{inv}}) ▹\triangleright Approximately solve QFFTQ+Q=VQF F^{\mathsf{T}}Q + Q = V

  2. C←FTVF+14IC \leftarrow F^{\mathsf{T}} V F + \frac{1}{4}I

  3. (B, ⋅)←(B,\,\cdot) \leftarrow NEWTONSCHULZROOTPAIR(CC, JrootJ_{\mathrm{root}})

  4. W←W \leftarrow NEWTONSCHULZINVERSE(12I+B,Jinv)(\frac{1}{2}I+B, J_{\mathrm{inv}})

  5. E←VFWE \leftarrow VFW

  6. return sym⁡[V−EET]\operatorname{sym}[V-EE^{\mathsf{T}}]

  1. function KRONECKERUPDATE(LL, RR, SS, YY, λ\lambda, JrootJ_{\mathrm{root}}, JinvJ_{\mathrm{inv}}) ▹\triangleright Update LL, holding RR fixed

  2. (CR,DR)←(C_R,D_R) \leftarrow NEWTONSCHULZROOTPAIR(RR, JrootJ_{\mathrm{root}})

  3. FL←λnYTCRF_L \leftarrow\sqrt{\frac{\lambda}{n}}Y^{\mathsf{T}}C_R ▹\triangleright Form factored coefficient UL=FLFLTU_L=F_LF_L^{\mathsf{T}}

  4. ZR←DRSZ_R \leftarrow D_RS

  5. VL←L+λnZRTZRV_L \leftarrow L+\frac{\lambda}{n}Z_R^{\mathsf{T}}Z_R ▹\triangleright Form coefficient VLV_L

  6. L+←L^+ \leftarrow SOLVEGRAM(FL,VL,Jroot,JinvF_L,V_L,J_{\mathrm{root}},J_{\mathrm{inv}}) ▹\triangleright Update RR, holding L+L^+ fixed

  7. (CL,DL)←(C_L,D_L) \leftarrow NEWTONSCHULZROOTPAIR(L+L^+, JrootJ_{\mathrm{root}})

  8. FR←λmYCLF_R \leftarrow\sqrt{\frac{\lambda}{m}}YC_L ▹\triangleright Form factored coefficient UR=FRFRTU_R=F_RF_R^{\mathsf{T}}

  9. ZL←SDLZ_L \leftarrow SD_L

  10. αL←1mtr⁡(DLLDL)\alpha_L \leftarrow\frac{1}{m}\operatorname{tr}(D_LLD_L) ▹\triangleright Depends on original factor LL

  11. VR←αLR+λmZLZLTV_R \leftarrow\alpha_LR+\frac{\lambda}{m}Z_LZ_L^{\mathsf{T}} ▹\triangleright Form coefficient VRV_R

  12. R+←R^+ \leftarrow SOLVEGRAM(FR,VR,Jroot,JinvF_R,V_R,J_{\mathrm{root}},J_{\mathrm{inv}})

return (L+,R+)(L^+,R^+)

where we define the matrix symmetrization operation

sym⁡[A]=(A+AT)/2.(54)\operatorname{sym}[A]=(A+A^{\mathsf{T}})/2. \tag*{(54)}

The iterates ZjZ_j and PjP_j approximate the square root and inverse square root, respectively, of the scaled input. The correction Tj=12(3I−PjZj)T_j=\frac{1}{2}(3I-P_jZ_j) is a first-degree polynomial in PjZjP_jZ_j.

After JJ iterations, rescaling by a\sqrt{a} gives the desired approximations with respect to the original input matrix are given by

M12≈a ZJ(55)M^{\frac{1}{2}}\approx\sqrt{a}\,Z_J \tag*{(55)}
M−12≈PJ/a.(56)M^{-\frac{1}{2}}\approx P_J/\sqrt{a}. \tag*{(56)}

To approximate the inverse of the matrix, we apply a separate Newton-Schulz iteration [19] (Schulz 1933). For a positive definite matrix M∈S++dM\in\mathbb{S}_{++}^{d}, we initialize and then iterate j=0,…,J−1j=0,\ldots,J-1 times

E0=I/∥M∥F(57)E_0=I/\lVert M\rVert_F \tag*{(57)}
Ej+1=sym⁡[Ej(2I−MEj)].(58)E_{j+1}=\operatorname{sym}[E_j(2I-ME_j)]. \tag*{(58)}

This update builds a polynomial approximation to M−1M^{-1}. After JJ iterations, we return the approximation EJ≈M−1E_J\approx M^{-1}.

Computing the Kronecker updates via Newton-Schulz

We now combine the Newton-Schulz routines to evaluate the Gram update in Eq. B.22. Given FF and VV, we form C=FTVF+14IC=F^{\mathsf{T}}VF+\frac{1}{4}I and apply NEWTONSCHULZROOTPAIR to obtain an approximation B^≈C12\widehat{B}\approx C^{\frac{1}{2}}. We then apply NEWTONSCHULZINVERSE to obtain W^≈(12I+B^)−1\widehat{W}\approx(\frac{1}{2}I+\widehat{B})^{-1}. The resulting Newton-Schulz approximation to the Gram solution (B.22) of the quadratic matrix equation is then given by

Q^=V−(VFW^)(VFW^)T.(59)\widehat{Q}=V-(VF\widehat{W})(VF\widehat{W})^{\mathsf{T}}. \tag*{(59)}
MetricStateApplyRefresh
DenseO(n2m2)\mathcal{O}(n^{2}m^{2})O(n2m2)\mathcal{O}(n^{2}m^{2})O(n2m2)\mathcal{O}(n^{2}m^{2})
DiagO(nm)\mathcal{O}(nm)O(nm)\mathcal{O}(nm)O(nm)\mathcal{O}(nm)
Kron, n×mn \times mO(n2+m2)\mathcal{O}(n^{2}+m^{2})O(n2m+nm2)\mathcal{O}(n^{2}m+nm^{2})O(n3+m3+n2m+nm2)\mathcal{O}(n^{3}+m^{3}+n^{2}m+nm^{2})

Table D.1. SOFTSERVE method costs for updating the parameters of a n×mn \times m linear layer.

The resulting update only requires these two Newton-Schulz routines and matrix multiplications. Algorithm C.2 presents the pseudocode for this Gram update and its application within the alternating Kronecker update for the factors LL and RR. In our implementation, we use 18 iterations for the square root routines, and 10 for the inverse routine.

In the application of these procedures to the quadratic matrix equation solution, our implementation symmetrizes every output and, for every solve, records the normalized residual

ρQ=∥QUQ+Q−V∥F/∥V∥F,\rho_Q = \lVert Q U Q + Q - V \rVert_F / \lVert V \rVert_F,

so we can verify how close we are to the exact solution to the quadratic matrix equation.

Optimizer Details

Training with SoftServe

We provide more of the details of how our SOFTSERVE methods are implemented. In particular, this section will explain the detailed pseudo code of SOFTSERVE-Kron and SOFTSERVE-Diag is in Algorithm D.1 and Algorithm D.2, respectively.

SOFTSERVE-Kron is a method for updating matrix parameters, where we will use X∈Rn×mX \in\mathbb{R}^{n \times m} to denote the matrix parameters of a given layer. Whereas SOFTSERVE-Diag is applicable to parameters of any shape, and thus in Algorithm D.2, we represent the given parameters as a vector x∈Rdx \in\mathbb{R}^{d}. If this corresponds to a linear layer, then d=nmd = nm, where n×mn \times m are the dimensions of the linear layer.

To make SOFTSERVE practical, we will make use of some now-standard practices in deep learning, including the use of momentum, updating the approximate Hessian every so often to amortize costs, and taking care to properly scale the update directions. We address each of these considerations in turn.

To estimate the gradient for the quasi-Newton step, we will use momentum estimate which in matrix form is updated according to lines (6–7) in Algorithm D.1, and in vector form is updated according to lines (6–7) in Algorithm D.2. We also incorporate an additional Nesterov extrapolation or the debiasing trick Kingma & Ba [24] to form the final momentum estimate.

Restricting the Hessian approximation to a diagonal or Kronecker factor greatly reduces the costs as compared to the dense Soft QN method. For instance, for a n×mn \times m linear layer, the state, application, and refresh costs of SOFTSERVE are given in Table D.1. In particular, the cost for applying and refreshing the Kronecker-factored update in SOFTSERVE-Kron is still cubic in the dimensions of the layer. To amortize this cost, we will update our estimate of the inverse Hessian only once every K∈NK \in\mathbb{N} iterations. That is, once every KK iterations we take a snapshot of the current iterate, gradient, and sample in line 5 in Algorithm D.1. We then use this snap shot to form our difference of iterates SS and gradients YY on lines 10 and 11. The analogous snapshot for and its application for SOFTSERVE-Diag are on lines 5, 10 and 11 in Algorithm D.2.

The differences of iterates and gradients are then used to update the factorized and diagonal Hessian estimates on line 12 of Algorithm D.1 and line 12 of Algorithm D.2, respectively. To be more efficient (or pythonic) we have written the update of the diagonal estimate ht+1h_{t+1} on line 12 in Algorithm D.2 as a vector operation as opposed to an element-wise operation as introduced in Eq. (6).

Our final modification to make SOFTSERVE practical for deep learning is to normalize the update. We will explain this modification for a vector parameter x∈Rdx \in\mathbb{R}^{d}. The same modification for matrix parameters follows by vectorizing, and then re-stacking as a matrix. Traditionally quasi-Newton methods are applied according to

xt+1=xt−γtHtm^t.(60)x_{t+1} = x_t - \gamma_t H_t \widehat{m}_t. \tag*{(60)}

Algorithm D.1 SOFTSERVE-Kron: detailed implementation

Require: Step size γt\gamma_t; Number of iterations T∈NT \in\mathbb{N}, Refresh rate K∈[T]K \in[T], Penalty λ\lambda; momentum parameters β∈(0,1)\beta\in(0,1), Nesterov ∈{True,False}\in\{\mathit{True},\mathit{False}\}

1: Initialize X0∈Rn×mX_0 \in\mathbb{R}^{n \times m}, M−1=0M_{-1}=0, L0=ImL_0=I_m and R0=InR_0=I_n.

2: for t=0,…,T−1t=0,\ldots,T-1 do

3: Draw ξt\xi_t and evaluate Gt←∇fξt(Xt)G_t \gets\nabla f_{\xi_t}(X_t)

4: if t mod K=0t \bmod K=0 then

5: ξˉ←ξt\bar{\xi} \gets\xi_t, Xˉ←Xt\bar{X} \gets X_t, Gˉ←Gt\bar{G} \gets G_t ▷ Take snapshot

6: Mt=βMt−1+(1−β)GtM_t=\beta M_{t-1}+(1-\beta)G_t ▷ Update Momentum buffer

7:

M^t={(1−β)Gt+βMtif Nesterov=TrueMt/(1−βt+1)if Nesterov=False\hat{M}_t = \begin{cases} (1-\beta)G_t+\beta M_t & \text{if Nesterov}=\mathit{True}\\ M_t/(1-\beta^{t+1}) & \text{if Nesterov}=\mathit{False} \end{cases}

▷ Use bias correction or Nesterov

8: Xt+1=Xt−γtRtM^tLttr⁡(M^tTRtM^tLt)X_{t+1}=X_t-\gamma_t\frac{R_t\hat{M}_tL_t}{\sqrt{\operatorname{tr}(\hat{M}_t^{\mathsf{T}}R_t\hat{M}_tL_t)}} ▷ Update parameters

9: if (t+1) mod K=0(t+1)\bmod K=0 and t+1<Tt+1<T then ▷ Update Hessian estimate

10: S←Xt+1−XˉS \gets X_{t+1}-\bar{X}

11: Y←∇fξˉ(Xt+1)−GˉY \gets\nabla f_{\bar{\xi}}(X_{t+1})-\bar{G}

12: Update Kronecker factors by Gram Newton-Schulz (Algorithm C.2) to solve

Update Lt+1L_{t+1} by solving LULL+L=VLLU_L L+L=V_L

Update Rt+1R_{t+1} by solving RURR+R=VRRU_R R+R=V_R,

where UL,VLU_L,V_L are given in Eq. (9), and UR,VRU_R,V_R are given in Eq. (12).

13: Rebalance the Kronecker factors

(Lt+1,Rt+1)=(Lt+1/c,cRt+1)where c=tr⁡(Lt+1)/mtr⁡(Rt+1)/n.(61)(L_{t+1},R_{t+1})=(L_{t+1}/c,cR_{t+1}) \qquad\text{where } c=\sqrt{\frac{\operatorname{tr}(L_{t+1})/m}{\operatorname{tr}(R_{t+1})/n}}. \tag*{(61)}

14: return XTX_T

This update Eq. D.2 corresponds to the regularized descent method:

xt+1=arg⁡min⁡x∈Rd m^tT(x−xt)+12γt∥x−xt∥Ht−12x_{t+1}=\underset{x\in\mathbb{R}^{d}}{\arg\min}\ \hat{m}_t^{\mathsf{T}}(x-x_t)+\frac{1}{2\gamma_t}\lVert x-x_t\rVert_{H_t^{-1}}^2

But now there is a growing body of evidence that the constrained descent method (Jordan et al., [23]; Pethick et al., [36]; Crawshaw et al., [9]) given by

xt+1=arg⁡min⁡x∈Rd m^tT(x−xt)subject to∥x−xt∥Ht−1≤γt=xt−γtHtm^tm^tTHtm^t(62)\begin{aligned} x_{t+1}=\underset{x\in\mathbb{R}^{d}}{\arg\min}\ \hat{m}_t^{\mathsf{T}}(x-x_t)\quad\text{subject to}\quad\lVert x-x_t\rVert_{H_t^{-1}}\leq\gamma_t \\ &= x_t-\gamma_t\frac{H_t\hat{m}_t}{\sqrt{\hat{m}_t^{\mathsf{T}}H_t\hat{m}_t}} \tag*{(62)} \end{aligned}

generally works better for deep learning. Our initial experiments also confirmed that the constrained descent Eq. D.3 resulting in better methods and thus we used Eq. D.3 throughout our experiments to update the parameters; see line 8 of Algorithm D.1 and line 8 of Algorithm D.2.

In these updates, note that the product Htm^tH_t\hat{m}_t in Eq. D.3 is given by

Htm^t={vec⁡(RtM^tLt)in line 8 in xref‘Algorithm D.1‘,ht⊙m^tin line 8 in xref‘Algorithm D.2‘,(63)H_t\hat{m}_t= \begin{cases} \operatorname{vec}(R_t\hat{M}_tL_t) & \text{in line 8 in {xref}`Algorithm D.1`,}\\ h_t\odot\hat{m}_t & \text{in line 8 in {xref}`Algorithm D.2`,} \end{cases} \tag*{(63)}

where the Kronecker case follows from Eq. B.4, and ⊙\odot is the elementwise (Hadamard) product.

Routing and state

The parameter partition is disjoint. A Diag block stores one positive value per coordinate; a Kron block for an n×mn\times m matrix stores L∈S++mL\in\mathbb{S}_{++}^{m} and R∈S++nR\in\mathbb{S}_{++}^{n}. Blocks without a matrix interpretation are routed to Diag, or to a first-order fallback in the neural experiments (Appendix § 13). Kron factors of equal shape are stacked for batched matrix multiplication. The initial states are h0=1h_0=1, the all-ones vector, and (L0,R0)=(Im,In)(L_0,R_0)=(I_m,I_n). The metric is fixed within each interval of KK parameter steps. Each refresh uses one raw interval pair; we do not average pairs or interpolate metric states.

Algorithm D.2 SOFTSERVE-Diag detailed implementation

Require: Step size γt\gamma_t; Number of iterations T∈NT \in\mathbb{N}, Refresh rate K∈[T]K \in[T], Penalty λ\lambda; momentum parameters β∈(0,1)\beta\in(0,1), Nesterov ∈{True,False}\in\{\mathit{True},\mathit{False}\}

  1. Initialize x0∈Rdx_0 \in\mathbb{R}^d, m−1←0m_{-1} \leftarrow0 and h0=(1,…,1)∈Rdh_0 = (1,\ldots,1) \in\mathbb{R}^d.

  2. for t=0,…,T−1t = 0,\ldots,T-1 do

  3. Draw ξt\xi_t and evaluate gt←∇fξt(xt)g_t \leftarrow\nabla f_{\xi_t}(x_t)

  4. if t mod K=0t \bmod K = 0 then

  5. ξˉ←ξt\bar{\xi} \leftarrow\xi_t, xˉ←xt\bar{x} \leftarrow x_t, gˉ←gt\bar{g} \leftarrow g_t ▷ Take snapshot

  6. mt=βmt−1+(1−β)gtm_t = \beta m_{t-1} + (1-\beta)g_t

  7. m^t={(1−β)gt+βmtif Nesterov=Truemt1−βt+1if Nesterov=False\hat{m}_t = \begin{cases} (1-\beta)g_t + \beta m_t & \text{if Nesterov} = \mathit{True} \\ \dfrac{m_t}{1-\beta^{t+1}} & \text{if Nesterov} = \mathit{False} \end{cases}

  8. xt+1=xt−γtht⊙m^tm^tT(ht⊙m^t)x_{t+1} = x_t - \gamma_t \dfrac{h_t \odot\hat{m}_t}{\sqrt{\hat{m}_t^{\mathsf{T}}(h_t \odot\hat{m}_t)}} ▷ Update parameters

  9. if (t+1) mod K=0(t+1) \bmod K = 0 and t+1<Tt+1 < T then ▷ Update Hessian estimate

  10. s←xt+1−xˉs \leftarrow x_{t+1} - \bar{x}

  11. y←∇fξˉ(xt+1)−gˉy \leftarrow\nabla f_{\bar{\xi}}(x_{t+1}) - \bar{g}

  12. ht+1=2(ht+λs⊙s)⊘[1+1+4λ(y⊙y)⊙(ht+λs⊙s)]h_{t+1} = 2(h_t + \lambda s \odot s) \oslash\left[1 + \sqrt{1 + 4\lambda(y \odot y) \odot(h_t + \lambda s \odot s)}\right]

  13. return xTx_T

Replay and gradient accounting

A replay key stores every random choice that affects fξtf_{\xi_t}: the minibatch indices, augmentation, dropout masks, and any other sampled loss input. Replaying the key at both endpoints removes sampling mismatch from yty_t. The replayed gradient is used only for the refresh; it does not update momentum, the learning-rate schedule, or the parameters. For NN parameter steps, Algorithm D.1 evaluates NN ordinary gradients and ⌊(N−1)/K⌋\lfloor(N-1)/K\rfloor replayed ones, and we count both. With decoupled weight decay, the displacement sts_t is the actual parameter displacement, including the decay. A checkpoint taken inside an interval must retain the momentum, the metric state, the interval start, the cached raw gradient, and the replay key.

Experimental Details and Additional Results

Experimental setting

Hardware and arithmetic. We use NVIDIA RTX PRO 6000 Blackwell GPUs for training. Models use FP32, with BF16 autocasting for GPT.

Selection and evaluation. We tune learning rates on seed 0 using logarithmic grids, extending a grid when its minimum lies at the boundary. Final runs use seeds 1–3. Within each task, methods share initialization seeds and data. Test errors are not used for selection. Curves show three-seed means and variability bands; settings with failed seeds are shown as individual traces.

RNN Adding, MNIST, and the small PINNs screen the first-moment coefficient β1\beta_1 for SOFTSERVE, SOFTSERVE-I, Adam, Muon, and SOAP. K-FAC and K-BFGS(L) also receive a momentum search. In these studies, Nesterov on/off is tested for SOFTSERVE and Muon; Adam and SOAP retain the momentum update rules of their implementations while their β1\beta_1 values are tuned. The task descriptions below specify which settings are tuned or fixed.

Optimizer settings. SOFTSERVE uses K=10K=10, and one alternating factor sweep per refresh. Kron uses the Gram QME implementation in Algorithm C.2, with 18 coupled root iterations and 10 inverse iterations; Diag uses the closed-form elementwise update.

Gradient accounting and plots. Gradient budgets count training gradients, secant replays, line-search evaluations, and loss-balancing gradients. In stochastic training, replay adds approximately 10% to SOFTSERVE-Kron's count at K=10K=10, so it takes fewer parameter updates within the same budget.

RNN Adding

Task and data. Each length-TT input has T=100T = 100 pairs zτ=(aτ,mτ)z_\tau= (a_\tau, m_\tau), where aτ∼Uniform⁡[0,1]a_\tau\sim\operatorname{Uniform}[0,1]. Exactly two markers mτm_\tau equal one, one in each half of the sequence. The target is the sum of the marked numbers. Every update draws 128 new sequences; validation and test sets each contain 8,192 fixed sequences per seed.

Model and objective. The network uses hτ=tanh⁡(Whhτ−1+Wzzτ+b)h_\tau= \tanh(W_h h_{\tau-1} + W_z z_\tau+ b), hidden width 16, h0=0h_0 = 0, and a scalar affine readout, for 321 parameters. The target and batch loss are

y=∑τ=1Tmτaτ,L(θ)=1B∑i=1B(y^θ(z(i))−y(i))2.(64)y = \sum_{\tau=1}^{T} m_\tau a_\tau,\qquad\mathcal{L}(\theta) = \frac{1}{B}\sum_{i=1}^{B}\left(\hat{y}_\theta(z^{(i)}) - y^{(i)}\right)^2. \tag*{(64)}

Here BB is the batch size and y^θ\hat{y}_\theta is the prediction.

Training and tuning. The budget is 40,000 gradient evaluations. An 8,000-gradient pilot screens hyperparameters, followed by full-budget learning-rate sweeps selected by validation MSE (Figure E.1). The selected values are λ=999\lambda= 999 for SoftServe-Kron and λ=1\lambda= 1 for SoftServe-Diag.

Evaluation. We report minibatch training MSE and fixed-set validation and test MSE. Figure E.2 shows training and validation MSE against parameter updates and wall-clock time. K-BFGS(L)’s two failed seeds are shown individually.

Local conditioning. We compute the full 321×321321 \times321 loss Hessian at initialization on a fixed batch of 128 sequences for each of seeds 0–3, using FP64 differentiation. All four Hessians are indefinite. Each has one to six singular values below 321ε64σmax⁡321\varepsilon_{64}\sigma_{\max}, where ε64=2−52\varepsilon_{64} = 2^{-52} and σmax⁡\sigma_{\max} is the largest singular value. Thus, these sampled losses are numerically nearly singular at initialization; a finite condition number cannot be resolved reliably (Figure E.3).

Figure E.1. RNN Adding learning-rate sweeps on seed 0. Stars mark selected rates; crosses mark numerical failures.

Figure E.2. RNN Adding training minibatch MSE and held-out validation MSE against parameter updates and wall-clock time. Failed cohorts retain their individual traces.

Figure E.3. RNN Adding loss-Hessian singular values at initialization, normalized by the largest value. The dashed line marks the numerical-rank threshold 321ε64321\varepsilon_{64}. All four seeds have singular values below this threshold.

MNIST autoencoder

Task and data. We use MNIST, comprising 28×2828 \times28 grayscale images of handwritten digits, with 60,000 training and 10,000 test examples and pixel values in [0,1][0, 1]. The task is to compress each image into a low-dimensional representation and reconstruct the original input, without using digit labels. This autoencoder task is a standard benchmark for second-order optimization (Goldfarb et al. [15]).

Model and objective. We use a 2.8M-parameter fully connected autoencoder with a symmetric encoder–decoder architecture and a 30-dimensional linear bottleneck. The remaining hidden layers use ReLU, and the output uses sigmoid. Following Goldfarb et al. [15], the batch objective is

L(θ)=−1B∑i=1B∑j=1784[xijlog⁡x^ij+(1−xij)log⁡(1−x^ij)]+10−52∥θ∥22,(65)\mathcal{L}(\theta) = -\frac{1}{B}\sum_{i=1}^{B}\sum_{j=1}^{784}\left[x_{ij}\log\hat{x}_{ij} + (1-x_{ij})\log(1-\hat{x}_{ij})\right] + \frac{10^{-5}}{2}\lVert\theta\rVert_{2}^{2}, \tag*{(65)}

where BB is the batch size, xx is the input image, and x^\hat{x} is its reconstruction.

Training and tuning. Full-batch training uses 4,000 gradient evaluations; minibatch training uses batches of 1,000 images and 6,000 evaluations. SoftServe-Kron, SoftServe-I, Muon, and SOAP use Adam on biases, while SoftServe-Diag acts on all parameters. Full-batch L-BFGS uses a strong-Wolfe line search.

A quarter-budget pilot screens hyperparameters, followed by full-budget learning-rate sweeps selected by the mean of the final five training objectives (Figure E.4). We select λ=999\lambda= 999 for SoftServe-Kron and λ=9\lambda= 9 for SoftServe-Diag.

Evaluation. Figure E.5 reports test reconstruction BCE, excluding the training regularizer. Figure E.6 shows the regularized training objective against parameter updates and wall-clock time. Failed runs are shown individually rather than included in three-seed means.

Figure E.4. Autoencoder full-budget LR sweeps at selected momentum and fixed λ\lambda. Stars mark selected rates. Crosses mark failed or off-scale runs.

Figure E.5. Autoencoder test reconstruction BCE. Dots are individual seeds; ticks are three-seed means. Full-batch K-BFGS(L) has one failed seed and therefore no three-seed mean.

Figure E.6. Autoencoder training objective against parameter updates and wall-clock time. Shading spans the three seed values.

Small physics-informed neural networks

Task and data. We consider three one-dimensional problems from Rathore et al. [39]. The scalar function u(x,t)u(x,t) denotes the solution at spatial coordinate xx and time tt. All problems use t∈[0,1]t \in[0,1].

Convection. On the spatial domain [0,2π][0,2\pi], we solve

∂u∂t+40∂u∂x=0,\frac{\partial u}{\partial t}+40\frac{\partial u}{\partial x}=0,
u(x,0)=sin⁡x,u(x,0)=\sin x,
u(0,t)=u(2π,t).u(0,t)=u(2\pi,t).

The analytical solution is

u∗(x,t)=sin⁡(x−40t).u^*(x,t)=\sin(x-40t).

Reaction. On the spatial domain [0,2π][0,2\pi], we solve

∂u∂t−5u(1−u)=0,\frac{\partial u}{\partial t}-5u(1-u)=0,
u(x,0)=h(x),u(x,0)=h(x),
u(0,t)=u(2π,t),u(0,t)=u(2\pi,t),

where h(x)=exp⁡[−(x−π)2/(2(π/4)2)]h(x)=\exp[-(x-\pi)^2/(2(\pi/4)^2)]. The analytical solution is

u∗(x,t)=h(x)e5th(x)e5t+1−h(x).u^*(x,t)=\frac{h(x)e^{5t}}{h(x)e^{5t}+1-h(x)}.

Wave. On the spatial domain [0,1][0,1], we solve

∂2u∂t2−4∂2u∂x2=0,\frac{\partial^2u}{\partial t^2}-4\frac{\partial^2u}{\partial x^2}=0,
u(x,0)=sin⁡(πx)+12sin⁡(5πx),u(x,0)=\sin(\pi x)+\frac{1}{2}\sin(5\pi x),
∂u∂t(x,0)=0,\frac{\partial u}{\partial t}(x,0)=0,
u(0,t)=u(1,t)=0.u(0,t)=u(1,t)=0.

The analytical solution is

u∗(x,t)=sin⁡(πx)cos⁡(2πt)+12sin⁡(5πx)cos⁡(10πt).u^*(x,t)=\sin(\pi x)\cos(2\pi t)+\frac{1}{2}\sin(5\pi x)\cos(10\pi t).

The analytical solutions are used to evaluate solution errors, not as interior training targets.

Model and objective. We use a fully connected network with three width-200 tanh hidden layers and 81,201 parameters to predict uθ(x,t)u_\theta(x,t). The training objective is

L(θ)=LPDE+LIC+LBC.\mathcal{L}(\theta)=\mathcal{L}_{\mathrm{PDE}}+\mathcal{L}_{\mathrm{IC}}+\mathcal{L}_{\mathrm{BC}}.

The PDE term is the mean squared equation residual. The initial- and boundary-condition terms sum the MSEs for the prescribed conditions. For Wave, these include both initial displacement and velocity, and the values at both spatial boundaries.

Training and tuning. We use 200,000 gradient evaluations and cosine learning-rate decay to one tenth of the initial rate. In the deterministic setting, the 10,000 interior collocation points remain fixed throughout training. In the stochastic setting, they are resampled at every update. Both gradients of each secant pair are evaluated on the same points.

Following hyperparameter screening, we select learning rates by the mean of the final five training losses (Figure E.7). SOFTSERVE-Kron uses β1=0.995\beta_1=0.995. For Wave, Convection, and Reaction, respectively, its selected λ\lambda values are (99, 9999, 999) in the deterministic setting and 99 for all three in the stochastic setting. In the same problem order, SOFTSERVE-Diag uses (9, 1, 1) for deterministic training and (9, 1, 9) for stochastic training.

SOFTSERVE-Kron, SOFTSERVE-I, Muon, and SOAP update the two 200×200200 \times200 hidden weight matrices, with Adam on the remaining parameters. Deterministic experiments also include L-BFGS and Adam followed by L-BFGS, using strong-Wolfe line searches.

Evaluation. We measure relative solution error,

∥uθ−u∗∥2∥u∗∥2,\frac{\lVert u_\theta-u^*\rVert_2}{\lVert u^*\rVert_2},

with both solutions evaluated on a 129 × 101 space–time grid. Figure E.8 reports FP32 solution errors. Figures E.11 and E.12 show training losses against parameter updates and wall-clock time.

Since numerical precision can affect PINN convergence ([50]), we repeat the experiments in FP64 using the FP32-selected configurations without retuning. Figures E.9 and E.10 report the corresponding training losses and solution errors. Failed runs are shown individually. When an L-BFGS line search returns zero displacement, we extend its final value horizontally to indicate that the iterate remains unchanged.

Figure E.7. Small PINN learning-rate sweeps on seed 0, scored by the mean of the final five training losses. Stars mark selected rates, crosses numerical failures, and triangles off-scale finite scores.

FP32 PINN relative solution error plots for Wave, Convection, and Reaction

Figure E.8. FP32 PINN relative solution error. Columns: Wave, Convection, Reaction. Rows: fixed and resampled collocation points. The horizontal continuation of a terminated L-BFGS run represents its unchanged solution.

Figure E.9. FP64 PINN training objectives with the FP32-selected settings. The gradient budget includes replay and line-search evaluations.

Figure E.10. FP64 PINN solution errors with the FP32-selected settings. Settings with failed seeds are shown as individual traces.

Figure E.11. FP32 PINN training objectives against parameter updates.

Figure E.12. FP32 PINN training objectives against wall-clock time. K-FAC and K-BFGS(L) are omitted here because their timers also include construction time.

PirateNet

Task and data. We solve the Allen–Cahn and Korteweg–de Vries (KdV) equations on (x,t)∈[−1,1]×[0,1](x,t) \in[-1,1] \times[0,1], where u(x,t)u(x,t) is the scalar solution.

Allen–Cahn.

∂u∂t−10−4∂2u∂x2+5u3−5u=0,\frac{\partial u}{\partial t} - 10^{-4}\frac{\partial^2 u}{\partial x^2} + 5u^3 - 5u = 0,
u(x,0)=x2cos⁡(πx).u(x,0) = x^2\cos(\pi x).

KdV.

∂u∂t+u∂u∂x+0.022∂3u∂x3=0,\frac{\partial u}{\partial t} + u\frac{\partial u}{\partial x} + 0.022\frac{\partial^3 u}{\partial x^3} = 0,
u(x,0)=cos⁡(πx).u(x,0) = \cos(\pi x).

Both problems use periodic spatial boundaries. Reference solutions for evaluation are taken from the jaxpi repository.3

Model and objective. We use PirateNet {(citep}(Wang et al., 2024)}, a residual PINN with three width-256 blocks, tanh activations, and approximately 0.73M parameters. The network uses periodic spatial features, and its final layer is initialized by least squares against the initial condition.

Following Wang et al. [47], training minimizes a weighted combination of PDE residual and initial-condition MSEs. Causal weighting prioritizes earlier times, while gradient-norm balancing adjusts the relative weights of the loss terms. These weights are treated as constants during differentiation and held fixed between the two secant evaluations.

Training and tuning. Each update samples 32,768 uniform collocation points. We compare methods at 300,600 gradient evaluations for Allen–Cahn and 100,200 for KdV, counting both secant replay and loss-balancing gradients. Learning rates use a 5,000-update warmup followed by exponential decay. Matrix methods use β1=0.995\beta_1 = 0.995 and Adam on the remaining parameters. Momentum settings are fixed during tuning.

Learning-rate sweeps run for 300,000 updates on Allen–Cahn and 100,000 on KdV, with selection based on unweighted validation loss (Figure E.13). The selected λ\lambda values for SᴏғᴛSᴇʀᴠᴇ-Kron are λ=9999\lambda= 9999 for Allen–Cahn and λ=999\lambda= 999 for KdV.

Evaluation. Although all optimizers use the same weighting rules, their training weights evolve differently. We therefore compare the unweighted sum of PDE and initial-condition MSEs on common fixed points. Figure E.14 shows this loss against parameter updates and wall-clock time.

Figure E.15 reports relative L2L^2 solution errors on the reference grid. Solution errors are not used for learning-rate selection. All curves stop at the same gradient budgets as the main figures, so SᴏғᴛSᴇʀᴠᴇ-Kron takes fewer parameter updates because of replay.

PirateNet full-budget learning-rate sweeps for Allen–Cahn and KdV, showing unweighted validation loss versus peak learning rate for Adam, Muon, SOAP, and SoftServe-Kron

Figure E.13. PirateNet full-budget learning-rate sweeps, scored by unweighted validation loss. Stars mark selected rates; crosses mark failures.

PirateNet unweighted PDE and initial-condition MSE for Allen–Cahn and KdV against parameter updates and wall-clock time

Figure E.14. PirateNet unweighted PDE and initial-condition MSE against updates and wall-clock time. All curves stop at 300,600 gradient evaluations for Allen–Cahn and 100,200 for KdV; Kron therefore uses fewer parameter updates.

PirateNet relative $L^2$ error for Allen–Cahn and KdV over gradient evaluations

Figure E.15. PirateNet relative L2L^2 error over the reference space–time grid, up to the same gradient budgets as the training-loss plots. This metric is not used to select the learning rate.

Physics-informed diffusion

Task and data. We consider structural design using the mechanics dataset of Bastek et al. [2], which contains 30,000 optimized structures. Given supports, applied loads, and a material budget, the model generates a material-density field and two displacement fields. We retain the released 65×6565 \times65 field representation and 64×6464 \times64 finite-element grid.

Model and objective. We use the released 136M-parameter U-Net, consisting of residual convolution blocks and attention layers. It predicts the two displacement fields and the material density, with a sigmoid output for density.

Let z0z_0 contain the target fields and cc the design conditions. At diffusion timestep tt, we construct a noisy input

zt=αˉtz0+1−αˉtϵ,ϵ∼N(0,I),z_t = \sqrt{\bar{\alpha}_t}z_0 + \sqrt{1-\bar{\alpha}_t}\epsilon,\qquad\epsilon\sim\mathcal{N}(0,I),

where αˉt\bar{\alpha}_t is the cumulative signal-retention factor. The network predicts the clean fields as z^0=fθ(zt,t,c)\widehat{z}_0 = f_\theta(z_t,t,c). The training objective combines reconstruction and physics-based terms:

L(θ)=E[wt MSE⁡(z^0,z0)+ℓt(req)+10 ℓt(rvol)+10−4C].(66)\mathcal{L}(\theta) = \mathbb{E}\left[w_t\,\operatorname{MSE}(\widehat{z}_0,z_0) + \ell_t(r_{\mathrm{eq}}) + 10\,\ell_t(r_{\mathrm{vol}}) + 10^{-4}C\right]. \tag*{(66)}

The expectation is over training examples, diffusion timesteps, and noise. The equilibrium residual is

req=K(ρ^)u^−f,r_{\mathrm{eq}} = K(\widehat{\rho})\widehat{u} - f,

after applying boundary conditions, where K(ρ^)K(\widehat{\rho}) is the stiffness matrix determined by the predicted density, u^\widehat{u} is the predicted displacement, and ff is the applied load. The volume residual rvolr_{\mathrm{vol}} measures deviation from the material budget. Compliance CC measures structural flexibility under the load. We retain the released denoising weights wtw_t and Gaussian residual penalties ℓt\ell_t, including their diffusion-dependent variances, for all optimizers.

Training and tuning. We use batches of 16, 100 diffusion timesteps, constant learning rates, gradient clipping at 1, and no weight decay. An exponential moving average (EMA) of the parameters uses decay 0.99 after the first 1,000 updates.

Only learning rates are tuned. Each method initially tests five rates for 10,000 updates, extending the grid when needed. Selection uses the EMA validation objective on 128 fixed examples with fixed noise (Figure E.16). Final runs use a budget of 100,000 gradient evaluations.

Momentum and λ\lambda remain fixed. Muon uses β1=0.95\beta_1 = 0.95 with Nesterov; Adam, SOAP, and SOFTSERVE-Kron use β1=0.9\beta_1 = 0.9. Adam and SOAP use β2=0.999\beta_2 = 0.999. SOFTSERVE-Kron uses λ=9\lambda= 9 without Nesterov. Matrix methods use the same convolution-kernel partitions, with blocks of at most 256×256256 \times256, and Adam at learning rate 10−410^{-4} on the remaining parameters.

Evaluation. We evaluate the training objective on 32 fixed examples with fixed noise using the current, unaveraged parameters. Validation uses the EMA parameters on 128 separate fixed examples. Figure E.17 shows both objectives against gradient evaluations, parameter updates, and wall-clock time. All curves stop at 100,000 gradient evaluations. Including secant replay, this permits approximately 90,900 parameter updates for SOFTSERVE-Kron and 100,000 for the baselines.

Figure E.16. PIDM LR selection after 10,000 updates. The score is the EMA validation objective. Stars mark selected rates; crosses mark numerical failures.

Six-panel PIDM training and validation objective plots against gradient evaluations, parameter updates, and wall-clock time for Adam, Muon, SOAP, and SoftServe-Kron

Figure E.17. PIDM training objective (unaveraged parameters) and validation objective (EMA parameters) against gradient evaluations, updates, and wall-clock time. Every curve stops at 100,000 gradient evaluations, corresponding to approximately 90,900 parameter updates for Kron and 100,000 for the baselines.

Language model

Task and data. We train a language model on 200M tokens from FineWeb ([35]). The task is to predict each token from its preceding context.

Model and objective. We use a 16.17M-parameter GPT-style model ([38]) with four layers, four attention heads, hidden width 256, and context length 512. We minimize next-token cross-entropy, reported as negative log-likelihood (NLL) per token.

Training and tuning. Each update uses 64 sequences, giving 32,768 tokens per full update. The 200M-token budget requires 6,104 updates, with a smaller final batch. Kron additionally uses 610 same-batch gradient replays. The learning rate warms up over the first 2% of training, remains constant, then decays by cosine to one tenth of its peak over the final 10%. We use no dropout, weight decay, or gradient clipping.

We tune learning rates on seed 0 using five-point sweeps at the full 200M-token budget, selecting by validation NLL. We first tune AdamW, then use its selected peak learning rate of 0.003 for the AdamW updates outside the matrix methods. Muon, SOAP, and Kron update the same attention and MLP weight matrices, with AdamW on the remaining parameters. The selected peak learning rates are 0.003 for Muon and SOAP, and 0.01 for Kron.

Kron uses λ=99\lambda= 99, β1=0.99\beta_1 = 0.99, K=10K = 10, and no Nesterov. Muon uses β1=0.9\beta_1 = 0.9 with Nesterov. SOAP uses betas (0.95, 0.95) and refreshes its preconditioner every 10 updates. AdamW uses betas (0.9, 0.95), both as a baseline and for the remaining parameters of the matrix methods. Momentum, Nesterov, and λ\lambda are fixed throughout tuning.

Evaluation. We evaluate the selected configurations on fresh seeds 1–3 and report their mean NLL. Final training NLL uses one million training tokens; learning-rate selection and final validation NLL use five million held-out tokens.

Ablation studies

We study the secant penalty λ\lambda, the accuracy of the Gram QME solver, and the refresh interval KK for SOFTSERVE-Kron. Training studies use RNN Adding and minibatch MNIST, with budgets of 40,000 and 6,000 gradient evaluations, respectively, including secant replay. For each setting, we select the learning rate on seed 0 and evaluate on fresh seeds 1–3. RNN selection uses validation MSE; MNIST selection uses the mean of the last five training objectives. Test errors are not used for selection. Matching completed runs are reused.

Unless varied, λ=999\lambda= 999, K=10K = 10, and the solver uses 18 coupled root iterations and 10 inverse iterations. RNN uses β1=0.99\beta_1 = 0.99 and MNIST uses β1=0.95\beta_1 = 0.95, both with Nesterov momentum. Lines and points show arithmetic means; bands and error bars span the minimum and maximum over the three seeds.

Sensitivity to the secant penalty

We vary λ\lambda from 0.01 to 9999 on RNN Adding, retuning the learning rate for each value. Figure F.1 shows lower mean validation error as λ\lambda increases from 0.01 to 999. Values from 0.1 to 999 outperform the tuned Muon baseline in this experiment. Increasing λ\lambda further to 9999 causes numerical failure on all three evaluation seeds. Thus, the penalty can substantially affect both accuracy and stability; the best value here is not a task-independent default.

Figure F.1. RNN Adding validation MSE after 40,000 gradient evaluations, with a separately selected learning rate for each λ\lambda. Points show means and bars show seed ranges. The dashed line is the mean of the completed Muon comparison. The cross above the axis denotes three numerical failures at λ=9999\lambda= 9999, not a measured loss.

Accuracy of the QME solver

We first isolate numerical accuracy by solving QUQ+Q=VQUQ + Q = V for fixed 256×256256 \times256 matrices. We construct U=RRTU = RR^{\mathsf{T}} with singular values of RR between 0.7 and 1.3, and use independent random eigenbases for UU and VV. The eigenvalues of VV are logarithmically spaced from 1 to κ∈{10,103,105}\kappa\in\{10, 10^{3}, 10^{5}\}. We vary both iteration counts in the FP32 Gram solver and compare with the FP64 decomposition-based solution Q⋆Q_{\star} using relative Frobenius error ∥Q^−Q⋆∥F/∥Q⋆∥F\lVert\widehat{Q} - Q_{\star} \rVert_{\mathrm{F}} / \lVert Q_{\star} \rVert_{\mathrm{F}}.

Figure F.2 shows that too few iterations can leave substantial error. At the default 18/10 counts, median errors are approximately 2.3×10−62.3 \times10^{-6}, 7.3×10−57.3 \times10^{-5}, and 7.2×10−37.2 \times10^{-3} for the three values of κ\kappa. More iterations do not uniformly reduce FP32 error, particularly once rounding error limits accuracy.

Figure F.2. Relative QME solution error as the root and inverse iteration counts vary. Each cell is the median over three matrix seeds; all panels share a logarithmic color scale. Lower values are better. White outlines mark the default 18 root and 10 inverse iterations.

We then vary the solver counts during RNN training (Figure F.3). We compare 12, 18, and 24 root iterations at 10 inverse iterations, and 10, 16, and 24 inverse iterations at 18 root iterations. Separate sweeps select a learning rate of 1.33×10−31.33 \times10^{-3} for all four stable settings. Their learning curves are similar; increasing either count beyond 18/10 does not consistently improve validation error. With 12/10, all three tested seed-0 learning rates fail before the full budget, so no fresh-seed mean is shown.

Figure F.3. RNN validation MSE as root iterations vary (left) and inverse iterations vary (right). Legend entries give root/inverse counts; 18/10 is the default. Each completed setting uses a separately selected learning rate and three fresh seeds. Lines show means and shading spans the seed minimum and maximum. Insets enlarge the last 10,000 gradient evaluations on a linear MSE axis with shared limits. The 12/10 setting failed at all three tested tuning rates and has no learning curve.

Refresh frequency and training cost

We compare K∈{1,5,10,20,50}K \in\{1, 5, 10, 20, 50\}, retuning the learning rate at each interval. Figure F.4 shows learning curves against gradient evaluations and wall-clock time. More frequent refreshes require more secant replays and leave fewer parameter updates within the same budget. Refreshing at every update slows convergence on both tasks. The best trade-off is task-dependent: K=5K = 5 reaches the lowest mean RNN validation MSE, while larger intervals shorten MNIST training with similar final objectives.

Figure F.4. Learning curves for different refresh intervals. Rows show RNN validation MSE and minibatch MNIST training objective; columns show gradient evaluations and wall-clock time. All runs stop at the same task-specific gradient budget, including replay: 40,000 for RNN and 6,000 for MNIST. Lines show three-seed means and shading spans the seed minimum and maximum. Wall-clock time includes evaluation and diagnostic overhead. Orange lines mark the default K=10K = 10.

References

  1. [1]Noah Amsel, David Persson, Christopher Musco, and Robert M. Gower. The Polar Express: Optimal matrix sign methods and their application to the Muon algorithm. In International Conference on Learning Representations (ICLR), 2026.
  2. [2]Jan-Hendrik Bastek, WaiChing Sun, and Dennis M. Kochmann. Physics-informed diffusion models. In International Conference on Learning Representations (ICLR), 2025.arxiv.org/abs/2403.14404
  3. [3]Albert S Berahas, Jorge Nocedal, and Martin Takac. A multi-batch L-BFGS method for machine learning. In Advances in Neural Information Processing Systems (NeurIPS), 2016.arxiv.org/abs/1605.06049
  4. [4]Erik Berglund, Jiaojiao Zhang, and Mikael Johansson. Soft quasi-Newton: guaranteed positive definiteness by relaxing the secant constraint. Optimization Methods and Software, 40(4):783–812, 2025.arxiv.org/abs/2403.02448
  5. [5]Antoine Bordes, Léon Bottou, and Patrick Gallinari. SGD-QN: Careful quasi-Newton stochastic gradient descent. Journal of Machine Learning Research, 10(59):1737–1754, 2009.
  6. [6]C. G. Broyden. The convergence of a class of double-rank minimization algorithms: 2. the new algorithm. IMA Journal of Applied Mathematics, 6(3):222–231, 1970.
  7. [7]Richard H. Byrd, S. L. Hansen, Jorge Nocedal, and Yoram Singer. A stochastic quasi-Newton method for large-scale optimization. SIAM Journal on Optimization, 26(2):1008–1031, 2016.arxiv.org/abs/1401.7020
  8. [8]Diana Cai, Chirag Modi, Loucas Pillaud-Vivien, Charles Margossian, Robert M. Gower, David Blei, and Lawrence K. Saul. Batch and match: black-box variational inference with a score-based divergence. In International Conference on Machine Learning (ICML), 2024.arxiv.org/abs/2402.14758
  9. [9]Michael Crawshaw, Chirag Modi, Mingrui Liu, and Robert M. Gower. An exploration of non-Euclidean gradient descent: Muon and its many variants. In International Conference on Machine Learning (ICML), 2026.arxiv.org/abs/2510.09827
  10. [10]J. E. Dennis, Jr. and Jorge J. Moré. Quasi-Newton Methods, Motivation and Theory. SIAM Review, 19(1):46–89, 1977.DOI
  11. [11]John Duchi, Elad Hazan, and Yoram Singer. Adaptive Subgradient Methods for Online Learning and Stochastic Optimization. Journal of Machine Learning Research, 12(61):2121–2159, 2011.
  12. [12]R. Fletcher. A new approach to variable metric algorithms. The Computer Journal, 13(3):317–322, 1970.DOI
  13. [13]R. Fletcher. A new variational result for quasi-Newton formulae. SIAM Journal on Optimization, 1(1):18–21, 1991.DOI
  14. [14]Donald Goldfarb. A family of variable-metric methods derived by variational means. Mathematics of Computation, 24(109):23–26, 1970.DOI
  15. [15]Donald Goldfarb, Yi Ren, and Achraf Bahamou. Practical quasi-Newton methods for training deep neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2020.arxiv.org/abs/2006.08877
  16. [16]Vineet Gupta, Tomer Koren, and Yoram Singer. Shampoo: Preconditioned stochastic tensor optimization. In International Conference on Machine Learning (ICML), 2018.arxiv.org/abs/1802.09568
  17. [17]Nathan Heavner, Chao Chen, Abinand Gopal, and Per-Gunnar Martinsson. Efficient algorithms for computing rank-revealing factorizations on a GPU. Numerical Linear Algebra with Applications, 30(6):e2515, 2023.arxiv.org/abs/2106.13402
  18. [18]Nicholas J. Higham. Stable iterations for the matrix square root. Numerical Algorithms, 15(2):227–242, 1997.DOI
  19. [19]Nicholas J Higham. Functions of Matrices: Theory and Computation. Society for Industrial and Applied Mathematics, 2008.
  20. [20]Geoffrey E. Hinton and Ruslan R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006.pubmed.ncbi.nlm.nih.gov/16873662
  21. [21]Roger A Horn and Charles R Johnson. Matrix Analysis. Cambridge University Press, 2nd edition, 2012.
  22. [22]Brian Irwin and Eldad Haber. Secant penalized BFGS: a noise robust quasi-Newton method via penalizing the secant condition. Computational Optimization and Applications, 84(3):651–702, 2023.DOI
  23. [23]Keller Jordan, Yuchen Jin, Vlado Boza, Jiacheng You, Franz Cesista, Laker Newhouse, and Jeremy Bernstein. Muon: An optimizer for hidden layers in neural networks. Keller Jordan blog, 2024.
  24. [24]Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015.arxiv.org/abs/1412.6980
  25. [25]Peter Lancaster and Leiba Rodman. Algebraic Riccati Equations. Oxford University Press, 1995.DOI
  26. [26]Xi-Lin Li. Preconditioned Stochastic Gradient Descent. IEEE Transactions on Neural Networks and Learning Systems, 29(5):1454–1466, 2018.DOI
  27. [27]Xi-Lin Li. Preconditioner on matrix Lie group for SGD. In International Conference on Learning Representations (ICLR), 2019.arxiv.org/abs/1809.10232
  28. [28]Dong C. Liu and Jorge Nocedal. On the limited memory BFGS method for large scale optimization. Mathematical Programming, 45(1-3):503–528, 1989.
  29. [29]Jingyuan Liu, Jianlin Su, Xingcheng Yao, Zhejun Jiang, et al. Muon is scalable for LLM training. arXiv preprint arXiv:2502.16982, 2025.arxiv.org/abs/2502.16982
  30. [30]James Martens. Deep learning via Hessian-free optimization. In International Conference on Machine Learning (ICML), 2010.
  31. [31]James Martens and Roger Grosse. Optimizing neural networks with Kronecker-factored approximate curvature. In International Conference on Machine Learning (ICML), 2015.arxiv.org/abs/1503.05671
  32. [32]Chirag Modi, Diana Cai, and Lawrence K Saul. Batch, match, and patch: low-rank approximations for score-based variational inference. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2025.arxiv.org/abs/2410.22292
  33. [33]Jorge Nocedal and Stephen J Wright. Numerical Optimization. Springer, 2nd edition, 2006.
  34. [34]Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In International Conference on Machine Learning (ICML), 2013.arxiv.org/abs/1211.5063
  35. [35]Guilherme Penedo, Hynek Kydlíček, Loubna Ben allal, Anton Lozhkov, Margaret Mitchell, Colin Raffel, Leandro Von Werra, and Thomas Wolf. The FineWeb datasets: Decanting the web for the finest text data at scale. In Advances in Neural Information Processing Systems (NeurIPS), 2024.arxiv.org/abs/2406.17557
  36. [36]Thomas Pethick, Wanyun Xie, Kimon Antonakopoulos, Zhenyu Zhu, Antonio Silveti-Falls, and Volkan Cevher. Training deep learning models with norm-constrained LMOs. In International Conference on Machine Learning (ICML), 2025.arxiv.org/abs/2502.07529
  37. [37]Omead Pooladzandi and Xi-Lin Li. Curvature-informed SGD via general purpose Lie-group preconditioners. arXiv preprint arXiv:2402.04553, 2024.arxiv.org/abs/2402.04553
  38. [38]Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. Technical report, OpenAI, 2019.
  39. [39]Pratik Rathore, Weimu Lei, Zachary Frangella, Lu Lu, and Madeleine Udell. Challenges in training PINNs: A loss landscape perspective. In International Conference on Machine Learning (ICML), 2024.arxiv.org/abs/2402.01868
  40. [40]Yi Ren, Achraf Bahamou, and Donald Goldfarb. Kronecker-factored quasi-Newton methods for deep learning. arXiv preprint arXiv:2102.06737v3, 2022.arxiv.org/abs/2102.06737
  41. [41]Nicol N. Schraudolph, Jin Yu, and Simon Günter. A Stochastic Quasi-Newton Method for On-line Convex Optimization. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2007.
  42. [43]D. F. Shanno. Conditioning of quasi-Newton methods for function minimization. Mathematics of Computation, 24(111):647–656, 1970.DOI
  43. [44]Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5—RMSProp: Divide the gradient by a running average of its recent magnitude. Coursera: Neural Networks for Machine Learning, 2012.
  44. [45]Nikhil Vyas, Depen Morwani, Rosie Zhao, Itai Shapira, David Brandfonbrener, Lucas Janson, and Sham Kakade. SOAP: Improving and stabilizing Shampoo using Adam for language modeling. In International Conference on Learning Representations (ICLR), 2025.arxiv.org/abs/2409.11321
  45. [46]Sifan Wang, Bowen Li, Yuhan Chen, and Paris Perdikaris. PirateNets: Physics-informed deep learning with residual adaptive networks. Journal of Machine Learning Research, 25(402):1–51, 2024.arxiv.org/abs/2402.00326
  46. [47]Sifan Wang, Ananya Kumar Bhartari, Bowen Li, and Paris Perdikaris. Gradient alignment in physics-informed neural networks: A second-order optimization perspective. In Advances in Neural Information Processing Systems (NeurIPS), 2025.arxiv.org/abs/2502.00604
  47. [48]Xiao Wang, Shiqian Ma, Donald Goldfarb, and Wei Liu. Stochastic quasi-Newton methods for nonconvex stochastic optimization. SIAM Journal on Optimization, 27(2):927–956, 2017.arxiv.org/abs/1412.1196
  48. [49]Philip Wolfe. Convergence conditions for ascent methods. SIAM Review, 11(2):226–235, 1969. doi: 10.1137/1011036.DOI
  49. [50]Chenhui Xu, Dancheng Liu, Amir Nassereldine, and Jinjun Xiong. FP64 is all you need: Rethinking failure modes in physics-informed neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2025.arxiv.org/abs/2505.10949

Paper details

vlnc:W_m7rueajm
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents