Yuhan Chi

← Writing

From a Quadratic Hessian to a Functional Scaling Law

Start with a Taylor expansion, keep only the directions a finite model can learn, and derive a power law. Then use Gaussian linear regression to turn the SGD second-moment recursion into a linear ODE, work out what SGD noise adds to the learning curve, and read off the form of the Functional Scaling Law.

How far can a basic analysis of the loss function take us in explaining a scaling law? Where do we get stuck, and what does being stuck tell us?

Here is the whole route. A Taylor expansion tells us that near a minimum the loss is a quadratic, so gradient descent can be solved one Hessian eigendirection at a time. A model has finite capacity, and the simplest way to say that is: it can learn only finitely many directions, say the first \(M\). If we also assume the spectrum decays as a power law, we get power laws in both training time and model size.

When we switch from GD to SGD, we want the expected loss, and we are missing the variance of the gradient noise: without it, the recursion for second moments cannot close. So we pick a model that is simple enough, and consistent with the Hessian analysis (Gaussian linear regression), where this variance can be computed. The recursion closes, a linear ODE gives a continuous approximation, and its solution is an integral with a “forgetting kernel”. At the end two harder mathematical problems remain, and their answer is the central formula of the paper.

I will try not to skip steps. Every equation is numbered, and I re-explain each symbol where it first appears, instead of sending you back to the notation table.

Three panels above the Functional Scaling Law. (1) Hessian eigenvalues decaying as a power law, with the first M directions trained and the rest left at initialization. (2) Single-direction exponential decays that add up to a power-law learning curve. (3) Expected loss under a constant and a decayed learning-rate schedule, with the gap above noiseless GD shaded as surviving noise. Each panel is colored like its term in the law below.
Figure 1. The route of this post in one picture. (1) A finite model learns only the top \(M\) Hessian directions; the untouched tail leaves the capacity floor \(M^{-s\beta}\) (Sections 3–4). (2) Each direction decays exponentially, and a power-law spectrum turns their sum into the power law \((1+t)^{-s}\) (Section 4). (3) Under SGD, noise injected at time \(r\) fades through a forgetting kernel, so the loss at \(t\) depends on the whole schedule \(\gamma(\cdot)\): decaying \(\gamma\) at the end removes noise that a constant rate keeps (Sections 5–10). Each term of Eq. (43) is drawn in the color of its panel. Curves are schematic, with \(\beta=2\), \(s=1/2\); panel 3 evaluates the last two terms of Eq. (43) numerically.

Notation

GD is gradient descent, SGD is stochastic gradient descent, and ODE is ordinary differential equation. The table is only for reference; the text explains each symbol when it is used.

Symbol Meaning
\(L,\theta,\theta^\star,x,\dot x\) Population loss, parameter vector, minimizer, displacement \(x=\theta-\theta^\star\), and its time derivative \(\dot x=dx/dt\).
\(H,Q,\Lambda,u_i,\lambda_i,z_i\) Hessian and its eigendecomposition \(H=Q\Lambda Q^\top\). Column \(i\) of \(Q\) is the unit eigenvector \(u_i\), the eigenvalues \(\lambda_i>0\) are in decreasing order, and \(z_i=u_i^\top x\) is the displacement coordinate.
\(k,\eta_k,\eta_{\max},T_m,t\) Update index, step size, its upper bound, power sums \(T_m=\sum_{j<k}\eta_j^m\), and the intrinsic time \(t=T_1\).
\(M,a_i,\delta_M,e_M,E_M\) Number of trainable directions, initial loss in direction \(i\), loss in the omitted tail, remaining loss in the trainable directions, and total excess loss \(E_M=e_M+\delta_M\). A subscript \(\infty\) means all directions are included.
\(\beta,s,C,w\) Spectral decay exponent (\(\beta>1\)), positive time-scaling exponent, compute budget, and a continuous variable standing in for the direction index. The symbol \(\asymp\) means bounds by positive constant multiples.
\(\xi_k,q_{i,k},v_{i,k},\bar E\) Batch gradient noise, its mean square in direction \(i\), the second moment of \(z_{i,k}\), and the expected excess loss under SGD. In continuous time: \(v_i(t)\) and \(\bar E(t)\).
\(\phi,y,\hat y,\epsilon,\sigma^2,\epsilon_M,b_i\) Feature vector, label, prediction, label noise, its variance, the residual from label noise and omitted features, and the part of the residual independent of feature \(i\).
\(\phi_M,x_M,\bar g_k,B_k,\gamma\) Retained features, retained displacement coordinates, batch-average gradient at step \(k\), batch size, and the effective rate \(\gamma=\eta/B\).
\(S_i,r,u,K_M\) Noise source in the second-moment ODE, the time at which noise was injected, the time elapsed since injection, and the forgetting kernel.
\(\gamma_{\max},D,\mathcal T_M,b,c,\Gamma\) Maximum effective rate, number of fresh training samples, the integral operator with kernel \(K_M\), deterministic loss plus label variance, a positive constant in the power-law estimate, and the Gamma function.

1. A Taylor expansion gives a quadratic

At a smooth local minimum \(\theta^\star\) the gradient vanishes, so the first-order term of the Taylor expansion disappears. Write \(x=\theta-\theta^\star\) for the displacement from the minimum and \(H=\nabla^2L(\theta^\star)\) for the Hessian there. Then

\[L(\theta^\star+x)-L(\theta^\star) =\tfrac12 x^\top Hx+o(\lVert x\rVert^2). \tag{1}\]

