Why wide neural networks share the same loss-curve fine structure

· 73 min · 15412 words · nor

TL;DR

We start from a common empirical observation: when two sufficiently wide networks are trained on the same ordered sequence of minibatches, the small rises and falls in their loss curves can align almost step for step, even when their initializations are independent, and attempt to explain this in an elementary manner.

For a smooth two-layer network in the classical mean-field parameterization, trained for a fixed number TT of SGD steps, we show that for every fixed data stream UU, the vector of losses over steps differs from the deterministic infinite-width loss vector associated with UU by a vector whose RMS size is OT(m1/2)O_T(m^{-1/2}). The same conclusion holds after applying any fixed linear detrending operator QQ.

If the examples used at every step are independent and the batch size bb is also allowed to vary, we show using another approach that, writing the finite-width loss vector in its two-factor Hoeffding/functional-ANOVA decomposition

μm,b+Dm,b(U)+Jm,b(I)+Xm,b(I,U), \mu_{m,b}+D_{m,b}(U)+J_{m,b}(I)+X_{m,b}(I, U),

where DD is the data-only component, JJ is the initialization-only component, and XX is their interaction, under some smoothness and stability assumptions we get

Dm,bL2=OT(b1/2),Jm,bL2=OT(m1/2),Xm,bL2=OT((mb)1/2). \|D_{m,b}\|_{L^2}=O_T(b^{-1/2}), \qquad \|J_{m,b}\|_{L^2}=O_T(m^{-1/2}), \qquad \|X_{m,b}\|_{L^2}=O_T((mb)^{-1/2}).

Effectively, width averages over initialized neurons, batch size averages over examples, and the interaction is averaged over both axes. Consequently, same-data runs synchronize as width grows, while same-initialization runs synchronize as batch size grows.

These are pessimistic finite-horizon upper bounds for a smooth bounded two-layer model. Their constants depend on the training recipe and can grow poorly with the training horizon. Nevertheless, the rates match our empirical observations quite well, including in settings rather far from the one used for the proofs. There are papers using much heavier machinery that strengthen some of these results under different assumptions, but our point is that weaker but empirically useful conclusions already follow from elementary arguments.

Introduction

If you've run multiple experiments while keeping the dataloader seed the same, you may have noticed something interesting: if you zoom into the loss curves, the short-timescale structure is quite detailed, and once the slow trend is removed, the rises and falls on short timescale can line up almost step for step, and this improves as networks get wider.

This is generally thought of as being driven by some sort of shared minibatch noise, but there are a couple of things that this understanding doesn't explain on its own:

  • Why does the initialization stop mattering with width? Is this some kind of concentration effect?
  • Why does the interaction between initialization and data ordering stop mattering too?

We will look at this for a smooth two-layer network in the classical mean-field parameterization, trained for a fixed number of steps with SGD. We will look at this only in the finite time limit, since this effect is quite visible during early training and it'll be easier to not worry about error accumulation as much.

A wide network is, in some sense, an average over many neurons. For a fixed sequence of minibatches, this becomes a Monte Carlo approximation to the infinite width case which corresponds to a full density over an infinite number of neurons (but this estimator is not necessarily unbiased).

So width averages over neurons, which reduces the initialization seed-specific error, while the variance due to the data still remains.

More specifically, we'll prove a bound of the following form, for a smooth two-layer neural network trained for a fixed number of steps using SGD:

Lm(I,U)=F(U)+Rm(I,U) L_m(I, U) = F(U) + R_m(I, U)

with

𝔼I[Rm(I,U)2|U]CTm \mathbb{E}_I [ \|R_m(I, U)\|^2 | U ] \le \frac{C_T}{m}

where mm is the width, II is the initialization, UU is the ordered data stream, LmL_m is the vector of pre-update minibatch losses at each step. FF is the part that depends only on the data stream and other constants related to the training procedure (but not on width), and RmR_m is the residual part, which we show is bounded in expectation. So the amplitude of the width-related noise decays as the width increases. To address the expectation over II, we can use Markov's inequality to get PrI(RmCTmδ|U)δ\mathrm{Pr}_I(\|R_m\| \ge \sqrt{\frac{C_T}{m\delta}} | U) \le \delta.

We will then also show that for mutually independent examples and under some other smoothness conditions, the data, initialization, and interaction components of the loss vector concentrate at the rates OT(b1/2)O_T(b^{-1/2}), OT(m1/2)O_T(m^{-1/2}), and OT((mb)1/2)O_T((mb)^{-1/2}) respectively, in the L2L^2 sense (see the corresponding section for the exact statement). Here and later, OTO_T hides constants that depend on the horizon TT, the training recipe, and the smoothness constants, but not on mm or bb - and as we discuss later, they can grow exponentially in TT.

While this doesn't give us a very general result that we can apply to standard transformer training (architecture/data/loss-wise), it gives us a toy model that can help us reason about this specific behavior, and also make some other predictions, like ones about detrended local loss curves, the kinds of concentration we can expect when scaling up training runs (and the acceptable noise in final loss values in scaling law predictions), and curricula. The bounds are also going to be (potentially extremely) pessimistic - and it seems to be a bad idea to trust pessimistic bounds in ML in general - but they give us some kind of guarantee on the concentration rates (where the exponents match empirical observations).

We first compare finite-width training with a true infinite-width trajectory for an arbitrary fixed data stream, and then use a different finite-(m,b)(m,b) argument to decompose and look at the data, initialization, and interaction effects.

Loss traces and the sources of randomness

Let's say we train the model for TT steps, and let Lm,tL_{m, t} be the loss at step tt. The loss trace corresponding to this run is the TT dimensional vector Lm=(Lm,0,,Lm,T1)L_m = (L_{m, 0}, \dots, L_{m, T - 1}). For any trace (not necessarily just the loss vector), we say v2=t=0T1vt2\|v\|^2 = \sum_{t = 0}^{T - 1} v_t^2.

In a training run, there are two main sources of randomness: the initialization of the model, and the ordering (and contents) of the minibatches. We don't consider dropout/indeterminacy due to kernels/augmentation choices and so on.

We assume that, as usual, these sources are independent of each other. If we want to be pedantic, this may not hold if you've e.g. run data mixture experiments without reshuffling or without changing seeds, or other such things, but this is a reasonable assumption.

The first roadblock is that training couples the two and makes it hard to study them. We can still decompose the loss, however, as:

Lm=μm+Dm+Jm+Xm L_m = \mu_m + D_m + J_m + X_m

where μm=𝔼[Lm]\mu_m = \mathbb{E}[L_m], Dm(U)=𝔼[Lm|U]μmD_m(U) = \mathbb{E}[L_m | U] - \mu_m, Jm(I)=𝔼[Lm|I]μmJ_m(I) = \mathbb{E}[L_m | I] - \mu_m, and Xm=LmμmDmJmX_m = L_m - \mu_m - D_m - J_m.

Here the first term doesn't depend on anything, DmD_m depends on the data stream only, JmJ_m depends on the initialization only, and XmX_m depends on both (it is the part that can't be written as a function of data or initialization alone).

This is a two-factor Hoeffding/functional-ANOVA decomposition.

We have 𝔼[Dm]=𝔼[Jm]=𝔼[Xm]=0\mathbb{E}[D_m] = \mathbb{E}[J_m] = \mathbb{E}[X_m] = 0 and 𝔼[Xm|U]=𝔼[Xm|I]=0\mathbb{E}[X_m | U] = \mathbb{E}[X_m | I] = 0.

As a result, the four parts of this decomposition are orthogonal in expectation (e.g., 𝔼[Dm,Jm]=0\mathbb{E}[\langle D_m, J_m \rangle] = 0), and we can write

𝔼[Lmμm2]=𝔼[Dm2]+𝔼[Jm2]+𝔼[Xm2] \mathbb{E}[\| L_m - \mu_m \|^2] = \mathbb{E}[\| D_m \|^2] + \mathbb{E}[\| J_m \|^2] + \mathbb{E}[\| X_m \|^2]

How do we use this to think about the local loss?

Let's consider static detrending (not data dependent) - e.g., subtract a window mean from the current point. This is a linear transformation of the loss trace, and the detrended loss trace can be represented as QLmQ L_m for some matrix QQ. Since QQ is linear, it gives us a similar decomposition.

We can quantify the local similarity by detrending two loss curves and taking their cosine similarity or the L2 norm of their gap, which will be one of our points of focus.

The model

Consider a two-layer neural network with a single output, with width mm:

fm(x)=1mi=1mϕ(Zi,x) f_m(x) = \frac{1}{m} \sum_{i = 1}^m \phi(Z_i, x)

Here ZiZ_i contains all the information about the ii-th neuron (e.g., for fm(x)=1mi=1maiσ(wix)f_m(x) = \frac{1}{m} \sum_{i = 1}^m a_i \sigma(w_i^\top x), Zi=(ai,wi)Z_i = (a_i, w_i) and ϕ(Zi,x)=aiσ(wix)\phi(Z_i, x) = a_i \sigma(w_i^\top x)).

The factor 1/m1/m is the classical mean-field factor, and it's important because we will now interpret this neural network as a sample average. To do so, we will have to generalize things a bit.

Let's say the minibatch loss over a batch BB of size bb is B(ρ)=1b(x,y)Bλ(y,fρ(x))\ell_B(\rho) = \frac{1}{b} \sum_{(x, y) \in B} \lambda (y, f_{\rho}(x)), where fρ(x)=ϕ(z,x)ρ(dz)f_{\rho}(x) = \int \phi(z, x) \rho(\mathrm{d} z). ρ\rho is a probability measure over "particles" zz.

Then the neural network corresponds to the empirical distribution ρm=1mi=1mδZi\rho_m = \frac{1}{m} \sum_{i = 1}^m \delta_{Z_i}, i.e., the particles are the neurons ZiZ_i, and the empirical distribution is the mean of point masses (delta functions) over the neurons of the neural network. We can superscript these with tt to show that this is a given state of the neural network at step tt, as these particles ZiZ_i evolve during training according to SGD.

In the feature learning regime, we want the "features" ϕ(z,)\phi(z, \cdot) to evolve even in the infinite width limit. For any neuron, the gradients with respect to its parameters scale with 1m\frac{1}{m}, so the parameter-space learning rate should scale proportionally to mm, say mηtm \eta_t at step tt.

Then a single step looks like

Zit+1=ZitηtGBt(Zit,ρmt) Z_{i}^{t+1} = Z_{i}^{t} - \eta_t G_{B_t} (Z_i^t, \rho_m^t)

Here ηt\eta_t is the mean-field-scaled step size, and the scaled neuron update is:

GB(z,ρ)=1b(x,y)Bλ(y,fρ(x))fρ(x)zϕ(z,x) G_B(z, \rho) = \frac{1}{b} \sum_{(x, y) \in B} \frac{\partial \lambda(y, f_{\rho}(x))}{\partial f_{\rho}(x)} \nabla_z \phi(z, x)

Now let's see what happens in the infinite width limit. Let's fix a data order, say U=(B0,,BT1)U = (B_0, \dots, B_{T - 1}).

We have a distribution at step tt, say ρtU\rho^U_{t}. To get to ρt+1U\rho^U_{t+1}, we would sample zz from ρ\rho, apply zzηtGBt(z,ρtU)z \gets z - \eta_t G_{B_t}(z, \rho^U_t), and see what the distribution of the mapped variable is.

