How SGD Learns Features
Beyond the kernel regime: single-index models, information exponents and leap complexity.
A wide network trained in the kernel regime keeps its random features and needs about examples to learn a degree- polynomial of a single direction in . A network that first finds the direction can do far better. Over the last few years, sharp theorems have pinned down when and how fast SGD finds such hidden structure, and the answer depends on a single integer: how flat the loss is at the start.
What you’ll learn
- Explain why kernel methods, including the neural tangent kernel regime, need about samples for degree- targets, and define single-index models.
- Define the information exponent through the Hermite expansion of the link function, and derive why online SGD needs about samples to escape the equator.
- Show that one gradient step on a two-layer network adds a rank-one spike aligned with the target's linear component, and state when gradient descent provably beats kernels.
- Define the leap complexity of a multi-index target, explain saddle-to-saddle dynamics and sparse parities, and relate SGD's cost to statistical-query lower bounds.
What kernels cannot learn
In the lazy regime a very wide network barely moves its first-layer weights, so it behaves like a linear model on fixed random features: kernel regression with the neural tangent kernel (Jacot, Gabriel & Hongler, 2018). Whether training is lazy depends on the scaling of initialization and learning rate (Chizat, Oyallon & Bach, 2019), and the Loss Landscapes lesson shows the linearization. The trouble with kernels is high dimension.
For inputs uniform on a sphere in , Ghorbani, Mei, Misiakiewicz & Montanari (2021) proved that kernel ridge regression with a rotation-invariant kernel and samples can fit at most the degree- polynomial part of the target; random-features and neural-tangent models whose width lies in the same range are limited in the same way (to degree and ). A cubic function of a single direction already costs about samples, the same as an arbitrary cubic. The kernel cannot exploit the fact that only one direction matters; a network that learns its features can, which is the formal meaning of feature learning in this lesson.
For unit vectors the pair is jointly Gaussian with correlation , and Hermite polynomials diagonalize such pairs:
Take a matched student, , and the square loss. Expanding both links, the population loss depends on only through the overlap :
Near the equator the first surviving term dominates. Its slope is what pulls a random start toward , and it is tiny when is large: the landscape has a degenerate critical point at of order .
| Link | First nonzero Hermite coefficient | |
|---|---|---|
| , or | , equal to and | |
| , (phase retrieval) | by symmetry, | |
| , | ||
| only |
Escaping the equator
Projected onto the sphere, gradient flow on the population loss moves the overlap like with . Starting from , the time to reach is
Online SGD follows this flow only if the step is small enough. A single sample's gradient has norm about , so renormalizing onto the sphere after a step shrinks by a factor of about , while the useful drift adds . The drift must win at the start, where :
The number of steps, which is the number of samples, is the search time divided by the step size. The weak signal costs twice: it makes the search long, and it forces small steps.
A single-index target has information exponent in dimension . About how many samples does online SGD need, ignoring constants and logarithms? Answer as a power of ten.
Show the answer
4 log₁₀ n
. For comparison, a kernel method needs about samples to learn this cubic, while the smoothed SGD discussed next needs only about , matching the lower bound for correlational methods.
Is the limit? No. Damian, Nichani, Ge & Lee (2023) ran online SGD on a smoothed loss: the average of the loss over the directions , for random unit vectors and a large radius . Smoothing shrinks both the signal and the noise of the stochastic gradient, but near the equator it shrinks the noise faster, and the higher signal-to-noise ratio cuts the sample complexity to about for . That matches a lower bound for correlational statistical query (CSQ) algorithms, which access the data only through averages ; gradient descent on the square loss is one of them. Algorithms that may also transform the labels are governed by a possibly smaller generative exponent; correlating with , for instance, already reveals for the link, whose information exponent is 3. Damian, Pillaud-Vivien, Lee & Bruna (2024) prove that statistical-query and low-degree-polynomial algorithms need about samples, and give a polynomial-time algorithm that matches it.
Online SGD is trained on four single-index targets in the same high dimension . Which needs the most samples?
Show the answer
D.
The cost is governed by the information exponent: for the linear and ReLU links (about samples), for (about ), and for (about ). Nonlinearity alone is not what makes a target hard; a vanishing correlation with low-degree polynomials of the hidden direction is.
One large step learns a direction
Full networks do not need thousands of small online steps to start learning features. Ba, Erdogdu, Suzuki, Wang, Wu & Yang (2022) studied a two-layer network whose first layer takes a single gradient step of size on samples, after which the second layer is fit by ridge regression, in the limit where , and grow in proportion. The structure of that one step is easy to see in expectation.
At initialization the network's output is small, so with the gradient for neuron is dominated by the label term:
A random is nearly orthogonal to , so write with independent standard Gaussian parts. The part averages to zero, and if so does the part along . Only the hidden direction survives, weighted by the first Hermite coefficient :
Every neuron moves along the same direction , scaled by its own output weight. Stacking the rows, the population gradient of the first layer is a rank-one matrix; on a finite sample it becomes this spike plus a bulk of sampling noise.
What the spike buys depends on the step size. For a small step, Ba et al. prove a Gaussian equivalence for the trained features: the new kernel improves on the random features but still cannot beat the best linear predictor on the input. For a sufficiently large step ( of order in their scaling), ridge regression on the trained features goes beyond this linear regime and, for certain targets, outperforms a wide range of random-features and rotation-invariant kernel methods. Note the factor : if the target has information exponent , the spike vanishes at first order, and the single step learns nothing about , consistent with the search phase above.
With more steps, gradient descent provably learns low-dimensional structure that kernels cannot. Damian, Lee & Soltanolkotabi (2022) took targets with relevant directions () and a degree- polynomial. A two-layer network trained by gradient descent learns a representation that depends only on the relevant directions, with sample complexity , whereas samples are necessary in the kernel regime. For and fixed , that is against .
A two-layer network at random initialization takes one gradient step on data labeled by , which has mean zero. What does the first-order spike in the gradient look like?
- A rank-one matrix aligned with , as for any target
- There is none: , so the step carries no first-order information about
- A rank-two matrix aligned with
- A full-rank matrix, since the target is nonlinear
Show the answer
B. There is none: , so the step carries no first-order information about
The spike is proportional to , the correlation of the label with , and an even link has . The direction is carried by , which a single step from a random start sees only at higher order; this is the information exponent at work.
Staircases, leaps and parities
Targets that depend on several hidden coordinates can be learned in stages, if each stage leaves a clue for the next. On the Boolean cube , the staircase can be found one coordinate at a time: correlates with the label directly, and once is known the term points to . The parity alone offers no such ladder: it is uncorrelated with every function of fewer than three of the coordinates.
Sparse parities sit at the hard end. With hidden bits among , every correlation of the label with fewer than bits vanishes, and statistical-query lower bounds imply that gradient methods with noisy gradients need steps. Barak, Edelman, Goel, Kakade, Malach & Zhang (2022) found that SGD on small networks learns such parities after about iterations, near that limit, and that the loss sits on a plateau and then drops abruptly. Underneath the plateau, progress is continuous: a Fourier gap in the population gradient steadily amplifies the weights on the relevant bits, which shows in the weights long before it shows in the loss. Hidden progress of this kind is one candidate explanation for abrupt learning curves such as grokking and some apparently emergent abilities.
Key takeaways
- Kernel methods, including lazy networks, need about samples to fit degree- polynomials in high dimension, even when the target depends on one direction; learning the direction is what feature learning buys.
- For a single-index target the information exponent , the index of the first nonzero Hermite coefficient, sets the flatness of the loss at a random start. Online SGD needs about , or samples (sharp up to logarithms), almost all spent escaping the equator; smoothing reaches the CSQ limit .
- One gradient step at initialization adds a rank-one spike to the first layer; with a large step it beats kernels, and gradient descent learns -index degree- targets with samples against for kernels.
- The leap of a multi-index target governs SGD's cost, conjecturally steps through saddle-to-saddle plateaus, proven in restricted settings. Sparse parities need steps, and SGD's progress on them is hidden beneath a flat loss.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
What is the information exponent of the link , and what does it imply for online SGD in dimension ?
- : about samples
- : about samples
- : about samples
- : about samples
Show the answer
B. : about samples
is orthogonal to the constant and to , so and : . The threshold gives about samples, up to logarithmic factors.
On the Boolean cube, what is the leap of ?
Show the answer
C.
Take first, adding two coordinates, then , adding two more: the largest jump is . No ordering does better, because the first term in any order adds at least two coordinates. By the conjecture, online SGD needs about steps, up to logarithms.
A target in is a degree-4 polynomial of hidden directions. Roughly how many samples does a method in the kernel regime need, compared with gradient descent on a two-layer network as analyzed by Damian, Lee & Soltanolkotabi (2022)?
- Kernel about ; gradient descent about
- Both about
- Kernel about ; gradient descent about
- Kernel about ; gradient descent about
Show the answer
A. Kernel about ; gradient descent about
Kernel methods pay for the degree in the ambient dimension, , because they cannot exploit the hidden low-dimensional structure. Gradient descent learns the two relevant directions first: , dominated by .
Further reading
- G. Ben Arous, R. Gheissari & A. Jagannath, "Online stochastic gradient descent on non-convex losses from high-dimensional inference," Journal of Machine Learning Research 22(106), 1–51 (2021).
- A. Damian, E. Nichani, R. Ge & J. D. Lee, "Smoothing the landscape boosts the signal for SGD: Optimal sample complexity for learning single index models," NeurIPS (2023).
- J. Ba, M. A. Erdogdu, T. Suzuki, Z. Wang, D. Wu & G. Yang, "High-dimensional asymptotics of feature learning: How one gradient step improves the representation," NeurIPS (2022).
- E. Abbe, E. Boix-Adserà & T. Misiakiewicz, "SGD learning on neural networks: leap complexity and saddle-to-saddle dynamics," COLT (2023).
- B. Barak, B. L. Edelman, S. Goel, S. Kakade, E. Malach & C. Zhang, "Hidden progress in deep learning: SGD learns parities near the computational limit," NeurIPS (2022).