This is why we start with a quadratic: to second order, the loss is the right-hand side of Eq. (1). We now study the quadratic itself, keeping the Hessian fixed. At a minimum the Hessian is positive semidefinite; we consider its positive-eigenvalue directions, since zero eigenvalues contribute no quadratic loss. This local expansion does not imply that a real network has a fixed Hessian throughout training.

2. Solve the descent one direction at a time

The gradient of \(\tfrac12x^\top Hx\) is \(Hx\). A dot denotes a derivative with respect to “time” \(t\): \(\dot x(t)=dx(t)/dt\) (what this time really is comes in the next subsection). Gradient flow satisfies

\[\dot x(t)=\frac{dx(t)}{dt}=-Hx(t). \tag{2}\]

The symmetric Hessian has an orthogonal decomposition \(H=Q\Lambda Q^\top\), with \(Q^\top Q=I\) and \(\Lambda=\operatorname{diag}(\lambda_1,\lambda_2,\ldots)\). The columns of \(Q\) are eigenvectors, and in the coordinates \(z=Q^\top x\) we are simply splitting \(x\) along each eigendirection. Multiplying Eq. (2) on the left by \(Q^\top\):

\[\frac{dz}{dt}=-Q^\top Q\Lambda Q^\top x=-\Lambda z. \tag{3}\]

Since \(\Lambda\) is diagonal, the directions no longer interact, and each one is an independent one-dimensional linear ODE. Here \(z_i=u_i^\top x\) is the displacement along direction \(i\) and \(\lambda_i\) is the curvature in that direction:

\[\frac{dz_i}{dt}=-\lambda_i z_i,\qquad z_i(t)=z_i(0)e^{-\lambda_i t}. \tag{4}\]

The loss also splits over directions, \(\tfrac12x^\top Hx=\tfrac12\sum_i\lambda_i z_i^2\), so direction \(i\) contributes

\[\tfrac12\lambda_i z_i(t)^2=a_i e^{-2\lambda_i t},\qquad a_i=\tfrac12\lambda_i z_i(0)^2 . \tag{5}\]

So \(a_i\) is the loss direction \(i\) contributes at the start (\(t=0\)), and afterwards it decays like \(e^{-2\lambda_i t}\). Larger curvature means faster learning; a flat direction takes about \(1/\lambda_i\) time to change noticeably.

What is the continuous time \(t\)?

Real GD is discrete, with step size \(\eta_k\) at step \(k\) (it may vary with \(k\)). Projecting the update \(x_{k+1}=x_k-\eta_kHx_k\) onto \(u_i\) and using \(Hu_i=\lambda_iu_i\) gives

\[z_{i,k+1}=(1-\eta_k\lambda_i)z_{i,k},\qquad z_{i,k}=z_{i,0}\prod_{j=0}^{k-1}(1-\eta_j\lambda_i). \tag{6}\]

This is a product, not an exponential. To compare with the continuous case, assume \(0\le\eta_k\le\eta_{\max}\) and \(\eta_{\max}\lambda_1<1\) (so every factor lies in \((0,1]\)). Write the product as the exponential of a sum of logarithms and expand with \(\log(1-y)=-y-\tfrac{y^2}{2}-\tfrac{y^3}{3}-\cdots\):

\[\begin{aligned} z_{i,k} &=z_{i,0}\exp\Bigl(\sum_{j=0}^{k-1}\log(1-\eta_j\lambda_i)\Bigr)\\ &=z_{i,0}\exp\Bigl(-\lambda_iT_1-\frac{\lambda_i^2}{2}T_2-\frac{\lambda_i^3}{3}T_3-\cdots\Bigr),\\ T_m&=\sum_{j=0}^{k-1}\eta_j^m . \end{aligned} \tag{7}\]

Gradient flow (Eq. (4)) keeps only the first term, so the \(t\) above is the cumulative step size \(T_1=\sum_j\eta_j\), called the intrinsic time. \(T_2,T_3,\ldots\) are not new time variables; they are finite-step corrections of increasing order. Keeping only \(T_1\) does lose information. Take \(\lambda_i=1\): the step sequences \(0.1,0.1,0.1,0.1\) and \(0.01,0.01,0.19,0.19\) both have \(T_1=0.4\), but

\[0.9^4=0.6561,\qquad 0.99^2\times0.81^2=0.64304361 . \tag{8}\]

The difference comes from \(T_2=0.04\) versus \(T_2=0.0724\) and from higher orders.

Why can we use only \(T_1\) later? Compare the \(m\)-th term of Eq. (7) with the first. Since \(T_m\le\eta_{\max}^{m-1}T_1\),

\[\frac{\lambda_i^mT_m/m}{\lambda_iT_1}\le\frac{(\lambda_i\eta_{\max})^{m-1}}{m}. \tag{9}\]

The next section shows that the loss remaining late in training comes from slow directions with \(\lambda_i\asymp 1/T_1\). For those, the ratio in Eq. (9) is at most \((\eta_{\max}/T_1)^{m-1}/m\), which goes to zero. For fast directions with large curvature, \(1-y\le e^{-y}\) shows that the discrete product never exceeds \(e^{-\lambda_iT_1}\): they learn at least as fast as gradient flow and have long stopped contributing loss. So we can drop the higher-order terms, not because we assumed a small learning rate in advance, but because the directions that decide long-run behavior have smaller and smaller curvature.

3. Capacity as a finite number of directions

