Skip to content

Menu

WorksComputer Science

A Closed Form Depth-Width Law for Neural Collapse in Deep Linear Networks

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_qwds3edu. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

How the depth and width of neural networks shape learned representations is difficult to predict from the data and architecture. We use neural collapse (NC) as a probe of the representation geometry and express its first three properties, within-class variability collapse (NC1), simplex class means (NC2) and classifier alignment (NC3), through the learned feature kernel, extending a known identity for NC1 to NC2 and NC3. For deep linear networks with an exchangeable input kernel, the kernel equations yield a geometric law, exact within this theory, for the layerwise decrease of NC1. At large width NN the accumulated decrease becomes a function of the depth-to-width ratio L/NL/N, with its rate determined self-consistently by the data and architecture, yielding a scaling law for representation geometry.

Introduction

Neural collapse (NC) refers to four properties that the last-layer features and the linear classifier of deep classification networks approach in the terminal phase of training, after the training error has vanished: the within-class variability of the features collapses (NC1), the centered class means form a simplex equiangular tight frame (NC2), the classifier vectors align with these class means (NC3), and the classifier reduces to a nearest-class-mean decision (NC4) [9]. The ratio of within- to between-class variability also decreases progressively across the layers of trained networks [4, 10].

How depth, width and data shape this behavior remains an open question, since most analyses of NC remove these dependencies by treating the layer features as free variables [5, 11, 12, 16], or constrain the features by keeping them close to their initial values [13] or by structural assumptions on the inputs and the weights [14]. With LL hidden layers of width NN, the depth-to-width ratio L/NL/N controls the fluctuations of the neural tangent kernel at initialization [2], and depth, width and the number PP of training samples enter the posterior of Bayesian deep linear networks through LP/NLP/N [3].

Here, we show that L/NL/N also controls the layerwise decrease of NC1 in a solvable setting. To this end, we predict NC across layers from a theory describing the feature kernels in trained networks. Given the labels, NC1–NC3 of a layer depend on its features only through the feature kernel, the Gram matrix of the features over the training samples, if NC3 uses the ridge readout of the layer. For Bayesian networks of finite width, the maximum a posteriori (MAP) feature kernels of all layers follow from self-consistency equations in the data, weight prior and architecture [1]. We show that for deep linear networks with an exchangeable input kernel, i.e., invariant under permutations of samples

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: AXIOM Foundations of Efficient Deep Learning. within classes and of the classes, these equations reduce exactly to scalar equations for the within- and between-class kernel eigenvalues on solutions with the same symmetry. Our contributions are:

  • kernel forms of NC2 and NC3 (Proposition 1), complementing that of NC1 [6], which we evaluate on the predicted MAP kernels of Fischer et al. [1] for a nonlinear network (Figure 1);

  • a geometric law for the layerwise decrease of NC1 in deep linear networks with an exchangeable input kernel (Theorem 1), exact within this theory, which shows that the accumulated compression is at leading order controlled by the depth-to-width ratio L/NL/N, with a rate determined self-consistently by the data, weight prior and architecture (Corollary 1).

Figure 1. The kernels capture the layerwise decrease of NC1–NC3 in nonlinear networks. NC1–NC3 of an erf network (N=256N = 256, L=3L = 3) on four-class XOR from the MAP kernels (lines), the feature kernels K(l)K^{(l)} (circles), and raw features zα(l)z_{\alpha}^{(l)} (triangles) of SGLD-trained networks; error bars over initialization seeds, layer 0 is the input. Experimental details are in App. G.

Neural collapse observables from feature kernels

Consider a balanced CC-class problem with nn samples per class, P=CnP=Cn total training samples and one-hot targets Y∈{0,1}P×CY \in\{0,1\}^{P \times C}. At a fixed layer, the feature vectors zαz_\alpha of the training samples form the rows of the feature matrix ZZ, with feature kernel K=ZZTK=ZZ^{\mathsf{T}}, class means μc\mu_c, global mean μG\mu_G, and within- and between-class covariances ΣW\Sigma_W and ΣB\Sigma_B. We quantify NC1–NC3 by

NC1=Tr⁡(ΣW)Tr⁡(ΣB),NC2=∥G^−CC−1HC∥F,NC3=1−1C∑c=1Ccos⁡(wˉc,μc−μG).(1)\mathrm{NC}_1=\frac{\operatorname{Tr}(\Sigma_W)}{\operatorname{Tr}(\Sigma_B)},\qquad \mathrm{NC}_2=\left\lVert\widehat{G}-\frac{C}{C-1}H_C\right\rVert_F,\qquad \mathrm{NC}_3=1-\frac{1}{C}\sum_{c=1}^{C}\cos\left(\bar{w}_c,\mu_c-\mu_G\right). \tag*{(1)}

For NC1, we use the trace ratio of Tirer et al. [13] instead of the measure 1CTr⁡(ΣWΣB†)\frac{1}{C}\operatorname{Tr}(\Sigma_W\Sigma_B^{\dagger}) of Papyan et al. [9]. NC2 measures the deviation of the cosine Gram matrix G^cc′=cos⁡(μc−μG,μc′−μG)\widehat{G}_{cc'}=\cos(\mu_c-\mu_G,\mu_{c'}-\mu_G) of the centered class means from that of a unit-norm simplex equiangular tight frame CC−1HC\frac{C}{C-1}H_C with HC=IC−1C1C1CTH_C=I_C-\frac{1}{C}\mathbf{1}_C\mathbf{1}_C^{\mathsf{T}}. For NC3, the trained classifier is replaced by the ridge readout W=arg min⁡W ∥YT−WZT∥F2+κ∥W∥F2W=\underset{W}{\operatorname{arg\,min}}\ \lVert Y^{\mathsf{T}}-WZ^{\mathsf{T}}\rVert_F^2+\kappa\lVert W\rVert_F^2 with ridge parameter κ>0\kappa>0, whose centered rows are wˉc\bar{w}_c.

With H=IP−1P1P1PTH=I_P-\frac{1}{P}\mathbf{1}_P\mathbf{1}_P^{\mathsf{T}} and Yc=HYY_c=HY, the orthogonal projectors onto the centered class-indicator subspace and onto within-class fluctuations are

PB=Yc(YcTYc)†YcT,PW=H−PB.(2)P_B=Y_c(Y_c^{\mathsf{T}}Y_c)^{\dagger}Y_c^{\mathsf{T}},\qquad P_W=H-P_B. \tag*{(2)}

The rows of S~Z\widetilde{S}Z, with S~=HCYT/n\widetilde{S}=H_CY^{\mathsf{T}}/n, are the centered class means, with Gram matrix G=S~KS~TG=\widetilde{S}K\widetilde{S}^{\mathsf{T}} and D=Diag⁡(G11,…,GCC)D=\operatorname{Diag}(G_{11},\ldots,G_{CC}). We further write U=YT(K+κIP)−1U=Y^{\mathsf{T}}(K+\kappa I_P)^{-1} and U~=HCU\widetilde{U}=H_CU.

Proposition 1 (Kernel forms of the neural-collapse observables). For balanced classes and nonvanishing denominators, NC1–NC3 are functions of the feature kernel KK, the targets YY and, for NC3, the ridge parameter κ\kappa alone,

NC1=Tr⁡(PWK)Tr⁡(PBK),NC2=∥D−1/2GD−1/2−CC−1HC∥F,(3)\mathrm{NC}_1=\frac{\operatorname{Tr}(P_WK)}{\operatorname{Tr}(P_BK)},\qquad \mathrm{NC}_2=\left\lVert D^{-1/2}GD^{-1/2}-\frac{C}{C-1}H_C\right\rVert_F, \tag*{(3)}
NC3=1−1C∑c=1CU~c:KS~c:T(U~c:KU~c:T)(S~c:KS~c:T).(4)\mathrm{NC}_3=1-\frac{1}{C}\sum_{c=1}^{C}\frac{\widetilde{U}_{c:}K\widetilde{S}_{c:}^{\mathsf{T}}}{\sqrt{\left(\widetilde{U}_{c:}K\widetilde{U}_{c:}^{\mathsf{T}}\right)\left(\widetilde{S}_{c:}K\widetilde{S}_{c:}^{\mathsf{T}}\right)}}. \tag*{(4)}

where Ac:A_{c:} is row cc of AA. The kernel form of NC1 is due to Kothapalli and Tirer [6 Thm. 4.1].

Fig. 1 evaluates Prop. 1 on the kernels of a nonlinear network, which qualitatively capture the layerwise decreases of NC1–NC3 in networks trained with stochastic gradient Langevin dynamics (SGLD) [8, 15]. NC4, defined on held-out data samples, additionally requires the kernel between test and training inputs (see App. § 6). These identities hold for arbitrary representations; predicting their layerwise evolution requires a theory of the learned kernels.

Geometric law for deep linear networks with an exchangeable input kernel

We consider fully connected networks with LL hidden layers of width NN, hα(0)=W(0)xα+b(0)h_\alpha^{(0)}=W^{(0)}x_\alpha+b^{(0)} and hα(l)=W(l)ϕ(hα(l−1))+b(l)h_\alpha^{(l)}=W^{(l)}\phi(h_\alpha^{(l-1)})+b^{(l)} for l=1,…,Ll=1,\ldots,L, with activation function ϕ\phi, inputs xα∈Rd0x_\alpha\in\mathbb{R}^{d_0} and outputs hα(L)∈RCh_\alpha^{(L)}\in\mathbb{R}^{C}. Following Fischer et al. [1], the weights have independent Gaussian priors of variance g0/d0g_0/d_0 in the first layer and gl/Ng_l/N in layer ll, the biases of variance gbg_b, and the targets have Gaussian observation noise of variance κ\kappa, which we also use as the ridge parameter of NC3. We evaluate Prop. 1 on the kernels Kαβ(0)=(g0/d0)xαTxβ+gbK_{\alpha\beta}^{(0)} = (g_0/d_0)\mathbf{x}_{\alpha}^{\mathsf{T}}\mathbf{x}_{\beta} + g_b of the inputs and Kαβ(l)=(gl/N)zα(l)Tzβ(l)+gbK_{\alpha\beta}^{(l)} = (g_l/N)\mathbf{z}_{\alpha}^{(l)\mathsf{T}}\mathbf{z}_{\beta}^{(l)} + g_b of the features zα(l)=ϕ(hα(l−1))z_{\alpha}^{(l)} = \phi(h_{\alpha}^{(l-1)}) of the lth hidden layer, giving NC1(l)\mathrm{NC}_1^{(l)}; the term gbg_b adds a constant feature, which leaves NC1 and NC2 unchanged and acts as a readout bias in NC3.

Fischer et al. [1] derive self-consistency equations for the MAP kernels from a large-deviation principle in NN (see App. B): forward equations for K(l)K^{(l)} and backward equations for conjugate kernels K~(l)\widetilde{K}^{(l)}, starting from a terminal conjugate kernel. We extend the latter to Nout=CN_{\mathrm{out}} = C outputs (see App. C), K~(L)=12SL−1(YYT−NoutSL)SL−1\widetilde{K}^{(L)} = \frac{1}{2}S_L^{-1}(YY^{\mathsf{T}} - N_{\mathrm{out}}S_L)S_L^{-1} with SL=K(L)+κIPS_L = K^{(L)} + \kappa I_P; it measures the mismatch between the target covariance per output, YYT/NoutYY^{\mathsf{T}}/N_{\mathrm{out}}, and the output covariance SLS_L. For deep linear networks, ϕ(h)=h\phi(h) = h, the equations take the closed form

K(l)=gb1P1PT+glK(l−1)T(l),K~(l−1)=glT(l)K~(l),(5)K^{(l)} = g_b\mathbf{1}_P\mathbf{1}_P^{\mathsf{T}} + g_lK^{(l-1)}T^{(l)}, \qquad\widetilde{K}^{(l-1)} = g_lT^{(l)}\widetilde{K}^{(l)}, \tag*{(5)}

with T(l)=(IP−2glNK~(l)K(l−1))−1T^{(l)} = \left(I_P - \frac{2g_l}{N}\widetilde{K}^{(l)}K^{(l-1)}\right)^{-1} to be solved jointly, as K~(L)\widetilde{K}^{(L)} depends on K(L)K^{(L)}.

Exchangeable input kernel. To obtain an analytic solution, we assume that the input kernel is exchangeable, i.e., invariant under simultaneous permutations of its rows and columns that permute the samples within a class or permute the classes, a natural idealization since under NC1 and NC2 the centered kernel HKHHKH is exchangeable. Exchangeable kernels form the commutative algebra A\mathcal{A} of matrices K=λEE+λBPB+λWPWK = \lambda_EE + \lambda_BP_B + \lambda_WP_W, with E=11T/PE = \mathbf{1}\mathbf{1}^{\mathsf{T}}/P and eigenvalues of multiplicities 11, C−1C - 1 and P−CP - C. As 11T=PE\mathbf{1}\mathbf{1}^{\mathsf{T}} = PE and YYT=n(E+PB)YY^{\mathsf{T}} = n(E + P_B) lie in A\mathcal{A}, the MAP equations restricted to A\mathcal{A} reduce to scalar equations for the eigenvalues λX(l)\lambda_X^{(l)} of K(l)K^{(l)} and λ~X(l)\widetilde{\lambda}_X^{(l)} of K~(l)\widetilde{K}^{(l)}, X∈{E,B,W}X \in\{E, B, W\} (see App. D.1). On such solutions, NC2(l)=NC3(l)=0\mathrm{NC}_2^{(l)} = \mathrm{NC}_3^{(l)} = 0 and NC1(l)=(P−C)λW(l)/((C−1)λB(l))\mathrm{NC}_1^{(l)} = (P - C)\lambda_W^{(l)}/((C - 1)\lambda_B^{(l)}).

Theorem 1 (Channel conservation and geometric depth law). Let ϕ(h)=h\phi(h) = h, K(0)∈AK^{(0)} \in\mathcal{A} with λB(0)>0\lambda_B^{(0)} > 0 and κ>0\kappa> 0, and consider a solution of the MAP equations in A\mathcal{A}. For X∈{W,B}X \in\{W, B\}, qX=λX(l)λ~X(l)q_X = \lambda_X^{(l)}\widetilde{\lambda}_X^{(l)} is the same for all l=1,…,Ll = 1, \ldots, L. Hence the eigenvalue tX=1+2qX/Nt_X = 1 + 2q_X/N of T(l)T^{(l)} in channel XX is layer-independent and, for l=0,…,Ll = 0, \ldots, L,

λX(l)=λX(0)(∏m=1lgm)tXl,NC1(l)=NC1(0)(tWtB)l.(6)\lambda_X^{(l)} = \lambda_X^{(0)}\left(\prod_{m=1}^{l}g_m\right)t_X^l, \qquad\mathrm{NC}_1^{(l)} = \mathrm{NC}_1^{(0)}\left(\frac{t_W}{t_B}\right)^l. \tag*{(6)}

The forward and backward equations multiply λX\lambda_X and λ~X\widetilde{\lambda}_X by the same factor gltXg_lt_X in opposite directions, which conserves their product (see App. D). In NC1, the common factors glg_l cancel, and NC1 decreases geometrically for tB>tWt_B > t_W, in line with the target-dependent kernel corrections of order 1/N1/N that grow with depth in deep linear networks [7]. The input data fixes NC1(0)\mathrm{NC}_1^{(0)}, while the feature-learning corrections, which also depend on the data, set the depthwise contraction.

Corollary 1 (Depth–width law). Under the assumptions of Theorem 1 and to leading order in κ/λW(L)\kappa/\lambda_W^{(L)} and κ/λB(L)\kappa/\lambda_B^{(L)}, the expression NC1(L)/NC1(0)\mathrm{NC}_1^{(L)}/\mathrm{NC}_1^{(0)} depends on depth and width at large NN only through τ=L/N\tau= L/N: for N→∞N \to\infty at fixed τ\tau and fixed μ=n/(λB(0)∏m=1Lgm)\mu= n/(\lambda_B^{(0)}\prod_{m=1}^{L}g_m),

NC1(L)/NC1(0)→exp⁡[−W0(μτeτ)]=1−μτ+O(τ2),(7)\mathrm{NC}_1^{(L)}/\mathrm{NC}_1^{(0)} \to\exp\left[-W_0(\mu\tau e^{\tau})\right] = 1 - \mu\tau+ O(\tau^2), \tag*{(7)}

with W0W_0 the principal branch of the Lambert function. At finite width, tW=1−C/Nt_W = 1 - C/N and tB=1+(r−C)/Nt_B = 1 + (r-C)/N, where r=n/λB(L)r = n/\lambda_B^{(L)} is, for N>CN > C, the unique positive root of μ=r(1+(r−C)/N)L\mu= r\left(1+(r-C)/N\right)^L.

Since tB−tW=r/N>0t_B-t_W = r/N > 0, NC1 decreases in every layer, by the factor tW/tB=1−r/N+O(N−2)t_W/t_B = 1-r/N+O(N^{-2}). Accumulated over LL layers, this gives NC1(L)/NC1(0)≈e−rL/N\mathrm{NC}_1^{(L)}/\mathrm{NC}_1^{(0)} \approx e^{-rL/N}, where the rate rr itself depends on LL and NN through the terminal kernel. At large width, rr depends on them only through τ\tau, which yields Eq. (7); for (μ+C)τ≪1(\mu+C)\tau\ll1, it reduces to μ\mu, its value without feature learning (see App. § 10). Within the theory, Eq. (7) thus predicts the depth-to-width ratio for a target compression. As in Wang et al. [14], within-class compression is geometric across layers, but its rate follows here from the feature-learning equations instead of assumptions on the inputs and trained weights.

Input geometry. For Gaussian data (see App. § 11), where xα=mc+σξαx_\alpha= m_c + \sigma\xi_\alpha for a sample α\alpha of class cc, with ξα∼N(0,Id0)\xi_\alpha\sim\mathcal{N}(0, I_{d_0}) and centers mcm_c of equal norms and equal pairwise overlaps, the expected input kernel is exchangeable, with

λW(0)=g0σ2,λB(0)=g0σ2(1+nCC−1SNR),NC1(0)=n−1n SNR+1−1/C,(8)\lambda_W^{(0)} = g_0\sigma^2,\qquad\lambda_B^{(0)} = g_0\sigma^2\left(1+\frac{nC}{C-1}\mathrm{SNR}\right),\qquad\mathrm{NC}_1^{(0)} = \frac{n-1}{n\,\mathrm{SNR}+1-1/C}, \tag*{(8)}

where SNR=∑c∥mc−mˉ∥2/(Cd0σ2)\mathrm{SNR} = \sum_c \lVert m_c-\bar{m}\rVert^2/(Cd_0\sigma^2) with mean center mˉ\bar{m}. Then NC1(0)→1/SNR\mathrm{NC}_1^{(0)} \to1/\mathrm{SNR} for n→∞n \to\infty.

Figure 2 compares these predictions with the numerical solution of the MAP equations and with SGLD-trained networks. On the expected input kernel, theory and numerics agree: NC1 decreases geometrically, more slowly in wider networks (see panel (a)); in panel (b), the rate grows with the SNR, here raised by lowering σ\sigma at fixed centers, which lowers λB(0)\lambda_B^{(0)}; and the terminal compression for N=64N = 64 to 512512 nearly coincides as a function of τ\tau (see panel (c)). SGLD-trained networks follow the per-layer factor of Theorem 1 after a slower decrease in the first layers (see panel (d)).

Figure 2. NC1 decreases geometrically with depth and, for the MAP kernels at large width, depends on depth and width only through L/NL/N. (a)–(c) Expected input kernel of C=5C = 5 Gaussian classes with gl=1g_l = 1 for l<Ll < L; Theorem 1 (lines) and full MAP equations (markers). (a) NC1(l)/NC1(0)\mathrm{NC}_1^{(l)}/\mathrm{NC}_1^{(0)} for varying widths and L=16L = 16. (b) Per-layer compression rate log⁡(tW/tB)\log(t_W/t_B) versus SNR for N=256N = 256 and L=16L = 16. (c) NC1(L)/NC1(0)\mathrm{NC}_1^{(L)}/\mathrm{NC}_1^{(0)} versus τ=L/N\tau= L/N; the curves nearly coincide. (d) Four sampled Gaussian classes for N=256N = 256 and L=16L = 16: SGLD-trained networks (markers) and Theorem 1 for the input kernel projected onto A\mathcal{A} (line), with gl=0.5g_l = 0.5 for l<Ll < L. Experimental details in App. § 12.

Beyond the exchangeable case. On four-class XOR, the input kernel is not exchangeable and NC2 and NC3 are nonzero. For an erf network, whose MAP equations we solve to first order in the conjugate kernels (see App. § 7), all three decrease across depth in this theory and in SGLD-trained networks (see Figure 1), agreeing best in the first hidden layer, while the trained networks collapse more strongly in deeper layers.

Discussion

In deep linear networks with an exchangeable input kernel, our theory shows how depth, width and data shape the layerwise decrease of NC1: each layer lowers it by the same factor, and at large width, depth and width enter only through L/NL/N. Our main limitation is the assumption of input kernel exchangeability, which makes the equations solvable but forces NC2 and NC3 to vanish, so that the law describes NC1 alone and does not hold for general sampled data. Since Proposition 1 applies to any kernel, solving the equations for general input kernels and studying nonlinear networks will be an interesting direction of future research.

Acknowledgments and Disclosure of Funding

This work is supported by ERC grant DOG-AMP (No 101125506) [E.S.]. G.W. acknowledges support from a Canada CIFAR AI Chair (via Mila), Humboldt Research Fellowship, FRQNT-NSERC grant 2023-NOVA-329125 and NSERC Discovery grant 03267.

Funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.

Derivation of the kernel neural-collapse observables

We here prove Proposition 1, i.e., that NC1–NC3 can be written in terms of the feature kernel KK, the class labels yy and, for NC3, the ridge parameter κ\kappa. We work at an arbitrary fixed layer and make no assumptions on the network architecture, the training dynamics or the exchangeability of the input kernel. The proof consists of three parts. For NC1, label-dependent projectors separate the representation into its centered class-mean and within-class components, whose squared norms are traces of projected kernels. For NC2, the Gram matrix of the centered class means follows by applying the class-averaging and centering operators to KK. For NC3, the representer form of the ridge readout expresses its alignment with the class means through kernel inner products. The NC1 identity was previously derived by Kothapalli and Tirer [6]; we reproduce it in our notation because the same sample-space decomposition is used in the linear analysis of App. D.

We denote the feature matrix as Z∈RP×pZ \in\mathbb{R}^{P \times p}, whose rows zα⊤z_\alpha^\top are the representations of the training samples α=1,…,P\alpha= 1,\ldots,P, so that K=ZZ⊤K = ZZ^\top; the feature dimension is p=d0p = d_0 at the input and p=Np = N for a hidden layer of the networks in Sec. 3. We consider CC balanced classes with n=P/Cn = P/C samples each, labels yα∈{1,…,C}y_\alpha\in\{1,\ldots,C\} and one-hot targets Y∈{0,1}P×CY \in\{0,1\}^{P \times C}. With the centering matrices HH and HCH_C and the centered label matrix Yc=HYY_c = HY of Sec. 2, balanced classes imply

