DO-Conv: Depthwise Over-Parameterized Convolutional Layer

Jinming Cao, Yangyan Li, Mingchao Sun, Ying Chen, Dani Lischinski, Daniel Cohen-Or, Baoquan Chen, Changhe Tu · DOI

TL;DR

DO-Conv (Depthwise Over-parameterized Convolutional Layer) is a drop-in replacement for standard convolutional layers that boosts model accuracy across various computer vision tasks with zero extra cost at inference time. By adding a temporary depthwise convolution during training and mathematically "folding" it into the main weights afterward, the authors achieve a "free lunch" in performance for architectures like ResNet and MobileNet.

What Problem Does This Paper Address?

In the world of Convolutional Neural Networks (CNNs), we typically increase a model's "expressiveness" by adding more layers and non-linearities (like ReLU). However, researchers have recently discovered that adding linear layers—which technically don't change what a network can represent—can actually make the optimization process easier and faster. This is known as over-parameterization.

The challenge is that adding extra layers usually increases the computational cost (FLOPs) and memory usage during inference. Previous attempts to solve this, like ACNet, only over-parameterized specific parts of the kernel (like the center row and column). The authors of DO-Conv sought a more generalized way to over-parameterize the entire spatial kernel of a convolutional layer without slowing down the final deployed model.

Methods

The core idea of DO-Conv is to augment a standard convolutional layer with an additional depthwise convolution.

  1. The Architecture: In a standard layer, an input patch is convolved with a kernel. In DO-Conv, each input channel is first convolved with its own unique 2D kernel (the depthwise part) before the standard convolution takes place.
  2. Two Views of Training:
    • Feature Composition: Applying the depthwise kernel to the input features first, then the standard kernel.
  3. Kernel Composition: Mathematically combining the depthwise kernel ($D$) and the standard kernel ($W$) into a single "folded" kernel ($W'$).
  4. The "Folding" Trick: Because both operations are linear, the composition of a depthwise convolution and a standard convolution is equivalent to a single standard convolution. During the inference phase, the extra parameters are folded away. The resulting model has the exact same number of parameters and the same computational complexity as a traditional CNN.
  5. Initialization: To ensure training starts stable, the authors initialize the depthwise component as an identity transformation, meaning the model starts out behaving exactly like a standard CNN and then learns how to utilize the extra parameters.

Datasets

The authors validated DO-Conv across a wide array of standard benchmarks:

  • Image Classification: CIFAR-10, CIFAR-100, and ImageNet.
  • Object Detection: MS COCO (using Faster R-CNN).
  • Semantic Segmentation: PASCAL VOC and Cityscapes (using DeepLabv3).
  • Architectures: They tested the layer as a replacement in ResNet (v1, v1b, v2), ResNeXt, and the MobileNet family (v1, v2, v3).

Key Insights and Ideas

  • Optimization over Expressiveness: The paper reinforces the idea that how we parameterize a model matters as much as the model's theoretical capacity. DO-Conv doesn't allow the network to "see" more complex patterns, but it helps the gradient descent algorithm find better minima.
  • The Efficiency of Kernel Composition: The authors point out that while "Feature Composition" and "Kernel Composition" are mathematically identical, Kernel Composition is much faster during training. This is because you only fold the weights once per training step, rather than performing extra operations on every single pixel of the feature maps.
  • Generalization to Depthwise/Grouped Convs: The technique isn't just for standard convolutions. The authors show it can be applied to depthwise separable convolutions (common in mobile-friendly models) by creating "DO-DConv," providing gains even for already optimized architectures.

Key Results

  • Consistent Accuracy Boosts: On ImageNet, replacing standard layers with DO-Conv improved ResNet-50 accuracy by 0.49% and ResNet-101 by 0.46%.
  • MobileNet Gains: Even highly optimized models like MobileNet-v2 saw a 0.16% boost on ImageNet.
  • Downstream Tasks: In semantic segmentation on the Cityscapes dataset, using DO-Conv in the ResNet-101 backbone led to a significant 1.45% increase in Mean IoU.
  • Faster Convergence: Training curves (Figure 5 in the paper) show that DO-Conv models often reach lower error rates faster than their baseline counterparts.

Limitations and Future Work

  • Training Overhead: While inference is "free," training a DO-Conv model requires more memory and computation because of the extra parameters ($D$) and the folding operation performed during the forward/backward passes.
  • Hyperparameter Sensitivity: The authors primarily used a depth multiplier ($D_{mul}$) equal to the spatial size of the kernel ($M \times N$). While they show this works well, exploring different multipliers for different layers might yield even better results.
  • Theoretical Gap: While empirical results are strong, a rigorous theoretical explanation of why this specific depthwise over-parameterization is superior to others (like simply adding more standard linear layers) remains an open question for future research.

The authors have open-sourced their implementation for TensorFlow, PyTorch, and GluonCV, making it easy for researchers to test this "free" performance boost on their own models.

Summary updated

BibTeX
@article{cao2022do,
  author = {Jinming Cao and Yangyan Li and Mingchao Sun and Ying Chen and Dani Lischinski and Daniel Cohen-Or and Baoquan Chen and Changhe Tu},
  title = {{DO-Conv: Depthwise Over-Parameterized Convolutional Layer}},
  journal = {IEEE Trans. Image Process.},
  year = {2022},
  doi = {10.1109/tip.2022.3175432},
}
Figure