How many dimensions does the Hessian have? As many as there are parameters. But if we want to study the effect of model size \(M\), how should we describe “model size”?

\(M\) should control some kind of “size” of this matrix. A model with finite capacity can learn only finitely many feature directions. I choose the simplest version: it learns the first \(M\), the directions with the largest curvature, which are the easiest to learn. This is a nested truncation assumption, not something deduced from the parameter count.

Concretely, let models of different sizes share one ordered list of feature directions and one starting point. A model of size \(M\) can adjust only the first \(M\) coordinates; the others stay at their initial values. In eigen-coordinates it really trains the top-left \(M\times M\) block of the Hessian, \(\operatorname{diag}(\lambda_1,\ldots,\lambda_M)\). The first \(M\) directions decay as in Section 2, and the later ones stay put:

\[E_M(t)=e_M(t)+\delta_M,\qquad e_M(t)=\sum_{i\le M}a_i e^{-2\lambda_i t},\qquad \delta_M=\sum_{i>M}a_i. \tag{10}\]

\(E_M\) is the total excess loss, the loss above what we have at the minimizer. It has two parts. \(e_M(t)\) is what a capacity-\(M\) model has not yet learned at time \(t\), and it decays exponentially. \(\delta_M\) is the error caused by the capacity limit: we never train the directions beyond \(M\), so their initial losses \(a_i\) are left untouched.

4. Power laws in model size and training time

To discuss how things scale with \(M\), we put these finite models into one countable feature sequence, and assume that both curvature and initial loss decay as power laws:

\[\lambda_i\asymp i^{-\beta},\qquad a_i\asymp i^{-1-s\beta}. \tag{11}\]

Here \(\beta>1\) and \(s>0\). The spectrum says how fast each direction learns, and \(a_i\) says where the initial error sits. Both power laws are extra assumptions; a Taylor expansion alone does not give them.

Why write the exponent of \(a_i\) as \(-1-s\beta\)? The total initial loss \(\sum_ia_i\) must converge, and \(\sum_i i^{-\alpha}\) converges only if \(\alpha>1\), so the exponent has to be “\(-1-\) something positive”. Calling that something \(s\beta\) is only a convenience: it makes the time-decay exponent come out as exactly \(-s\), with no \(s/\beta\) scattered around. In infinite dimensions we only require the weighted error \(\sum_i\lambda_i z_i(0)^2\) to be finite, not that the parameter sequence itself be square-summable.

Training time: the sum from Section 2

First keep all directions and compute \(e_\infty(t)=\sum_i a_ie^{-2\lambda_i t}\). Let \(\lambda_i=c\,i^{-\beta}\) for a constant \(c>0\), and use a continuous variable \(w\) in place of the discrete direction index \(i\) to turn the sum into an integral:

\[e_\infty(t)\asymp\int_1^\infty w^{-1-s\beta}e^{-2ctw^{-\beta}}\,dw . \tag{12}\]

The role of \(w\) here is just that of the index \(i\) in the sum.

First, intuition. The exponential \(e^{-2ctw^{-\beta}}\) acts like a switch:

  • When \(tw^{-\beta}\gg1\), i.e. \(w\ll t^{1/\beta}\) (fast, high-curvature directions), the exponential is close to \(0\): these directions are already learned.
  • When \(tw^{-\beta}\ll1\), i.e. \(w\gg t^{1/\beta}\) (slow, low-curvature directions), the exponential is close to \(1\): these directions have barely moved.

So the boundary sits at \(w\asymp t^{1/\beta}\). Integrating only the unlearned tail already guesses the order of magnitude:

\[\int_{t^{1/\beta}}^\infty w^{-1-s\beta}\,dw =\Bigl[\frac{w^{-s\beta}}{-s\beta}\Bigr]_{t^{1/\beta}}^{\infty} =\frac{t^{-s}}{s\beta}. \tag{13}\]

To check that the directions before the boundary do not change the order, we do the substitution carefully. The goal is to remove \(t\) from the exponent: let \(w=t^{1/\beta}p\). The three pieces become

  • differential: \(dw=t^{1/\beta}\,dp\);
  • power term: \(w^{-1-s\beta}=t^{-1/\beta-s}\,p^{-1-s\beta}\);
  • exponent: \(tw^{-\beta}=t\cdot t^{-1}p^{-\beta}=p^{-\beta}\).

Multiplying the \(t\)-factors of the first two, \(t^{-1/\beta-s}\cdot t^{1/\beta}=t^{-s}\), so all of \(t\) comes out of the integral:

\[e_\infty(t)\asymp t^{-s}\int_{t^{-1/\beta}}^\infty p^{-1-s\beta}e^{-2cp^{-\beta}}\,dp . \tag{14}\]

As \(t\to\infty\) the lower limit tends to zero. Now let \(q=p^{-\beta}\) (so \(p=q^{-1/\beta}\) and \(dp=-\tfrac1\beta q^{-1/\beta-1}dq\); \(p\) from \(0\) to \(\infty\) means \(q\) from \(\infty\) to \(0\), and swapping the limits cancels the minus sign):

\[\begin{aligned} \int_0^\infty p^{-1-s\beta}e^{-2cp^{-\beta}}\,dp &=\frac1\beta\int_0^\infty (q^{-1/\beta})^{-1-s\beta}e^{-2cq}\,q^{-1/\beta-1}\,dq\\ &=\frac1\beta\int_0^\infty q^{s-1}e^{-2cq}\,dq . \end{aligned} \tag{15}\]

In the second equality the exponent of \(q\) is \((1/\beta+s)+(-1/\beta-1)=s-1\). Finally let \(\rho=2cq\) to get the Gamma function \(\Gamma(s)=\int_0^\infty \rho^{s-1}e^{-\rho}d\rho\):

\[\frac1\beta\int_0^\infty q^{s-1}e^{-2cq}\,dq =\frac{\Gamma(s)}{\beta(2c)^s}<\infty . \tag{16}\]

This is a finite positive constant independent of \(t\), so at large times \(e_\infty(t)\asymp t^{-s}\). Since the loss is bounded for small \(t\), we write \(e_\infty(t)\asymp(1+t)^{-s}\). (Strictly, one must also control the gap between sum and integral. The integrand rises and then falls, so the gap is at most a constant times its peak, of order \(t^{-s-1/\beta}\), one order below the main term.)

Model size: the truncation from Section 3

Now \(M\) is just a truncation, and the discarded tail integrates directly:

\[\delta_M=\sum_{i>M}a_i\asymp\int_M^\infty w^{-1-s\beta}\,dw=\frac{M^{-s\beta}}{s\beta}. \tag{17}\]

Putting them together

First some intuition. The larger the capacity \(M\), the less we truncate, and the closer \(\delta_M\) gets to \(0\). Also, a finite model counts the unlearned loss in only the first \(M\) directions, which is less than counting it over all directions, so \(e_M(t)\le e_\infty(t)\) (every term is nonnegative).

On the other hand, split the infinite sum into two parts: \(e_\infty(t)=\sum_{i\le M}a_ie^{-2\lambda_it}+\sum_{i>M}a_ie^{-2\lambda_it}\). For the second part, the finite model does not learn those directions at all, so their loss never changes; the infinite model does learn them, but since \(e^{-2\lambda_it}\le1\) their loss is at most the initial value, so the second part is at most \(\sum_{i>M}a_i=\delta_M\). Hence \(e_\infty(t)\le e_M(t)+\delta_M=E_M(t)\). Also \(\delta_M\le E_M\) is obvious, since \(\delta_M\) is one of the pieces that make up \(E_M\). Combining:

\[\max(\delta_M,e_\infty)\le E_M\le\delta_M+e_\infty,\qquad E_M(t)\asymp M^{-s\beta}+(1+t)^{-s}. \tag{18}\]

(The second statement holds because \(\max\) and the sum differ by at most a factor of two.) The two terms are comparable around \(t\asymp M^\beta\), which is the time needed to learn the last retained direction. If we keep training a fixed \(M\), \(e_M(t)\) eventually decays exponentially and only the truncation loss remains.

If the step size is fixed and the cost per step is proportional to \(M\), then the compute is \(C\asymp Mt\), i.e. \(t\asymp C/M\). Balancing the two terms of Eq. (18) at a given \(C\):

\[M^{-s\beta}\asymp\Bigl(\frac CM\Bigr)^{-s} \;\Longrightarrow\; M\asymp C^{1/(1+\beta)},\quad t\asymp C^{\beta/(1+\beta)},\quad E\asymp C^{-s\beta/(1+\beta)} . \tag{19}\]

This is the compute-optimal scaling law of this noiseless model.

5. From GD to SGD: the missing noise variance

Everything so far was GD, with no randomness. SGD estimates the gradient from a batch of samples each step. Write the batch-average gradient at step \(k\) as \(\bar g_k\), and split it into “population gradient plus fluctuation”:

\[\bar g_k=Hx_k+\xi_k,\qquad \mathbb E[\xi_k\mid\theta_k]=0 . \tag{20}\]

\(\xi_k\) is the noise from sampling at this step. Conditionally unbiased means: given the current parameters \(\theta_k\), sampling does not push us in any particular direction on average. Projecting the update \(x_{k+1}=x_k-\eta_k\bar g_k\) onto direction \(i\) (with \(\xi_{i,k}=u_i^\top\xi_k\)) gives Eq. (6) plus a noise term:

\[z_{i,k+1}=(1-\eta_k\lambda_i)z_{i,k}-\eta_k\xi_{i,k}. \tag{21}\]

The loss involves squared coordinates, \(E=\tfrac12\sum\lambda_iz_i^2+\cdots\), and \(z_{i,k}\) is now random, so we have to track its second moment \(v_{i,k}=\mathbb E[z_{i,k}^2]\). First square Eq. (21):

\[z_{i,k+1}^2=(1-\eta_k\lambda_i)^2z_{i,k}^2 -2\eta_k(1-\eta_k\lambda_i)z_{i,k}\xi_{i,k} +\eta_k^2\xi_{i,k}^2 . \tag{22}\]

Then take expectations. The cross term vanishes: fix \(\theta_k\), so that \(z_{i,k}\) is deterministic and can be pulled out of the inner expectation, and \(\mathbb E[\xi_{i,k}\mid\theta_k]=0\) gives \(\mathbb E[z_{i,k}\xi_{i,k}]=\mathbb E\bigl[z_{i,k}\,\mathbb E[\xi_{i,k}\mid\theta_k]\bigr]=0\). Writing \(q_{i,k}=\mathbb E[\xi_{i,k}^2]\) for the mean square of the noise in this direction,

\[v_{i,k+1}=(1-\eta_k\lambda_i)^2v_{i,k}+\eta_k^2q_{i,k}. \tag{23}\]

