# Wider or Deeper: Revisiting the ResNet Model for Visual Recognition

Shallower but wider residual networks can outperform much deeper ResNets

Zifeng Wu, Chunhua Shen, Anton van den Hengel · arXiv · 2016-11-30

- **Problem** Deeper residual networks add memory and training cost while gains shrink, so it is unclear whether to go deeper or wider.
- **Method** The authors reread residual networks as ensembles limited by an effective depth, then build shallower networks with two wide convolution stages per unit.
- **Results** The shallower network beats ResNet-200 on ImageNet classification while using less memory.

## Why more depth stops paying off

Convolutional networks have kept getting deeper since AlexNet, and residual networks now reach depths that were once thought impractical, with a 1,202-layer model trained on the tiny CIFAR-10 images. Each extra layer adds memory use and training cost, so depth has a price that grows with the network.

The returns are diminishing. Zhao et al. moved from 152 to 269 layers for segmentation and gained only 1.1 points of mean intersection-over-union, from 42.2% to 43.3%. At the same time, Zagoruyko and Komodakis reported that much shallower but wider networks can beat a very deep thin residual network on CIFAR-10, which makes the depth-versus-width choice an open question.

Veit et al. describe residual networks as ensembles of relatively shallow networks, but their unravelled picture does not match a true exponential ensemble, because the non-linear residual units prevent the paths from splitting cleanly. The authors therefore take the view that a residual network combines a linearly growing set of sub-networks, and that the length of the paths that matter is set by an effective depth.

## Unravelling the forward pass

A residual unit i takes the output of the previous unit, applies its trainable non-linear mapping f\_i with parameters w\_i, and adds the input back through the shortcut. \\\[ y\_i = f\_i(y\_{i-1}, w\_i) + y\_{i-1} \\\]

Growing the number of units therefore grows the number of sub-networks linearly, not exponentially.

Each sub-network has an actual depth set by how many blocks sit on its path, and the effective depth l is the number of residual units that backward gradients can pass through during training. For a network with d residual units, sub-network M\_i has actual depth \\(\\min(i, l)\\), so a network whose effective depth is smaller than d contains sub-networks that stop growing once i exceeds l.

## Which blocks receive gradients

