Learning Versatile Filters for Efficient Convolutional Neural Networks

Yunhe Wang, Chang Xu, Chunjing Xu, Chao Xu, Dacheng Tao

Deep learning has a "weight" problem. While state-of-the-art Convolutional Neural Networks (CNNs) like ResNet and ResNeXt achieve incredible accuracy, they are often too bloated for mobile phones or embedded cameras. Traditionally, researchers have tried to slim down these networks by pruning weights, quantizing them to lower precision, or using tiny $1\times1$ filters.

In this NeurIPS 2018 paper, researchers from Huawei’s Noah’s Ark Lab and the University of Sydney propose a different philosophy: instead of just subtracting weights, why not make the existing weights work harder? They introduce Versatile Filters, a method to derive multiple "secondary" filters from a single "primary" filter to capture richer features without increasing storage requirements.

The Efficiency Challenge: Subtractive vs. Additive Approaches

The core challenge in deploying deep learning models is the contradiction between the high resource demands of heavy CNNs and the limited hardware capabilities of mobile devices.

Most efficiency techniques are subtractive: they remove "redundant" connections or weights. However, the authors argue that the potential of a standard filter hasn't been fully explored. A single $5\times5$ filter, for instance, naturally contains the weights for a $3\times3$ and a $1\times1$ filter within its center. By ignoring these internal sub-filters, networks waste valuable information. The authors' goal is to "unfold" these internal filters during computation, enhancing the network's capability without needing extra memory to store them. This "additive" approach allows CNNs to extract multi-scale features essentially for free.

Methodology: Unfolding Versatile Filters

The authors introduce two main types of versatile filters to handle different architectural needs:

1. Spatial Versatile Filters

Instead of using a $5\times5$ filter to produce just one feature map, the authors use it to produce three. They apply a series of masks to the primary $5\times5$ filter to "inherit" secondary filters:

  • Filter 1: The original $5\times5$ weights.
  • Filter 2: The inner $3\times3$ weights (masking the outer ring).
  • Filter 3: The center $1\times1$ weight.
Spatial Versatile Filters

By concatenating the results of these three operations, the network gains a multi-scale view of the input (leveraging different receptive fields) using only the memory required for the single $5\times5$ block.

2. Channel Versatile Filters

For architectures that rely heavily on $1\times1$ filters—where spatial masking isn't possible—the authors propose a channel stride approach.

Channel Versatile Filters

A primary filter is split into multiple secondary filters along the channel dimension. By sliding a smaller sub-filter across the input channels with a specific stride, the network can generate multiple output feature maps from a single set of weights. This significantly expands the representational power of $1\times1$ convolutions without bloating the parameter count.

Key Insights

  • Weight Inheritance: The core insight is realizing that smaller receptive fields are naturally embedded within larger ones. By explicitly calculating these sub-convolutions, the network learns more robust, multi-scale features.
  • Computational Efficiency: Even though the network generates more feature maps, total FLOPs (Floating Point Operations) often decrease. The secondary filters (like the $1\times1$ or $3\times3$ sub-filters) are computationally cheaper to apply than the full $5\times5$ primary filter.
  • Complexity Reduction: The authors prove mathematically that for a filter of size $d \times d$, the space complexity is reduced by a factor of $s$ (where $s$ is the number of secondary filters), making the network significantly more portable.

Experimental Evaluation

The researchers evaluated their approach across multiple benchmarks, including MNIST, ImageNet (ILSVRC 2012), and VDSR (Very Deep Super-Resolution) to test generalization beyond standard classification.

The results on ImageNet demonstrate that "versatile" versions of famous networks can outperform their baselines with fewer resources:

  • Versatile-AlexNet: Achieved a 42.1% Top-1 error (improving upon the 42.9% baseline) while using 1.76\times less memory and 1.95\times fewer FLOPs.
  • Versatile-ResNet-50: Achieved a 7.6% Top-5 error (comparable to the 7.8% baseline) while reducing the number of weights from 26 million to 19 million.
  • Portable Architectures: When applied to ShuffleNet (an already highly efficient model), versatile filters reduced the weights by an additional 30% while maintaining comparable accuracy.
  • Super-Resolution: The Versatile-VDSR model achieved a higher peak signal-to-noise ratio (PSNR) than standard VDSR while being more memory-efficient.

Limitations and Future Work

While the theoretical reductions in FLOPs and memory are substantial, standard deep learning frameworks (like PyTorch or TensorFlow) are highly optimized for standard convolutions. Realizing these speedups in practice may require writing custom CUDA kernels to handle the overlapping masked operations efficiently. Additionally, the "channel stride" and the number of secondary filters introduce new hyperparameters that require tuning for different architectures.

Future work will likely involve embedding these versatile filters into more complex tasks, such as object detection and semantic segmentation, to determine if these multi-scale benefits translate to better spatial localization.

Summary updated

BibTeX
@inproceedings{wang2018learning,
  author = {Yunhe Wang and Chang Xu and Chunjing Xu and Chao Xu and Dacheng Tao},
  title = {{Learning Versatile Filters for Efficient Convolutional Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
}
Figure