Eq. (23) says: the old second moment decays by the GD factor \((1-\eta_k\lambda_i)^2\), and each step injects \(\eta_k^2q_{i,k}\) more noise.

Now the problem: we cannot yet derive what \(q_{i,k}\) is from our assumptions. The Hessian gives the mean gradient, not its variance. Take a one-dimensional example without label noise, where the single-sample gradient is \(g=\phi^2x\) (\(\phi\) is the random feature):

Distribution of \(\phi\) \(\mathbb E[\phi^2]\) (Hessian) Mean gradient \(\mathbb E[\phi^4]\) Gradient variance \(\operatorname{Var}(g)\)
\(\pm1\) with equal probability \(1\) \(x\) \(1\) \(0\)
standard normal \(1\) \(x\) \(3\) \(2x^2\)

Both have the same Hessian and the same mean gradient, but very different gradient variance: variance involves the square of the gradient, hence the fourth moment of the feature, while the Hessian contains only second moments.

If \(q_{i,k}\) were constant, Eq. (23) would be easy to solve. But the real gradient noise depends on the current parameters and changes during training. We would like a structure for which

\[q_{i,k}=f_i(v_{1,k},v_{2,k},\ldots,v_{M,k}), \tag{24}\]

that is, the noise depends only on the second moments themselves, so Eq. (23) becomes a closed system. We therefore have to introduce a carefully chosen structure that brings in new information. It should satisfy three things: the mean loss is itself the quadratic, consistent with the Hessian analysis; the gradient noise can be computed explicitly and depends only on second moments; and the calculation is simple enough.

6. Gaussian linear regression gives the missing variance

Linear regression with squared loss fits. The setup:

  • The features \(\phi=(\phi_1,\phi_2,\ldots)\) have independent components with \(\phi_i\sim\mathcal N(0,\lambda_i)\). So the feature covariance \(\mathbb E[\phi\phi^\top]=\operatorname{diag}(\lambda_1,\lambda_2,\ldots)\) is exactly the diagonal Hessian.
  • Labels come from the full linear model plus independent zero-mean noise: \(y=\phi^\top\theta^\star+\epsilon\), with noise variance \(\mathbb E[\epsilon^2]=\sigma^2\).
  • The learner starts from zero, so \(z_i(0)=-\theta_i^\star\). It trains only the first \(M\) coefficients and draws a fresh batch at every step.

Let \(\phi_M,x_M\) denote the retained features and displacement coordinates (the first \(M\) components). The omitted directions have parameters fixed at zero, and the prediction error they cause can be merged with the label noise into one residual \(\epsilon_M\):

\[\hat y-y=\phi_M^\top\theta_M-\phi^\top\theta^\star-\epsilon=\phi_M^\top x_M-\epsilon_M, \qquad \epsilon_M=\epsilon+\sum_{i>M}\theta_i^\star\phi_i . \tag{25}\]

Here \(\hat y\) is the model prediction. All components are independent with zero mean, so the variance of \(\epsilon_M\) can be written down directly (recall \(a_i=\tfrac12\lambda_i(\theta_i^\star)^2\), so \(\sum_{i>M}\lambda_i(\theta_i^\star)^2=2\delta_M\)):

\[\mathbb E[\epsilon_M^2]=\sigma^2+\sum_{i>M}\lambda_i(\theta_i^\star)^2=\sigma^2+2\delta_M. \tag{26}\]

The actual one-pass SGD algorithm is:

  1. Fix the feature spectrum, the full target, the label-noise distribution, the number \(M\) of retained directions, the step sizes, and the batch sizes. The first \(M\) coefficients start at zero and the others stay fixed at zero.
  2. At step \(k\), draw \(B_k\) fresh feature–label pairs independently.
  3. Take the gradient of the half squared error on these samples, keep only the first \(M\) coordinates, and average over the batch to get \(\bar g_k\); update \(\theta_{M,k+1}=\theta_{M,k}-\eta_k\bar g_k\).
  4. Repeat with fresh samples. Subtract \(\sigma^2/2\) from the population loss to get the excess loss, and take the expectation over training randomness to get \(\bar E_k\). GD uses the population gradient in step 3 instead.

The mean loss is still that quadratic

The omitted features are independent of the retained ones. Fix the current parameters \(x\) and take the expectation of the squared residual on a new sample:

\[\begin{aligned} L(\theta)&=\tfrac12\mathbb E\bigl[(\phi_M^\top x_M-\epsilon_M)^2\mid x\bigr]\\ &=\tfrac12\sum_{i\le M}\lambda_i z_i^2+\delta_M+\tfrac12\sigma^2. \end{aligned} \tag{27}\]

The mean loss is exactly the quadratic \(\tfrac12\sum\lambda_iz_i^2\) we have been studying, plus two constants \(\delta_M\) and \(\sigma^2/2\), with no Taylor remainder. Subtracting the irreducible \(\sigma^2/2\) from Eq. (27) gives the excess loss \(E_M\) of Section 3: Gaussian linear regression is fully consistent with the Hessian analysis.

The variance of the gradient noise

But now we also know how the gradient changes from sample to sample. Along direction \(i\), the single-sample gradient is the prediction error times the feature, \(g_i=(\phi_M^\top x_M-\epsilon_M)\phi_i\). Squaring and averaging it directly is messy; it is cleaner to pull out the term of the residual that contains \(\phi_i\):

\[g_i=z_i\phi_i^2+b_i\phi_i,\qquad b_i=\sum_{\substack{j\le M\\j\ne i}}z_j\phi_j-\epsilon_M . \tag{28}\]