Y⊤Y=nIC,HY=YHC.(9)Y^\top Y = nI_C,\qquad HY = YH_C. \tag*{(9)}

Proof of the NC1 identity

With the class and global feature means

μc=1n∑α:yα=czα,μG=1P∑α=1Pzα=1C∑c=1Cμc,(10)\mu_c = \frac{1}{n}\sum_{\alpha:y_\alpha=c} z_\alpha,\qquad \mu_G = \frac{1}{P}\sum_{\alpha=1}^{P} z_\alpha= \frac{1}{C}\sum_{c=1}^{C}\mu_c, \tag*{(10)}

the within- and between-class covariances are

ΣW=1P∑c=1C∑α:yα=c(zα−μc)(zα−μc)⊤,ΣB=1C∑c=1C(μc−μG)(μc−μG)⊤.(11)\Sigma_W = \frac{1}{P}\sum_{c=1}^{C}\sum_{\alpha:y_\alpha=c}(z_\alpha-\mu_c)(z_\alpha-\mu_c)^\top,\qquad \Sigma_B = \frac{1}{C}\sum_{c=1}^{C}(\mu_c-\mu_G)(\mu_c-\mu_G)^\top. \tag*{(11)}

Since Yc⊤Yc=nHCY_c^\top Y_c = nH_C by (9) and HC⊤=HCH_C^\top= H_C, the projector PBP_B of (2) becomes

PB=1nYHCY⊤=1nYY⊤−1P1P1P⊤.(12)P_B = \frac{1}{n}YH_CY^\top= \frac{1}{n}YY^\top-\frac{1}{P}\mathbf{1}_P\mathbf{1}_P^\top. \tag*{(12)}

We consider a sample α\alpha belonging to class cc, so that row α\alpha of YY is the unit vector ec⊤∈RCe_c^\top\in\mathbb{R}^C. As the rows of Y⊤ZY^\top Z are the class sums, (Y⊤Z)c:=∑β:yβ=czβ⊤=nμc⊤(Y^\top Z)_{c:}=\sum_{\beta:y_\beta=c}z_\beta^\top=n\mu_c^\top, and the rows of HZHZ are (HZ)α:=(zα−μG)⊤(HZ)_{\alpha:}=(z_\alpha-\mu_G)^\top, we obtain

(PBZ)α:=1nec⊤HCY⊤Z=(μc−μG)⊤,(P_BZ)_{\alpha:}=\frac{1}{n}e_c^\top H_CY^\top Z=(\mu_c-\mu_G)^\top,
(PWZ)α:=(HZ)α:−(PBZ)α:=(zα−μc)⊤.(13)(P_WZ)_{\alpha:}=(HZ)_{\alpha:}-(P_BZ)_{\alpha:}=(z_\alpha-\mu_c)^\top. \tag*{(13)}

Thus, PBZP_BZ consists of the centered class means, repeated over the samples of each class, and PWZP_WZ of the within-class residuals. The projector PBP_B is symmetric and idempotent by construction, and HPB=PBH=PBHP_B=P_BH=P_B as HYc=YcHY_c=Y_c, so that PWP_W is symmetric and idempotent as well. Hence Tr⁡(PXK)=Tr⁡(Z⊤PXZ)=∥PXZ∥F2\operatorname{Tr}(P_XK)=\operatorname{Tr}(Z^\top P_XZ)=\lVert P_XZ\rVert_F^2 for X∈{B,W}X\in\{B,W\}, and with Eqs. (11) and (13) and P=CnP=Cn,

Tr⁡(PBK)=n∑c=1C∥μc−μG∥2=PTr⁡(ΣB),\operatorname{Tr}(P_BK)=n\sum_{c=1}^{C}\lVert\mu_c-\mu_G\rVert^2=P\operatorname{Tr}(\Sigma_B),
Tr⁡(PWK)=∑c=1C∑α:yα=c∥zα−μc∥2=PTr⁡(ΣW).(14)\operatorname{Tr}(P_WK)=\sum_{c=1}^{C}\sum_{\alpha:y_\alpha=c}\lVert z_\alpha-\mu_c\rVert^2=P\operatorname{Tr}(\Sigma_W). \tag*{(14)}

which yields

NC1=Tr⁡(ΣW)Tr⁡(ΣB)=Tr⁡(PWK)Tr⁡(PBK).(15)\mathrm{NC}_1=\frac{\operatorname{Tr}(\Sigma_W)}{\operatorname{Tr}(\Sigma_B)} =\frac{\operatorname{Tr}(P_WK)}{\operatorname{Tr}(P_BK)}. \tag*{(15)}

Proof of the NC2 identity

With the class-averaging matrix Π=Y/n\Pi= Y/n, the rows of ΠTZ\Pi^{\mathsf{T}}Z are the class means μcT\mu_c^{\mathsf{T}}. Centering across classes, S~=HCΠT=HCYT/n\widetilde{S} = H_C\Pi^{\mathsf{T}} = H_CY^{\mathsf{T}}/n, gives the centered class means and their Gram matrix,

S~Z=[(μ1−μG)T⋮(μC−μG)T],G=(S~Z)(S~Z)T=S~KS~T.(16)\widetilde{S}Z = \begin{bmatrix} (\mu_1-\mu_G)^{\mathsf{T}}\\ \vdots\\ (\mu_C-\mu_G)^{\mathsf{T}} \end{bmatrix}, \qquad G = (\widetilde{S}Z)(\widetilde{S}Z)^{\mathsf{T}} = \widetilde{S}K\widetilde{S}^{\mathsf{T}}. \tag*{(16)}

If all centered class means are nonzero, D=Diag⁡(G11,…,GCC)D = \operatorname{Diag}(G_{11},\ldots,G_{CC}) is invertible, and D−1/2GD−1/2D^{-1/2}GD^{-1/2} has the entries

