Convolutional Networks with Adaptive Inference Graphs

Andreas Veit, Serge J. Belongie

Introduction

Standard Convolutional Neural Networks (ConvNets) are typically static: every input image, whether simple or complex, undergoes the same fixed sequence of computational layers. This "one size fits all" approach is fundamentally inefficient. High-level features specialized for specific categories—such as the texture of a bird's wing—provide no value when the network is identifying a toaster. In large-scale datasets like ImageNet, many parameters in deeper layers are specialized, and forcing every image through them wastes power and introduces noise.

The ConvNet-AIG Architecture

To address these limitations, the authors introduce ConvNet-AIG (Adaptive Inference Graphs), a novel architecture that dynamically defines its inference graph for each input. By skipping irrelevant layers on the fly, ConvNet-AIG optimizes computational resources while maintaining or even improving accuracy.

Comparison of traditional feed-forward ConvNets, ResNets, and the proposed ConvNet-AIG with adaptive gating.

ConvNet-AIG builds upon the Residual Network (ResNet) structure. In a standard ResNet, each block adds a residual $f(x)$ to the input $x$. ConvNet-AIG adds a "gate" to each of these blocks. This gate acts as a switch that determines whether the convolutional layer $f(x)$ should be executed or bypassed based on the specific features of the input image.

Methods: Gating and Differentiable Decisions

The system relies on two primary components to enable adaptive inference:

  1. The Gating Unit: Each layer is paired with a lightweight module that produces a "relevance score." This unit uses global average pooling and two small fully-connected layers to decide if the subsequent convolutional block is necessary for the current input.
  2. Gumbel-Softmax Trick: Discrete "yes/no" decisions are non-differentiable, which typically prevents training via standard backpropagation. ConvNet-AIG utilizes the Gumbel-Softmax distribution to create a differentiable approximation of these discrete choices, allowing the gates and convolutional weights to be trained jointly.
The internal mechanism of the gating unit, illustrating the use of Gumbel-Softmax for differentiable straight-through sampling.

To ensure efficiency, a Target Rate Loss is added to the objective function. This encourages the network to achieve a specific average layer usage (e.g., 70%), preventing it from simply keeping all layers active to maximize accuracy.

Key Insights and Results

Evaluations on CIFAR-10 and ImageNet reveal several key advantages of the adaptive approach:

  • Efficiency vs. Accuracy: On ImageNet, ConvNet-AIG 50 outperformed standard ResNet-50 while using 20% fewer computations. ConvNet-AIG 101 achieved even greater gains, outperforming ResNet-101 with a 33% reduction in FLOPs.
  • Automatic Hierarchy Discovery: The network naturally learned to group categories without manual labels. For instance, animal images consistently triggered different layer sets than man-made objects.
  • Layer Indispensability: The model learned that certain layers, such as downsampling blocks, are critical for almost all inputs, while intermediate refinement layers are more frequently skipped.
  • Adversarial Robustness: The stochastic nature of the gating mechanism provides an inherent defense against adversarial attacks. By varying the inference graph, the network becomes harder to fool with gradient-based attacks like FGSM.

Conclusion

ConvNet-AIG represents a shift toward more intelligent, content-aware neural architectures. By allowing networks to "choose their own adventure," we can build models that are both more efficient and more robust. Future research will focus on optimizing these dynamic graphs for modern GPU hardware and extending the gating logic to other architectural families.

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