Convolution with even-sized kernels and symmetric padding

Shuang Wu, Guanrui Wang, Pei Tang, Feng Chen, Luping Shi

Abstract

Even-sized convolutional kernels (e.g., 2x2, 4x4) are historically neglected in deep learning due to the "shift problem"—spatial misalignment caused by asymmetric padding. This paper introduces symmetric padding, a simple yet effective channel-grouping strategy that cancels out these shifts. By dividing feature map channels into four groups and padding each on a different side, even-sized kernels can match or exceed the performance of standard 3x3 kernels while reducing parameter counts and memory usage by 30-50%.

Introduction

In modern computer vision, the $3 \times 3$ kernel is the standard building block. Even-sized kernels, such as $2 \times 2$ or $4 \times 4$, are rarely used because they lack a central pixel. This forces deep learning frameworks to apply asymmetric padding (e.g., adding zeros to the right and bottom but not the left and top).

The authors identify this as the shift problem. As data traverses deep networks, features progressively "slide" toward the top-left corner. This leads to information erosion, where spatial signal is distorted at the edges, significantly degrading the performance of deep architectures and sensitive models like Generative Adversarial Networks (GANs).

Methods: Symmetric Padding

The proposed solution, Symmetric Padding (sp), is a structural fix that requires no extra parameters. The input feature map channels are divided into four equal groups, and each group is padded on a different side (Top, Bottom, Left, or Right).

The information erosion hypothesis (left) and the Symmetric Padding mechanism (right).

When these channels are convolved and subsequently aggregated, the individual directional shifts cancel each other out, maintaining a centered aggregate receptive field. This method allows $2 \times 2$ (C2sp) and $4 \times 4$ (C4sp) kernels to function without the spatial bias inherent in standard implementations.

Key Results

The researchers evaluated the approach across classification (CIFAR, ImageNet) and generation (GANs) tasks.

  • Efficiency: On CIFAR-100, a ResNet using C2sp achieved accuracy comparable to a standard 3x3 ResNet while utilizing 30% to 50% fewer parameters and FLOPs.
  • Training Performance: C2sp demonstrated a >20% speedup and >35% memory saving during training compared to other compact blocks like Inverted Bottlenecks.
  • Generative Stability: GANs are highly sensitive to spatial alignment. Standard $2 \times 2$ kernels often fail to converge, but C4sp achieved superior FID scores (30.22) compared to standard 3x3 (43.39) and 5x5 (33.90) baselines on CelebA-HQ.
Performance benchmarks showing test error vs. parameters and training convergence across datasets.

Conclusion and Limitations

Symmetric padding proves that even-sized kernels are a mathematically viable and highly efficient alternative to traditional odd-sized kernels. However, a practical hurdle remains: current GPU libraries (like cuDNN) are heavily hand-optimized for $3 \times 3$ operations. Until low-level libraries are optimized for even-sized kernels, the theoretical FLOP reductions may not translate linearly to wall-clock speedups on all hardware. Future work may involve integrating these blocks into automated Neural Architecture Search (NAS) systems.

Summary updated

BibTeX
@inproceedings{wu2019convolution,
  author = {Shuang Wu and Guanrui Wang and Pei Tang and Feng Chen and Luping Shi},
  title = {{Convolution with even-sized kernels and symmetric padding}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure