Criticality & Finite-Width Effects
Tuning initialization to criticality, and why the depth-to-width ratio governs finite networks.
Initialization theory usually imagines infinitely wide layers, where a random network's signals are exactly Gaussian and perfectly predictable. Real networks are finite, and the corrections pile up layer after layer. Tuned to criticality, a network neither explodes nor vanishes on average; what remains is controlled by one number, the ratio of depth to width. It decides how far a network strays from the infinite-width picture, and with it how much the network can learn features at all.
What you’ll learn
- State the criticality conditions for the kernel recursion and the two universality classes of activations (scale-invariant, like ReLU, and , like tanh), and derive each class's behavior at criticality.
- Show that at finite width the size of a layer's signal is a product of independent random factors, derive that its relative variance grows like (by per layer for linear networks and for ReLU), and explain the log-normal drift that follows.
- Explain why the neural tangent kernel fluctuates and moves during training at finite width, and why this is the mechanism of representation learning that the infinite-width limit lacks.
- Relate the aspect ratio to trainability, and to the alternatives of changing the parameterization (μP) or the architecture (residual scaling).
Criticality and two universality classes
First the infinite-width picture of signal propagation, in one paragraph and in the notation of Roberts, Yaida and Hanin's The Principles of Deep Learning Theory (PDLT). With weights and biases , at infinite width each pre-activation of layer is Gaussian with variance (the kernel, for a single input), and
For a scale-invariant and a symmetric Gaussian , half the mass sits on each side: , and likewise . The recursion is linear, , so both susceptibilities equal , and criticality fixes as stated, with :
For tanh, expand and use . With and the recursion becomes, for small ,
(The continuum version integrates to .) Both susceptibilities tend to as , so the signal and the gradient fade only polynomially, like in RMS. Away from criticality, for example , the decay is exponential.
A critical tanh network (, ) starts with . Using , what is the RMS of the pre-activations at layer 50?
Show the answer
0.1
, so the RMS is about (iterating the exact recursion gives ). The signalprop widget shows the same law: a tanh network at gain keeps about of its first-layer RMS after 50 layers and after 100, a slow power-law fade instead of the exponential collapse at smaller gains.
Finite width: corrections of order L/n
At width the infinite-width story is only the average. Given layer , the next pre-activations are exactly Gaussian, but with a random variance: the empirical kernel , a sum over units that fluctuates by . Integrating over it makes each layer a mixture of Gaussians: nearly Gaussian, with a connected four-point correlation of order . Across layers the fluctuations compound, as a simple calculation shows.
Take a critical ReLU network (, ). Given , the pre-activations of layer are i.i.d. , so the next empirical kernel is , where with fresh . The factors are independent of each other and of :
Their variance follows from and : , so . For a linear network (, ) the same computation gives . Independence makes second moments multiply:
The mean is preserved exactly, as criticality promises, but the fluctuations grow with , and once is of order one they grow exponentially, like . Taking logarithms, is a sum of independent terms with mean and variance , so it is approximately Gaussian: is roughly log-normal, and its typical value drifts below its mean, like .
A critical ReLU network has width , and the signal passes through random layers. Using the linear approximation, what is the relative variance of the final layer's squared signal?
Show the answer
0.2
(exactly, ): a relative standard deviation of about from one random draw to the next, although every layer is "correctly" initialized. A linear network of the same shape would give .
PDLT develops this into a systematic expansion. At criticality the network's output distribution is a Gaussian process plus corrections in powers of the aspect ratio : the four-point vertex, which measures non-Gaussianity, grows linearly with depth, so at leading order every correction is of order . Normalized by the squared kernel, it is , where with for scale-invariant activations: for ReLU and for linear, the same constants as above, and for the class. Wide-and-shallow networks () are close to the infinite-width Gaussian process; as approaches one the expansion breaks down and fluctuations dominate. The same accounting explains the slow downward drift of a He-initialized ReLU network in the signalprop widget (about of the first layer's RMS after 50 layers at width 128, against the log-normal estimate for a typical draw): the typical value sits below the preserved mean.
When the kernel moves: representation learning
Why care about finite width beyond stability? Because infinite width, in the standard parameterization, also removes learning of features. Gradient descent on a network moves its outputs according to the neural tangent kernel . As the width goes to infinity at fixed depth, becomes deterministic and stays constant during training: the network trains like a linear model in a fixed feature space, the lazy regime, and its hidden representations do not change in any way that matters.
This suggests a trade-off in architecture. As a network is stable but its features barely move; as grows, feature learning strengthens, and so do the fluctuations that make training erratic and the predictions of the expansion unreliable. PDLT motivates an intermediate optimal aspect ratio on these grounds and estimates it heuristically in an appendix, from an information-theoretic criterion (the mutual information between groups of neurons, which vanishes at infinite width, first grows with and then falls). The estimate depends on the activation, larger for tanh than for ReLU because tanh's is smaller, and residual connections shift it to larger values. The same picture also explains why very deep, narrow plain networks are hard to train even at criticality. Two other ways out of the lazy limit are taught elsewhere in the course: change the parameterization so that features move by order one at infinite width (μP; μP & Hyperparameter Transfer), or change the architecture so that depth is tamed, with residual branches scaled like (Scaling Residual Branches with Depth).
In the standard (NTK) parameterization, what happens to the neural tangent kernel as the width grows to infinity at fixed depth, and what does finite width change?
- It becomes deterministic and constant in training, so features do not move; finite width makes it fluctuate and evolve at order , which is feature learning
- It grows without bound, so training diverges; finite width keeps it bounded
- Nothing changes: the kernel is constant at every width
- It becomes random; finite width makes it deterministic
Show the answer
A. It becomes deterministic and constant in training, so features do not move; finite width makes it fluctuate and evolve at order , which is feature learning
The infinite-width limit at fixed depth is the lazy, kernel regime. The corrections that make finite networks fluctuate are the same ones that let their kernels, and hence their representations, change during training.
What it means in practice, and what is open
| Regime | Aspect ratio | Behavior at initialization | Training |
|---|---|---|---|
| Infinite width, fixed depth | Gaussian process; kernel deterministic | lazy: linear model in fixed features | |
| Wide and moderately deep | small | nearly Gaussian; corrections | stable, with feature learning at order |
| Deep and narrow | order one or more | log-normal fluctuations, relative variance | erratic even at criticality; normalization, residual scaling or orthogonal weights needed |
Key takeaways
- Criticality means : signals and gradients neither grow nor shrink exponentially with depth. Scale-invariant activations are critical at (He for ReLU) with a constant kernel; activations such as tanh at , with a kernel fading like .
- At width each layer multiplies the signal's squared size by an independent factor with mean one and variance ( for ReLU, for linear), so its relative variance is and the signal is roughly log-normal, with a typical value drifting below the mean.
- The aspect ratio controls all leading finite-width corrections (PDLT; Hanin & Nica): including the fluctuation and the motion of the neural tangent kernel, which is the representation learning that infinite width at fixed depth removes.
- Shallow-and-wide networks are nearly Gaussian processes; deep-and-narrow ones fluctuate wildly even at criticality. μP and scaled residual branches are the other routes to well-behaved large models.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
In PDLT's notation (, ), where is a ReLU network critical?
- ,
- , , He initialization, where the kernel is the same at every layer
- Any , as long as
- ReLU networks cannot be made critical
Show the answer
B. , , He initialization, where the kernel is the same at every layer
ReLU is scale-invariant with , , so , which equals at . At infinite width the kernel is then exactly constant in depth.
How does the kernel of a critical tanh network behave with depth?
- It stays exactly constant
- It decays exponentially
- It grows like
- It decays like a power law, , because tanh's fixed point is
Show the answer
D. It decays like a power law, , because tanh's fixed point is
gives per layer. Polynomial decay is what criticality buys for this class; exponential decay is the off-critical behavior.
Two critical ReLU networks: A has depth 10 and width 1,000; B has depth 100 and width 100. Which is closer to the infinite-width prediction at initialization, and why?
- B, because deeper networks average out more randomness
- They are equally close, since both are critical
- A, because the size of the finite-width corrections is set by the aspect ratio : for A against for B
- Neither: finite networks never resemble the infinite-width limit
Show the answer
C. A, because the size of the finite-width corrections is set by the aspect ratio : for A against for B
The relative variance of the squared signal is : about for A () against about for B (, where the growth is already exponential), whose signal is wildly log-normal.
At criticality the mean of is preserved exactly. Why does a typical deep, narrow network nevertheless show a signal that shrinks with depth?
- is a product of independent factors with mean , so it is roughly log-normal: its typical value falls like while rare large draws keep the mean at its value
- Because criticality only holds for the first few layers
- Because of rounding errors in floating point
- Because ReLU's derivative is smaller than one
Show the answer
A. is a product of independent factors with mean , so it is roughly log-normal: its typical value falls like while rare large draws keep the mean at its value
Jensen's inequality: for a random factor with mean . Summed over layers, the median drifts down by about in log-scale, though the mean does not move.
Further reading
- D. A. Roberts, S. Yaida & B. Hanin, The Principles of Deep Learning Theory (Cambridge University Press, 2022), arXiv:2106.10165.
- B. Poole, S. Lahiri, M. Raghu, J. Sohl-Dickstein & S. Ganguli, "Exponential expressivity in deep neural networks through transient chaos," NeurIPS (2016).
- B. Hanin, "Which neural net architectures give rise to exploding and vanishing gradients?," NeurIPS (2018).
- B. Hanin & M. Nica, "Products of many large random matrices and gradients in deep neural networks," Communications in Mathematical Physics 376 (2020).
- B. Hanin & M. Nica, "Finite depth and width corrections to the neural tangent kernel," ICLR (2020).