NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Stable ResNet

Soufiane Hayou, Eugenio Clerico, Bobby He, George Deligiannidis, Arnaud Doucet, Judith Rousseau

Introduction

Deep Residual Networks (ResNets) have become the backbone of modern computer vision. While skip connections were originally designed to mitigate vanishing gradients, theoretical analysis of the infinite depth limit reveals a persistent "Curse of Depth." As ResNets grow extremely deep, they suffer from two critical failures: exponential gradient explosion and a catastrophic loss of expressivity. This paper introduces Stable ResNet, an architectural modification that ensures stability and functional richness even as depth approaches infinity.

The Curse of Depth

In standard ResNets, the residual branch is added directly to the skip connection without scaling. Mathematically, this is expressed as $y_l(x) = y_{l-1}(x) + \mathcal{F}(y_{l-1}(x))$. In the limit of infinite depth, the variance of the gradients and the values of the Neural Tangent Kernel (NTK) grow exponentially. This instability makes optimization difficult and leads to a regime where the network's output becomes nearly independent of its input, effectively "forgetting" the features of the data.

Kernel values explode exponentially with depth in unscaled ResNets, whereas Stable ResNets (Uniform and Decreasing) remain bounded.

The Stable ResNet Solution

The authors propose introducing a depth-dependent scaling factor, $\lambda_{l,L}$, to the residual branch: $$y_l(x) = y_{l-1}(x) + \lambda_{l,L} \mathcal{F}(y_{l-1}(x))$$

The key theoretical insight is the Stability Condition: for gradients to remain bounded at infinite depth, the scaling factors must satisfy $\sum_{l=1}^L \lambda_{l,L}^2 < \infty$. The paper explores two primary scaling strategies:

  1. Uniform Scaling: $\lambda = 1/\sqrt{L}$, where every layer is scaled equally by the total depth.
  2. Decreasing Scaling: $\lambda_l \approx 1 / (\sqrt{l} \log l)$, where deeper layers receive progressively smaller updates, placing more emphasis on early feature extraction.

Preserving Expressivity at Infinite Depth

Beyond numerical stability, scaling preserves the network's "expressivity." In unscaled networks, the correlation between different inputs tends toward 1 as depth increases, meaning the network loses the ability to distinguish between data points. Stable ResNets maintain a non-trivial kernel, allowing them to approximate complex functions regardless of depth. This is clearly visible in regression tasks where unscaled models collapse into trivial flat lines at high depths.

Comparison of NNGP regression across depths. Unscaled ResNets lose the ability to fit the target function as depth increases, while Stable ResNets maintain expressivity.

Empirical Validation

The theoretical benefits of Stable ResNet translate directly to improved performance on standard benchmarks like CIFAR-10 and CIFAR-100.

  • Kernel Regression: At a depth of 1000 on CIFAR-10, an unscaled ResNet achieved a mere 17.86% accuracy—barely above random chance. In contrast, a Stable ResNet with decreasing scaling maintained 48.76% accuracy, demonstrating its ability to retain information.
  • Trained Networks: For finite-width models trained with SGD, Stable ResNet consistently outperformed standard architectures. For instance, a Stable ResNet-104 reached 77.44% accuracy on CIFAR-100, compared to 75.08% for the vanilla version.

Conclusion

Stable ResNet provides a rigorous framework for scaling deep architectures. By satisfying the $\sum \lambda^2 < \infty$ condition, these networks avoid the pitfalls of the infinite depth limit. While this study focuses on convolutional and fully connected layers, the principles of stable residual scaling are highly relevant to other architectures, such as Transformers, which rely heavily on residual connections for deep stacking.

Summary updated

BibTeX
@inproceedings{hayou2021stable,
  author = {Soufiane Hayou and Eugenio Clerico and Bobby He and George Deligiannidis and Arnaud Doucet and Judith Rousseau},
  title = {{Stable ResNet}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2021},
}
Figure