SkipNet: Learning Dynamic Routing in Convolutional Networks

Xin Wang, Fisher Yu, Zi-Yi Dou, Joseph E. Gonzalez

Abstract

Modern convolutional neural networks (CNNs) often employ hundreds of layers to achieve state-of-the-art accuracy, incurring significant computational costs. However, many inputs do not require the full depth of these networks for correct classification. We present SkipNet, a dynamic routing mechanism that learns to skip redundant layers on a per-input basis. By combining supervised pre-training with reinforcement learning, SkipNet reduces computational costs by 30% to 90% while maintaining the accuracy of deep models.

Introduction

The prevailing paradigm in computer vision has been that "deeper is better." While massive networks achieve peak performance, they apply the same amount of computation to every image, regardless of its complexity. A clear, high-contrast image of a common object might only require a few layers to identify, whereas a blurry or occluded image necessitates the full depth of the network. SkipNet addresses this inefficiency through dynamic routing, allowing the network to decide in real-time which layers are necessary for a specific input.

Methodology

SkipNet modifies the standard Residual Network (ResNet) architecture by inserting small "gating modules" between convolutional blocks. These modules output a binary decision to either execute or skip the subsequent block.

Gating Architectures

The authors explore two primary gating designs:

  • Feed-Forward Gate (FFGate): Employs small convolutional layers to make independent skipping decisions for each block based on local activations.
  • Recurrent Gate (RNNGate): Utilizes a shared LSTM unit that maintains a "state" as the image progresses through the network. This recurrent design is highly efficient, adding only 0.04% computational overhead while allowing for more coherent routing policies.
Comparison of Feed-forward and Recurrent gating mechanisms.

Hybrid Learning Algorithm

Because the decision to skip a layer is discrete and non-differentiable, standard backpropagation cannot be used directly. SkipNet employs a two-stage hybrid approach:

  1. Supervised Pre-training: A "soft-max relaxation" is used to treat gates as continuous probabilities, providing a strong initialization for both feature extraction and gating logic.
  2. Reinforcement Learning (RL): The policy is refined using the REINFORCE algorithm. A reward function balances classification accuracy against a computational cost penalty (controlled by hyperparameter $\alpha$), enabling the learning of "hard" skipping policies that bypass computation during inference.

Experimental Results

SkipNet was evaluated on CIFAR-10, CIFAR-100, SVHN, and ImageNet benchmarks. The model consistently achieved significant computational savings with negligible accuracy loss (typically <0.5%):

  • SVHN: Achieved an 86% reduction in computation.
  • CIFAR-10: Reduced computation by 50%.
  • ImageNet: Reduced computation by 30% on a ResNet-101 backbone.

SkipNet outperformed static compression methods like pruning and other dynamic models such as SACT and ACT in the accuracy-vs-computation trade-off.

Key Insights

Qualitative analysis confirms the "Easy Image Hypothesis": images that are bright, clear, and centered trigger more skips, while complex or blurry images utilize more of the network's depth.

Dynamic routing patterns for different input images. 'Easy' images trigger more skips than 'hard' images.

Furthermore, the study revealed that layer criticality varies; middle blocks in ResNets are often the most essential for feature extraction and are skipped less frequently than early or late blocks. The RNNGate design proved superior to independent gates by "remembering" previous skipping decisions, leading to a more globally optimized routing policy.

Conclusion

SkipNet demonstrates that dynamic routing is a powerful tool for improving the efficiency of deep CNNs. By learning to bypass redundant computation, SkipNet achieves substantial speedups without sacrificing accuracy. Future work includes applying these mechanisms to video processing, where temporal redundancy offers even greater potential for skipping, and extending the gating logic to non-residual architectures.

Summary updated

BibTeX
@inproceedings{wang2018skipnet,
  author = {Xin Wang and Fisher Yu and Zi-Yi Dou and Joseph E. Gonzalez},
  title = {{SkipNet: Learning Dynamic Routing in Convolutional Networks}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  doi = {10.1007/978-3-030-01261-8\_25},
}
Figure