\(b_i\) is the part of the residual that does not involve \(\phi_i\). Given the current parameters, it has mean zero and is independent of \(\phi_i\). Two consequences. First, \(\mathbb E[g_i\mid x]=z_i\mathbb E[\phi_i^2]=\lambda_iz_i\), the gradient of the quadratic, so we have not changed the average behavior. Second, the covariance of the two terms is \(z_i\,\mathbb E[\phi_i^3]\,\mathbb E[b_i]=0\), so the variance is the sum of the two variances:

  • First term: the Gaussian fourth moment \(\mathbb E[\phi_i^4]=3\lambda_i^2\) gives \(\operatorname{Var}(\phi_i^2)=3\lambda_i^2-\lambda_i^2=2\lambda_i^2\), contributing \(2\lambda_i^2z_i^2\).
  • Second term: \(\mathbb E[\phi_i^2b_i^2]=\mathbb E[\phi_i^2]\,\mathbb E[b_i^2\mid x]=\lambda_i\bigl(\sum_{j\le M,\,j\ne i}\lambda_jz_j^2+2\delta_M+\sigma^2\bigr)\).

Split \(2\lambda_i^2z_i^2\) into \(\lambda_i^2z_i^2+\lambda_i(\lambda_iz_i^2)\); the second half fills in the missing \(j=i\) term of the sum:

\[\begin{aligned} \operatorname{Var}(g_i\mid x) &=2\lambda_i^2z_i^2 +\lambda_i\Bigl(\sum_{\substack{j\le M\\j\ne i}}\lambda_j z_j^2+2\delta_M+\sigma^2\Bigr)\\ &=\lambda_i\Bigl(\sum_{j\le M}\lambda_j z_j^2+2\delta_M+\sigma^2\Bigr)+\lambda_i^2z_i^2\\ &=2\lambda_i L(\theta)+\lambda_i^2 z_i^2 . \end{aligned} \tag{29}\]

The last step uses Eq. (27): the bracket is exactly \(2L(\theta)\).

Averaging over \(B_k\) independent samples divides the variance by the batch size. Taking the expectation over the history and writing the total loss as excess loss plus label noise, \(2\mathbb E[L(\theta_k)]=2\bar E_k+\sigma^2\), gives the mean square of the noise:

\[q_{i,k} =\frac{1}{B_k} \Bigl[\lambda_i(2\bar E_k+\sigma^2)+\lambda_i^2 v_{i,k}\Bigr], \qquad \bar E_k=\delta_M+\tfrac12\sum_{i\le M}\lambda_i v_{i,k}. \tag{30}\]

The \(2\bar E_k\) in Eq. (30) also explains why SGD is still noisy when the labels are exact (\(\sigma^2=0\)): as long as the prediction has error, different samples give different gradients. More importantly, \(q_{i,k}\) now depends only on the second moments \(v_{j,k}\), and linearly. This is the structure Eq. (24) asked for. The recursion closes.

7. Write the recursion as a linear ODE

Substitute Eq. (30) into Eq. (23), expand \((1-\eta_k\lambda_i)^2\), subtract \(v_{i,k}\) from both sides, and divide by the intrinsic time \(\eta_k\) this step covers:

\[\begin{aligned} \frac{v_{i,k+1}-v_{i,k}}{\eta_k} &=-2\lambda_i v_{i,k}+\eta_k\lambda_i^2v_{i,k}\\ &\quad+\frac{\eta_k}{B_k}\Bigl[\lambda_i(2\bar E_k+\sigma^2)+\lambda_i^2v_{i,k}\Bigr]. \end{aligned} \tag{31}\]

The first two terms on the right come from the GD multiplier; the last comes from gradient noise. The noise injected in one step carries \(\eta_k^2/B_k\); dividing by the time increment \(\eta_k\) leaves \(\eta_k/B_k\), so we define the effective learning rate \(\gamma=\eta/B\): larger learning rate and smaller batch mean more injected noise.

Next, a continuous model: replace the difference quotient by a derivative, use the gradient-flow drift, and keep the full noise variance we just computed. That means dropping the finite-step drift correction \(\eta_k\lambda_i^2v_{i,k}\):

\[\frac{dv_i}{dt} =-2\lambda_i v_i +\gamma(t)\lambda_i\bigl(2\bar E(t)+\sigma^2\bigr) +\gamma(t)\lambda_i^2v_i, \qquad \bar E(t)=\delta_M+\tfrac12\sum_{j\le M}\lambda_j v_j(t). \tag{32}\]

Here \(v_i(t)\) and \(\bar E(t)\) are the continuous versions of \(v_{i,k}\) and \(\bar E_k\) in Eq. (30). Since \(\bar E\) is the constant \(\delta_M\) plus a linear combination of the \(v_j\), Eq. (32) is a first-order linear ODE system in \((v_1,\ldots,v_M)\) (with a source term when there is label noise or a truncation residual). Unlike GD, where the directions decouple, here all directions are coupled through the total loss \(\bar E\): unlearned error in any direction becomes gradient noise in every other direction through the residual.

We should separate the model from the limit. With a fixed batch size, \(\eta\to0\) also sends \(\gamma\to0\), so the strict limit is just deterministic gradient flow. Eq. (32) is a continuous approximation that keeps a finite noise strength; it is not an exact identity for discrete SGD. The slow-direction argument of Section 2 explains the deterministic power law but does not control noise that keeps being injected into fast directions; to use this ODE for a concrete discrete run, one still has to check the step size against the top of the spectrum, for instance \(\eta_{\max}\lambda_1\ll1\). The integral solution below is the exact solution of the ODE.

