NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

CondConv: Conditionally Parameterized Convolutions for Efficient Inference

Brandon Yang, Gabriel Bender, Quoc V. Le, Jiquan Ngiam

Introduction

In standard convolutional neural networks (CNNs), convolutional kernels are static: once a model is trained, the exact same filters are applied to every single image in the dataset. Traditionally, to increase a model's capacity and make it "smarter," researchers must add more layers or widen existing ones. However, both approaches increase the number of Multiply-Add operations (MADDs) proportionally to the input resolution. This creates a severe bottleneck for real-time applications, such as self-driving cars or mobile video processing, where low latency is critical.

CondConv (Conditionally Parameterized Convolutions) challenges this status quo. It introduces a method to increase a model's parameter count—and thus its capacity—without a linear explosion in the computational cost required for inference. It achieves this by replacing static kernels with dynamic ones that adapt to each specific input image.

The CondConv Architecture

The core innovation of this work is the CondConv layer. Instead of relying on a single weight matrix $W$, a CondConv layer maintains $n$ distinct "expert" weights ($W_1, W_2, \dots, W_n$).

For every input $x$, the layer performs the following steps:

  1. Routing: A small, computationally inexpensive routing function (typically Global Average Pooling followed by a Fully-Connected layer and a Sigmoid activation) computes a set of scalar weights ($\alpha_1, \alpha_2, \dots, \alpha_n$).
  2. Kernel Synthesis: These scalar weights are used to create a specialized, custom kernel for that specific input via a weighted linear combination: $W_{cond} = \sum \alpha_i W_i$.
  3. Efficient Convolution: The newly synthesized kernel is then convolved with the input.
CondConv architecture compared to a standard Mixture of Experts (MoE) approach.

Mathematically, this process is equivalent to a "Mixture of Experts" (MoE) approach, where one would run $n$ separate convolutions and sum their outputs. However, standard MoE is incredibly computationally expensive. CondConv bypasses this expense by combining the weights first—a relatively small matrix operation—and performing the computationally heavy convolution only once.

Key Insights

By decoupling model capacity from computational compute, CondConv represents a paradigm shift for efficient model design. The authors evaluated this approach across major benchmarks like ImageNet-2012 and COCO, revealing several fascinating properties:

  • Semantic Specialization: Analysis of the routing weights shows that different experts naturally specialize in specific visual features. For instance, one expert might activate strongly for wheeled vehicles, while another specializes in cylindrical objects like bottles.
  • Depth-Dependent Behavior: In the early layers of the network, routing weights remain largely similar across different classes, focusing on low-level features. As the input progresses deeper into the network, the routing becomes highly class-specific, indicating that dynamic kernel customization is most valuable for high-level semantic reasoning.
  • Drop-in Replacement: CondConv is highly versatile and can replace standard convolutions in almost any existing architecture (e.g., ResNet, MobileNet, EfficientNet) with minimal structural modifications.

Performance and Results

The performance gains from CondConv are consistent and significant across various architectures.

When applied to MobileNetV1, increasing the number of experts to 8 improved Top-1 accuracy on ImageNet from 70.6% to 73.7%. Remarkably, the computational cost only increased from 567M to 600M MADDs—roughly a 6% increase in compute for a massive 3% jump in accuracy.

Top-1 Accuracy vs. Multiply-Adds for CondConv-MobileNetV1 compared to baseline MobileNetV1.

Similar improvements were observed in other domains. On the COCO dataset for object detection, CondConv-MobileNetV1 (1.0x) improved the Mean Average Precision (mAP) by 2.1 points compared to the baseline, incurring less than a 5% increase in inference cost. Furthermore, applying CondConv to EfficientNet-B0 achieved a state-of-the-art 78.3% accuracy on ImageNet with only 413M MADDs.

Limitations and Future Directions

While CondConv is highly "FLOP-efficient," it is not strictly "parameter-efficient." Because the model must store multiple sets of expert weights per layer, the overall binary size and RAM usage increase significantly. This makes CondConv less ideal for edge devices constrained by very limited storage or memory bandwidth.

Additionally, training CondConv models introduces new complexities. For models utilizing more than four experts, specialized training strategies—such as processing examples with a batch size of one or leveraging specific library optimizations—are necessary to maintain training efficiency. Future work may explore using Neural Architecture Search (NAS) to automatically determine the optimal number of experts and their ideal placement within a network to balance accuracy, compute, and memory footprint.

Summary updated

BibTeX
@inproceedings{yang2019condconv,
  author = {Brandon Yang and Gabriel Bender and Quoc V. Le and Jiquan Ngiam},
  title = {{CondConv: Conditionally Parameterized Convolutions for Efficient Inference}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure