Residual Networks are Exponential Ensembles of Relatively Shallow Networks

Andreas Veit, Michael J. Wilber, Serge J. BelongiearXiv 2016

Introduction

The introduction of Residual Networks (ResNets) marked a milestone in deep learning, enabling the training of models with over a thousand layers. The prevailing wisdom attributed this success to the ability of skip connections to facilitate the training of ultra-deep sequential representations. However, research by Veit et al. (2016) challenges this view, proposing that ResNets do not behave like monolithic deep networks. Instead, they function as an exponential ensemble of many relatively shallow paths.

The Unraveled View

To understand this perspective, the authors introduce the "unraveled view" of ResNets. By expanding the recursive definition of a residual block—where the output $y_i$ is the sum of the previous output $y_{i-1}$ and a residual function $f_i(y_{i-1})$—a network with $n$ blocks can be mathematically shown to consist of $2^n$ unique paths from input to output.

The unraveled view demonstrates that a 3-block ResNet is equivalent to an ensemble of 8 distinct paths.

This decomposition reveals that ResNets are highly redundant. Unlike traditional sequential architectures like VGG, where information must pass through every layer in a single fixed chain, ResNets provide a multitude of parallel routes for data to traverse.

Resilience and the Ensemble Effect

The ensemble hypothesis explains a curious property of ResNets: their extreme robustness to layer deletion. In a sequential model, removing a single layer breaks the entire chain, causing performance to drop to random chance. In contrast, deleting a residual module in a ResNet only removes a subset of the total paths. Specifically, removing one module in an $n$-block network eliminates half of the available paths while leaving the other half intact.

Deleting a module (e.g., $f_2$) removes all paths containing that module, but many other paths remain to preserve network function.

Lesion studies on CIFAR-10 and ImageNet confirm this. Deleting a single non-downsampling layer in a 110-layer ResNet results in negligible error increases, whereas the same operation on a VGG network leads to total failure. This smooth degradation is a hallmark of ensemble behavior.

The "Effective" Depth is Shallow

If ResNets are ensembles, which paths are doing the heavy lifting? The authors performed a gradient analysis to measure the contribution of paths of different lengths. While a 110-layer ResNet contains paths ranging from 0 to 54 modules long, the "effective" paths—those that actually carry significant gradient signal during training—are surprisingly short, typically between 10 and 34 layers deep.

Paths longer than this threshold continue to suffer from the vanishing gradient problem, even with skip connections. Consequently, ResNets do not truly "solve" the problem for ultra-deep sequences; rather, they circumvent it by providing a massive number of shorter "gradient highways" that allow the early layers to learn effectively.

Conclusion

The findings of Veit et al. suggest that the success of ResNets stems from their multi-path ensemble structure rather than their nominal depth. This insight has profound implications for architecture design, suggesting that performance gains may come more easily from managing the ensemble of paths rather than simply stacking layers deeper in a sequential fashion. ResNets are best understood not as deep networks, but as a collection of shallow ones working in concert.

Summary updated

BibTeX
@misc{veit2016residual,
  author = {Andreas Veit and Michael J. Wilber and Serge J. Belongie},
  title = {{Residual Networks are Exponential Ensembles of Relatively Shallow Networks}},
  year = {2016},
  eprint = {1605.06431},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1605.06431},
}
Figure