Feature Learning in Two-Layer Networks: Weak Recovery and the Generative Exponent
ICTP Summer School on Machine Learning — Lecture 7 (Day 9, Morning)
These notes cover the second lecture of Day 9 by Andrea Montanari. We ask when a two-layer network trained by (stochastic) gradient descent can learn the single-index model y=φ(w∗⊤x) in polynomial time with n=O~(d) samples. The mean field theory (MFT) provides a sharp separation from the NTK regime: while Rademacher complexity remains small along MFT dynamics, it blows up in the NTK regime. The lecture introduces the generative exponentk∗ of a link function φ and proves that: (a) weak recovery requires n≥Ω(dk∗/2) for any efficient algorithm (lower bound from SQ/LDP hardness), and (b) a computationally efficient algorithm achieving weak recovery with n=O~(dk∗/2) is given by a degree-k∗ preprocessing estimator, as proved in Damian et al. (2024).
We begin with a structural observation that sharpens the NTK/feature-learning distinction.
In mean field theory (MFT), the Rademacher complexity Rdn(Ft) — where Ft is the function class at time t — stays small (=O(1)) on times t=O(1). This is because in MFT the mean field potential Ψ(θ;ρt) has a small number of effective degrees of freedom (essentially 1, by the symmetry reduction for the single-index model), and the Barron norm ∥ft∥σ remains bounded.
In the NTK regime, however, as we showed via the GMMM theorem (Lecture 6), Rdn(F)≥cσ>0 when the network class can overfit. The Rademacher bound does not vanish.
This distinction is the precise sense in which MFT enables generalization that NTK cannot: the effective complexity of the hypothesis class stays controlled throughout training.
We focus on the single-index model yi=φ(⟨w∗,xi⟩)+εi with xi∼N(0,Id), εi∼N(0,τ2), and ask: can a two-layer network f(x;θ)=m1∑k=1makσ(wk⊤x) learn this model efficiently?
Three approaches and their sample complexities:
RKHS/NTK methods (e.g. KRR with the NTK): require n≥dc for every constant c>0 by the GMMM theorem (Lecture 6). Computationally efficient but statistically far from optimal.
ERM over functions of bounded Barron norm with ∥f∗∥σ≍1: requires n=O~(d) samples (from the Rademacher bound, Lecture 4), but is computationally inefficient — minimizing the empirical risk over the Barron ball is NP-hard in general.
Gradient-based methods on a two-layer network (the question): can they be efficient?
The answer depends on the link function φ via the generative exponent defined below. By the results of Damian et al. (2024), there is a polynomial-time algorithm achieving weak recovery when n≥O~(dk∗/2), and no efficient algorithm can do better.
Weak recovery means finding w^ such that ∣⟨w^,w∗⟩∣≥ε>0 (non-trivial correlation with w∗) with high probability. It is a necessary first step toward full estimation.
Goal: construct an efficient estimator achieving weak recovery using n=O~(dk∗/2) samples.
Why k∗/2? As we will see, the natural preprocessing statistics live in (Rd)⊗k∗ (a tensor of order k∗), which has dk∗ entries. Estimating a rank-1 tensor from n samples by a spectral method requires n≫dk∗/2 (the threshold for a Wishart-type matrix with dk∗/2×dk∗/2 structure).
Weak Recovery Idea #1: Score Function (Preprocessing)¶
achieves weak recovery. Its expectation is Ew~=E[yx]=E[φ(w∗⊤x)x]=λ1w∗ (by Stein’s lemma E[xh(w⊤x)]=E[h′(w⊤x)]w). The variance is E∥w~−λ1w∗∥2=n1E[∥yx∥2]≤nCd, so ∥w^−w∗∥=O(d/n) and weak recovery holds for n/d bounded away from 0 (proposition-feature-learning in Lecture 6).
Failure case:k∗≥2, which happens when E[YG]=0, i.e. when φ is an even function or more generally has no odd-degree component in its Hermite expansion. The prototype is phase retrieval where φ(u)=u2.
General Preprocessing: Optimizing the Linear Functional¶
To handle k∗≥2, one replaces y by a preprocessed label T(y). The estimator becomes
The expectation is E[w~]=E[T(Y)X]=E[T(Y)E[G∣Y]]w∗=λ1(T)w∗ where λ1(T)=E[T(Y)G]. This is non-zero iff E[T(Y)G]=0, i.e. iff T is not orthogonal to E[G∣Y].
Optimal choice (the Preprocessing Trick): maximize E[T(Y)G] subject to E[T(Y)2]=1. By Cauchy–Schwarz:
Works iff k∗=1: The optimal preprocessing works iff λ1=E[E[G∣Y]2]>0, i.e. iff P(E[G∣Y]=0)<1. This fails precisely when E[G∣Y]=0 a.s., which happens when φ is even (e.g. phase retrieval: φ(u)=u2 means Y=G2+ε, so E[G∣Y=y]=0 since G and −G are exchangeable given Y).
where the second step uses E[φ(G)G2]=E[φ(G)He2(G)]+E[φ(G)]=λ2+c, giving EM^=cI+λ2w∗w∗⊤. (Here λ2=E[φ′′(G)]=E[φ(G)He2(G)] by integration by parts.)
So M=cI+λ2w∗w∗⊤ is a rank-1 perturbation of a multiple of the identity. The leading eigenvector is w∗ (assuming λ2=0).
Concentration:M^−M=n1∑i=1nZi where Zi=yixixi⊤−M are i.i.d. mean-zero. By an ε-net argument (high-dimensional probability, HDP):
By Davis–Kahan (eigenvalue perturbation), ∥v1(M^)−v1(M)∥≤Cd/n/∣λ2∣, giving weak recovery whenever n/d≥c0 for c0 sufficiently large. Note: if λ1=0 (i.e. k∗≥2) and n/d<c1, then weak recovery via the second-moment method is impossible — a sharp threshold.
This is a rank-2 + Wishart structure: M^≈nλ2(Xe1)(Xe1)⊤+W where W=n1X~⊤DX~ is approximately a Wishart matrix (spectrum of a low-rank perturbation of a random matrix) — a classical problem in random matrix theory.
The Generative Exponent and the Damian et al. Theorem¶
where Hek∗(x) denotes the k∗-th Hermite tensor: Qk∗(x)i1,…,ik∗=xi1⋯xik∗ (symmetrized monomial), with Hek∗ obtained by orthogonalizing Q0,Q1,…,Qk∗−1 (Gram–Schmidt), giving He0=Q0, He1=Q1, Hek=Qk−lower order terms.
The expectation is ET^=λk∗w∗⊗k∗, a rank-1 tensor proportional to w∗⊗k∗, since all lower Hermite coefficients λ1=⋯=λk∗−1=0 by definition of k∗.
Partial trace: For k∗ even, extract w∗ by taking the partial trace. Define the contracted matrix
Then EM^(k∗)=λk∗w∗w∗⊤ (a rank-1 matrix), and w^=v1(M^(k∗)) achieves weak recovery.
The key quantity is ET^=λk∗w∗⊗k∗. Note: the ideal estimator would be w^=argmax{⟨T^,w⊗k∗⟩:∥w∥=1}, the best rank-1 approximation to T^, but this is NP-hard in general (tensor PCA is hard for k≥3). The partial-trace method sidesteps this by reducing to a matrix spectral problem at the cost of a d factor in the sample complexity.
After one GD step: the weights move in the direction wi←ciw∗+wi⊥+signal⋅w∗, where the signal comes from m1∑iai∇wiR^n.
Freeze wi and minimize R^n over ai (a linear regression): ϕ(x)=(σ(w1⊤x),…,σ(wm⊤x))⊤, giving the “one-step” kernel Km(1step)(x1,x2)=m1∑iσ(wi⊤x1)σ(wi⊤x2).
The key observation: ∥f∗∥Km(1step)≪∥f∗∥Km(0step) (the RKHS norm of f∗ in the one-step kernel is much smaller than in the zero-step/NTK kernel), meaning f∗ is easier to approximate in the learned kernel than the random one.
so ℓ′(yi;w0⊤xi)=Ti(yi) evaluated at the current prediction, which is exactly the preprocessing function! As w0⊤xi≈0 at initialization, Ti(yi)=ℓ′(yi;0)∝(yi−σ(0)), giving the degree-1 preprocessing. For higher k∗, one applies k∗−1 preprocessing steps to extract the generative exponent.
Both have the form of a weighted sum of outer products, where the weights Ti(yi)=ℓ′(yi;w0⊤xi) are label-dependent preprocessings. This connects the gradient step to the preprocessing trick: one step of GD at initialization w0 with w0⊤xi≈0 produces the estimator w~=∇R^n(w0), which is exactly the linear preprocessing estimator n1∑iTi(yi)xi for Ti(y)=ℓ′(y;0).
For the square loss with σ=ReLU: T(y)=−(y−0+)=−y (up to a constant), recovering w~∝n1∑iyixi, which is the Stein estimator when λ1=0.
Damian, A., Pillaud-Vivien, L., Lee, J. D., & Bruna, J. (2024). Computational-statistical gaps in Gaussian single-index models. Proceedings of the 37th Annual Conference on Learning Theory, 1262–1262.