(D−1/2GD−1/2)cc′=⟨μc−μG,μc′−μG⟩∥μc−μG∥∥μc′−μG∥,(17)\left(D^{-1/2}GD^{-1/2}\right)_{cc'} = \frac{\langle\mu_c-\mu_G,\mu_{c'}-\mu_G\rangle} {\lVert\mu_c-\mu_G\rVert\lVert\mu_{c'}-\mu_G\rVert}, \tag*{(17)}

i.e., it equals the cosine Gram matrix G^\widehat{G} of the centered class means in § 2. Since the reference matrix CC−1HC\frac{C}{C-1}H_C, the Gram matrix of a unit-norm simplex equiangular tight frame of CC vectors, does not depend on the features,

NC2=∥D−1/2S~KS~TD−1/2−CC−1HC∥F(18)\mathrm{NC}_2 = \left\lVert D^{-1/2}\widetilde{S}K\widetilde{S}^{\mathsf{T}}D^{-1/2} -\frac{C}{C-1}H_C\right\rVert_F \tag*{(18)}

is determined by KK and the class labels alone.

Proof of the NC3 identity

For NC3, we use the bias-free ridge readout W∈RC×pW \in\mathbb{R}^{C\times p} of § 2, which minimizes

∥YT−WZT∥F2+κ∥W∥F2,κ>0.(19)\left\lVert Y^{\mathsf{T}}-WZ^{\mathsf{T}}\right\rVert_F^2+\kappa\lVert W\rVert_F^2, \qquad\kappa>0. \tag*{(19)}

The extremum condition (WZT−YT)Z+κW=0(WZ^{\mathsf{T}}-Y^{\mathsf{T}})Z+\kappa W=0 gives W=YTZ(ZTZ+κIp)−1W=Y^{\mathsf{T}}Z(Z^{\mathsf{T}}Z+\kappa I_p)^{-1}, and the push-through identity Z(ZTZ+κIp)−1=(ZZT+κIP)−1ZZ(Z^{\mathsf{T}}Z+\kappa I_p)^{-1}=(ZZ^{\mathsf{T}}+\kappa I_P)^{-1}Z yields the representer form

W=UZ,U=YT(K+κIP)−1.(20)W=UZ,\qquad U=Y^{\mathsf{T}}(K+\kappa I_P)^{-1}. \tag*{(20)}

NC3 compares the class-specific readout directions after removing their common component. The centered readout vectors w~cT\widetilde{w}_c^{\mathsf{T}} are the rows of HCW=U~ZH_CW=\widetilde{U}Z, with U~=HCU\widetilde{U}=H_CU, and the centered class means μ~cT=(μc−μG)T\widetilde{\mu}_c^{\mathsf{T}}=(\mu_c-\mu_G)^{\mathsf{T}} are the rows of S~Z\widetilde{S}Z. Hence,

⟨w~c,μ~c⟩=U~c:KS~:cT,∥w~c∥2=U~c:KU~c:T,∥μ~c∥2=S~:cKS~:cT,(21)\langle\widetilde{w}_c,\widetilde{\mu}_c\rangle =\widetilde{U}_{c:}K\widetilde{S}_{:c}^{\mathsf{T}}, \qquad \lVert\widetilde{w}_c\rVert^2 =\widetilde{U}_{c:}K\widetilde{U}_{c:}^{\mathsf{T}}, \qquad \lVert\widetilde{\mu}_c\rVert^2 =\widetilde{S}_{:c}K\widetilde{S}_{:c}^{\mathsf{T}}, \tag*{(21)}

and averaging the cosine misalignment 1−cos⁡(w~c,μ~c)1-\cos(\widetilde{w}_c,\widetilde{\mu}_c) over classes gives

NC3=1−1C∑c=1CU~c:KS~:cT(U~c:KU~c:T)(S~:cKS~:cT),U~=HCYT(K+κIP)−1,(22)\mathrm{NC}_3 =1-\frac{1}{C}\sum_{c=1}^{C} \frac{\widetilde{U}_{c:}K\widetilde{S}_{:c}^{\mathsf{T}}} {\sqrt{\left(\widetilde{U}_{c:}K\widetilde{U}_{c:}^{\mathsf{T}}\right) \left(\widetilde{S}_{:c}K\widetilde{S}_{:c}^{\mathsf{T}}\right)}}, \qquad \widetilde{U}=H_CY^{\mathsf{T}}(K+\kappa I_P)^{-1}, \tag*{(22)}

in which every quantity is determined by KK, YY and κ\kappa. This completes the proof of Proposition 1.

Biases and test samples

Biases as a constant feature. The kernels K(l)K^{(l)} of § 3 contain the term gb1P1PTg_b\mathbf{1}_P\mathbf{1}_P^{\mathsf{T}}, i.e., they are the Gram matrices of feature matrices [Z,gb1P][Z,\sqrt{g_b}\mathbf{1}_P] with an additional constant column. As PB1P=PW1P=S~1P=0P_B\mathbf{1}_P=P_W\mathbf{1}_P=\widetilde{S}\mathbf{1}_P=0, this column changes neither NC1 nor NC2. In NC3, it adds a bias b∈RCb\in\mathbb{R}^C to the ridge readout, given by gb\sqrt{g_b} times the readout weights of the constant column, so that the readout is Wzα+bWz_\alpha+b and the penalty is κ(∥W∥F2+∥b∥2/gb)\kappa(\lVert W\rVert_F^2+\lVert b\rVert^2/g_b). The bias is thus regularized with strength κ/gb\kappa/g_b and also changes WW through the joint fit. As the constant column vanishes in the centered class means, the bias does not enter the inner products ⟨w~c,μ~c⟩\langle\widetilde{w}_c,\widetilde{\mu}_c\rangle, but it raises the squared norms of the centered readout vectors from ∥w~c∥2\lVert\widetilde{w}_c\rVert^2 to ∥w~c∥2+b~c2/gb\lVert\widetilde{w}_c\rVert^2+\widetilde{b}_c^2/g_b, with b~=HCb\widetilde{b}=H_Cb, which enter the denominators in Eq. (4).

NC4. On a test input xx with features z(x)z(x), NC4 compares the readout decision arg maxc wcTz(x)\mathop{\mathrm{arg\,max}}_{c}\,w_c^{\mathsf{T}}z(x) with the nearest class mean arg minc∥z(x)−μc∥\mathop{\mathrm{arg\,min}}_{c}\lVert z(x)-\mu_c\rVert. Both decisions require the kernel between the test input and the training inputs, which is not contained in KK. We therefore do not give a kernel form of NC4.

MAP kernel equations

Fischer et al. [1] determine the most probable kernels of a network of large width NN in a Bayesian setting, conditioned on its training data. Under the weight prior and given K(l−1)K^{(l-1)}, the preactivation vectors h∈RPh\in\mathbb{R}^{P} of the NN neurons of layer l−1l-1 across the training samples are independent and Gaussian with covariance K(l−1)K^{(l-1)}, and K(l)−gb1P1PTK^{(l)}-g_b\mathbf{1}_{P}\mathbf{1}_{P}^{\mathsf{T}} is glg_l times the average of ϕ(h)ϕ(h)T\phi(h)\phi(h)^{\mathsf{T}} over these neurons. Its distribution given K(l−1)=KK^{(l-1)}=K thus obeys a large-deviation principle in NN with the cumulant-generating function

Wl(K~∣K)=Nln⁡⟨exp⁡(glNϕ(h)TK~ϕ(h))⟩h∼N(0,K)(23)\mathcal{W}_l(\widetilde{K}\mid K)=N\ln\left\langle\exp\left(\frac{g_l}{N}\phi(h)^{\mathsf{T}}\widetilde{K}\phi(h)\right)\right\rangle_{h\sim\mathcal{N}(0,K)} \tag*{(23)}

whose argument K~∈RP×P\widetilde{K}\in\mathbb{R}^{P\times P} is the conjugate kernel, the variable conjugate to K(l)K^{(l)} in the Legendre transform of Wl\mathcal{W}_l that gives the rate function of K(l)K^{(l)}. The stationary point of the resulting log posterior of the kernels obeys forward equations K(l)=gb1P1PT+∂Wl(K~(l)∣K(l−1))/∂K~(l)K^{(l)}=g_b\mathbf{1}_{P}\mathbf{1}_{P}^{\mathsf{T}}+\partial\mathcal{W}_l(\widetilde{K}^{(l)}\mid K^{(l-1)})/\partial\widetilde{K}^{(l)} and backward equations K~(l−1)=∂Wl(K~(l)∣K(l−1))/∂K(l−1)\widetilde{K}^{(l-1)}=\partial\mathcal{W}_l(\widetilde{K}^{(l)}\mid K^{(l-1)})/\partial K^{(l-1)}. They start from the input kernel K(0)K^{(0)} and from the terminal conjugate kernel, which, for a single output with targets Y∈RP×1Y\in\mathbb{R}^{P\times1} and Gaussian observation noise of variance κ\kappa, is

K~(L)=12SL−1(YYT−SL)SL−1,SL=K(L)+κIP.(24)\widetilde{K}^{(L)}=\frac{1}{2}S_L^{-1}(YY^{\mathsf{T}}-S_L)S_L^{-1},\qquad S_L=K^{(L)}+\kappa I_P. \tag*{(24)}

As K~(L)\widetilde{K}^{(L)} depends on K(L)K^{(L)}, the equations must be solved jointly. The forward equation evaluates gl⟨ϕϕT⟩g_l\langle\phi\phi^{\mathsf{T}}\rangle under the Gaussian measure with covariance K(l−1)K^{(l-1)}, tilted by exp⁡(glϕTK~(l)ϕ/N)\exp(g_l\phi^{\mathsf{T}}\widetilde{K}^{(l)}\phi/N), and reduces to the recursion for the kernels of the neural network Gaussian process (NNGP) for K~(l)=0\widetilde{K}^{(l)}=0. For linear networks, the tilted measure is Gaussian, so that the equations close exactly in the kernels; for nonlinear networks, it is not, and we expand the equations in the conjugate kernels.

Linear networks. For ϕ(h)=h\phi(h)=h, Eq. (23) is a Gaussian integral, Wl(K~∣K)=−N2ln⁡det⁡(IP−2glNKK~)\mathcal{W}_l(\widetilde{K}\mid K)=-\frac{N}{2}\ln\det\left(I_P-\frac{2g_l}{N}K\widetilde{K}\right), and its derivatives give, without approximation and for l=1,…,Ll=1,\ldots,L,

K(l)=gb1P1PT+glK(l−1)T(l),K~(l−1)=glT(l)K~(l)(25)K^{(l)}=g_b\mathbf{1}_{P}\mathbf{1}_{P}^{\mathsf{T}}+g_lK^{(l-1)}T^{(l)},\qquad\widetilde{K}^{(l-1)}=g_lT^{(l)}\widetilde{K}^{(l)} \tag*{(25)}

with the transfer matrix T(l)=(IP−2glNK~(l)K(l−1))−1T^{(l)}=\left(I_P-\frac{2g_l}{N}\widetilde{K}^{(l)}K^{(l-1)}\right)^{-1}. These are the equations of Sec. 3, Eq. (5). The same matrix T(l)T^{(l)} acts from the right on the kernel and from the left on the conjugate kernel.

Nonlinear networks. For nonlinear ϕ\phi, the tilted expectations have no closed form. Following Fischer et al. [1, Sec. 3.4], we expand the forward and backward equations to first order in the conjugate kernels, assuming P/N≪1P/N\ll1, and have

Kαβ(l)=gb+gl⟨ϕαϕβ⟩+gl2N∑γ,δVαβ,γδ(l−1)K~γδ(l)(26)K_{\alpha\beta}^{(l)}=g_b+g_l\langle\phi_\alpha\phi_\beta\rangle+\frac{g_l^2}{N}\sum_{\gamma,\delta}V_{\alpha\beta,\gamma\delta}^{(l-1)}\widetilde{K}_{\gamma\delta}^{(l)} \tag*{(26)}
K~αβ(l−1)=glK~αβ(l)⟨ϕα′ϕβ′⟩+δαβgl∑γK~αγ(l)⟨ϕα′′ϕγ⟩(27)\widetilde{K}_{\alpha\beta}^{(l-1)}=g_l\widetilde{K}_{\alpha\beta}^{(l)}\langle\phi'_\alpha\phi'_\beta\rangle+\delta_{\alpha\beta}g_l\sum_\gamma\widetilde{K}_{\alpha\gamma}^{(l)}\langle\phi''_\alpha\phi_\gamma\rangle \tag*{(27)}

with ϕα=ϕ(hα)\phi_\alpha=\phi(h_\alpha), all expectations over h∼N(0,K(l−1))h\sim\mathcal{N}(0,K^{(l-1)}), and the connected four-point function Vαβ,γδ(l−1)=⟨ϕαϕβϕγϕδ⟩−⟨ϕαϕβ⟩⟨ϕγϕδ⟩V_{\alpha\beta,\gamma\delta}^{(l-1)}=\langle\phi_\alpha\phi_\beta\phi_\gamma\phi_\delta\rangle-\langle\phi_\alpha\phi_\beta\rangle\langle\phi_\gamma\phi_\delta\rangle. Together with the terminal condition for CC outputs, Eq. (30), Eqs. (26) and (27) give the theory curves in Fig. 1 (see App. § 12 for more details).

Terminal condition for multidimensional network outputs

The feature-learning theory of Fischer et al. [1] is formulated for a scalar network output, which covers binary classification. To study neural collapse in the more general CC-class case with one-hot encoded labels, we here extend the terminal condition to NoutN_{\mathrm{out}}-dimensional outputs. This condition expresses the terminal conjugate kernel K~(L)\widetilde{K}^{(L)}, from which the backward equations start, through K(L)K^{(L)} and the targets, and thereby enters all results below; for one-hot targets, it is the origin of the factor CC in the transfer factors of Corollary 1.

The forward equations for the feature kernels and the backward equations for the conjugate kernels are unchanged: all NoutN_{\mathrm{out}} outputs share the same feature kernel K(L)∈RP×PK^{(L)} \in\mathbb{R}^{P \times P}. The output dimension enters only through the data term SDS_D of the action, the log posterior of the kernels [1 Eq. (9)].

We denote the network output for training sample α\alpha by fα∈RNoutf_\alpha\in\mathbb{R}^{N_{\mathrm{out}}}. The readout weights W(L)∈RNout×NW^{(L)} \in\mathbb{R}^{N_{\mathrm{out}} \times N} and biases b(L)∈RNoutb^{(L)} \in\mathbb{R}^{N_{\mathrm{out}}} have independent rows and entries, respectively,

Wk⋅(L)∼N(0,gwNIN),bk(L)∼N(0,gb),k=1,…,Nout.W_{k\cdot}^{(L)} \sim\mathcal{N}\left(0, \frac{g_w}{N} I_N\right), \qquad b_k^{(L)} \sim\mathcal{N}(0,g_b), \qquad k=1,\ldots,N_{\mathrm{out}}.

The targets are collected in Y∈RP×NoutY \in\mathbb{R}^{P \times N_{\mathrm{out}}}. For one-hot encoded labels yα∈{1,…,C}y_\alpha\in\{1,\ldots,C\}, the targets are Yαk=1{yα=k}Y_{\alpha k} = \mathbf{1}\{y_\alpha= k\} and Nout=CN_{\mathrm{out}} = C. Assuming independent Gaussian observation noise of variance κ\kappa for each output coordinate, the likelihood is

p(Y∣f)=∏α=1P∏k=1NoutN(Yαk∣fαk,κ).(28)p(Y \mid f) = \prod_{\alpha=1}^{P} \prod_{k=1}^{N_{\mathrm{out}}} \mathcal{N}(Y_{\alpha k} \mid f_{\alpha k},\kappa). \tag*{(28)}

Conditioned on the activations of the last hidden layer, the NoutN_{\mathrm{out}} outputs are independent Gaussian processes on the training inputs with the common covariance K(L)K^{(L)}. Marginalizing the readout weights and biases therefore gives, with SL=K(L)+κIPS_L = K^{(L)} + \kappa I_P as in Sec. 3,

p(Y∣K(L))=∏k=1NoutN(Y⋅k∣0,SL),p(Y \mid K^{(L)}) = \prod_{k=1}^{N_{\mathrm{out}}} \mathcal{N}(Y_{\cdot k} \mid0,S_L),
SD=ln⁡p(Y∣K(L))=−12Tr⁡(SL−1YYT)−Nout2ln⁡det⁡SL+const.(29)S_D = \ln p(Y \mid K^{(L)}) = -\frac{1}{2}\operatorname{Tr}\left(S_L^{-1}YY^{\mathsf{T}}\right) - \frac{N_{\mathrm{out}}}{2}\ln\det S_L + \mathrm{const.} \tag*{(29)}

Relative to the scalar-output case, the trace term keeps its form, while the log-determinant acquires the factor NoutN_{\mathrm{out}}.

Stationarity of the action with respect to K(L)K^{(L)}, together with the equation of state, gives K~(L)=∂SD/∂K(L)\widetilde{K}^{(L)} = \partial S_D/\partial K^{(L)}. Differentiating Eq. (29) with respect to K(L)K^{(L)}, using ∂ln⁡det⁡SL/∂K(L)=SL−1\partial\ln\det S_L/\partial K^{(L)} = S_L^{-1} and ∂Tr⁡(SL−1YYT)/∂K(L)=−SL−1YYTSL−1\partial\operatorname{Tr}(S_L^{-1}YY^{\mathsf{T}})/\partial K^{(L)} = -S_L^{-1}YY^{\mathsf{T}}S_L^{-1}, yields

K~(L)=12SL−1(YYT−NoutSL)SL−1.(30)\widetilde{K}^{(L)} = \frac{1}{2}S_L^{-1}\left(YY^{\mathsf{T}} - N_{\mathrm{out}}S_L\right)S_L^{-1}. \tag*{(30)}

Thus, relative to the scalar-output terminal condition, only the subtracted term acquires the factor NoutN_{\mathrm{out}}; the two outer resolvents are unchanged. Equation (30) reduces to Eq. (24) at Nout=1N_{\mathrm{out}} = 1. From here on, we use one-hot targets, Nout=CN_{\mathrm{out}} = C. Equation (30) is therefore the only modification required for the multiclass analysis below.

Proof of Theorem 1

We here prove Theorem 1; Corollary 1 is proven in App. § 10. The proof has two steps. First, for an exchangeable input kernel, we show that the linear MAP equations, Eqs. (25) and (30), restricted to the algebra A\mathcal{A}, decouple into independent scalar equations for the channels EE, BB and WW of the global mean, the centered class means and the within-class fluctuations, and that the NC2 and NC3 vanish on such solutions (App. § 9.§ 1). Second, the scalar forward and backward equations conserve the product of the kernel and conjugate-kernel eigenvalues in each channel, which makes the transfer factor independent of the layer; the geometric law for NC1 then follows from the ratio of the within- and between-class eigenvalues (App. § 9.§ 2).

Exchangeable input kernel

Equations (25) and (30) are matrix equations for P×PP \times P kernels. To solve them in closed form, we now assume that the input kernel is exchangeable, i.e., invariant under simultaneous permutations of its rows and columns that permute the samples within a class or permute the classes. This is a strong assumption on the input geometry, which sampled data satisfy approximately at best. We adopt it because it makes the coupled forward and backward equations analytically solvable, and because the solution isolates the mechanism behind the layerwise decrease of NC1.

An exchangeable kernel has only three distinct entries: a diagonal value k0k_0, a within-class off-diagonal value kwk_w, and a between-class value kbk_b. Any such kernel can be written as

K=(k0−kw)IP+(kw−kb)YY⊤+kb1P1P⊤(31)K = (k_0-k_w)I_P + (k_w-k_b)YY^\top+ k_b\mathbf{1}_P\mathbf{1}_P^\top \tag*{(31)}

Projector basis. The three entry types are resolved by three mutually orthogonal projectors that sum to the identity,

E=1P1P1P⊤,PB=1nYY⊤−E,PW=IP−1nYY⊤(32)E = \frac{1}{P}\mathbf{1}_P\mathbf{1}_P^\top,\qquad P_B = \frac{1}{n}YY^\top-E,\qquad P_W = I_P-\frac{1}{n}YY^\top \tag*{(32)}

which extract, respectively, the global-mean direction (rank 1), the centered class-mean subspace (rank C−1C-1), and the within-class fluctuations (rank P−CP-C). As Yc=HYY_c = HY satisfies Yc⊤Yc=nHCY_c^\top Y_c = nH_C, PBP_B and PWP_W coincide with the projectors of Eq. (2). In this basis, Eq. (31) becomes

K=λEE+λBPB+λWPW(33)K = \lambda_E E+\lambda_B P_B+\lambda_W P_W \tag*{(33)}

with the eigenvalues

λE=k0+(n−1)kw+n(C−1)kb,λB=k0−kw+n(kw−kb),λW=k0−kw.(34)\lambda_E = k_0+(n-1)k_w+n(C-1)k_b,\qquad\lambda_B = k_0-k_w+n(k_w-k_b),\qquad\lambda_W = k_0-k_w. \tag*{(34)}

The channel EE collects the uniform component of the kernel. It drops out of NC1 and NC2, as PB1P=PW1P=S~1P=0P_B\mathbf{1}_P=P_W\mathbf{1}_P=\widetilde{S}\mathbf{1}_P=0, and for kernels in A\mathcal{A}, NC3 vanishes for any λE\lambda_E (see below), so that we track only the channels BB and WW in what follows.

Invariance of the equations. Exchangeable kernels form the commutative algebra A=span⁡{E,PB,PW}\mathcal{A}=\operatorname{span}\{E,P_B,P_W\}, which is closed under the sums, products and inverses that appear in the forward and backward equations. The two remaining ingredients also lie in A\mathcal{A}: the bias term is purely global-mean, gb1P1P⊤=gbPEg_b\mathbf{1}_P\mathbf{1}_P^\top=g_bP E, and the target kernel occupies the global-mean and between-class channels,

YY⊤=n(E+PB),(yE,yB,yW)=(n,n,0).(35)YY^\top=n(E+P_B),\qquad(y_E,y_B,y_W)=(n,n,0). \tag*{(35)}

Restricted to A\mathcal{A}, the equations therefore close: if all K(l)K^{(l)} and K~(l)\widetilde{K}^{(l)} lie in A\mathcal{A}, so do the transfer matrices T(l)T^{(l)}, and the matrix equations reduce to scalar equations for the eigenvalues. We consider such solutions; as the equations are only equivariant under the permutations, solutions outside A\mathcal{A} are not excluded. Within A\mathcal{A}, K~(l)\widetilde{K}^{(l)} and K(l−1)K^{(l-1)} commute, so that T(l)T^{(l)} is symmetric and its left and right actions in Eq. (25) coincide: a single scalar tX(l)t_X^{(l)} per channel governs the forward and backward equations, which decouple into three independent scalar channels.

NC2 and NC3. On solutions in A\mathcal{A}, NC2 and NC3 vanish at every layer with λB>0\lambda_B>0. With S~=HCY⊤/n\widetilde{S}=H_CY^\top/n of Sec. 2 and the projectors of Eq. (32), Y⊤Y=nICY^\top Y=nI_C and Y⊤1P=n1CY^\top\mathbf{1}_P=n\mathbf{1}_C imply Y⊤PW=0Y^\top P_W=0, HCY⊤E=0H_CY^\top E=0 and HCY⊤PB=HCY⊤H_CY^\top P_B=H_CY^\top, so that S~K=λBS~\widetilde{S}K=\lambda_B\widetilde{S} for every K∈AK\in\mathcal{A}. Hence G=S~K~S~⊤=(λB/n)HCG=\widetilde{S}\widetilde{K}\widetilde{S}^\top=(\lambda_B/n)H_C and D=(λB/n)(1−1/C)ICD=(\lambda_B/n)(1-1/C)I_C, so that D−1/2GD−1/2=CC−1HCD^{-1/2}GD^{-1/2}=\frac{C}{C-1}H_C and NC2 =0=0. Likewise, (K+κIP)−1∈A(K+\kappa I_P)^{-1}\in\mathcal{A} has the eigenvalue (λB+κ)−1(\lambda_B+\kappa)^{-1} in channel BB, so that U~=HCY⊤(K+κIP)−1=nS~/(λB+κ)\widetilde{U}=H_CY^\top(K+\kappa I_P)^{-1}=n\widetilde{S}/(\lambda_B+\kappa). Every row U~c\widetilde{U}_c is thus a positive multiple of S~c\widetilde{S}_c, as λB+κ>0\lambda_B+\kappa>0, all cosines in Eq. (4) equal one, and NC3 =0=0.

Conservation law and geometric depth law

Writing the eigenvalues of K(l)K^{(l)}, K~(l)\widetilde{K}^{(l)} and T(l)T^{(l)} in channel X∈{B,W}X\in\{B,W\} as λX(l)\lambda_X^{(l)}, λ~X(l)\widetilde{\lambda}_X^{(l)} and tX(l)t_X^{(l)}, Eq. (25) reduces per channel to

λX(l)=glλX(l−1)tX(l),λ~X(l−1)=glλ~X(l)tX(l),tX(l)=(1−2glNλ~X(l)λX(l−1))−1(36)\lambda_X^{(l)}=g_l\lambda_X^{(l-1)}t_X^{(l)},\qquad\widetilde{\lambda}_X^{(l-1)}=g_l\widetilde{\lambda}_X^{(l)}t_X^{(l)},\qquad t_X^{(l)}=\left(1-\frac{2g_l}{N}\widetilde{\lambda}_X^{(l)}\lambda_X^{(l-1)}\right)^{-1} \tag*{(36)}

where the bias contributes only to the channel EE and hence drops from both BB and WW.

Proof of Theorem 1. Inserting the forward recursion of Eq. (36) into λX(l)λ~X(l)\lambda_X^{(l)}\widetilde{\lambda}_X^{(l)} and the backward recursion into λX(l−1)λ~X(l−1)\lambda_X^{(l-1)}\widetilde{\lambda}_X^{(l-1)} gives the same expression, gXtX(l)λ~X(l−1)λX(l−1)g_X t_X^{(l)}\widetilde{\lambda}_X^{(l-1)}\lambda_X^{(l-1)}: the forward and backward eigenvalues change by the same factor gXtX(l)g_X t_X^{(l)} in opposite directions, so that their product is conserved, qX=λX(l)λ~X(l)q_X=\lambda_X^{(l)}\widetilde{\lambda}_X^{(l)} for all l=1,…,Ll=1,\ldots,L. Substituting λ~X(l)λX(l−1)=qX/(gXtX(l))\widetilde{\lambda}_X^{(l)}\lambda_X^{(l-1)}=q_X/(g_Xt_X^{(l)}) into the definition of tX(l)t_X^{(l)} gives tX(l)=(1−2qX/(NtX(l)))−1t_X^{(l)}=(1-2q_X/(Nt_X^{(l)}))^{-1}, which rearranges to

tX(l)=1+2qXN≡tX.(37)t_X^{(l)}=1+\frac{2q_X}{N}\equiv t_X. \tag*{(37)}

The transfer factor is thus independent of the layer, and iterating the forward recursion yields, for l=0,…,Ll=0,\ldots,L,

λX(l)=λX(0)(∏m=1lgm)tXl.(38)\lambda_X^{(l)}=\lambda_X^{(0)}\left(\prod_{m=1}^{l}g_m\right)t_X^l. \tag*{(38)}

NC1\mathrm{NC}_1 in Eq. (3) is the ratio of within- to between-class kernel mass, NC1(l)=Tr⁡(PWK(l))/Tr⁡(PBK(l))\mathrm{NC}_1^{(l)}=\operatorname{Tr}(P_WK^{(l)})/\operatorname{Tr}(P_BK^{(l)}). Since K(l)K^{(l)} is scalar on each projector subspace and the trace of an orthogonal projector equals its rank,

Tr⁡(PWK(l))=(P−C)λW(l),Tr⁡(PBK(l))=(C−1)λB(l),(39)\operatorname{Tr}(P_WK^{(l)})=(P-C)\lambda_W^{(l)},\qquad\operatorname{Tr}(P_BK^{(l)})=(C-1)\lambda_B^{(l)}, \tag*{(39)}

so that

NC1(l)=P−CC−1λW(l)λB(l).(40)\mathrm{NC}_1^{(l)}=\frac{P-C}{C-1}\frac{\lambda_W^{(l)}}{\lambda_B^{(l)}}. \tag*{(40)}

Inserting Eq. (38), the factor ∏m=1lgm\prod_{m=1}^{l}g_m, which is the same for both channels, cancels, and

NC1(l)=P−CC−1λW(0)λB(0)(tWtB)l=NC1(0)(tWtB)l,(41)\mathrm{NC}_1^{(l)}=\frac{P-C}{C-1}\frac{\lambda_W^{(0)}}{\lambda_B^{(0)}}\left(\frac{t_W}{t_B}\right)^l=\mathrm{NC}_1^{(0)}\left(\frac{t_W}{t_B}\right)^l, \tag*{(41)}

where the prefactor is NC1(0)\mathrm{NC}_1^{(0)} by Eq. (40) at l=0l=0.

The decrease of NC1\mathrm{NC}_1 is therefore controlled entirely by the ratio tW/tBt_W/t_B: the input kernel fixes the prefactor NC1(0)\mathrm{NC}_1^{(0)}, while feature learning drives the layerwise decrease through the two transfer factors. Within-class fluctuations are compressed relative to the between-class signal whenever tW<tBt_W<t_B, and the per-layer factor is constant, so that NC1\mathrm{NC}_1 decreases geometrically with depth. The transfer factors also depend on the input data through the terminal condition, which we analyze in detail in the next section.

Proof of Corollary 1

We next derive the transfer factors at small κ\kappa and the depth–width law of Corollary 1. We denote the terminal eigenvalue in channel XX as ΛX=λX(L)\Lambda_X=\lambda_X^{(L)}. Since the terminal condition, Eq. (30), is diagonal in the projector basis, it becomes

λ~X(L)=12yX−C(ΛX+κ)(ΛX+κ)2,(42)\widetilde{\lambda}_X^{(L)}=\frac{1}{2}\frac{y_X-C(\Lambda_X+\kappa)}{(\Lambda_X+\kappa)^2}, \tag*{(42)}

where yXy_X is the eigenvalue of YY⊤YY^\top in channel XX from Eq. (35).

Exact terminal closure

Before any approximation, we give the exact self-consistency equations for the transfer factors. Combining tX=1+2qX/Nt_X=1+2q_X/N with qX=ΛXλ~X(L)q_X=\Lambda_X\widetilde{\lambda}_X^{(L)} and Eq. (42) expresses the transfer factor as an explicit function of the terminal eigenvalue alone,

tX(ΛX)=1+1NΛX[yX−C(ΛX+κ)](ΛX+κ)2.(43)t_X(\Lambda_X)=1+\frac{1}{N}\frac{\Lambda_X\left[y_X-C(\Lambda_X+\kappa)\right]}{(\Lambda_X+\kappa)^2}. \tag*{(43)}

The eigenvalue ΛX\Lambda_X is in turn the terminal value of Eq. (38), ΛX=ΛXNNGPtXL\Lambda_X = \Lambda_X^{\mathrm{NNGP}}t_X^L, with the NNGP eigenvalue ΛXNNGP=λX(0)∏m=1Lgm\Lambda_X^{\mathrm{NNGP}} = \lambda_X^{(0)}\prod_{m=1}^{L}g_m, for which K~(l)=0\widetilde{K}^{(l)} = 0 and tX=1t_X = 1. Equation (43) thus closes into a single scalar fixed-point equation for the terminal eigenvalue,

ΛX=ΛXNNGP(1+1NΛX[yX−C(ΛX+κ)](ΛX+κ)2)L.(44)\Lambda_X = \Lambda_X^{\mathrm{NNGP}}\left(1+\frac{1}{N}\frac{\Lambda_X\left[y_X-C\left(\Lambda_X+\kappa\right)\right]}{\left(\Lambda_X+\kappa\right)^2}\right)^L . \tag*{(44)}

This closure is exact within the MAP theory, as the geometric profile and the conservation law hold at any finite width. Admissible roots have tX>0t_X>0, for which the Gaussian integral in Eq. (23) converges; several such roots can occur for ΛXNNGP≪κ\Lambda_X^{\mathrm{NNGP}}\ll\kappa. Through ΛXNNGP\Lambda_X^{\mathrm{NNGP}}, the solution depends on the input kernel via λX(0)\lambda_X^{(0)}, on the weight prior via ∏mgm\prod_m g_m, and on depth and width explicitly; this dependence carries the input data into the per-layer factor. We now simplify the transfer factors for small κ\kappa.

Small-κ\kappa transfer factors

Within-class channel. The targets have no within-class component, yW=0y_W=0. Hence,

λ~W(L)=−C21ΛW+κ,qW=ΛWλ~W(L)=−C2ΛWΛW+κ.(45)\widetilde{\lambda}_W^{(L)}=-\frac{C}{2}\frac{1}{\Lambda_W+\kappa},\qquad q_W=\Lambda_W\widetilde{\lambda}_W^{(L)}=-\frac{C}{2}\frac{\Lambda_W}{\Lambda_W+\kappa}. \tag*{(45)}

For κ≪ΛW\kappa\ll\Lambda_W, qW=−C/2+O(Cκ/ΛW)q_W=-C/2+O(C\kappa/\Lambda_W), so that

tW=1−CN+O(CκNΛW).(46)t_W=1-\frac{C}{N}+O\left(\frac{C\kappa}{N\Lambda_W}\right). \tag*{(46)}

Thus, the within-class variance is suppressed by a per-layer factor that deviates from one by C/NC/N at leading order.

Between-class channel. The eigenvalue of the one-hot targets in the between-class channel is yB=ny_B=n. With the ratio of target to terminal between-class variance

r=yBΛB=nΛB,(47)r=\frac{y_B}{\Lambda_B}=\frac{n}{\Lambda_B}, \tag*{(47)}

Eq. (42) gives

qB=ΛBλ~B(L)=12ΛB[n−C(ΛB+κ)](ΛB+κ)2.(48)q_B=\Lambda_B\widetilde{\lambda}_B^{(L)}=\frac{1}{2}\frac{\Lambda_B\left[n-C\left(\Lambda_B+\kappa\right)\right]}{\left(\Lambda_B+\kappa\right)^2}. \tag*{(48)}

For κ≪ΛB\kappa\ll\Lambda_B,

qB=12(r−C)+O((r+C)κΛB),(49)q_B=\frac{1}{2}(r-C)+O\left(\frac{(r+C)\kappa}{\Lambda_B}\right), \tag*{(49)}

and therefore

tB=1+r−CN+O((r+C)κNΛB).(50)t_B=1+\frac{r-C}{N}+O\left(\frac{(r+C)\kappa}{N\Lambda_B}\right). \tag*{(50)}

Large-width depth–width scaling

Neglecting the corrections in κ\kappa and assuming N>CN>C, the ratio of the transfer factors is

tWtB=1−C/N1+(r−C)/N=N−CN+r−C=1−rN+r−C.(51)\frac{t_W}{t_B}=\frac{1-C/N}{1+(r-C)/N}=\frac{N-C}{N+r-C}=1-\frac{r}{N+r-C}. \tag*{(51)}

For r≪Nr\ll N, this gives

tWtB=1−rN+O(r(r+C)N2),ln⁡(tWtB)=−rN+O(r(r+C)N2),(52)\frac{t_W}{t_B}=1-\frac{r}{N}+O\left(\frac{r(r+C)}{N^2}\right),\qquad\ln\left(\frac{t_W}{t_B}\right)=-\frac{r}{N}+O\left(\frac{r(r+C)}{N^2}\right), \tag*{(52)}

and substitution into Theorem 1 yields

NC1(L)=NC1(0)exp⁡[−rLN+O(Lr(r+C)N2)].(53)NC_1^{(L)}=NC_1^{(0)}\exp\left[-\frac{rL}{N}+O\left(\frac{Lr(r+C)}{N^2}\right)\right]. \tag*{(53)}

The explicit dependence on CC cancels from the leading rate r/Nr/N; the number of classes enters only through rr, which we determine below.

Self-consistent determination of the rate

We next determine rr at small κ\kappa. With the NNGP eigenvalue of the between-class channel ΛBNNGP=λB(0)∏m=1Lgm\Lambda_{B}^{\mathrm{NNGP}} = \lambda_{B}^{(0)} \prod_{m=1}^{L} g_m, we define the target drive

μ=nΛBNNGP.(54)\mu= \frac{n}{\Lambda_{B}^{\mathrm{NNGP}}}. \tag*{(54)}

the value of rr for the NNGP kernels. With ΛB=ΛBNNGPtBL\Lambda_B = \Lambda_{B}^{\mathrm{NNGP}}t_B^L and r=n/ΛBr = n/\Lambda_B, (44) for X=BX = B is equivalent to μ=rtBL\mu= r t_B^L, which at small κ\kappa with (50) becomes

μ=r(1+r−CN)L.(55)\mu= r\left(1+\frac{r-C}{N}\right)^L. \tag*{(55)}

Its left-hand side is fixed by the input kernel and the weight prior, so that (55) determines rr. For N>CN > C, the right-hand side vanishes at r=0r = 0 and increases strictly and without bound for r>0r > 0, as rr and (1+(r−C)/N)L\left(1+(r-C)/N\right)^L are positive and increasing, since 1+(r−C)/N≥1−C/N>01+(r-C)/N \ge1-C/N > 0. (55) therefore has a unique positive solution rr for every μ>0\mu> 0, which increases with μ\mu.

Moreover, the right-hand side equals CC at r=Cr = C and exceeds (falls below) rr for r>Cr > C (r<Cr < C), so that rr lies between μ\mu and CC and, in particular, r≤max⁡(μ,C)r \le\max(\mu,C). Feature learning thus moves the terminal between-class variance ΛB=n/r\Lambda_B = n/r from its NNGP value n/μn/\mu towards the target variance per output, n/Cn/C, amplifying it for μ>C\mu> C (tB>1t_B > 1) and suppressing it for μ<C\mu< C (tB<1t_B < 1). As r>0r > 0, however, tB−tW=r/N>0t_B-t_W = r/N > 0 for every μ>0\mu> 0, so that NC1N C_1 decreases in every layer, at a rate that increases with μ\mu.

Limit at fixed depth-to-width ratio

We now let N→∞N \to\infty at fixed τ=L/N\tau= L/N and fixed μ\mu and show that the compression converges to Eq. (7). The drive μ\mu does not depend on LL if ∏m=1Lgm\prod_{m=1}^{L} g_m does not, as in Figure 2(a)–(c). As in Corollary 1, we work to leading order in κ/ΛW\kappa/\Lambda_W and κ/ΛB\kappa/\Lambda_B; the corrections in Eqs. (46) and (50) accumulate over the LL layers to relative order τ(r+C)κ/ΛX\tau(r+C)\kappa/\Lambda_X and persist in this limit.

Rate. In logarithmic form, (55) reads ln⁡r+Lln⁡(1+(r−C)/N)=ln⁡μ\ln r + L\ln\left(1+(r-C)/N\right) = \ln\mu. As r≤max⁡(μ,C)r \le\max(\mu,C) is bounded, Lln⁡(1+(r−C)/N)=(r−C)τ+O(τ/N)L\ln\left(1+(r-C)/N\right) = (r-C)\tau+ O(\tau/N), so that for N→∞N \to\infty the equation becomes

ln⁡rτ+(rτ−C)τ=ln⁡μ.(56)\ln r_\tau+ (r_\tau-C)\tau= \ln\mu. \tag*{(56)}

Its left-hand side increases from −∞-\infty to ∞\infty with slope 1/r+τ1/r+\tau in rr, so that it has a unique root rτr_\tau, which, like rr, lies between μ\mu and CC. As the slope exceeds 1/max⁡(μ,C)1/\max(\mu,C) there, r=rτ+O(τ/N)r = r_\tau+ O(\tau/N). Exponentiating (56) and multiplying by τeCτ\tau e^{C\tau} gives (rττ)erττ=μτeCτ(r_\tau\tau)e^{r_\tau\tau} = \mu\tau e^{C\tau}, an equation of the form xex=zx e^x = z with z>0z > 0. As xex≤0x e^x \le0 for x≤0x \le0 and xexx e^x increases from 00 to ∞\infty for x>0x > 0, this equation has exactly one real solution, which is positive and is denoted by W0(z)W_0(z), the principal branch of the Lambert function. Hence,

rτ=1τW0(μτeCτ).(57)r_\tau= \frac{1}{\tau} W_0\left(\mu\tau e^{C\tau}\right). \tag*{(57)}

Compression. By Theorem 1 and Eq. (52),

ln⁡NC1(L)NC1(0)=Lln⁡tWtB=−rττ+O(τN).(58)\ln\frac{N C_1^{(L)}}{N C_1^{(0)}} = L\ln\frac{t_W}{t_B} = -r_\tau\tau+ O\left(\frac{\tau}{N}\right). \tag*{(58)}

The error term collects the corrections of order 1/N21/N^2 per layer in (52), which add up to O(τ/N)O(\tau/N) over L=τNL=\tau N layers as rr is bounded, and (r−rτ)=O(τ2/N)(r-r_\tau)=O(\tau^2/N). For N→∞N\to\infty at fixed τ\tau and μ\mu, it vanishes, and (57) gives

lim⁡N→∞NC1(L)NC1(0)=e−rττ=exp⁡[−W0(μτeCτ)],(59)\lim_{N\to\infty}\frac{N C_1^{(L)}}{N C_1^{(0)}} = e^{-r_\tau\tau} = \exp\left[-W_0\left(\mu\tau e^{C\tau}\right)\right], \tag*{(59)}

which is (7).

Small depth-to-width ratio. With W0(x)=x−x2+O(x3)W_0(x)=x-x^2+O(x^3), Eq. (57) gives rτ=μ+μ(C−μ)τ+O(τ2)r_\tau=\mu+\mu(C-\mu)\tau+O(\tau^2). For μτ≪1\mu\tau\ll1 and Cτ≪1C\tau\ll1, the rate thus reduces to μ\mu, its value for the NNGP kernels, and Eq. (59) to 1−μτ1-\mu\tau. The self-consistent change of the rate towards CC enters the compression only at second order in τ\tau; Eq. (59) includes it to all orders.

Scope. The limit is taken for the MAP equations, a saddle point for N→∞N\to\infty at fixed LL, whose corrections can accumulate over the layers, as the finite-width corrections of the neural tangent kernel do [2]. For deep linear networks with one output and without observation noise, the posterior at large PP is determined by LP/NLP/N [3], whereas PP does not enter Eq. (7) at fixed μ\mu. Whether trained networks, which sample this posterior, follow Eq. (7) beyond LP/N≪1LP/N\ll1 therefore remains to be checked in future work.

Input geometry of Gaussian classes

The input kernel enters the depth law through NC1(0)N^{(0)}_{\mathrm{C}1} and through the target drive μ\mu of Corollary 1. We here compute both for Gaussian classes, xα=mc+σξαx_\alpha=m_c+\sigma\xi_\alpha for a sample α\alpha of class cc, with fixed class centers mc∈Rd0m_c\in\mathbb{R}^{d_0} and independent ξα∼N(0,Id0)\xi_\alpha\sim\mathcal{N}(0,I_{d_0}), and determine when their expected input kernel is exchangeable.

Expected input kernel. As E[xαxβ]=mcTmc′+d0σ2δαβ\mathbb{E}[x_\alpha x_\beta]=m_c^\mathsf{T}m_{c'}+d_0\sigma^2\delta_{\alpha\beta} for samples α\alpha of class cc and β\beta of class c′c', the input kernel of Sec. 3 has the expectation

E[K(0)]=g0d0(YMYT+d0σ2IP)+gb1P1PT,Mcc′=mcTmc′.(60)\mathbb{E}\left[K^{(0)}\right]=\frac{g_0}{d_0}\left(YMY^\mathsf{T}+d_0\sigma^2I_P\right)+g_b\mathbf{1}_P\mathbf{1}_P^\mathsf{T},\qquad M_{cc'}=m_c^\mathsf{T}m_{c'}. \tag*{(60)}

The noise and bias terms lie in AA, and (YMYT)αβ=Mcc′(YMY^\mathsf{T})_{\alpha\beta}=M_{cc'} depends on the samples only through their classes. The expected input kernel is therefore exchangeable if and only if MM is invariant under all permutations π\pi of the classes, Mπ(c)π(c′)=Mcc′M_{\pi(c)\pi(c')}=M_{cc'}, i.e., if the centers have equal norms, Mcc=aM_{cc}=a, and equal pairwise overlaps, Mcc′=bM_{cc'}=b for c≠c′c\ne c'. Then M=(a−b)IC+b1C1CTM=(a-b)I_C+b\mathbf{1}_C\mathbf{1}_C^\mathsf{T}, and with Y1C=1PY\mathbf{1}_C=\mathbf{1}_P and Eq. (35),

YMYT=n(a−b)(E+PB)+bPE,(61)YMY^\mathsf{T}=n(a-b)(E+P_B)+bP_E, \tag*{(61)}

whose eigenvalues are n(a−b)n(a-b) in channel BB and 0 in channel WW. The centers ±e1,±e2\pm e_1,\pm e_2 of four-class XOR (App. § 12) have equal norms but overlaps −1-1 and 0, and thus violate this condition.

Channel eigenvalues and SNR. With the signal-to-noise ratio SNR=∑c∥mc−mˉ∥2/(Cd0σ2)\mathrm{SNR}=\sum_c\lVert m_c-\bar m\rVert^2/(Cd_0\sigma^2) of Sec. 3, where mˉ=1C∑cmc\bar m=\frac{1}{C}\sum_c m_c, and ∑c∥mc−mˉ∥2=Tr⁡(HCM)=(C−1)(a−b)\sum_c\lVert m_c-\bar m\rVert^2=\operatorname{Tr}(H_CM)=(C-1)(a-b), the channel eigenvalues of the expected input kernel are

λW(0)=g0σ2,λB(0)=g0σ2+g0n(a−b)d0=g0σ2(1+nCC−1SNR).(62)\lambda_W^{(0)}=g_0\sigma^2,\qquad\lambda_B^{(0)}=g_0\sigma^2+\frac{g_0n(a-b)}{d_0}=g_0\sigma^2\left(1+\frac{nC}{C-1}\mathrm{SNR}\right). \tag*{(62)}

By Eq. (40), we get

NC1(0)=P−C(C−1)+nC SNR=n−1n SNR+1−1/C.(63)N_{\mathrm{C}1}^{(0)}=\frac{P-C}{(C-1)+nC\,\mathrm{SNR}}=\frac{n-1}{n\,\mathrm{SNR}+1-1/C}. \tag*{(63)}

For n→∞n\to\infty, it tends to 1/SNR1/\mathrm{SNR}, the NC1 of the input distribution. At finite nn, it is smaller, as the within-class subspace has dimension P−CP-C instead of PP and the empirical class means retain part of the noise.

Target drive. Inserting Eq. (62) into Eq. (54) gives

μ=ng0σ2(1+nCC−1SNR)∏m=1Lgm.(64)\mu=\frac{n}{g_0\sigma^2\left(1+\frac{nC}{C-1}\mathrm{SNR}\right)\prod_{m=1}^{L}g_m}. \tag*{(64)}

At small κ\kappa, the rate rr of Corollary 1 is an increasing function of μ\mu and thus depends on the input only through λB(0)\lambda_B^{(0)}, i.e., on σ\sigma and the SNR separately rather than on the SNR alone. Raising the SNR by lowering σ\sigma at fixed centers lowers λB(0)\lambda_B^{(0)} and thus raises μ\mu, rr and the per-layer decrease of NC1, as in Figure 2(b); raising it by separating the centers at fixed σ\sigma raises λB(0)\lambda_B^{(0)} and has the opposite effect.

Sampled data. For general sampled inputs, K(0)K^{(0)} is not exchangeable. Its orthogonal projection onto A\mathcal{A} with respect to the Frobenius inner product has the channel eigenvalues λX(0)=Tr⁡(PXK(0))/rank⁡(PX)\lambda_{X}^{(0)} = \operatorname{Tr}(P_XK^{(0)})/\operatorname{rank}(P_X) and thus, by Eq. (40), the same NC1 as K(0)K^{(0)}. The theory in Figure 2(d) is evaluated on this projection.

Experimental and numerical details

Synthetic data. We consider two balanced four-class Gaussian-mixture tasks in Rd0\mathbb{R}^{d_0} with d0=100d_0 = 100, xα=mc+σξαx_\alpha= m_c + \sigma\xi_\alpha for the samples of class cc and ξα∼N(0,Id0)\xi_\alpha\sim\mathcal{N}(0,I_{d_0}). For four-class XOR (Figure 1), the class centers are mc∈{e1,−e1,e2,−e2}m_c \in\{e_1,-e_1,e_2,-e_2\}, one class per center, whereas the Gaussian task of Figure 2(d) uses mc=ecm_c = e_c, c=1,…,4c = 1,\ldots,4. Here, eie_i denotes the iith standard unit vector of Rd0\mathbb{R}^{d_0}. Only the latter has centers with equal pairwise overlaps, so that its expected input kernel is exchangeable (App. § 11). Both datasets use σ=0.4\sigma= 0.4, with P=40P = 40 training samples (n=10n = 10 per class), drawn once and shared by all trained networks.

Network training. We train the networks of § 3 with one modification: the network output h(L)h^{(L)} is multiplied by γ−1/2\gamma^{-1/2}. Weights and biases are initialized from zero-mean Gaussian priors, with variance vw/dinv_w/d_{\mathrm{in}} for a weight matrix of fan-in dind_{\mathrm{in}} and vbv_b for the biases. Training uses full-batch stochastic gradient Langevin dynamics (SGLD) [8, 15] on the squared-error loss L\mathcal{L} summed over all samples and outputs. For a parameter θ\theta, one update is

θt+1=θt−η(∇θL(θt)+λθθt)+2ηTγ ξt,ξt∼N(0,I).\theta_{t+1} = \theta_t - \eta\left(\nabla_\theta\mathcal{L}(\theta_t) + \lambda_\theta\theta_t\right) + \sqrt{\frac{2\eta T}{\gamma}}\,\xi_t,\qquad\xi_t \sim\mathcal{N}(0,I).

Here, η=lr/P\eta= \mathrm{lr}/P with lr=10−3\mathrm{lr} = 10^{-3}, so that the data-gradient step equals one with learning rate lr\mathrm{lr} on the per-sample averaged loss. The weight decay is matched to the prior: λθ\lambda_\theta equals T/γT/\gamma divided by the prior variance of θ\theta, i.e., λW=(T/γ)din/vw\lambda_W = (T/\gamma)d_{\mathrm{in}}/v_w for weights and λb=(T/γ)/vb\lambda_b = (T/\gamma)/v_b for biases. We train 1010 networks with independent initializations and Langevin noise on the same training samples, each for 10510^5 steps. Reported empirical values are the mean and population standard deviation over networks of the NC values at the final iterate; as the training samples are shared, layer 00 has no spread.

The stationary distribution of these dynamics is proportional to exp⁡(−γL/T)\exp(-\gamma\mathcal{L}/T) times the Gaussian prior, i.e., the posterior with Gaussian observation noise of variance κ=T/(2γ)\kappa= T/(2\gamma). As the output multiplier γ−1/2\gamma^{-1/2} rescales the readout, this is the posterior of § 3 with gl=vwg_l = v_w for l<Ll < L, gL=vw/γg_L = v_w/\gamma and gb=vbg_b = v_b, except that the readout bias has variance vb/γv_b/\gamma, so that the constant term of K(L)K^{(L)} is vb/γv_b/\gamma instead of gbg_b; the theory uses the same convention. Hence, γ\gamma enters the posterior only through the readout and κ\kappa, and it sets the strength of feature learning, e.g., μ∝γ\mu\propto\gamma in Corollary 1.

Kernel NC observables. At each layer, we compute the kernel K(l)K^{(l)} of the trained network as defined in § 3 and evaluate NC1--NC3 using the kernel expressions of Proposition 1. The ridge parameter of NC3 is κ=T/(2γ)\kappa= T/(2\gamma) at every layer, matching the observation noise of the readout. We additionally report a raw-feature estimate (triangles in Figure 1), obtained from the Gram matrix ZZTZZ^{\mathsf{T}} of the inputs (l=0l = 0) or of the post-activations ϕ(h(l−1))\phi(h^{(l-1)}) (l≥1l \ge1), i.e., without the prefactors and the bias term of the kernels of § 3. As neither changes NC1 or NC2, the two estimates differ only in NC3, which depends on the scale of the kernel relative to the ridge. For the raw features, NC3 is evaluated with the same ridge κ=T/(2γ)\kappa= T/(2\gamma), without rescaling.

Nonlinear XOR experiment (Figure 1). For Figure 1, we use four-class XOR with C=4C = 4, N=256N = 256, L=3L = 3, ϕ=erf⁡\phi= \operatorname{erf}, vw=0.5v_w = 0.5, vb=0.1v_b = 0.1, γ=2\gamma= 2 and T=10−4T = 10^{-4}, i.e., κ=2.5×10−5\kappa= 2.5 \times10^{-5}. The theory curves solve the first-order moment equations, Eqs. (26) and (27), jointly with the terminal condition, Eq. (30). The two-point expectations of erf⁡\operatorname{erf} and its derivatives are evaluated in closed form, and the connected four-point function by quasi-Monte Carlo, with 5×1045 \times10^4 Sobol points for all layers and iterations. The resulting equations are solved by Anderson acceleration until the residual of K(L)K^{(L)} falls below 10−310^{-3} in relative spectral norm. To improve convergence at the target finite width, the solution is annealed from the NNGP kernels at an auxiliary width N=2×104N = 2 \times10^4 to N=256N = 256 in 5050 steps equally spaced in N−1/2N^{-1/2}, each initialized with the solution of the previous step.

Linear networks with an exchangeable input kernel (Figure 2(a)–(c)). Panels (a)–(c) use the expected input kernel, Eq. (60), which is exactly exchangeable, so no finite dataset is sampled and no seed averaging is required. We use C=5C = 5, P=50P = 50, d0=400d_0 = 400, vw=1v_w = 1, vb=0.01v_b = 0.01, γ=2\gamma= 2 and κ=10−4\kappa= 10^{-4}, and class centers that form a regular simplex, ∥mc∥2=d0\lVert m_c\rVert^2 = d_0 and mc⊤mc′=−d0/(C−1)m_c^\top m_{c'} = -d_0/(C - 1) for c≠c′c \ne c', so that SNR =1/σ2= 1/\sigma^2. Panels (a) and (c) use σ=1.5\sigma= 1.5, i.e., SNR =0.444= 0.444. Throughout these experiments, gl=1g_l = 1 for l<Ll < L and gL=1/2g_L = 1/2, so that ∏l=1Lgl\prod_{l=1}^{L} g_l, and hence the target drive μ\mu, does not depend on depth. Consequently, varying (L,N)(L, N) isolates the dependence on the ratio τ=L/N\tau= L/N.

The lines show Theorem 1, NC1(l)=NC1(0)(tW/tB)l\mathrm{NC}_1^{(l)} = \mathrm{NC}_1^{(0)}(t_W/t_B)^l, with tWt_W and tBt_B obtained from the exact finite-κ\kappa closure in Eq. (44). For all settings shown, these scalar equations have a unique root with tX>0t_X > 0, which we find by root finding with continuation in depth from L=1L = 1. As an independent check, the markers solve the full MAP forward–backward matrix equations in Eq. (5), by Anderson acceleration of K(l)K^{(l)} and K~(l)\widetilde{K}^{(l)} until the residual of K(L)K^{(L)} falls below 10−610^{-6} in relative spectral norm, with the width annealed from N=2×104N = 2 \times10^4 in 20 steps equally spaced in N−1/2N^{-1/2}. The closed-form and full-matrix solutions agree to a relative deviation below 4×10−54 \times10^{-5} for all widths shown, N∈{64,128,256,512}N \in\{64, 128, 256, 512\}.

Panel (a) fixes L=16L = 16 and compares the layerwise geometric law across widths. Panel (b) fixes N=256N = 256 and L=16L = 16 and varies SNR ∈{4,2,1,0.444,0.25,0.111}\in\{4, 2, 1, 0.444, 0.25, 0.111\} through σ\sigma at fixed centers, testing the data dependence of the contraction rate log⁡(tW/tB)\log(t_W/t_B). Panel (c) varies depth at each width so that all curves reach τ=0.25\tau= 0.25: L∈{1,2,4,…,N/4}L \in\{1, 2, 4, \ldots, N/4\} for N∈{64,128,256,512}N \in\{64, 128, 256, 512\}.

Trained linear networks (Figure 2(d)). Panel (d) departs from the exactly exchangeable population setting and uses the sampled Gaussian task together with SGLD-trained linear networks, with N=256N = 256, L=16L = 16, vw=0.5v_w = 0.5, vb=0.1v_b = 0.1, γ=2\gamma= 2 and T=10−4T = 10^{-4}. We compare the layerwise NC1 values of the trained networks with Theorem 1 evaluated on the channel eigenvalues λX(0)=Tr⁡(PXK(0))/rank⁡(PX)\lambda_X^{(0)} = \operatorname{Tr}(P_X K^{(0)})/\operatorname{rank}(P_X) of the sampled input kernel (see App. § 11), with tWt_W and tBt_B from Eq. (44). Thus, unlike panels (a)–(c), which compare two solutions of the same theoretical equations, panel (d) provides a direct comparison between the analytic law and representations learned by trained finite-width networks.

References

  1. [1]Kirsten Fischer, Javed Lindner, David Dahmen, Zohar Ringel, Michael Krämer, and Moritz Helias. Critical feature learning in deep neural networks. In Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp, editors, Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 13660–13690. PMLR, 21–27 Jul 2024. URL https://proceedings.mlr.press/v235/fischer24a.html.arxiv.org/abs/2405.10761
  2. [2]Boris Hanin and Mihai Nica. Finite depth and width corrections to the neural tangent kernel. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=SJgndT4kwB.arxiv.org/abs/1909.05989
  3. [3]Boris Hanin and Alexander Zlokapa. Bayesian interpolation with deep linear networks. Proceedings of the National Academy of Sciences, 120(23):e2301345120, 2023. doi: 10.1073/pnas.2301345120. URL https://www.pnas.org/doi/abs/10.1073/pnas.2301345120.DOI
  4. [4]Hangfeng He and Weijie J. Su. A law of data separation in deep learning. Proceedings of the National Academy of Sciences, 120(36):e2221704120, 2023. doi: 10.1073/pnas.2221704120. URL https://www.pnas.org/doi/abs/10.1073/pnas.2221704120.DOI
  5. [5]Wanli Hong and Shuyang Ling. Neural collapse for unconstrained feature model under cross-entropy loss with imbalanced data. Journal of Machine Learning Research, 25(192):1–48, 2024. URL http://jmlr.org/papers/v25/23-1215.html.arxiv.org/abs/2309.09725
  6. [6]Vignesh Kothapalli and Tom Tiner. Can kernel methods explain how the data affects neural collapse? Transactions on Machine Learning Research, 2025. URL https://openreview.net/forum?id=MbF1gYfIIY.arxiv.org/abs/2406.02105
  7. [7]Qianyi Li and Haim Sompolinsky. Statistical mechanics of deep linear neural networks: The backpropagating kernel renormalization. Phys. Rev. X, 11:031059, Sep 2021. doi: 10.1103/PhysRevX.11.031059. URL https://link.aps.org/doi/10.1103/PhysRevX.11.031059.DOI
  8. [8]Gadi Naveh, Oded Ben David, Haim Sompolinsky, and Zohar Ringel. Predicting the outputs of finite deep neural networks trained with noisy gradients. Phys. Rev. E, 104:064301, Dec 2021. doi: 10.1103/PhysRevE.104.064301. URL https://link.aps.org/doi/10.1103/PhysRevE.104.064301.DOI
  9. [9]Vardan Papyan, X. Y. Han, and David L. Donoho. Prevalence of neural collapse during the terminal phase of deep learning training. Proceedings of the National Academy of Sciences, 117(40):24652–24663, 2020. doi: 10.1073/pnas.2015509117. URL https://www.pnas.org/doi/abs/10.1073/pnas.2015509117.DOI
  10. [10]Akshay Rangamani, Marius Lindegeard, Tomer Galanti, and Tomaso A Poggio. Feature learning in deep classifiers through intermediate neural collapse. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett, editors, Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 28729–28745. PMLR, 23–29 Jul 2023. URL https://proceedings.mlr.press/v202/rangamani23a.html.
  11. [11]Peter Súkeník, Marco Mondelli, and Christoph Lampert. Deep neural collapse is provably optimal for the deep unconstrained features model. In A. Oh, T. Naumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine, editors, Advances in Neural Information Processing Systems, volume 36, pages 52991–53024. Curran Associates, Inc., 2023. doi: 10.52202/075280-2306. URL https://proceedings.neurips.cc/paper_files/paper/2023/file/a60c43ba078b723d3d517d28c50ed4c-Paper-Conference.pdf.DOI
  12. [12]Peter Súkeník, Christoph Lampert, and Marco Mondelli. Neural collapse vs. low-rank bias: Is deep neural collapse really optimal? In A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang, editors, Advances in Neural Information Processing Systems, volume 37, pages 138250–138288. Curran Associates, Inc., 2024. doi: 10.52202/079017-4388. URL https://proceedings.neurips.cc/paper_files/paper/2024/file/f9c2ab8d429044e0c35bcece2ff6d123-Paper-Conference.pdf.DOI
  13. [13]Tom Tირer, Haoxiang Huang, and Jonathan Niles-Weed. Perturbation analysis of neural collapse. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett, editors, Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 34301–34329. PMLR, 23–29 Jul 2023. URL https://proceedings.mlr.press/v202/tirer23a.html.arxiv.org/abs/2210.16658
  14. [14]Peng Wang, Xiao Li, Can Yaras, Zhihui Zhu, Laura Balzano, Wei Hu, and Qing Qu. Understanding deep representation learning via layerwise feature compression and discrimination. Journal of Machine Learning Research, 26(220):1–61, 2025. URL http://jmlr.org/papers/v26/24-0047.html.
  15. [15]Max Welling and Yee Whye Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th International Conference on Machine Learning, ICML’11, page 681–688, Madison, WI, USA, 2011. Omnipress. ISBN 9781450306195.
  16. [16]Zhihui Zhu, Tianyu Ding, Jinxin Zhou, Xiao Li, Chong You, Jeremias Sulam, and Qing Qu. A geometric analysis of neural collapse with unconstrained features. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, volume 34, pages 29820–29834. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper_files/paper/2021/file/f92586a25bb3145facd64ab20fd554ff-Paper.pdf.arxiv.org/abs/2105.02375

AI tools statement

No AI-use declaration is available for this version in Valency.

The available record does not establish whether AI systems or models contributed to this work.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

No code, data or supplementary files were declared for this version.

Pick where to look, or just type