8. Solve each direction, then add up the losses

Combine the two noise terms on the right of Eq. (32) into \(S_i(t)\), the strength of the noise injected into direction \(i\) at time \(t\):

\[S_i(t)=\gamma(t)\lambda_i\bigl(2\bar E(t)+\sigma^2\bigr)+\gamma(t)\lambda_i^2v_i(t). \tag{33}\]

Eq. (32) is then \(\dot v_i+2\lambda_iv_i=S_i(t)\), a standard first-order linear ODE. Use an integrating factor: multiply by \(e^{2\lambda_it}\), and the left side becomes the derivative of a product:

\[\frac{d}{dt}\bigl(e^{2\lambda_i t}v_i(t)\bigr)=e^{2\lambda_i t}S_i(t). \tag{34}\]

Integrate both sides from \(0\) to \(t\) (with integration variable \(r\), the time in the past at which noise was injected):

\[e^{2\lambda_i t}v_i(t)-v_i(0)=\int_0^te^{2\lambda_i r}S_i(r)\,dr . \tag{35}\]

Move \(v_i(0)\) over and divide by \(e^{2\lambda_i t}\):

\[v_i(t)=v_i(0)e^{-2\lambda_i t}+\int_0^te^{-2\lambda_i(t-r)}S_i(r)\,dr . \tag{36}\]

The meaning is clear. The first term is the initial error, decaying exponentially just as in GD. The second is what remains of past noise: a packet of noise \(S_i(r)\,dr\) injected into direction \(i\) at time \(r\) evolves from \(r\) to \(t\), which is only \(t-r\) of intrinsic time, so it has decayed by \(e^{-2\lambda_i(t-r)}\).

Adding up into the total excess loss

Multiply each \(v_i(t)\) by \(\tfrac12\lambda_i\) to convert back to loss, sum over \(i=1,\ldots,M\), and add the truncation loss \(\delta_M\):

\[\bar E(t)=\delta_M+\sum_{i\le M}\tfrac12\lambda_i v_i(0)e^{-2\lambda_i t} +\tfrac12\int_0^t\sum_{i\le M}\lambda_i e^{-2\lambda_i(t-r)}S_i(r)\,dr . \tag{37}\]

Because the initialization is deterministic (zero initialization), \(v_i(0)=z_i(0)^2\), so \(\tfrac12\lambda_iv_i(0)=a_i\). The first two terms of Eq. (37) then add up to exactly the deterministic GD excess loss of Section 3, \(E_M(t)=\delta_M+\sum_{i\le M}a_ie^{-2\lambda_it}\) (Eq. (10)):

\[\boxed{\;\bar E(t)=E_M(t)+\tfrac12\int_0^t\sum_{i\le M}\lambda_i e^{-2\lambda_i(t-r)}S_i(r)\,dr\;} \tag{38}\]

This is an exact identity in the continuous second-moment model of Eq. (32).

Summary

We now have a clean structure: the expected excess loss of SGD equals the deterministic GD loss \(E_M(t)\) plus a “noise integral”. In the integral, the noise \(S_i(r)\) injected at each time \(r\) decays by \(e^{-2\lambda_i(t-r)}\), and we sum over directions. This was the whole purpose of the first half: how noise is injected, and how it is forgotten.

9. Two harder problems, and the answer

Eq. (38) is not yet usable as a scaling law, for two reasons:

  1. Self-feedback: the unknown \(\bar E\) appears on both sides, inside the integral on the right. The source \(S_i\) (Eq. (33)) contains \(\bar E\) and \(v_i\): noise raises the loss, and the raised loss produces more noise later.
  2. The kernel depends on \(M\). After substituting the main part of \(S_i\), the kernel left inside the integral is a finite sum \(\sum_{i\le M}\lambda_i^2e^{-2\lambda_iu}\), which we would like to replace by a simple power law.

The mathematics here is harder: it needs squeezing inequalities and a series expansion of an integral equation. The below content is mostly done by AI; for the full proof see Theorem 4.2 of Li et al.

Step one: turn the self-feedback into an integral equation. The loss in each direction is at most the total excess loss, \(0\le\lambda_iv_i\le2\bar E\). Putting this into Eq. (33) squeezes \(S_i\) between \(\gamma\lambda_i(2\bar E+\sigma^2)\) and \(\gamma\lambda_i(4\bar E+\sigma^2)\). Both sides are \(\lambda_i\) times a factor independent of the direction, so the sum over \(i\) can be pulled out and defined as the forgetting kernel (\(u\) is the time elapsed since the injection):

\[K_M(u)=\sum_{i\le M}\lambda_i^2e^{-2\lambda_i u}. \tag{39}\]

The first \(\lambda_i\) in the kernel comes from the gradient noise injected into this direction, the second from converting squared parameter error into loss, and the exponential is the fraction of that noise still left after time \(u\). Up to constant factors, Eq. (38) becomes

\[\bar E(t)\asymp E_M(t)+\int_0^tK_M(t-r)\,\gamma(r)\,\bigl[\bar E(r)+\sigma^2\bigr]\,dr . \tag{40}\]

The integral only involves past times, so this is a Volterra-type integral equation: \(\bar E\) appears inside its own integral. The key point is that the kernel has finite total mass:

