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) are fundamental to modern deep learning, designed to mitigate the vanishing gradient problem. However, as these networks scale to extreme depths, they encounter a theoretical paradox. Standard ResNets suffer from exponential gradient growth at initialization and a "loss of expressivity" where the network essentially "forgets" input data in the infinite depth limit. This paper, presented at AISTATS 2021, introduces Stable ResNet, a modification that ensures stability and preserves universal approximation properties regardless of depth.

The Stability Problem

In standard ResNets, the residual update is defined as $y_l = y_{l-1} + \mathcal{F}(y_{l-1})$. Theoretical analysis using Neural Network Gaussian Processes (NNGP) and Neural Tangent Kernels (NTK) reveals that as depth $L \to \infty$, these kernels converge to constants. This means the network treats all inputs identically, losing the ability to distinguish between data points. Furthermore, unscaled kernels grow exponentially with depth, leading to training instabilities.

Kernel value growth as a function of depth. Unscaled ResNets exhibit exponential growth, while Stable ResNets remain constant.

Proposed Method: Stable ResNet

The authors propose scaling each residual block by a factor $\lambda_{l,L}$: $$y_l = y_{l-1} + \lambda_{l,L} \mathcal{F}(y_{l-1})$$ A ResNet is defined as "Stable" if the sequence of scaling factors is square-summable ($\sum \lambda^2 < \infty$) as $L \to \infty$. Two primary strategies are explored:

  1. Uniform Scaling: $\lambda_{l,L} = 1/\sqrt{L}$, where every layer is scaled equally based on total depth.
  2. Decreasing Scaling: $\lambda_{l,L}$ decreases as a function of the layer index $l$ (e.g., using a sequence like $1/\sqrt{l \log^2 l}$), tapering the influence of deeper layers.

Key Results and Insights

The square-summability condition prevents the "Curse of Depth." By maintaining the distance between hidden representations, Stable ResNets ensure the NTK remains "universal," meaning the network can theoretically approximate any continuous function even at infinite depth.

Stability at Extreme Depth

In a 1D regression task ($y = x \sin(x)$), unscaled ResNets fail completely as depth increases, eventually predicting a flat line. In contrast, both Stable ResNet variants maintain their predictive power even at a depth of 1000.

1D function approximation at varying depths. Unscaled ResNets collapse at depth 1000, whereas Stable ResNets maintain expressivity.

Performance on Image Benchmarks

The theoretical benefits translate to practical gains in image classification:

  • CIFAR-10: At depth 1000, unscaled ResNet accuracy collapsed to 17.86%, while Stable ResNet (Decreasing) maintained 48.76%.
  • CIFAR-100: For a trained ResNet-104, Decreasing scaling achieved 77.44% accuracy, outperforming the unscaled version's 75.08%.

Conclusion

Stable ResNet provides a mathematically grounded solution to the instabilities of deep residual architectures. By ensuring scaling factors are square-summable, researchers can build deeper, more expressive networks that avoid the pitfalls of gradient explosion and representational collapse. Future work remains to identify optimal scaling sequences for specific tasks and to bridge the gap between infinite-width theory and finite-width practice.

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