The infinite width loss trace consists of Ft(U)=Bt(ρtU)F_t(U) = \ell_{B_t}(\rho^U_t), and this is the F(U)F(U) that we claimed earlier. Once UU is fixed, F(U)F(U) is deterministic.

What is held fixed when width and batch size change

In this parameterization the parameter-space learning rate is mηtm\eta_t (while the "function-space" neuron update learning rate is around η\eta). We keep the finite schedule (η0,,ηT1)(\eta_0,\ldots,\eta_{T-1}) and the horizon TT fixed as width changes. A nonconstant schedule causes no problem, but the constants in the bounds depend on the whole schedule. If the schedule itself changes with width, one needs uniform bounds on the resulting update maps.

The same issue appears when changing batch size. The b1/2b^{-1/2} rate below holds with the effective schedule fixed. If one tunes the learning rate as a function of batch size, the theorem can still be applied separately at every bb, but its constants now change with bb, so the observed scaling no longer isolates the averaging effect. Holding the schedule fixed is most plausible near or above the critical batch size, and less so in the regime where linear batch-size learning-rate scaling is useful.

For simplicity, the model in the proofs has no weight decay. A fixed smooth particle-level drift can be added without changing the argument. With decoupled weight decay applied directly to these particle parameters and the raw learning rate mηtm\eta_t, keeping the particle-level decay fixed requires the raw decay coefficient to scale as 1/m1/m. Other parameterizations need the analogous translation to an effective update whose constants stay uniform.

Fixed-data-stream analysis

Let's fix the batch size, learning rate schedule, the initialization distribution, and pretty much everything other than the width.

Theorem 1: fixed-stream width concentration

