Scaling ResNets in the Large-depth Regime

Pierre Marion, Adeline Fermanian, Gérard Biau, Jean-Philippe Vert
6/14/2022
cs.LGstat.ML

Official code: PierreMarion23/scaling-resnets (2 stars, Python, MIT, last commit 2025-02-25).

Abstract

Deep ResNets are recognized for achieving state-of-the-art results in complex machine learning tasks. However, the remarkable performance of these architectures relies on a training procedure that needs to be carefully crafted to avoid vanishing or exploding gradients, particularly as the depth $L$ increases.

Show full abstract

No consensus has been reached on how to mitigate this issue, although a widely discussed strategy consists in scaling the output of each layer by a factor $α_L$. We show in a probabilistic setting that with standard i.i.d.~initializations, the only non-trivial dynamics is for $α_L = \frac{1}{\sqrt{L}}$; other choices lead either to explosion or to identity mapping. This scaling factor corresponds in the continuous-time limit to a neural stochastic differential equation, contrarily to a widespread interpretation that deep ResNets are discretizations of neural ordinary differential equations. By contrast, in the latter regime, stability is obtained with specific correlated initializations and $α_L = \frac{1}{L}$. Our analysis suggests a strong interplay between scaling and regularity of the weights as a function of the layer index. Finally, in a series of experiments, we exhibit a continuous range of regimes driven by these two parameters, which jointly impact performance before and after training.

View on arXivView PDF

Code Implementations(1)

MIT
21PythonAug 23, 20211 years agoMIT

Similar Papers

Cite this paper

@article{marion2022scaling,
  title  = {Scaling ResNets in the Large-depth Regime},
  author = {Pierre Marion and Adeline Fermanian and Gérard Biau and Jean-Philippe Vert},
  year   = {2022},
  eprint = {2206.06929},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.06929}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2206.06929.svg)](https://codeofpaper.com/paper/2206.06929)

Discussion