Convolutional Networks with Adaptive Inference Graphs

Andreas Veit, Serge J. Belongie

Introduction

Standard Convolutional Neural Networks (ConvNets) are typically static, "one-size-fits-all" structures. Regardless of whether an input is a simple texture or a complex scene, the data passes through every layer in a fixed sequence. This approach is computationally inefficient, as many layers specialize in features that may not be present in every image. ConvNet-AIG (Adaptive Inference Graphs) addresses this by allowing the network to decide, on the fly, which layers are necessary for a specific input.

Architecture and Gating Mechanism

ConvNet-AIG builds upon the Residual Network (ResNet) architecture. In a standard ResNet, each block computes $x_{out} = x_{in} + f(x_{in})$. ConvNet-AIG introduces a lightweight gating module, $g$, transforming the equation into: $$x_{out} = x_{in} + g(x_{in}) \cdot f(x_{in})$$

Comparison of traditional, residual, and adaptive inference graph architectures.

The gate $g(x_{in})$ produces a binary decision: 1 to execute the layer $f$, or 0 to skip it, effectively passing the input through via the identity connection. This allows the network to adapt its topology dynamically based on the content of the image.

Differentiable Discrete Decisions

A significant challenge in training such a network is that "skipping" is a discrete, non-differentiable operation, which prevents standard backpropagation. To overcome this, the authors employ the straight-through Gumbel-Softmax trick.

The internal process of the gating module, from feature map pooling to Gumbel-based discrete decision making.

During training, the gating module estimates the relevance of a layer by pooling the input feature map and passing it through a small fully-connected layer. By adding Gumbel noise and applying a softmax (for gradients) or argmax (for inference), the network can learn these discrete routing decisions in an end-to-end fashion. To ensure efficiency, a Target Rate Loss is added to the objective function, penalizing the model if it fails to meet a desired level of sparsity.

Key Insights and Results

The research yielded several critical findings:

  • Emergent Specialization: The network naturally learned to use different sets of layers for different categories (e.g., birds vs. cars) without manual supervision.
  • Backbone Stability: Certain layers, particularly downsampling and final layers, were identified as essential and were rarely skipped.
  • Efficiency: On the ImageNet benchmark, ConvNet-AIG 101 outperformed standard ResNet-101 in accuracy while utilizing 38% fewer GFLOPs.
  • Robustness: The dynamic nature of the inference graph provides inherent resistance to adversarial attacks, as the "path" through the network is not fixed.

Conclusion and Limitations

While ConvNet-AIG offers significant theoretical computational savings, practical "wall-clock" speedups on current GPUs may be limited due to the way modern hardware handles conditional branching. Furthermore, the architecture requires identity skip-connections to function. Future work may explore applying these adaptive graphs to more diverse architectures and developing more complex gating functions to skip entire network branches.

Summary updated

BibTeX
@inproceedings{veit2018convolutional,
  author = {Andreas Veit and Serge J. Belongie},
  title = {{Convolutional Networks with Adaptive Inference Graphs}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  doi = {10.1007/978-3-030-01246-5\_1},
}
Figure