We assume some smoothness (Lipschitz) constraints on the neural network, as well as some stability constraints on the training process, to make our life easier:

  • The neurons are initialized i.i.d. (and the inits don't depend on the data).
  • xx, yy, and initial particles ZiZ_i all lie in bounded sets.
  • We use SGD as above, with a fixed learning-rate schedule η0,,ηT1\eta_0,\ldots,\eta_{T-1} and a fixed number of steps TT.
  • There is a common compact set that contains every finite-width/mean-field trajectory we consider up to time TT uniformly in mm and all supported data streams UU.
  • The feature ϕ(z,x)\phi(z, x) is differentiable in zz, and ϕ\phi and its parameter gradient are bounded and Lipschitz on the region reached within the TT steps.
  • The loss is differentiable in the prediction, and its slope is bounded and Lipschitz over the predictions reached within the TT steps.

Note that we don't need independence between batches, so it doesn't matter whether we do SGD, or random reshuffling per epoch, or even no shuffling.

Note that since we are in a finite time regime, this is quite reasonable to expect for a smooth model. We can imagine a two layer MLP with tanh activations, with MSE loss (which may seem unbounded, but under finite time, is not an issue under standard conditions).

Under these assumptions, there is a constant CTC_T, independent of mm and uniform over the supported fixed streams UU, such that

𝔼I[Rm(I,U)2|U]CTm \mathbb{E}_I [ \|R_m(I, U)\|^2 | U ] \le \frac{C_T}{m}

The idea behind the proof is the following. Compare each actual neuron with an ideal infinite-width particle starting from the same initialization. Conditional on UU, the ideal particles remain independent (each one follows the same deterministic sequence of maps driven by the mean-field distribution). The prediction gap then splits into the error accumulated by the coupled dynamics and a centered average of mm independent ideal particles. The latter is an ordinary Monte Carlo term with variance O(1/m)O(1/m). Smoothness gives a recursion for the expected squared particle discrepancy of the form et+1κtet+rt/me_{t+1}\leq\kappa_t e_t+r_t/m. Since e0=0e_0=0 and TT is fixed, we get et=OT(1/m)e_t=O_T(1/m) for a fixed time horizon, and smoothness of the loss gives the claim.

Proof

Let's write down the smoothness conditions first. Suppose there are constants M0,M1,M2,K0,K1,K2M_0, M_1, M_2, K_0, K_1, K_2 such that |ϕ(z,x)|M0|\phi(z, x)| \le M_0, zϕ(z,x)M1\|\nabla_z \phi(z, x)\| \le M_1, zϕ(z,x)zϕ(z,x)M2zz\|\nabla_z \phi(z, x) - \nabla_{z'} \phi(z', x)\| \le M_2 \| z - z' \|, |λ(y,u)|K0|\lambda(y, u)| \le K_0, |uλ(y,u)|K1|\partial_u \lambda(y, u)| \le K_1 and |uλ(y,u)uλ(y,u)|K2|uu||\partial_u \lambda(y, u) - \partial_{u'} \lambda(y, u')| \le K_2 |u - u'|, over whatever we observe during the training run.

Also, the particles Zi0=Zi0Z^0_i = \bar{Z}^0_i are sampled i.i.d. independently of the data.

Now, we try to compare the infinite width limit with the finite width limit. To do that, we pick a particle ZiZ_i, look at the idealized particle Zi\bar{Z}_i (as done before), and look at their joint evolution.

We have Zit+1=ZitηtGBt(Zit,ρmt)Z^{t+1}_i = Z^t_i - \eta_t G_{B_t}(Z_i^t, \rho_m^t) and Zit+1=ZitηtGBt(Zit,ρtU)\bar{Z}^{t+1}_i = \bar{Z}^t_i - \eta_t G_{B_t} (\bar{Z}_i^t, \rho^U_t).

Conditional on the data stream UU, the ideal particles are independent and their distribution is ρtU\rho^U_t.

Let's say the expected discrepancy between the particles at step tt (expectation over initialization) is:

et=1mi=1m𝔼I[ZitZit2|U] e_t = \frac{1}{m} \sum_{i = 1}^m \mathbb{E}_I [\|Z_i^t - \bar{Z}_i^t\|^2 | U]

We will bound the error using smoothness conditions, and then propagate the prediction error through one step of SGD, which will give us a bound on ete_t, and then use it to bound the loss error.

For input xx, we have

fρmt(x)fρtU(x)=1mi(ϕ(Zit,x)ϕ(Zit,x))+1mi(ϕ(Zit,x)𝔼[ϕ(Zit,x)|U]) f_{\rho_m^t}(x) - f_{\rho_t^U}(x) = \frac{1}{m} \sum_i (\phi(Z_i^t, x) - \phi(\bar{Z}_i^t, x)) + \frac{1}{m} \sum_i (\phi(\bar{Z}_i^t, x) - \mathbb{E}[\phi(\bar{Z}_i^t, x) | U])

By our second assumption and the mean-value theorem, we have |ϕ(z,x)ϕ(z,x)|M1zz|\phi(z, x) - \phi(z', x)| \le M_1 \|z - z'\|.

The expectation of the first term squared, conditioned on UU, can then be bounded by M12etM_1^2 e_t using Jensen's inequality.

For the conditional expectation of the second term squared, it is a conditional variance (divided by mm), and hence is upper bounded by the second moment divided by mm, which is upper bounded by M02/mM_0^2 / m.

Now, using (a+b)22a2+2b2(a + b)^2 \le 2a^2 + 2b^2, we get that

𝔼[|fρmt(x)fρtU(x)|2|U]2M12et+2M02/m \mathbb{E}[|f_{\rho_m^t}(x) - f_{\rho_t^U}(x)|^2 | U] \le 2 M_1^2 e_t + 2 M_0^2 / m

Now, we consider the SGD update.

Let's look at GB(z,ρ)GB(z,ρ)\|G_B(z, \rho) - G_B(z', \rho')\|. The unscaled term inside the norm, corresponding to (x,y)(x, y), is λ(y,fρ(x))fρ(x)zϕ(z,x)λ(y,fρ(x))fρ(x)zϕ(z,x)\frac{\partial \lambda(y, f_{\rho}(x))}{\partial f_{\rho}(x)} \nabla_z \phi(z, x) - \frac{\partial \lambda(y, f_{\rho'}(x))}{\partial f_{\rho'}(x)} \nabla_{z'} \phi(z', x). Adding and subtracting λ(y,fρ(x))fρ(x)zϕ(z,x)\frac{\partial \lambda(y, f_{\rho}(x))}{\partial f_{\rho}(x)} \nabla_{z'} \phi(z', x), we get bounds for that term being K1M2zz+M1K2|fρ(x)fρ(x)|K_1 M_2 \|z - z'\| + M_1 K_2 |f_{\rho'}(x) - f_{\rho}(x)|. By triangle inequality, we get an upper bound of K1M2zz+M1K2b(x,y)B|fρ(x)fρ(x)|K_1 M_2 \|z - z'\| + \frac{M_1 K_2}{b} \sum_{(x, y) \in B} |f_{\rho'}(x) - f_{\rho}(x)|.

Let Δit\Delta_i^t be the difference ZitZitZ_i^t - \bar{Z}_i^t. Then we have Δit+1=Δitηt(GBt(Zit,ρmt)GBt(Zit,ρtU))\Delta_i^{t+1} = \Delta_i^{t} - \eta_t (G_{B_t}(Z_i^t, \rho_m^t) - G_{B_t}(\bar{Z}_i^t, \rho_t^U)).

So we have Δit+1Δit+ηt(K1M2Δit+M1K2b(x,y)B|fρmt(x)fρtU(x)|)\|\Delta_i^{t+1}\| \le \|\Delta_i^{t}\| + \eta_t (K_1 M_2 \|\Delta_i^t\| + \frac{M_1 K_2}{b} \sum_{(x, y) \in B} |f_{\rho_m^t}(x) - f_{\rho_t^U}(x)|).

Applying Cauchy-Schwarz to the second term, we get Δit+1Δit(1+ηtK1M2)+ηtM1K2b(x,y)B|fρmt(x)fρtU(x)|2\|\Delta_i^{t+1}\| \le \|\Delta_i^{t}\|(1 + \eta_t K_1 M_2) + \frac{\eta_t M_1 K_2}{\sqrt{b}} \sqrt{\sum_{(x, y) \in B} |f_{\rho_m^t}(x) - f_{\rho_t^U}(x)|^2}.

Squaring and using (a+b)22a2+2b2(a + b)^2 \le 2a^2 + 2b^2 again, and taking conditional expectation over II given UU, we get

et+1(2(1+η*K1M2)2+4η*2M14K22)et+4η*2M02M12K22m, e_{t + 1} \le (2(1 + \eta_* K_1 M_2)^2 + 4 \eta_*^2 M_1^4 K_2^2) e_t + \frac{4 \eta_*^2 M_0^2 M_1^2 K_2^2}{m},

where e0=0e_0 = 0 and η*=maxt<Tηt\eta_*=\max_{t<T}\eta_t. We can then unroll this recursion.

Note two things:

  • For a fixed number of steps, even though the bound becomes exponential in tt, it gives a bound that depends inversely on mm. The error accumulation that leads to such an issue is also why our analysis may give us useless bounds for long training times.
  • Our bounds are quite weak, e.g., one way to strengthen them is to use (a+b)2(1+δ)a2+(1+1δ)b2(a + b)^2 \le (1 + \delta) a^2 + (1 + \frac{1}{\delta}) b^2 (and there are other issues such as applying loose global bounds).

Now, we want to see how loss behaves.

The mean value theorem with the loss derivative boundedness assumption gives |λ(y,u)λ(y,v)|K1|uv||\lambda(y, u) - \lambda(y, v)| \le K_1|u - v|, so |Lm,tFt(U)|K11b(x,y)B|fρmt(x)fρtU(x)|2|L_{m, t} - F_t(U)| \le K_1 \sqrt{\frac{1}{b} \sum_{(x, y) \in B} |f_{\rho_m^t}(x) - f_{\rho_t^U}(x)|^2}. Squaring and taking the conditional expectation with respect to II given UU, then using the prediction error bounds in terms of ete_t and the ete_t bound we have above, we get the desired

𝔼I[Rm(I,U)2|U]CTm \mathbb{E}_I [ \|R_m(I, U)\|^2 | U ] \le \frac{C_T}{m}

Corollary: detrending and same-stream loss synchronization

Now let's see what happens with a linear transform QQ.

We have QLmQF(U)2Qop2LmF(U)2\|QL_m - QF(U)\|^2 \le \|Q\|_{\mathrm{op}}^2 \|L_m - F(U)\|^2, so

𝔼I[QLmQF(U)2|U]Qop2CTm \mathbb{E}_I [ \|QL_m - QF(U)\|^2 | U ] \le \frac{\|Q\|_{\mathrm{op}}^2 C_T}{m}

Now using (a+b)22a2+2b2(a + b)^2 \le 2a^2 + 2b^2 element-wise, for two independently initialized runs of widths mm and nn with the same data stream, we get

𝔼I,I[QLmQLn2|U]2Qop2CT(1m+1n) \mathbb{E}_{I,I'} [ \|QL_m - QL_n\|^2 | U ] \le 2\|Q\|_{\mathrm{op}}^2 C_T \left(\frac{1}{m} + \frac{1}{n}\right)

If QF(U)QF(U) is nonzero, the gap bound also gives QLm,QLnQLmQLn1\frac{\langle QL_m, QL_n \rangle}{\|QL_m\|\|QL_n\|} \to 1 in conditional probability as m,nm,n\to\infty. The gap bound is a stronger and potentially more useful statement.

Let's look at the Hoeffding components again. If D(U)=F(U)𝔼[F(U)]D_{\infty}(U) = F(U) - \mathbb{E}[F(U)], then QDmQDQD_m \to QD_\infty, QJm0QJ_m \to 0, and QXm0QX_m \to 0 in mean square, where the last two terms scale as O(m1/2)O(m^{-1/2}) (due to orthogonality and operator norms). Synchronization only needs the interaction and the initialization terms to vanish (which they do).

Some discussion is in order:

  • This only considers upper bounds, and these are very strong conditions and the bounds we have are extremely pessimistic. One can still think about some of these inequalities being approximations (with smaller constant factors), and getting more realistic constants, but that is still not a proper proof. In fact, it is also possible that the O(1/m)O(1/m) rate is not tight, and that the convergence is even faster. However, Bordelon and Pehlevan (2023) do a sharper analysis of finite width corrections and get a similar rate. We also show this rate experimentally for our setting.
  • There is a difference between two ideas - ensemble at a fixed width and the actual infinite-width limit. Our O(m1/2)O(m^{-1/2}) bound controls the total deviation and is dominated by initialization noise. Vyas et al. (2023) show empirically that after ensembling away this noise, a systematic O(1/m)O(1/m) finite-width bias remains. We do not resolve that smaller effect. This is one way in which the next section's approach differs from this section, where the reference is a finite-width ensemble rather than the mean-field limit.
  • Unlike a gradient-flow argument, our discrete-time argument is not immediately incompatible with edge-of-stability behavior. However, its constants can grow exponentially with the number of steps and may become useless by the time progressive-sharpening finishes. It is possible that a different explanation dominates at such horizons, and I have not thought in more detail about this.
  • Boundedness is used to keep all derivative constants uniform over the trajectories being compared. Projected methods can make this easier, though their boundary effects would need separate treatment. Weaker assumptions should also be possible, but the present ones make the main mechanism clear regardless.

Changing the batch size

In the previous section, we fixed bb and got the regime where the data dependent loss fine structure can survive as width goes to infinity. If we increase bb, we should expect the data component to concentrate too. Scaling width reduces the randomness due to sampling finitely many neurons at init, while scaling batch size reduces the randomness due to sampling finitely many examples (and their interaction is affected by both).

The two results use different comparisons, and neither is just a corollary of the other. The first allows an arbitrary fixed or reshuffled stream and compares a finite network with its true mean-field limit, but says nothing about varying bb. The result below assumes independent examples and stronger smoothness, and compares a run with finite-(m,b)(m,b) ensemble means rather than with an infinite-width trajectory.

Let's first look at what happens when there is no training, i.e., before the first step.

Let ξ=(x,y)\xi = (x, y) denote a random example, and let h(ξ)=λ(y,fρ0(x))h(\xi) = \lambda(y, f_{\rho_0}(x)) be the single-sample loss.

The infinite-width minibatch loss before any update is F0,b=1br=1bh(ξr)F_{0,b} = \frac{1}{b}\sum_{r = 1}^b h(\xi_r). Since the ξξ-s are i.i.d., the variance of F0,bF_{0, b} is exactly 1/b1/b times the variance of h(ξ)h(\xi).

Now when there's training, an example affects both the current loss as well as the loss for subsequent steps.

We will make a stronger assumption this time: all bTbT examples ξt,r\xi_{t,r} are mutually independent, and within each step they are identically distributed. The step-tt distribution PtP_t may vary with tt, which allows for using fixed randomized curricula. The argument below doesn't directly handle the more commonly used random reshuffling without replacement, and it would need some more work.

Let Lm,b=Lm,b(I,U)TL_{m,b}=L_{m,b}(I,U)\in\mathbb{R}^T be the loss trace, where I=(Z10,,Zm0)I=(Z_1^0,\ldots,Z_m^0) and U=(ξt,r)0t<T,1rbU=(\xi_{t,r})_{0\le t<T,\,1\le r\le b}. We use the same finite-size Hoeffding decomposition:

Lm,b=μm,b+Dm,b+Jm,b+Xm,b. L_{m,b}=\mu_{m,b}+D_{m,b}+J_{m,b}+X_{m,b}.

The components are defined at the actual finite mm and bb (note that this is different from the previous section where we could use infinite width), with μm,b=𝔼[Lm,b]\mu_{m,b}=\mathbb{E}[L_{m,b}]:

Dm,b=𝔼[Lm,bU]μm,b, D_{m,b}=\mathbb{E}[L_{m,b}\mid U]-\mu_{m,b},

Jm,b=𝔼[Lm,bI]μm,b, J_{m,b}=\mathbb{E}[L_{m,b}\mid I]-\mu_{m,b},

and Xm,b=Lm,bμm,bDm,bJm,bX_{m,b}=L_{m,b}-\mu_{m,b}-D_{m,b}-J_{m,b}.

In particular, the width-mm ensemble trace for a fixed stream is

Lm,b(U)=𝔼I[Lm,bU]=μm,b+Dm,b(U), \bar L_{m,b}(U)=\mathbb{E}_I[L_{m,b}\mid U]=\mu_{m,b}+D_{m,b}(U),

so

Lm,bLm,b(U)=Jm,b+Xm,b. L_{m,b}-\bar L_{m,b}(U)=J_{m,b}+X_{m,b}.

Similarly, the data ensemble for a fixed initialization is

Lm,bI(I)=𝔼U[Lm,bI]=μm,b+Jm,b(I). \bar L^{\,I}_{m,b}(I) = \mathbb E_U[L_{m,b}\mid I] = \mu_{m,b}+J_{m,b}(I).

Unlike in the previous section, this is not the infinite-width limit: the systematic finite-width displacement of the ensemble mean is already inside Lm,b\bar{L}_{m,b}.

Theorem 2: two-factor (minibatch and initialization) finite-size concentration

Under the assumptions in the proof below, there are constants independent of mm and bb such that

Jm,bL2=OT(m1/2),Dm,bL2=OT(b1/2),Xm,bL2=OT((mb)1/2), \|J_{m,b}\|_{L^2}=O_T(m^{-1/2}), \qquad \|D_{m,b}\|_{L^2}=O_T(b^{-1/2}), \qquad \|X_{m,b}\|_{L^2}=O_T((mb)^{-1/2}),

where YL2=(𝔼Y2)1/2\|Y\|_{L^2}=(\mathbb{E}\|Y\|^2)^{1/2}.

The first two rates are what we would expect from averaging neurons and examples separately. The last rate gives us a concrete higher-order term averaged over both axes.

The proof idea is to replace one initialized neuron, one training example, or both by independent copies. Stability and the two averages in the update give deterministic influence bounds of OT(m1)O_T(m^{-1}), OT(b1)O_T(b^{-1}), and OT((mb)1)O_T((mb)^{-1}) on the whole loss trace. Efron-Stein then squares and sums these influences over mm neurons, bTbT examples, or all mbTmbT neuron-example pairs. This gives second moments of order m1m^{-1}, b1b^{-1}, and (mb)1(mb)^{-1} respectively.

Proof

Write one SGD update as

Zit+1=Zitηtbr=1bg(Zit,ξt,r,fmt(xt,r)), Z_i^{t+1}=Z_i^t-\frac{\eta_t}{b}\sum_{r=1}^b g\left(Z_i^t,\xi_{t,r},f_m^t(x_{t,r})\right),

where

g(z,ξ,u)=uλ(y,u)zϕ(z,x), g(z,\xi,u)=\partial_u\lambda(y,u)\nabla_z\phi(z,x),

and ξ=(x,y)\xi=(x,y). The prediction at a particle configuration 𝐳=(z1,,zm)\mathbf z=(z_1,\ldots,z_m) is

f𝐳(x)=1mj=1mϕ(zj,x). f_{\mathbf z}(x)=\frac1m\sum_{j=1}^m\phi(z_j,x).

The loss before the update is

B(m)(𝐳)=1br=1bλ(yr,f𝐳(xr)). \ell_B^{(m)}(\mathbf z)=\frac1b\sum_{r=1}^b\lambda\left(y_r,f_{\mathbf z}(x_r)\right).

Thus, if Bt=(ξt,1,,ξt,b)B_t=(\xi_{t,1},\ldots,\xi_{t,b}) is the batch at step tt, then

𝐙t+1=Tt,Bt(m)(𝐙t), \mathbf Z^{t+1}=T_{t,B_t}^{(m)}(\mathbf Z^t),

where Tt,B(m)T_{t,B}^{(m)} denotes one SGD step, and

Lm,b,t=Bt(m)(𝐙t). L_{m,b,t}=\ell_{B_t}^{(m)}(\mathbf Z^t).

The full loss trace is

Lm,b=(Lm,b,0,,Lm,b,T1)T, L_{m,b}=(L_{m,b,0},\ldots,L_{m,b,T-1})\in\mathbb R^T,

and we use the usual Euclidean norm on traces:

v2=t=0T1vt2. \|v\|^2=\sum_{t=0}^{T-1}v_t^2.

Let's first write down the assumptions:

  • The number of steps TT and the effective learning-rate schedule η0,,ηT1\eta_0,\ldots,\eta_{T-1} are fixed as mm and bb change, as discussed in the parameterization section above. In particular, increasing bb also increases the total number bTbT of examples used.
  • The initialized particles are i.i.d.
  • The examples are mutually independent and independent of the initialization. Within step tt they are identically distributed according to PtP_t, but PtP_t may vary with tt.
  • The initialization and data distributions have bounded support.
  • There is a fixed compact convex set KK containing every particle state reached during the first TT steps, including in the coupled runs used below.
  • On this region, the first and second derivatives of ϕ\phi and gg with respect to their numerical arguments are bounded.
  • The loss λ(y,u)\lambda(y,u), its first derivative with respect to uu, and its second derivative with respect to uu are bounded over the predictions reached during training.

All derivative bounds below are understood to hold on a compact convex set containing the particle states and on a compact interval containing every prediction encountered in the coupled runs. Thus, every line segment used in the mean-value and fundamental-theorem-of-calculus arguments remains inside the region where the derivative bounds hold.

No differentiability with respect to the example ξ=(x,y)\xi=(x,y) is needed.

For convenience, choose constants such that

zϕ(z,x)Mϕ, \|\nabla_z\phi(z,x)\|\le M_\phi,

g(z,ξ,u)g(z,ξ,u)Lg(zz+|uu|), \|g(z,\xi,u)-g(z',\xi,u')\|\le L_g\left(\|z-z'\|+|u-u'|\right),

g(z,ξ,u)G, \|g(z,\xi,u)\|\le G,

|λ(y,u)|Λ, |\lambda(y,u)|\le\Lambda,

|λ(y,u)λ(y,u)|Mλ|uu|, |\lambda(y,u)-\lambda(y,u')|\le M_\lambda|u-u'|,

and the first derivatives of ϕ\phi, gg, and λ\lambda are Lipschitz, with constants bounded by HϕH_\phi, HgH_g, and HλH_\lambda.

We replace one initialized particle Zi0Z_i^0 by an independent copy and get a new trace L(i)L^{(i)}. Similarly, we replace one example ξs,r\xi_{s,r} and get a new trace L(s,r)L^{(s,r)}. We then replace both and get a new trace L(i;s,r)L^{(i;s,r)}.

Define

ΔiZL=LL(i), \Delta_i^ZL=L-L^{(i)},

Δs,rξL=LL(s,r), \Delta_{s,r}^{\xi}L=L-L^{(s,r)},

and

ΔiZΔs,rξL=LL(i)L(s,r)+L(i;s,r). \Delta_i^Z\Delta_{s,r}^{\xi}L=L-L^{(i)}-L^{(s,r)}+L^{(i;s,r)}.

We will first prove that there are constants AT,BT,CTA_T,B_T,C_T, independent of mm, bb, ii, ss, and rr, such that

ΔiZLATm, \|\Delta_i^ZL\|\le\frac{A_T}{m},

Δs,rξLBTb, \|\Delta_{s,r}^{\xi}L\|\le\frac{B_T}{b},

and

ΔiZΔs,rξLCTmb. \|\Delta_i^Z\Delta_{s,r}^{\xi}L\|\le\frac{C_T}{mb}.

For two particle configurations (neural network weights), define

𝐳𝐳av=1mj=1mzjzj, \|\mathbf z-\mathbf z'\|_{\mathrm{av}}=\frac1m\sum_{j=1}^m\|z_j-z_j'\|,

and

𝐳𝐳=maxjzjzj. \|\mathbf z-\mathbf z'\|_\infty=\max_j\|z_j-z_j'\|.

The average norm is useful for a neuron replacement. Replacing one particle can change that particle by an order-one amount, but the average change over all mm particles is only O(1/m)O(1/m).

The maximum norm is useful for an example replacement. Replacing one example changes the update of every particle by O(1/b)O(1/b), so the perturbation is O(1/b)O(1/b) even in the maximum norm.

We first derive some basic stability bounds.

By the mean value theorem,

|ϕ(z,x)ϕ(z,x)|Mϕzz. |\phi(z,x)-\phi(z',x)|\le M_\phi\|z-z'\|.

This gives

|f𝐳(x)f𝐳(x)|Mϕmj=1mzjzj=Mϕ𝐳𝐳av. |f_{\mathbf z}(x)-f_{\mathbf z'}(x)|\le\frac{M_\phi}{m}\sum_{j=1}^m\|z_j-z_j'\|=M_\phi\|\mathbf z-\mathbf z'\|_{\mathrm{av}}.

Now consider two configurations 𝐳\mathbf z and 𝐳\mathbf z' updated using the same batch BB. For particle ii,

Tt,B,i(m)(𝐳)=ziηtbr=1bg(zi,ξr,f𝐳(xr)). T_{t,B,i}^{(m)}(\mathbf z)=z_i-\frac{\eta_t}{b}\sum_{r=1}^b g\left(z_i,\xi_r,f_{\mathbf z}(x_r)\right).

Using the Lipschitz bound on gg,

Tt,B,i(m)(𝐳)Tt,B,i(m)(𝐳)zizi+ηtLgbr=1b(zizi+|f𝐳(xr)f𝐳(xr)|). \|T_{t,B,i}^{(m)}(\mathbf z)-T_{t,B,i}^{(m)}(\mathbf z')\|\le\|z_i-z_i'\|+\frac{\eta_tL_g}{b}\sum_{r=1}^b\left(\|z_i-z_i'\|+|f_{\mathbf z}(x_r)-f_{\mathbf z'}(x_r)|\right).

Using the prediction bound,

Tt,B,i(m)(𝐳)Tt,B,i(m)(𝐳)(1+ηtLg)zizi+ηtLgMϕ𝐳𝐳av. \|T_{t,B,i}^{(m)}(\mathbf z)-T_{t,B,i}^{(m)}(\mathbf z')\|\le(1+\eta_tL_g)\|z_i-z_i'\|+\eta_tL_gM_\phi\|\mathbf z-\mathbf z'\|_{\mathrm{av}}.

Averaging over ii gives

Tt,B(m)(𝐳)Tt,B(m)(𝐳)avκav𝐳𝐳av, \|T_{t,B}^{(m)}(\mathbf z)-T_{t,B}^{(m)}(\mathbf z')\|_{\mathrm{av}}\le\kappa_{\mathrm{av}}\|\mathbf z-\mathbf z'\|_{\mathrm{av}},

where we may take

κav=1+η*Lg(1+Mϕ), \kappa_{\mathrm{av}}=1+\eta_*L_g(1+M_\phi),

with

η*=maxt<Tηt. \eta_*=\max_{t<T}\eta_t.

Taking the maximum over ii gives

Tt,B(m)(𝐳)Tt,B(m)(𝐳)(1+η*Lg)𝐳𝐳+η*LgMϕ𝐳𝐳av. \|T_{t,B}^{(m)}(\mathbf z)-T_{t,B}^{(m)}(\mathbf z')\|_\infty\le(1+\eta_*L_g)\|\mathbf z-\mathbf z'\|_\infty+\eta_*L_gM_\phi\|\mathbf z-\mathbf z'\|_{\mathrm{av}}.

Both constants are independent of mm and bb. This comes from the two averagings: the prediction is an average over mm particles, and the update is an average over bb examples.

The corresponding same-minibatch loss bound is

|B(m)(𝐳)B(m)(𝐳)|MλMϕ𝐳𝐳av. |\ell_B^{(m)}(\mathbf z)-\ell_B^{(m)}(\mathbf z')|\le M_\lambda M_\phi\|\mathbf z-\mathbf z'\|_{\mathrm{av}}.

Now suppose that batches BB and BB' differ in exactly one example. Then, only one term in the update changes. Since gG\|g\|\le G,

Tt,B(m)(𝐳)Tt,B(m)(𝐳)2η*Gb. \|T_{t,B}^{(m)}(\mathbf z)-T_{t,B'}^{(m)}(\mathbf z)\|_\infty\le\frac{2\eta_*G}{b}.

Similarly, only one term in the loss changes, so:

|B(m)(𝐳)B(m)(𝐳)|2Λb. |\ell_B^{(m)}(\mathbf z)-\ell_{B'}^{(m)}(\mathbf z)|\le\frac{2\Lambda}{b}.

We also need to know how the effect of replacing an example changes when the particle configuration changes. Suppose again that BB and BB' differ in one example. Applying the Lipschitz bound on gg to the replaced example and to its independent copy gives

[Tt,B(m)(𝐳)Tt,B(m)(𝐳)][Tt,B(m)(𝐳)Tt,B(m)(𝐳)]avCb𝐳𝐳av, \left\|[T_{t,B}^{(m)}(\mathbf z)-T_{t,B'}^{(m)}(\mathbf z)]-[T_{t,B}^{(m)}(\mathbf z')-T_{t,B'}^{(m)}(\mathbf z')]\right\|_{\mathrm{av}}\le\frac{C}{b}\|\mathbf z-\mathbf z'\|_{\mathrm{av}},

where CC depends only on η*\eta_*, LgL_g, and MϕM_\phi.

The analogous loss bound is

|[B(m)(𝐳)B(m)(𝐳)][B(m)(𝐳)B(m)(𝐳)]|Cb𝐳𝐳av. \left|[\ell_B^{(m)}(\mathbf z)-\ell_{B'}^{(m)}(\mathbf z)]-[\ell_B^{(m)}(\mathbf z')-\ell_{B'}^{(m)}(\mathbf z')]\right|\le\frac{C}{b}\|\mathbf z-\mathbf z'\|_{\mathrm{av}}.

We can now prove the first two replacement bounds.

First, replace one initialized neuron. Let's couple the original and perturbed runs so that they use the same data stream. Let their particle configurations be 𝐙t\mathbf Z^t and 𝐙̃t\widetilde{\mathbf Z}^t, and define

at=𝐙t𝐙̃tav. a_t=\|\mathbf Z^t-\widetilde{\mathbf Z}^t\|_{\mathrm{av}}.

At initialization, only one of the mm particles differs. Since KK is bounded, there is a constant DKD_K such that

a0DKm. a_0\le\frac{D_K}{m}.

The two runs use the same batch at every step, so

at+1κavat. a_{t+1}\le\kappa_{\mathrm{av}}a_t.

Unrolling the recursion, we get

atDKκavtm. a_t\le\frac{D_K\kappa_{\mathrm{av}}^t}{m}.

The loss difference at step tt is therefore bounded by

|Lm,b,tLm,b,t(i)|MλMϕatMλMϕDKκavtm. |L_{m,b,t}-L_{m,b,t}^{(i)}|\le M_\lambda M_\phi a_t\le\frac{M_\lambda M_\phi D_K\kappa_{\mathrm{av}}^t}{m}.

Hence

ΔiZL2Mλ2Mϕ2DK2m2t=0T1κav2t. \|\Delta_i^ZL\|^2\le\frac{M_\lambda^2M_\phi^2D_K^2}{m^2}\sum_{t=0}^{T-1}\kappa_{\mathrm{av}}^{2t}.

Since TT is fixed, the sum is a constant depending only on TT. Therefore there is a constant ATA_T such that

ΔiZLATm. \|\Delta_i^ZL\|\le\frac{A_T}{m}.

Now replace one example ξs,r\xi_{s,r}.

The two runs have identical particle states until step ss. At the loss recorded at step ss, one of the bb loss summands changes, so

|Lm,b,sLm,b,s(s,r)|2Λb. |L_{m,b,s}-L_{m,b,s}^{(s,r)}|\le\frac{2\Lambda}{b}.

At the update at step ss, one of the bb update summands changes, so

𝐙s+1𝐙̃s+12η*Gb. \|\mathbf Z^{s+1}-\widetilde{\mathbf Z}^{s+1}\|_\infty\le\frac{2\eta_*G}{b}.

The same bound also holds in the average norm.

For t>st>s, define

at=𝐙t𝐙̃tav, a_t=\|\mathbf Z^t-\widetilde{\mathbf Z}^t\|_{\mathrm{av}},

and

dt=𝐙t𝐙̃t. d_t=\|\mathbf Z^t-\widetilde{\mathbf Z}^t\|_\infty.

After step ss, the two runs again use the same batches. The stability inequalities give

at+1κavat, a_{t+1}\le\kappa_{\mathrm{av}}a_t,

and

dt+1(1+η*Lg)dt+η*LgMϕat. d_{t+1}\le(1+\eta_*L_g)d_t+\eta_*L_gM_\phi a_t.

Therefore there is a constant κex\kappa_{\mathrm{ex}} such that

at+1+dt+1κex(at+dt). a_{t+1}+d_{t+1}\le\kappa_{\mathrm{ex}}(a_t+d_t).

Since as+1+ds+1=O(1/b)a_{s+1}+d_{s+1}=O(1/b), it follows that for some constant Kex,TK_{\mathrm{ex},T},

at+dtKex,Tb a_t+d_t\le\frac{K_{\mathrm{ex},T}}{b}

for every t>st>s, by unrolling the recursion.

At later steps, the two runs use the same loss batch, so

|Lm,b,tLm,b,t(s,r)|MλMϕatMλMϕKex,Tb. |L_{m,b,t}-L_{m,b,t}^{(s,r)}|\le M_\lambda M_\phi a_t\le\frac{M_\lambda M_\phi K_{\mathrm{ex},T}}{b}.

Combining this with the direct change at step ss, there is a constant BTB_T such that

Δs,rξLBTb. \|\Delta_{s,r}^{\xi}L\|\le\frac{B_T}{b}.

Now it remains to prove the mixed replacement bound

ΔiZΔs,rξLCTmb. \|\Delta_i^Z\Delta_{s,r}^{\xi}L\| \leq \frac{C_T}{mb}.

We first record a deterministic second-order difference lemma.

Rectangle lemma. Let F:ΩqF:\Omega\to\mathbb R^q, where Ω\Omega is convex. Suppose

supxΩDF(x)opMF \sup_{x\in\Omega}\|DF(x)\|_{\mathrm{op}}\leq M_F

and

DF(x)DF(y)opHFxy. \|DF(x)-DF(y)\|_{\mathrm{op}} \leq H_F\|x-y\|.

For four points qacΩq^{ac}\in\Omega, with a,c{0,1}a,c\in\{0,1\}, define

r=q00q10q01+q11, r=q^{00}-q^{10}-q^{01}+q^{11},

α=maxc{0,1}q0cq1c, \alpha= \max_{c\in\{0,1\}} \|q^{0c}-q^{1c}\|,

and

δ=maxa{0,1}qa0qa1. \delta= \max_{a\in\{0,1\}} \|q^{a0}-q^{a1}\|.

Then

F(q00)F(q10)F(q01)+F(q11)CF(r+αδ), \|F(q^{00})-F(q^{10})-F(q^{01})+F(q^{11})\| \leq C_F\left(\|r\|+\alpha\delta\right),

where CFC_F depends only on the derivative bounds and on the compact domain containing the four points.

To prove this, write

h0=q00q10,h1=q01q11. h_0=q^{00}-q^{10}, \qquad h_1=q^{01}-q^{11}.

Then

h0h1=r. h_0-h_1=r.

By the fundamental theorem of calculus,

F(q00)F(q10)=01DF(q10+θh0)h0dθ, F(q^{00})-F(q^{10}) = \int_0^1 DF(q^{10}+\theta h_0)h_0\,\mathrm d\theta,

and

F(q01)F(q11)=01DF(q11+θh1)h1dθ. F(q^{01})-F(q^{11}) = \int_0^1 DF(q^{11}+\theta h_1)h_1\,\mathrm d\theta.

Subtracting these expressions and adding and subtracting DF(q10+θh0)h1DF(q^{10}+\theta h_0)h_1 gives

F(q00)F(q10)F(q01)+F(q11)=01DF(q10+θh0)rdθ+01[DF(q10+θh0)DF(q11+θh1)]h1dθ.\begin{aligned} &F(q^{00})-F(q^{10})-F(q^{01})+F(q^{11})\\ &= \int_0^1 DF(q^{10}+\theta h_0)r\,\mathrm d\theta\\ &\quad+ \int_0^1 \left[ DF(q^{10}+\theta h_0) - DF(q^{11}+\theta h_1) \right]h_1\,\mathrm d\theta. \end{aligned}

The first integral has norm at most MFrM_F\|r\|. For the second integral,

(q10+θh0)(q11+θh1)q10q11+θh0h1δ+r.\begin{aligned} \| (q^{10}+\theta h_0) - (q^{11}+\theta h_1) \| &\leq \|q^{10}-q^{11}\| + \theta\|h_0-h_1\|\\ &\leq \delta+\|r\|. \end{aligned}

Since h1α\|h_1\|\leq\alpha, the second integral is bounded by

HFα(δ+r). H_F\alpha(\delta+\|r\|).

The four points lie in a fixed compact set, so α\alpha is uniformly bounded. The term αr\alpha\|r\| can therefore be absorbed into the coefficient of r\|r\|, which proves the lemma.

We now apply the lemma to four coupled training runs. Write their particle configurations as

𝐙ac,t=(Z1ac,t,,Zmac,t),a,c{0,1}, \mathbf Z^{ac,t} = (Z_1^{ac,t},\ldots,Z_m^{ac,t}), \qquad a,c\in\{0,1\},

where a=1a=1 means that initialized neuron ii was replaced, and c=1c=1 means that example ξs,r\xi_{s,r} was replaced.

For each particle jj, define its rectangle difference by

rjt=Zj00,tZj10,tZj01,t+Zj11,t. r_j^t = Z_j^{00,t} - Z_j^{10,t} - Z_j^{01,t} + Z_j^{11,t}.

Also define the particlewise one-factor perturbations

αjt=maxc{0,1}Zj0c,tZj1c,t, \alpha_j^t = \max_{c\in\{0,1\}} \|Z_j^{0c,t}-Z_j^{1c,t}\|,

and

δjt=maxa{0,1}Zja0,tZja1,t. \delta_j^t = \max_{a\in\{0,1\}} \|Z_j^{a0,t}-Z_j^{a1,t}\|.

At the configuration level, define

at=maxc{0,1}𝐙0c,t𝐙1c,tav, a_t = \max_{c\in\{0,1\}} \|\mathbf Z^{0c,t}-\mathbf Z^{1c,t}\|_{\mathrm{av}},

dt=maxa{0,1}𝐙a0,t𝐙a1,t, d_t = \max_{a\in\{0,1\}} \|\mathbf Z^{a0,t}-\mathbf Z^{a1,t}\|_\infty,

and

Rt=1mj=1mrjt. R_t = \frac1m\sum_{j=1}^m\|r_j^t\|.

The one-neuron and one-example arguments already give, uniformly for t<Tt<T and after enlarging ATA_T and BTB_T if necessary,

atATm,dtBTb. a_t\leq\frac{A_T}{m}, \qquad d_t\leq\frac{B_T}{b}.

We also have

1mj=1mαjt2at, \frac1m\sum_{j=1}^m\alpha_j^t \leq 2a_t,

because the maximum of two nonnegative quantities is at most their sum, and

δjtdt \delta_j^t\leq d_t

for every particle jj.

We first control the corresponding rectangle difference of the prediction.

For a fixed input xx, define

Πt(x)=f𝐙00,t(x)f𝐙10,t(x)f𝐙01,t(x)+f𝐙11,t(x). \Pi_t(x) = f_{\mathbf Z^{00,t}}(x) - f_{\mathbf Z^{10,t}}(x) - f_{\mathbf Z^{01,t}}(x) + f_{\mathbf Z^{11,t}}(x).

Since

f𝐳(x)=1mj=1mϕ(zj,x), f_{\mathbf z}(x) = \frac1m\sum_{j=1}^m\phi(z_j,x),

applying the rectangle lemma to the map zϕ(z,x)z\mapsto\phi(z,x) particle by particle gives

|Πt(x)|Cϕmj=1m(rjt+αjtδjt)Cϕ(Rt+dt1mj=1mαjt)Cϕ(Rt+2atdt).\begin{aligned} |\Pi_t(x)| &\leq \frac{C_\phi}{m} \sum_{j=1}^m ( \|r_j^t\| + \alpha_j^t\delta_j^t)\\ &\leq C_\phi ( R_t + d_t\frac1m\sum_{j=1}^m\alpha_j^t ) \\ &\leq C_\phi(R_t+2a_td_t). \end{aligned}

After changing the constant, we may write this as

|Πt(x)|Cϕ(Rt+atdt). |\Pi_t(x)| \leq C_\phi(R_t+a_td_t).

The corresponding first-order prediction differences satisfy

maxc{0,1}|f𝐙0c,t(x)f𝐙1c,t(x)|Mϕat, \max_{c\in\{0,1\}} \left| f_{\mathbf Z^{0c,t}}(x) - f_{\mathbf Z^{1c,t}}(x) \right| \leq M_\phi a_t,

and

maxa{0,1}|f𝐙a0,t(x)f𝐙a1,t(x)|Mϕdt. \max_{a\in\{0,1\}} \left| f_{\mathbf Z^{a0,t}}(x) - f_{\mathbf Z^{a1,t}}(x) \right| \leq M_\phi d_t.

The first inequality follows from the average norm. For the second, note that

1mj=1mZja0,tZja1,t𝐙a0,t𝐙a1,t. \frac1m\sum_{j=1}^m \|Z_j^{a0,t}-Z_j^{a1,t}\| \leq \|\mathbf Z^{a0,t}-\mathbf Z^{a1,t}\|_\infty.

Now suppose that all four runs use the same batch

B=(ξ1,,ξb). B=(\xi_1,\ldots,\xi_b).

For an example ξq=(xq,yq)\xi_q=(x_q,y_q), write

uqac=f𝐙ac,t(xq). u_q^{ac} = f_{\mathbf Z^{ac,t}}(x_q).

For particle jj, apply the rectangle lemma to the map

(z,u)g(z,ξq,u) (z,u)\longmapsto g(z,\xi_q,u)

at the four points

(Zjac,t,uqac). (Z_j^{ac,t},u_q^{ac}).

The rectangle difference of these four input points is

(rjt,Πt(xq)). (r_j^t,\Pi_t(x_q)).

Their differences in the initialization direction are bounded by

αjt+Mϕat, \alpha_j^t+M_\phi a_t,

and their differences in the example direction are bounded by

δjt+Mϕdt. \delta_j^t+M_\phi d_t.

Consequently,

g(Zj00,t,ξq,uq00)g(Zj10,t,ξq,uq10)g(Zj01,t,ξq,uq01)+g(Zj11,t,ξq,uq11)Cg(rjt+|Πt(xq)|+(αjt+Mϕat)(δjt+Mϕdt)).\begin{aligned} &\| g(Z_j^{00,t},\xi_q,u_q^{00}) - g(Z_j^{10,t},\xi_q,u_q^{10})\\ &\qquad - g(Z_j^{01,t},\xi_q,u_q^{01}) + g(Z_j^{11,t},\xi_q,u_q^{11}) \|\\ &\leq C_g ( \|r_j^t\| + |\Pi_t(x_q)| + (\alpha_j^t+M_\phi a_t) (\delta_j^t+M_\phi d_t) ). \end{aligned}

The average of the product term is bounded by a constant times atdta_td_t. Indeed,

1mj=1m(αjt+Mϕat)(δjt+Mϕdt)=1mjαjtδjt+Mϕdt1mjαjt+Mϕat1mjδjt+Mϕ2atdtCatdt.\begin{aligned} &\frac1m\sum_{j=1}^m (\alpha_j^t+M_\phi a_t) (\delta_j^t+M_\phi d_t)\\ &= \frac1m\sum_j\alpha_j^t\delta_j^t + M_\phi d_t\frac1m\sum_j\alpha_j^t + M_\phi a_t\frac1m\sum_j\delta_j^t + M_\phi^2a_td_t\\ &\leq C a_td_t. \end{aligned}

Here we used

1mjαjtδjtdt1mjαjt2atdt, \frac1m\sum_j\alpha_j^t\delta_j^t \leq d_t\frac1m\sum_j\alpha_j^t \leq 2a_td_t,

as well as

1mjδjtdt. \frac1m\sum_j\delta_j^t\leq d_t.

Together with the prediction rectangle bound, this gives

1mj=1mΔrectgj,qC(Rt+atdt), \frac1m\sum_{j=1}^m \left\| \Delta_{\mathrm{rect}} g_{j,q} \right\| \leq C(R_t+a_td_t),

uniformly in qq.

The update map contains the identity map and an average over the batch. It follows that

Rt+1Rt+ηtC(Rt+atdt). R_{t+1} \leq R_t+\eta_tC(R_t+a_td_t).

Using ηtη*\eta_t\leq\eta_*, there are constants κ2\kappa_2 and C2C_2, independent of mm and bb, such that

Rt+1κ2Rt+C2atdt R_{t+1} \leq \kappa_2R_t+C_2a_td_t

whenever all four runs use the same batch.

The loss obeys an analogous rectangle bound. Applying the rectangle lemma to the map

uλ(yq,u) u\longmapsto\lambda(y_q,u)

for each example and then averaging over the batch gives

|B(m)(𝐙00,t)B(m)(𝐙10,t)B(m)(𝐙01,t)+B(m)(𝐙11,t)|C(Rt+atdt).\begin{aligned} &\left| \ell_B^{(m)}(\mathbf Z^{00,t}) - \ell_B^{(m)}(\mathbf Z^{10,t}) - \ell_B^{(m)}(\mathbf Z^{01,t}) + \ell_B^{(m)}(\mathbf Z^{11,t}) \right|\\ &\leq C(R_t+a_td_t). \end{aligned}

It remains to handle the step at which the replaced example first appears.

Before step ss, changing ξs,r\xi_{s,r} has no effect. Hence, for each aa,

𝐙a0,s=𝐙a1,s. \mathbf Z^{a0,s} = \mathbf Z^{a1,s}.

Write this common state as 𝐙a,s\mathbf Z^{a,s}. In particular,

Rs=0. R_s=0.

Let the original and replacement examples be

ξ=(x,y),ξ=(x,y). \xi=(x,y), \qquad \xi'=(x',y').

For one example, define the vector-valued map

Hξ(𝐳)j=g(zj,ξ,f𝐳(x)). H_\xi(\mathbf z)_j = g(z_j,\xi,f_{\mathbf z}(x)).

The Lipschitz bounds for gg and the prediction imply

Hξ(𝐳)Hξ(𝐳)avLg(𝐳𝐳av+|f𝐳(x)f𝐳(x)|)Lg(1+Mϕ)𝐳𝐳av.\begin{aligned} \|H_\xi(\mathbf z)-H_\xi(\mathbf z')\|_{\mathrm{av}} &\leq L_g ( \|\mathbf z-\mathbf z'\|_{\mathrm{av}} + |f_{\mathbf z}(x)-f_{\mathbf z'}(x)| )\\ &\leq L_g(1+M_\phi) \|\mathbf z-\mathbf z'\|_{\mathrm{av}}. \end{aligned}

At step ss, only one of the bb update summands differs. Therefore

Rs+1=ηsb[Hξ(𝐙0,s)Hξ(𝐙0,s)][Hξ(𝐙1,s)Hξ(𝐙1,s)]av2η*Lg(1+Mϕ)b𝐙0,s𝐙1,savCTmb.\begin{aligned} R_{s+1} &= \frac{\eta_s}{b} \|[H_\xi(\mathbf Z^{0,s})-H_{\xi'}(\mathbf Z^{0,s})]\\ &\qquad\qquad - [H_\xi(\mathbf Z^{1,s})-H_{\xi'}(\mathbf Z^{1,s})] \|_{\mathrm{av}}\\ &\leq \frac{2 \eta_{*} L_g(1 + M_\phi)}{b} \|\mathbf Z^{0,s}-\mathbf Z^{1,s}\|_{\mathrm{av}}\\ &\leq \frac{C_T}{mb}. \end{aligned}

The mixed loss difference at step ss is also controlled directly. All b1b-1 unchanged summands cancel, leaving

|Lm,b,s00Lm,b,s10Lm,b,s01+Lm,b,s11|Mλb(|f𝐙0,s(x)f𝐙1,s(x)|+|f𝐙0,s(x)f𝐙1,s(x)|)2MλMϕasbCTmb.\begin{aligned} &\left| L_{m,b,s}^{00} - L_{m,b,s}^{10} - L_{m,b,s}^{01} + L_{m,b,s}^{11} \right|\\ &\leq \frac{M_\lambda}{b} \Big( |f_{\mathbf Z^{0,s}}(x)-f_{\mathbf Z^{1,s}}(x)| + |f_{\mathbf Z^{0,s}}(x')-f_{\mathbf Z^{1,s}}(x')| \Bigr)\\ &\leq \frac{2M_\lambda M_\phi a_s}{b}\\ &\leq \frac{C_T}{mb}. \end{aligned}

After step ss, the four runs again use the same batch at every step. Hence,

Rt+1κ2Rt+C2atdt. R_{t+1} \leq \kappa_2R_t+C_2a_td_t.

The one-factor replacement bounds give

atdtATBTmb. a_td_t \leq \frac{A_TB_T}{mb}.

Starting from Rs+1C0/(mb)R_{s+1}\leq C_0/(mb), we obtain, for t>s+1t>s+1,

Rt1mb(C0κ2ts1+C2ATBTq=0ts2κ2q). R_t \leq \frac{1}{mb} \left( C_0\kappa_2^{t-s-1} + C_2A_TB_T \sum_{q=0}^{t-s-2}\kappa_2^q \right).

Since TT is fixed, the expression in parentheses is bounded by a constant depending only on TT and the smoothness constants. Thus,

RtCTmb R_t\leq\frac{C_T}{mb}

for every t<Tt<T.

For t<st<s, the mixed loss difference is zero. At t=st=s, it is bounded by CT/(mb)C_T/(mb) by the direct calculation above. For t>st>s, the common-batch loss rectangle bound gives

|Lm,b,t00Lm,b,t10Lm,b,t01+Lm,b,t11|C(Rt+atdt)CTmb.\begin{aligned} &\left| L_{m,b,t}^{00} - L_{m,b,t}^{10} - L_{m,b,t}^{01} + L_{m,b,t}^{11} \right|\\ &\leq C(R_t+a_td_t) \leq \frac{C_T}{mb}. \end{aligned}

Therefore every coordinate of the mixed trace difference is bounded by CT/(mb)C_T/(mb). Consequently,

ΔiZΔs,rξL2=t=0T1|Lm,b,t00Lm,b,t10Lm,b,t01+Lm,b,t11|2TCT2m2b2.\begin{aligned} \|\Delta_i^Z\Delta_{s,r}^{\xi}L\|^2 &= \sum_{t=0}^{T-1} \left| L_{m,b,t}^{00} - L_{m,b,t}^{10} - L_{m,b,t}^{01} + L_{m,b,t}^{11} \right|^2\\ &\leq \frac{TC_T^2}{m^2b^2}. \end{aligned}

Absorbing the fixed factor T\sqrt T into the constant gives

ΔiZΔs,rξLCTmb. \|\Delta_i^Z\Delta_{s,r}^{\xi}L\| \leq \frac{C_T}{mb}.

Together with the previously established bounds

ΔiZLATm,Δs,rξLBTb, \|\Delta_i^ZL\|\leq\frac{A_T}{m}, \qquad \|\Delta_{s,r}^{\xi}L\|\leq\frac{B_T}{b},

this proves the three deterministic replacement bounds.

We now turn them into bounds on the Hoeffding components.

Recall that

Dm,b=𝔼[Lm,bU]𝔼[Lm,b], D_{m,b} = \mathbb E[L_{m,b}\mid U] - \mathbb E[L_{m,b}],

Jm,b=𝔼[Lm,bI]𝔼[Lm,b], J_{m,b} = \mathbb E[L_{m,b}\mid I] - \mathbb E[L_{m,b}],

and

Xm,b=Lm,b𝔼[Lm,bU]𝔼[Lm,bI]+𝔼[Lm,b]. X_{m,b} = L_{m,b} - \mathbb E[L_{m,b}\mid U] - \mathbb E[L_{m,b}\mid I] + \mathbb E[L_{m,b}].

We use the vector Efron-Stein inequality. If a random vector YY depends on independent random variables W1,,WNW_1,\ldots,W_N, and Y(j)Y^{(j)} is obtained by replacing WjW_j by an independent copy, then

𝔼Y𝔼Y212j=1N𝔼YY(j)2. \mathbb E\|Y-\mathbb EY\|^2 \leq \frac12 \sum_{j=1}^N \mathbb E\|Y-Y^{(j)}\|^2.

First consider Jm,bJ_{m,b}, which depends only on the initialization.

Let I(i)I^{(i)} be obtained by replacing initialized neuron ii by an independent copy. Then

Jm,b(I)Jm,b(I(i))=𝔼U[ΔiZLI,I(i)]. J_{m,b}(I)-J_{m,b}(I^{(i)}) = \mathbb E_U[ \Delta_i^ZL \mid I,I^{(i)} ].

Applying Efron-Stein over the mm initialized neurons and then conditional Jensen gives

𝔼Jm,b212i=1m𝔼𝔼U[ΔiZLI,I(i)]212i=1m𝔼ΔiZL212mAT2m2=AT22m.\begin{aligned} \mathbb E\|J_{m,b}\|^2 &\leq \frac12 \sum_{i=1}^m \mathbb E \| \mathbb E_U[ \Delta_i^ZL \mid I,I^{(i)} ] \|^2\\ &\leq \frac12 \sum_{i=1}^m \mathbb E\|\Delta_i^ZL\|^2\\ &\leq \frac12 m\frac{A_T^2}{m^2}\\ &= \frac{A_T^2}{2m}. \end{aligned}

Next consider Dm,bD_{m,b}, which depends only on the data stream.

Let U(s,r)U^{(s,r)} be obtained by replacing example ξs,r\xi_{s,r} by an independent copy. Then

Dm,b(U)Dm,b(U(s,r))=𝔼I[Δs,rξLU,U(s,r)]. D_{m,b}(U)-D_{m,b}(U^{(s,r)}) = \mathbb E_I[ \Delta_{s,r}^{\xi}L \mid U,U^{(s,r)} ].

There are bTbT independent example coordinates. Applying Efron-Stein over them and then conditional Jensen gives

𝔼Dm,b212s=0T1r=1b𝔼𝔼I[Δs,rξLU,U(s,r)]212s=0T1r=1b𝔼Δs,rξL212bTBT2b2=TBT22b.\begin{aligned} \mathbb E\|D_{m,b}\|^2 &\leq \frac12 \sum_{s=0}^{T-1} \sum_{r=1}^b \mathbb E \| \mathbb E_I[ \Delta_{s,r}^{\xi}L \mid U,U^{(s,r)} ] \|^2\\ &\leq \frac12 \sum_{s=0}^{T-1} \sum_{r=1}^b \mathbb E \|\Delta_{s,r}^{\xi}L\|^2\\ &\leq \frac12 bT\frac{B_T^2}{b^2}\\ &= \frac{TB_T^2}{2b}. \end{aligned}

Finally consider the interaction Xm,bX_{m,b}. For every fixed data stream UU, Xm,bX_{m,b} has conditional mean zero over II. We may therefore apply Efron-Stein over the initialized neurons conditionally on UU, and then average over UU as follows:

𝔼Xm,b212i=1m𝔼Xm,bXm,b(i)2. \mathbb E\|X_{m,b}\|^2 \leq \frac12 \sum_{i=1}^m \mathbb E \|X_{m,b}-X_{m,b}^{(i)}\|^2.

The term depending only on the data stream cancels when initialized neuron ii is replaced. The remaining difference is

Xm,bXm,b(i)=ΔiZL𝔼U[ΔiZLI,I(i)]. X_{m,b}-X_{m,b}^{(i)} = \Delta_i^ZL - \mathbb E_U[ \Delta_i^ZL \mid I,I^{(i)} ].

For fixed II and I(i)I^{(i)}, define

Yi(U)=ΔiZL𝔼U[ΔiZLI,I(i)]. Y_i(U) = \Delta_i^ZL - \mathbb E_U[ \Delta_i^ZL \mid I,I^{(i)} ].

This random vector has conditional mean zero over the data stream. Applying conditional Efron-Stein over the bTbT independent example coordinates gives

𝔼U[Yi(U)2I,I(i)]12s=0T1r=1b𝔼U[Yi(U)Yi(U(s,r))2I,I(i)]. \mathbb E_U[ \|Y_i(U)\|^2 \mid I,I^{(i)} ] \leq \frac12 \sum_{s=0}^{T-1} \sum_{r=1}^b \mathbb E_U[ \|Y_i(U)-Y_i(U^{(s,r)})\|^2 \mid I,I^{(i)} ].

The centering term does not depend on the realized data stream, so

Yi(U)Yi(U(s,r))=ΔiZL(ΔiZL)(s,r)=ΔiZΔs,rξL. Y_i(U)-Y_i(U^{(s,r)}) = \Delta_i^ZL - (\Delta_i^ZL)^{(s,r)} = \Delta_i^Z\Delta_{s,r}^{\xi}L.

Substituting this conditional bound into the first Efron-Stein inequality gives

𝔼Xm,b214i=1ms=0T1r=1b𝔼ΔiZΔs,rξL214mbTCT2m2b2=TCT24mb.\begin{aligned} \mathbb E\|X_{m,b}\|^2 &\leq \frac14 \sum_{i=1}^m \sum_{s=0}^{T-1} \sum_{r=1}^b \mathbb E \|\Delta_i^Z\Delta_{s,r}^{\xi}L\|^2\\ &\leq \frac14 mbT \frac{C_T^2}{m^2b^2}\\ &= \frac{TC_T^2}{4mb}. \end{aligned}

Taking square roots gives

Jm,bL2AT2m, \|J_{m,b}\|_{L^2}\le\frac{A_T}{\sqrt{2m}},

Dm,bL2BTT2b, \|D_{m,b}\|_{L^2}\le B_T\sqrt{\frac{T}{2b}},

and

Xm,bL2CTT4mb. \|X_{m,b}\|_{L^2}\le C_T\sqrt{\frac{T}{4mb}}.

Therefore, for fixed TT (and under our original assumptions),

Jm,bL2=OT(m1/2),Dm,bL2=OT(b1/2),Xm,bL2=OT((mb)1/2). \|J_{m,b}\|_{L^2}=O_T(m^{-1/2}),\qquad \|D_{m,b}\|_{L^2}=O_T(b^{-1/2}),\qquad \|X_{m,b}\|_{L^2}=O_T((mb)^{-1/2}).

Consequences of the two-factor decomposition

The same result holds for any fixed linear detrending operator QQ, with every RMS bound multiplied by Qop\|Q\|_{\mathrm{op}}. Thus the batch-size conclusion applies directly to local loss traces as well.

Let V(Q)=𝔼Q2V_{\cdot}(Q) = \mathbb E \|Q \cdot\|^2 for {D,J,X}\cdot \in \{D, J, X\} (these can be measured using run difference variances). Then

VD(Q)=OT(b1),VJ(Q)=OT(m1),VX(Q)=OT((mb)1). V_D(Q)=O_T(b^{-1}), \qquad V_J(Q)=O_T(m^{-1}), \qquad V_X(Q)=O_T((mb)^{-1}).

Again, these are upper bounds, and e.g., don't say that the leading coefficients are nonzero. At initialization, however, the scaling can already be seen from a first-order expansion. Let

f0(x)=𝔼Z[ϕ(Z,x)],ψz(x)=ϕ(z,x)f0(x), f_0(x)=\mathbb{E}_Z[\phi(Z,x)], \qquad \psi_z(x)=\phi(z,x)-f_0(x),

and define

h(ξ)=λ(y,f0(x)), h(\xi)=\lambda(y,f_0(x)),

γξ(z)=f0(x)λ(y,f0(x))ψz(x),γ(z)=𝔼ξ[γξ(z)]. \gamma_\xi(z)=\partial_{f_0(x)}\lambda(y,f_0(x))\psi_z(x), \qquad \bar\gamma(z)=\mathbb{E}_\xi[\gamma_\xi(z)].

Ignoring the second-order Taylor remainder for the moment, the initial minibatch loss decomposes as

1br=1bh(ξr)+1mi=1mγ(Zi)+1mbi=1mr=1b(γξr(Zi)γ(Zi)). \frac1b\sum_{r=1}^b h(\xi_r) + \frac1m\sum_{i=1}^m\bar\gamma(Z_i) + \frac1{mb}\sum_{i=1}^m\sum_{r=1}^b \left(\gamma_{\xi_r}(Z_i)-\bar\gamma(Z_i)\right).

Since 𝔼Z[γξ(Z)]=0\mathbb{E}_Z[\gamma_\xi(Z)]=0 for every ξ\xi, these terms are - a data average, a neuron average, and a degenerate two-way average. After subtracting the common mean from the data average, the RMS scales for these terms are b1/2b^{-1/2}, m1/2m^{-1/2}, and (mb)1/2(mb)^{-1/2} whenever the corresponding variances are nonzero. This is only meant to show that the leading coefficients can already be nonzero at t=0t=0, it is not a uniform joint expansion in mm and bb, and says nothing directly about later steps. The finite-time result above supplies the upper bounds during training.

There are three useful limits:

  • With bb fixed and mm\to\infty, Jm,bJ_{m,b} and Xm,bX_{m,b} vanish, while Dm,bD_{m,b} may remain. This is the loss-synchronization regime.
  • With mm fixed and bb\to\infty, Dm,bD_{m,b} and Xm,bX_{m,b} vanish, while initialization variation may remain.
  • If both grow, all three centered random components vanish at the upper root-mean-square rates above.

Another interesting thing is that if you remove μ\mu from LL to get YQ(I,U)=Q(Lm,b(I,U)μm,b)Y_Q(I,U)=Q(L_{m,b}(I,U) - \mu_{m,b}), we can define normalized shared-factor covariances (where I1,I2I_1,I_2 and U1,U2U_1,U_2 are independent copies):

ρU(Q)=𝔼YQ(I1,U),YQ(I2,U)𝔼YQ2,ρI(Q)=𝔼YQ(I,U1),YQ(I,U2)𝔼YQ2 \rho_U(Q) = \frac{\mathbb E\langle Y_Q(I_1,U),Y_Q(I_2,U)\rangle}{ \mathbb E\|Y_Q\|^2}, \qquad \rho_I(Q) = \frac{\mathbb E\langle Y_Q(I,U_1),Y_Q(I,U_2)\rangle}{ \mathbb E\|Y_Q\|^2}

Then we have

ρU(Q)=VD(Q)VD(Q)+VJ(Q)+VX(Q),ρI(Q)=VJ(Q)VD(Q)+VJ(Q)+VX(Q) \rho_U(Q) = \frac{V_D(Q)}{V_D(Q)+V_J(Q)+V_X(Q)}, \qquad \rho_I(Q) = \frac{V_J(Q)}{V_D(Q)+V_J(Q)+V_X(Q)}

The remaining fraction is the interaction term.

If the rates are tight, write VDcD/bV_D\approx c_D/b, VJcJ/mV_J\approx c_J/m, and VXcX/(mb)V_X\approx c_X/(mb). Then

ρU(Q)cDmcDm+cJb+cX,ρI(Q)cJbcDm+cJb+cX. \rho_U(Q)\approx\frac{c_Dm}{c_Dm+c_Jb+c_X}, \qquad \rho_I(Q)\approx\frac{c_Jb}{c_Dm+c_Jb+c_X}.

Thus the amount of shared variation also depends on the ratio of batch size and width.

There is also the same time-horizon caveat as before. The proof repeatedly multiplies worst-case Lipschitz factors, so AT,BT,CTA_T,B_T,C_T can grow exponentially and become practically useless. The rates in mm and bb, however, are still remarkably robust.

Implications

As earlier, one should remember that this is only a toy model, but we should expect some implications to transfer.

The deterministic influence bounds in the previous section also give conditional versions of the synchronization statements. Uniformly over a fixed supported data stream UU,

𝔼I[Jm,b+Xm,b2U]=OT(m1), \mathbb E_I[\|J_{m,b}+X_{m,b}\|^2\mid U]=O_T(m^{-1}),

and uniformly over a fixed supported initialization II,

𝔼U[Dm,b+Xm,b2I]=OT(b1). \mathbb E_U[\|D_{m,b}+X_{m,b}\|^2\mid I]=O_T(b^{-1}).

Thus training runs with the same data but different initializations synchronize as width grows, while runs with the same initialization but different data synchronize as batch size grows.

Also, due to the rectangle analysis, at sufficiently large mm and bb, the effect of changing initialization becomes nearly independent of the data. And the results we obtained also give evidence for usefulness of tricks such as debugging initialization by using large batches, and (the not-so-common) studying data by using wide networks (under the assumption that things stay stable even after scaling up).

For a fixed scalar statistic (e.g., final step loss or fixed window average for the last window), Y=aLY = a^\top L, there is a factor of a2\|a\|^2 in the bounds, which indicates that averaging across steps can reduce variance in results (but isn't really a proof since other constants can change).

For scaling law runs (with the caveat that this corresponds to training loss instead of validation loss), if the step count is kept the same (unrealistic considering typical batch size scaling laws are sublinear in total tokens, but let's assume this for now), then these results can help be more confident about the typically expected variance (such a variance would also follow a scaling law that can be empirically fitted too), instead of often reported ungrounded measures such as percentage points of loss. It is also worth thinking about what happens when noise can prevent us from measuring scaling improvements cheaply. Let's say our compute scaling law is L=E+ACpL = E + AC^{-p} for an exponent pp and compute CC. Let's say the single run variance is cCqc C^{-q}. If we use a compute multiplier of rr, the expected improvement is proportional to CpC^{-p}, and the single run SNR is proportional to Cq/2pC^{q/2 - p}. If this SNR decreases with CC, then gains become harder to figure out at scale.

Note that the results are still valid when the per-step data distribution is different for different steps. So a fixed curriculum can still be somewhat modeled using this method. It might be possible to think of the data effects in a hierarchical manner - a random curriculum plus within curriculum randomness, and do a similar bounding with three-factor Hoeffding/ANOVA (though it would still be pessimistic).

Experimental results

Measurement and fitting

Details

For every condition, the raw observation was a pre-update loss trace Yiu=Li,uTY_{iu}=L_{i,u}\in\mathbb R^T, with initialization ii and ordered minibatch stream uu fully crossed. We report magnitudes using the time-averaged norm

vT2=1Tt=0T1vt2. \|v\|_T^2=\frac1T\sum_{t=0}^{T-1}v_t^2.

For synchronization, QQ subtracts a centered 21-step moving average (ten steps on either side), using only the available points near the boundaries. For each stream, we average the widest reference networks over initialization to get F̂u\widehat F_u, and measure

Rsync(m)=[1nInUi,uQ(Lm,i,uF̂u)T2]1/2. R_{\mathrm{sync}}(m)= \left[ \frac{1}{n_I n_U}\sum_{i,u} \left\|Q(L_{m,i,u}-\widehat F_u)\right\|_T^2 \right]^{1/2}.

These are wide but finite numerical references, not the infinite-width solution.

The variance components use the standard correction for a crossed random-effects design. Let Yi\bar Y_{i\cdot}, Yu\bar Y_{\cdot u}, and Y\bar Y_{\cdot\cdot} be the initialization, stream, and grand means, and let

Eiu=YiuYiYu+Y. E_{iu}=Y_{iu}-\bar Y_{i\cdot}-\bar Y_{\cdot u}+\bar Y_{\cdot\cdot}.

We compute

MSJ=nUnI1iYiYT2,MSD=nInU1uYuYT2, MS_J=\frac{n_U}{n_I-1}\sum_i\|\bar Y_{i\cdot}-\bar Y_{\cdot\cdot}\|_T^2, \qquad MS_D=\frac{n_I}{n_U-1}\sum_u\|\bar Y_{\cdot u}-\bar Y_{\cdot\cdot}\|_T^2,

MSX=1(nI1)(nU1)i,uEiuT2, MS_X=\frac{1}{(n_I-1)(n_U-1)}\sum_{i,u}\|E_{iu}\|_T^2,

and use the signed estimates

V̂J=MSJMSXnU,V̂D=MSDMSXnI,V̂X=MSX. \widehat V_J=\frac{MS_J-MS_X}{n_U}, \qquad \widehat V_D=\frac{MS_D-MS_X}{n_I}, \qquad \widehat V_X=MS_X.

The plotted component magnitudes are the square roots of the positive estimates.

Exponents come from a rank-weighted least-squares fit of logR=logC+γlogx\log R=\log C+\gamma\log x, with ranks 1,,n1,\ldots,n giving moderately more weight to the larger-scale points. The two-coordinate interaction fit uses logRX=logC+γmlogm+γblogb\log R_X=\log C+\gamma_m\log m+\gamma_b\log b and the product of the width and batch-size ranks. The gray 1/2-1/2 lines in the figures are visual references to compare slopes.

We do 1,000 crossed-factor bootstrap resamples and look at 95%95\% intervals (accounting for initialization and data sampling).

The 12×1212\times12 controlled experiments supports this reasonably well, and intervals from the 4×44\times4 optimizer experiments are more like sanity checks.

Controlled simulation

First we check if the scaling exponents are indeed correct for our special case (single-hidden-layer mean-field network with SGD) in the average case instead of just in the worst case.

We note that the raw loss curves approach the fixed large width loss curve as width increases, and after the fixed detrending operation is used, we see local alignment between loss curves even at small widths, while the initialization-specific deviations reduce with width.

Estimating the RMS magnitudes of DD, JJ, and XX, we get exponents remarkably close to the predicted ones (usually within 0.010.01, and within 0.040.04 in the worst case), with reasonable 95%95\% factor-bootstrap intervals. So we move on to harder and slightly more diverse cases.

Figure 1: Loss concentration in the theoretical setting with SGD
Figure 1: Loss concentration in the theoretical setting with SGD
Details

The particle learning rate for SGD was η=0.05\eta = 0.05 (so the raw learning rate was mηm \eta), the training horizon was 256256 steps, the batch size was 6464, the inputs were uniform on [1,1]3[-1, 1]^3, and the function to be learnt was

y=0.90sin(πx1)+0.45(x2213)0.35x3+0.25x1x3+ε,εUniform[0.08,0.08]. y=0.90\sin(\pi x_1)+0.45\left(x_2^2-\frac13\right) -0.35x_3+0.25x_1x_3+\varepsilon, \qquad \varepsilon\sim\operatorname{Uniform}[-0.08,0.08].

A grid of 1212 initializations and 1212 i.i.d. fresh minibatch orders was used (and initializations at different widths were independent).

The conditional mean of 6 i.i.d. width-3276832768 networks was used as a finite reference for each stream.

Figure 1 uses a particular shared data stream, while the estimates use the full grid.

The synchronization and component width fits at batch size 6464 use widths 3232 through 20482048. The data batch-size fit uses batches 44 through 128128 at width 40964096, and the initialization fit uses widths 128128 through 40964096 at batch size 128128.

Validity beyond the two-layer model, and beyond SGD

We want to check whether the phenomenon is more general (and whether our exponent upper bounds are tight in other scenarios too).

We choose a two-hidden-layer model (MLP with two tanh layers) with three optimizers - SGD with momentum and weight decay, AdamW, and Muon (with weight decay) - all with a linear-to-zero LR schedule, tuned according to loss and transferred using their appropriate μμP parameterizations.

Figure 2 shows concentration for AdamW for a pre-tuning run in the setup, and Figure 3 shows the results of fitting rates for the complete experiment.

We find a reasonable match between the rates derived for a single-hidden-layer mean-field model with SGD and the empirical exponents for these three optimizers on a different model.

Figure 2: Loss concentration for AdamW on a model with more layers
Figure 2: Loss concentration for AdamW on a model with more layers
Figure 3: Scaling exponents for different optimizers
Figure 3: Scaling exponents for different optimizers
Details

We use the same initialized parameters and (more complex) i.i.d. data streams for all three optimizers (4 initialization seeds and 4 data seeds). Every run had 256 steps. Width ranged from d=32,64,,4096d=32,64,\ldots,4096 for measuring width effects at batch size 6464, and batch size ranged from b=16,32,,8192b=16,32,\ldots,8192 for measuring batch-size effects at width 6464. The width-81928192 reference averages four initializations separately for each stream. The width fits use all eight finite-width points, and the batch-size fits use all ten batch sizes. Because there are only four levels of each crossed factor, the component intervals here are primarily sanity checks.

Vyas et al. (2023), Feature-Learning Networks Are Consistent Across Widths At Realistic Scales study agreement of early loss curves, predictions, and representations across widths and study both initialization variance as well as a systematic narrow-ensemble-infinite-width gap. Their initialization-dependent prediction variance scales as 1/m1/m, or m1/2m^{-1/2} in root mean square. They also find an O(1/m)O(1/m) bias rate.

Bordelon and Pehlevan (2023), Dynamics of Finite Width Kernel and Prediction Fluctuations in Mean Field Neural Networks use dynamical mean-field theory to study fluctuations more precisely. They characterize O(m1/2)O(m^{-1/2}) fluctuations of kernels, predictions, and order parameters, corresponding to O(m1)O(m^{-1}) variances, and they include discrete-time large-learning-rate effects. The elementary proof here does not recover their precise conclusions.

The fixed-data analysis uses mean-field and propagation-of-chaos arguments. Relevant results include Mei, Misiakiewicz, and Montanari (2019), Mean-field theory of two-layers neural networks: dimension-free bounds and kernel limit and De Bortoli et al. (2020), Quantitative Propagation of Chaos for SGD in Wide Neural Networks (in continuous time, instead of discrete time SGD). Earlier particle and fluctuation viewpoints include Rotskoff and Vanden-Eijnden (2018), the law-of-large-numbers and central-limit work of Sirignano and Spiliopoulos (2020), and the finite-time dynamical CLT of Chen et al. (2020).

The poor step-count dependence of our proof is not something that is always going to be true. Glasgow, Wu, and Bruna (2025) obtain propagation-of-chaos control beyond logarithmic time in a certain feature-learning problem, and Guillin, Nectoux, and Stos (2026) prove uniform-in-time concentration for a quadratic-loss, ridge-regularized two-layer setting. These works rely on stability or regularization structure absent from the general bounded-Lipschitz estimate here.

The minibatch fluctuation literature is directly relevant to the second theorem. Descours et al. (2024), Law of Large Numbers and Central Limit Theorem for Wide Two-layer Neural Networks: The Mini-Batch and Noisy Case prove trajectorial law-of-large-numbers and central-limit results and study how minibatching contributes to the limiting fluctuation variance. Descours et al. (2026), Quantifying Uncertainty in Wide Two-Layer Neural Networks characterize the limiting Gaussian fluctuation process and its covariance in a related regime. The distinct emphasis in the post is the finite-size two-factor Hoeffding/functional ANOVA, the mixed replacement bound, and the resulting experimental identities for loss traces.

For scaling-law implications, Kaplan et al. (2020) give the early nearly-constant-serial-step prediction (which turns out to be incorrect), while Hoffmann et al. (2022) revise the compute-optimal allocation between model size and tokens. McCandlish et al. (2018) introduce the critical-batch framework; Zhang et al. (2024), Li et al. (2025), and Schaipp (2026) study modern batch-size and step-count scaling. Porian et al. (2024) and Choshen, Zhang, and Andreas (2024) explicitly discuss loss noise and seed variability in scaling-law estimation.

Acknowledgements

GPT 5.6 Sol helped in checking the math in parts of this post, formalizing/expanding upon some arguments, writing experiment code, as well as polishing prose and helping with LaTeX. After my first draft, it also found all the related literature that is cited above. Responsibility for the claims, their correctness and references remains with me.

WhereIsTheExit read through a first draft of the post and gave helpful comments on readability.

Cite this post
@online{wide-loss-fine-structure-2026,
  author = {nor},
  title  = {Why wide neural networks share the same loss-curve fine structure},
  year   = {2026},
  month  = {07},
  day    = {12},
  url    = {https://nor-blog.pages.dev/posts/2026-07-12-why-wide-neural-networks-share-the-same-loss-fine-structure/},
}