MixConv: Mixed Depthwise Convolutional Kernels

Mingxing Tan, Quoc V. Le

TL;DR

MixConv is a novel convolutional operator that replaces standard depthwise convolution by mixing multiple kernel sizes (e.g., 3x3, 5x5, and 7x7) within a single layer. By leveraging this multi-scale approach, the authors developed MixNets, a family of models that achieve state-of-the-art accuracy for mobile-scale networks, reaching 78.9% top-1 accuracy on ImageNet while staying under 600M FLOPS.

What Problem Does This Paper Address?

In the quest for efficient computer vision, depthwise convolution has become a cornerstone for architectures like MobileNet and ShuffleNet. However, most of these designs rely on a single, uniform kernel size—typically 3x3—across the entire network.

While larger kernels (like 5x5 or 7x7) can capture higher-resolution patterns and potentially improve accuracy, they come with a catch. The authors observed a "diminishing returns" effect: as kernel sizes increase beyond a certain point, accuracy actually begins to degrade, and computational costs spike.

Figure 1: Accuracy vs kernel sizes – Each point represents a model variant of MobileNet V1[7] and V2 [23], where model size is represented by point size. Larger kernels lead to more parameters, but the accuracy actually drops down when kernel size is larger than 9x9.

The challenge is to find a way to harness the representational power of large kernels without suffering from the accuracy drop-off or the efficiency penalties associated with using them exclusively.

Methods

The core innovation is Mixed Depthwise Convolution (MixConv). Unlike a vanilla depthwise convolution that applies one kernel size to all input channels, MixConv partitions the input channels into groups and applies a different kernel size to each group.

Figure 2: Mixed depthwise convolution (MixConv) – Unlike vanilla depthwise convolu- tion that applies a single kernel to all channels, MixConv partitions channels into groups and apply different kernel size to each group.

Key design elements include:

  • Group Size ($g$): Determines how many different kernel sizes are used. The authors found that $g=4$ is a robust choice for mobile models.
  • Kernel Sizes: To simplify the design, the authors start with 3x3 and increase the size by 2 for each subsequent group (e.g., {3x3, 5x5, 7x7, 9x9}).
  • Channel Partitioning: The authors explored both equal partitioning (each group gets the same number of channels) and exponential partitioning (smaller kernels get more channels).

To demonstrate MixConv's power, the authors integrated it into a Neural Architecture Search (NAS) framework to create MixNets. The search space allowed the algorithm to choose the optimal MixConv configuration, expansion ratios, and activation functions for each layer.

Datasets

The models were rigorously evaluated on several standard benchmarks:

  • ImageNet: The primary benchmark for image classification.
  • COCO: Used to evaluate object detection performance.
  • Transfer Learning Datasets: CIFAR-10, CIFAR-100, Oxford-IIIT Pets, and Food-101 were used to test how well the learned features generalize to new tasks.

Key Insights and Ideas

  • The Multi-Scale Advantage: MixConv effectively provides a multi-scale receptive field within a single layer. This allows the network to capture both fine-grained local features and coarser, high-resolution patterns simultaneously.
  • Breaking the Kernel Size Barrier: While vanilla depthwise convolution suffers accuracy degradation with kernels larger than 9x9, MixConv remains stable even with very large kernels.
  • Stride Sensitivity: The authors found that larger kernels are significantly more impactful in layers with a stride of 2 (downsampling layers), where preserving spatial information is more critical.
  • Efficiency Gains: Surprisingly, a MixConv layer often achieves better accuracy than a single large-kernel depthwise convolution while using fewer parameters and FLOPS.

Key Results

MixNets set new benchmarks for mobile-scale efficiency:

  • MixNet-L achieved 78.9% top-1 accuracy on ImageNet with <600M FLOPS, outperforming the previous state-of-the-art MobileNetV3.
  • Compared to MobileNetV2, MixNet provides a +4.2% accuracy boost at a similar computational cost.
  • On COCO object detection, MixConv-based models consistently achieved higher Mean Average Precision (mAP) than their vanilla counterparts while being more efficient.
  • In transfer learning, MixNet-M achieved 97.92% accuracy on CIFAR-10, proving to be 11.4x more efficient than ResNet-50 while delivering 1% higher accuracy.

Limitations and Future Work

  • Hardware Optimization: While MixConv is mathematically efficient, its "grouped" nature requires specialized kernel implementations (like those in TensorFlow Lite or XNNPACK) to achieve peak latency gains on all mobile hardware.
  • Dilated Convolutions: The authors tested dilated convolutions as an alternative to large kernels but found them inferior in accuracy. Exploring why dilation fails where MixConv succeeds could be a fruitful research path.
  • Partitioning Strategies: The search space for channel partitioning was relatively simple. Future work could involve NAS to discover even more sophisticated ways to distribute channels across kernel sizes.

Summary updated

BibTeX
@inproceedings{tan2019mixconv,
  author = {Mingxing Tan and Quoc V. Le},
  title = {{MixConv: Mixed Depthwise Convolutional Kernels}},
  booktitle = {BMVC},
  year = {2019},
  url = {https://openreview.net/forum?id=QAlMiF1ED2},
}
Figure