\[\int_0^\infty K_M(u)\,du=\sum_{i\le M}\lambda_i^2\cdot\frac1{2\lambda_i}=\tfrac12\sum_{i\le M}\lambda_i<\infty , \tag{41}\]

and this stays true as \(M\to\infty\) because \(\beta>1\), i.e. the trace of the Hessian is finite. If the upper bound \(\gamma_{\max}\) of the effective learning rate is small enough, each application of the integral shrinks the maximum of its input by a fixed ratio, so Eq. (40) expands into a convergent series: the deterministic part, plus “one round of noise”, plus “noise caused by noise”, and so on. A closer comparison shows the later rounds are at most constant multiples of the first, so computing one round already gives the right order of magnitude. This resolves the self-feedback.

Step two: replace the finite kernel by a power law. The kernel is again a superposition of exponentials, so the integral of Section 4 applies directly. There the weights were \(a_i\asymp i^{-1-s\beta}\); here they are \(\lambda_i^2\asymp i^{-2\beta}\), which amounts to replacing \(s\) by \(2-1/\beta\). So the infinite-dimensional kernel is

\[K_\infty(u)\asymp(1+u)^{-(2-1/\beta)} . \tag{42}\]

The finite kernel never exceeds the infinite one; the two are of the same order for \(u\lesssim M^\beta\), after which the finite kernel decays exponentially. For time gaps beyond \(M^\beta\), the infinite kernel contributes only \(\int_{M^\beta}^\infty K_\infty\asymp M^{1-\beta}\). In the “hard regime” \(s\le1-1/\beta\) this is at most the truncation loss \(M^{-s\beta}\) and is absorbed by it, so we may use the infinite kernel throughout the integral.

Conclusion. Put \(E_M(r)\asymp M^{-s\beta}+(1+r)^{-s}\) from Section 4 and Eq. (42) into Eq. (40). This gives the form of Theorem 4.2 in the paper for the top retained directions in the hard regime:

\[\boxed{\; \bar E(t)\asymp M^{-s\beta}+(1+t)^{-s} +\int_0^t \frac{\gamma(r)\bigl[(1+r)^{-s}+\sigma^2\bigr]} {(1+t-r)^{2-1/\beta}}\,dr\;} \tag{43}\]

This is the Functional Scaling Law. Reading it term by term:

  • \(M^{-s\beta}\): the truncation loss from model size, from Eq. (17);
  • \((1+t)^{-s}\): the deterministic training-time power law, from Eq. (18), with \(t\) the cumulative step size, i.e. the intrinsic time;
  • the integral: SGD noise. What is injected at time \(r\) is proportional to the effective learning rate \(\gamma(r)\) times the loss at that time, \((1+r)^{-s}\) (plus label noise \(\sigma^2\)), and it then decays to time \(t\) through the forgetting kernel \((1+t-r)^{-(2-1/\beta)}\).

Here I used Gaussian features to compute the variance term by term; the paper obtains comparable bounds under more general fourth-moment assumptions for its intrinsic-time SDE. The total population loss also includes the irreducible label loss \(\sigma^2/2\). (Li et al., Functional Scaling Laws in Kernel Regression)

It is called a functional law because the loss is no longer just a function of \((M,t)\): it depends on the whole learning-rate schedule \(\gamma(\cdot)\). For the same cumulative step size \(t\), different shapes of \(\gamma(r)\) give different losses.

10. What the integral says about the schedule

Take a constant effective rate \(\gamma\) and label-noise variance \(\sigma^2>0\). The label-noise part alone contributes to the integral in Eq. (43)

\[\gamma\sigma^2\int_0^t (1+u)^{-(2-1/\beta)}\,du \;\xrightarrow{t\to\infty}\; \gamma\sigma^2\,\frac{\beta}{\beta-1}. \tag{44}\]

So label noise leaves a loss plateau of order \(\gamma\sigma^2\). If we use \(D\) fresh samples in total, with \(B\) samples per step and \(\eta=\gamma B\) of intrinsic time per step, then \(t=\gamma D\). When the model is large enough and label noise dominates the stochastic term, we balance the deterministic term against the plateau:

\[(\gamma D)^{-s}\asymp \gamma\sigma^2 \quad\Longrightarrow\quad \gamma\asymp D^{-s/(1+s)},\qquad \bar E\asymp D^{-s/(1+s)} . \tag{45}\]

I treat the positive \(\sigma^2\) as fixed. A larger rate lets us travel further in intrinsic time, but it keeps injecting more noise at the end. A decaying schedule can slow that injection while the earlier noise fades. This is why we keep the full integral: the cumulative step size tells us how far gradient flow has gone, and the history of the effective rate tells us how much noise survives.


References

Cite this post

If you find this post useful in your work, you can cite it as:

Chi, Yuhan. “From a Quadratic Hessian to a Functional Scaling Law.” November 29, 2026. https://yuhanchi.github.io/writing/from-hessian-to-functional-scaling-law/

This post follows and re-derives parts of the Functional Scaling Law paper. To cite the underlying result, please cite Li et al., 2025. To cite this post, use the following BibTeX entry:

@misc{chi2026functionalscaling,
  author = {Chi, Yuhan},
  title = {{From a Quadratic Hessian to a Functional Scaling Law}},
  year = {2026},
  month = nov,
  howpublished = {Blog post},
  url = {https://yuhanchi.github.io/writing/from-hessian-to-functional-scaling-law/}
}