Backpropagation through the two-unit example gives the weight gradient of the first block as a sum of two terms. \\\[ \\Delta w\_1 = \\frac{df\_1}{dw\_1}\\cdot\\Delta y\_2 + \\frac{df\_1}{dw\_1}\\cdot f\_2'\\cdot\\Delta y\_2 \\\] Here f\_2' is the derivative of f\_2 with respect to its input y\_1, and the second term carries gradient through the second block.

When the effective depth is at least 2, both terms are non-zero, so the first block is updated by two sub-networks. When the effective depth is 1, the gradient at the second block vanishes, so the second term goes to zero and the first block is updated only by the shortest path. In that case the first block acts as a fixed preprocessing stage for the rest of the network, and the residual network is over-deepened and cannot be trained end to end even with its shortcuts.

For very deep networks, the paper's reading is that the shallow sub-networks converge first and deeper ones join later, so the network behaves like a growing ensemble. Littwin and Wolf reached a related view in concurrent work, describing residual networks as virtual ensembles whose depth grows during training. The authors caution that the vanishing gradient problem is not yet solved, because methods without residual shortcuts such as Inception-v4 still contain short paths from input to output.

## Why two wide stages and a limited number of units

A reusable residual unit has two conflicting needs: it must train well even when many sub-networks reuse its weights, and it must be shallow enough to allow a large effective depth. Since a single trainable layer has trouble reaching large capacity, the authors choose a unit with two wide convolution stages, which matches the empirical finding that stacking two 3x3 convolution stages works best among simple structures.

The authors favour a deeper model only when it can be trained completely end to end. Going deeper past the effective depth adds features that are not fully end-to-end trained, while going wider does not change that property. Under a fixed memory budget a shallower but wider network can hold more trainable parameters, and prior work relates performance to parameter count.

Veit et al. report a relatively small effective depth for a 110-layer ResNet, about seventeen residual units, so most of the layers in such networks sit on paths that are not trained end to end.

The proposed networks have up to seven levels, B1 to B7. Units in B1 to B5 use two 3x3 convolution layers, while B6 and B7 use bottleneck structures with adjusted channel counts. Each network has one B6, one B7 and a varying number of B1 to B5 units, and the B1 level is dropped for 224x224 inputs because of GPU memory limits. The top-most feature maps are averaged into 4,096-dimensional final features, and naming follows the training crop size followed by the number of units at each level, so 56-1-1-1-1-9-1-1 has input size 56 with one unit on every level except B5.

Model A, the strongest classification network, is named 224-0-3-3-6-3-1-1 and has 38 layers, with 224 input size.

## Turning a classifier into a segmenter

The segmentation approach follows the fully convolutional design and produces score maps at 1/8 resolution. Most down-sampling is removed by setting the first convolution layer of B5 to stride one and raising the dilation rate from one to two in the following layers, and doing the same in B6 with a dilation rate going from two to four. The authors found that pooling-based down-sampling hurt the fully convolutional networks, probably because pooling makes features too invariant to spatial position.

Three top-most pooling layers, before B4, B5 and B6, are replaced by strided convolutions, and the network is tuned for 45k iterations on ImageNet with a learning rate of 0.01. The top-most linear classifier and the global pooling layer are removed. Two variants are then tested: '1 convolution', which uses a single linear classifier, and '2 convolutions', which inserts a non-linear convolution stage without batch normalization below the linear classifier.

Both added layers have 3x3 kernels with dilation twelve and a hidden layer of 512 channels by default, which gives the two-layer classifier a receptive field of 392x392 on the final feature maps.

Dropout is applied to the widest residual units: at rate 0.3 for units with 2,048 channels and rate 0.5 for units with 4,096 channels. During fine-tuning the moving means and variances of batch normalization are held fixed, and the batch size is sixteen with four examples per device. The learning rate is held at 0.0016 for a first set of iterations and then reduced linearly, while each training image is resized by a ratio from \[0.7, 1.3\] and a 500x500 window is cropped.

## ImageNet classification results

Networks are evaluated on the ILSVRC 2012 validation set with single-crop testing, and the 224-input models are tested with a 320x320 crop.

Model B is described as reaching similar error to ResNet-152 and running slightly faster. Model D, with 34 layers at 112 input, performs slightly worse than the ResNet-152 run but runs almost twice as fast, and Models C, D and E perform comparably even though Model C has more depth and parameters.

The authors attribute the gain of the shallow networks to large model capacity, and they relate the weaker results of deeper models to placing too many layers at low resolution.

## PASCAL VOC validation and test results

On the PASCAL VOC validation set with 1,449 images, ResNet-101 with one convolution classifier reaches 75.35 mean IoU and ResNet-152 reaches 75.37. Model A with one convolution reaches 78.76 mean IoU, and with two convolutions it reaches 80.84, which is 3.4% above ResNet-152 for the one-convolution comparison as the paper states. Model A2, the variant tuned on Places 365, performs worse than Model A on this dataset, with 78.14 mean IoU against 78.76.

Memory is measured separately from accuracy, with four images per device during tuning: Model A with one convolution uses 11.0 GB per device, while ResNet-152 with one convolution uses 16.7 GB. The very deep ResNet-152 is described as hard to tune on mainstream GPUs with only 12GB of memory under the authors' settings.

A comparison with pre-training on Microsoft COCO data is also reported, where the strongest competitor reaches 79.7 mean IoU, and the proposed method is reported 2.8% higher.

## Cityscapes, ADE20K and PASCAL Context results

On the Cityscapes validation set with 500 images, Model A2 with two convolutions reaches 77.86 mean IoU, against 73.63 for ResNet-101 with one convolution. On the Cityscapes test set with 1,525 images, Model A2 with two convolutions reaches a class IoU of 78.4%, reported as 6.6% above the previous best entry. For the instance-weighted class score, the paper reports a margin of 6.4% over the previous best.

The multi-model submission, which used multi-scale testing, model averaging and CRF post-processing, is reported as 0.47% behind the winner.

On PASCAL Context validation with 5,105 images, Model A2 with two convolutions reaches 48.1 mean IoU, against 45.7 for DeepLab-v2 with ResNet-101. The hyper-parameters were reused from PASCAL VOC, because the PASCAL Context test set is not available.

## Gradient magnitudes along sampled paths

For a trained network with n units, a path of length k is sampled: during the backward pass k units pass gradients only through their mapping functions, and the other n minus k units pass gradients only through their shortcuts. The norm of the gradient arriving at the input is recorded for each path length, and divided by the number of examples in the batch.

ResNet-110 on CIFAR-10, and ResNet-101 and ResNet-152 on ILSVRC 2012, produce much smaller input gradients from long paths than from short ones. Model A on ILSVRC 2012 produces gradient magnitudes that are more comparable across path lengths, and its paths range up to length 16. The comparison is between sampled paths in trained models, so it does not show how a model trained with this sampling would behave.

## Limitations

Whether a non-linear block at the end of a network with large actual depth trains as well as fully end-to-end training is left as future work. The effective-depth values for a 110-layer ResNet come from Veit et al., and the paper does not re-derive them. Model A2 is worse than Model A on PASCAL VOC, and Model B is worse than ResNet-101 on that dataset even though it is better on the ImageNet task.

Most segmentation results use one convolution or two convolutions without multi-scale testing, model averaging or CRF post-processing, which are used only for the ADE20K test submission. The authors do not go to the shallowest possible design, because they judge that an appropriate depth is needed to train good features.

## Paper info

- **Authors**: Zifeng Wu, Chunhua Shen, Anton van den Hengel
- **Venue**: arXiv · Preprint
- **First published**: 2016-11-30
- **Added**: 2026-11-13
- **Updated**: 2016-11-30
- **Version**: v1
- **arXiv**: 1611.10080
- **Category**: cs.CV
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1611.10080v1) · [PDF ↗](https://arxiv.org/pdf/1611.10080v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Zifeng Wu, Chunhua Shen, Anton van den Hengel (2016). Wider or Deeper: Revisiting the ResNet Model for Visual Recognition. arXiv:1611.10080v1. https://arxiv.org/abs/1611.10080v1

**BibTeX**

```
@misc{wu2016wider,
  title = {{Wider or Deeper: Revisiting the ResNet Model for Visual Recognition}},
  author = {Zifeng Wu and Chunhua Shen and Anton van den Hengel},
  year = {2016},
  eprint = {1611.10080},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1611.10080v1}
}
```

## Other paper commentary

- [Moment Matching for Multi-Source Domain Adaptation](https://refivu.com/en/papers/8dd0a99c-d46a-4b5e-bfd0-6d72f38da2fc-moment-matching-for-multi-source-domain-adaptation.md)
- [Variational image compression with a scale hyperprior](https://refivu.com/en/papers/862ebff4-6ece-4ccf-a0cf-aa1b89192db4-variational-image-compression-with-a-scale-hyperprior.md)
- [DeblurGAN: Blind Motion Deblurring Using Conditional Adversarial Networks](https://refivu.com/en/papers/bcd086aa-43d4-404f-aae8-d730dc8d20db-deblurgan-blind-motion-deblurring-using-conditional.md)
- [Ups and Downs: Modeling the Visual Evolution of Fashion Trends with One-Class Collaborative Filtering](https://refivu.com/en/papers/c7f79e17-0229-4098-a2b0-1f184335cf4d-ups-and-downs-modeling-the-visual-evolution-of.md)
- [ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware](https://refivu.com/en/papers/40299bf6-79d4-4e50-829c-39acb400238f-proxylessnas-direct-neural-architecture-search-on-target.md)
- [Beyond Correlation Filters: Learning Continuous Convolution Operators for Visual Tracking](https://refivu.com/en/papers/cc3e5d8d-4cc2-494c-bc24-c9b0fd010736-beyond-correlation-filters-learning-continuous-convolution.md)
- [$π\_{0.5}$: a Vision-Language-Action Model with Open-World Generalization](https://refivu.com/en/papers/754e7c9a-2cc7-4f07-8b66-7ff8cff6a4c6-0-5-a-vision-language-action-model-with.md)
- [Oscar: Object-Semantics Aligned Pre-training for Vision-Language Tasks](https://refivu.com/en/papers/f7fe203e-c6e4-44a1-8ce4-3262834d64ee-oscar-object-semantics-aligned-pre-training-for-vision.md)
- [Differentially Private Federated Learning: A Client Level Perspective](https://refivu.com/en/papers/8eaa4c01-7257-42c2-9d51-9996980ee41d-differentially-private-federated-learning-a-client-level.md)
- [Open Graph Benchmark: Datasets for Machine Learning on Graphs](https://refivu.com/en/papers/edb8fbc5-0d88-4a3d-a7aa-268b0d397255-open-graph-benchmark-datasets-for-machine-learning-on.md)
- [MELD: A Multimodal Multi-Party Dataset for Emotion Recognition in Conversations](https://refivu.com/en/papers/a0735393-c1fc-4213-a826-8f9538fdcde6-meld-a-multimodal-multi-party-dataset-for-emotion.md)
- [Learning to Discover Cross-Domain Relations with Generative Adversarial Networks](https://refivu.com/en/papers/32a2c426-2c8b-4ca8-b0cd-574119f1d851-learning-to-discover-cross-domain-relations-with-generative.md)

## Terms in this paper

- [dropout](https://refivu.com/en/terms/db73f75bbdd3-dropout)
- [Batch Normalization](https://refivu.com/en/terms/2b3e5f8509f6-batch-normalization)
- [ResNet](https://refivu.com/en/terms/ca7e0121c7a8-resnet)
- [Cityscapes](https://refivu.com/en/terms/1067bb006500-cityscapes)
- [ADE20K](https://refivu.com/en/terms/5adea765479c-ade20k)
- [mean IoU](https://refivu.com/en/terms/5fcf149d794a-mean-iou)
- [pixel accuracy](https://refivu.com/en/terms/623755cb8953-pixel-accuracy)
- [Pascal Context](https://refivu.com/en/terms/aa3abacfe722-pascal-context)
- [fully convolutional networks](https://refivu.com/en/terms/0da53b39e0e8-fully-convolutional-networks)
- [semantic image segmentation](https://refivu.com/en/terms/36e83d7c10eb-semantic-image-segmentation)
- [ILSVRC 2012](https://refivu.com/en/terms/b8f897ff12e7-ilsvrc-2012)
- [dilation rate](https://refivu.com/en/terms/5ac338959138-dilation-rate)
- [residual unit](https://refivu.com/en/terms/7aebc1c872ee-residual-unit)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/92402cc1-8a47-44e2-ab4e-68cd6d212e9b-wider-or-deeper-revisiting-the-resnet-model-for)
