Diverse Branch Block: Building a Convolution as an Inception-Like Unit

Xiaohan Ding, Xiangyu Zhang, Jungong Han, Guiguang Ding

Abstract

The Diverse Branch Block (DBB) is a structural re-parameterization technique designed to enhance the representational power of Convolutional Neural Networks (ConvNets) without increasing inference-time costs. By replacing standard convolutions with multi-branch units during training and mathematically collapsing them into a single convolution for deployment, DBB achieves significant performance gains across various tasks and architectures with zero additional latency or memory overhead.

Introduction

Deep learning often faces a trade-off between model performance and inference efficiency. While multi-branch architectures like Inception offer superior feature extraction through diverse kernel sizes and parallel operations, they are frequently "hardware-unfriendly." Modern hardware is optimized for large, contiguous standard convolutions; the overhead of many small, parallel operations often leads to slower production speeds. The Diverse Branch Block (DBB) addresses this by providing the representational power of a complex, multi-branch unit during training while maintaining the raw speed of a single convolution during deployment.

Methodology

The core of the DBB approach is the replacement of a standard $K \times K$ convolution with a multi-branch block during the training phase. This block consists of four diverse paths: a standard $K \times K$ convolution, a $1 \times 1$ convolution, a sequence of $1 \times 1$ and $K \times K$ convolutions, and a $1 \times 1$ convolution followed by an average pooling layer. Each branch includes Batch Normalization (BN) to provide essential training-time non-linearity.

The transition from a multi-branch training-time DBB to a single-convolution inference-time DBB.

Post-training, the multi-branch structure is simplified through "structural re-parameterization." The authors define six mathematical transformations to fuse these diverse branches into the weights and bias of a single $K \times K$ convolution. For instance, a $1 \times 1$ convolution is treated as a $K \times K$ convolution with zero-padding, and average pooling is modeled as a convolution with fixed weights.

Six fundamental transformations used to collapse diverse branches into a single KxK convolution.

Experimental Results

The DBB was validated across multiple benchmarks, including ImageNet-1K for classification, MS COCO for object detection, and Cityscapes for semantic segmentation. Testing spanned various backbones such as VGG-16, AlexNet, MobileNet, and ResNet.

Key performance improvements include:

  • ImageNet: Top-1 accuracy increases of 1.96% for AlexNet and 1.45% for ResNet-18.
  • MobileNet: A 0.99% boost on ImageNet, demonstrating effectiveness even on optimized architectures.
  • Downstream Tasks: Improved CenterNet's AP by 0.85 on COCO and PSPNet's mIoU by 1.17% on Cityscapes.

Crucially, in all tests, inference latency, memory footprint, and parameter counts remained identical to the original baselines after re-parameterization.

Discussion

A primary insight from this work is that diversity in feature capture (e.g., combining $1 \times 1$ and $3 \times 3$ convolutions) is more beneficial than simply increasing parameter density with uniform kernel types. Furthermore, training-time non-linearities provided by BN layers are vital for reaching better local minima, even though they are fused into linear operations for inference.

However, DBB does introduce training-time overhead in terms of memory and computation. Future work may explore hyperparameter tuning specific to DBB branches or its application to non-convolutional architectures like Vision Transformers. As a "drop-in" replacement, DBB offers a practical path for improving existing ConvNets without requiring a complete architectural redesign.

Summary updated

BibTeX
@inproceedings{ding2021diverse,
  author = {Xiaohan Ding and Xiangyu Zhang and Jungong Han and Guiguang Ding},
  title = {{Diverse Branch Block: Building a Convolution as an Inception-Like Unit}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01074},
}
Figure