In deep learning theory, we often simplify complex neural networks by taking them to their mathematical extremes. We might imagine a network that is infinitely wide ($W \to \infty$) to understand its convergence as a Gaussian Process, or infinitely deep ($L \to \infty$) to study its signal propagation.
For years, a major hurdle in this field was that these two limits did not play well together. In standard "vanilla" feedforward networks, the order in which you take these limits matters. If you make a network infinitely deep first, the signal often becomes chaotic or vanishes before you can even consider its width. This lack of "commutativity" meant that our theories for wide networks didn't necessarily apply to the very deep networks used in practice.
However, recent research has shown that for residual architectures, these limits actually commute. This discovery provides a robust theoretical foundation for modern deep learning, proving that deep, narrow ResNets behave predictably like their infinite-width counterparts.
The Problem of Non-Commuting Limits
To understand why commutativity matters, imagine a grid where the x-axis is width and the y-axis is depth. Theoretical researchers want to reach the top-right corner (infinite width and infinite depth).
In vanilla architectures, taking the "depth-first" path usually leads to a dead end. As Mihai Nica and Mufan Bill Li explore in Differential Equation Scaling Limits of Shaped and Unshaped Neural Networks, unshaped networks become unstable as depth increases. The mathematical representation of the network changes fundamentally depending on whether you prioritize width or depth, making it difficult to create a unified "scaling law" that works for all architectures.
Why Residual Connections Change the Math
The breakthrough comes from the structure of the residual connection itself. By adding the input of a layer to its output, ResNets ensure that the identity mapping is preserved.
Etai Littwin and Tomer Galanti demonstrated in On Random Kernels of Residual Architectures that these connections keep the network "well-behaved." While vanilla networks require massive width to avoid chaotic behavior at depth, residual connections allow even narrow models to stay close to the stable Neural Tangent Kernel (NTK) regime.
The key mechanism that enables commutativity is the scaling of the residual branch. Soufiane Hayou and Greg Yang proved in Width and Depth Limits Commute in Residual Networks that if you scale the residual branches by $1/\sqrt{L}$ (where $L$ is depth), the order of limits no longer matters. Whether you take width to infinity first or depth to infinity first, you arrive at the same stable Gaussian Process. This $1/\sqrt{L}$ scaling ensures that the total variance of the signal doesn't explode as it passes through hundreds of layers.
From Discrete Layers to Continuous Equilibrium
This principle of commuting limits extends beyond standard ResNets into more exotic architectures like Deep Equilibrium (DEQ) models and Recurrent Neural Networks (RNNs).
- Deep Equilibrium Models: These models represent an "infinite-depth" network by finding the fixed point of a single layer. Zhili Feng and J. Zico Kolter showed in On the Neural Tangent Kernel of Equilibrium Models that DEQs converge to a stable, deterministic kernel. Because the limits commute, the theoretical predictions for wide DEQs remain valid even though the models are effectively infinitely deep.
- Neural Signature Kernels: By viewing ResNets as a form of controlled differential equation, Nicola Muca Cirone, Maud Lemercier, and Cristopher Salvi established that the convergence to a Gaussian Process is robust. In Neural signature kernels as infinite-width-depth-limits of controlled ResNets, they show that this commutativity allows us to bridge the gap between discrete neural networks and continuous-time mathematical models.
Why This Matters for Practitioners
While this research is highly theoretical, its implications are practical. It tells us that the "infinite-width" approximations we use to study neural networks are not just mathematical toys—they are legitimate descriptions of the deep, finite-width networks we use in production.
As Tianxiang Gao and colleagues argue in Wide Neural Networks as Gaussian Processes: Lessons from Deep Equilibrium Models, this mathematical stability is exactly what makes these architectures expressive and trainable at extreme scales. By ensuring that width and depth limits commute, we ensure that our models remain stable, predictable, and powerful as they grow.