SkipNet: Learning Dynamic Routing in Convolutional Networks

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

Abstract

Modern deep convolutional neural networks achieve high accuracy at the cost of significant computational overhead. SkipNet addresses this by introducing a dynamic routing mechanism that selectively skips convolutional layers based on the input image. By employing a gating module trained via a hybrid supervised and reinforcement learning approach, SkipNet reduces computation by 30–90% while maintaining the performance of state-of-the-art models.

Introduction

The "deeper is better" paradigm in computer vision has led to architectures like ResNet with hundreds of layers. While effective, these models are computationally expensive and often redundant. SkipNet is motivated by the observation that image complexity varies; simple, clear images should require less processing than complex, occluded ones. Unlike static pruning or early-exit strategies, SkipNet provides a flexible, per-input routing policy that can bypass any internal block.

Methods: Gating and Dynamic Routing

The fundamental component of SkipNet is the Gating Module, a lightweight sub-network positioned before each residual block. This module analyzes the activations from the preceding layer to make a binary decision: either execute the current residual block or skip it entirely.

Architecture of Feed-forward and Recurrent Gating Modules.

The authors explored two primary gating architectures:

  1. FFGate (Feed-Forward): A simple stack of convolutional and pooling layers.
  2. RNNGate (Recurrent): A shared LSTM-based gate that makes sequential decisions. This design is particularly efficient, adding only ~0.04% computational overhead while capturing dependencies across layers.

Hybrid Learning Algorithm

Training a discrete "skip or no-skip" policy is challenging because the decision is non-differentiable. SkipNet utilizes a two-stage hybrid approach:

  • Supervised Pre-training: A "soft" relaxation (similar to Gumbel-softmax) allows the gates to output probabilities, enabling standard backpropagation to learn initial feature representations.
  • Hybrid Reinforcement Learning: The model transitions to "hard" gating and is refined using the REINFORCE algorithm. A reward function balances classification accuracy against the computational cost of executed layers.

Key Insights

Qualitative analysis confirms that SkipNet learns semantically meaningful routing policies. The network naturally allocates more resources to "hard" images (e.g., blurry or cluttered) and skips layers for "easy" images (e.g., high contrast, centered objects).

Examples of dynamic routing patterns for different input images. Yellow blocks are executed; grey blocks are skipped.

Furthermore, the model reveals that the first and last blocks of ResNet groups are rarely skipped, indicating their importance for feature transitions, whereas middle blocks are frequently bypassed for simpler inputs.

Results and Performance

SkipNet was evaluated across several benchmarks, including CIFAR-10/100, SVHN, and ImageNet. Key results include:

  • SVHN: 86% reduction in FLOPs with no accuracy loss.
  • CIFAR-10: 50% reduction in computation.
  • ImageNet: 30% reduction in FLOPs while maintaining top-1 accuracy.

The model offers high flexibility; by tuning a single hyperparameter in the reward function, users can adjust the trade-off between accuracy and computational efficiency without retraining the entire base network.

Limitations and Future Work

While SkipNet significantly reduces theoretical FLOPs, actual wall-clock speedups on current GPUs are hindered by SIMD processing constraints. When different images in a batch follow different paths, hardware utilization can drop. Future research may focus on specialized hardware or software kernels designed to optimize the branching logic inherent in dynamic routing. Additionally, the two-stage training process increases total training time by approximately 30–40% compared to standard ResNets.

Summary updated

BibTeX
@inproceedings{wang2018skipnet,
  author = {Xin Wang and Fisher Yu and Zi-Yi Dou and Trevor Darrell 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