Dilated convolution with learnable spacings

Ismail Khalfaoui Hassani, Thomas Pellegrini, Timothée Masquelier

TL;DR

DCLS (Dilated Convolution with Learnable Spacings) is a novel convolution method that turns the fixed grid of dilated convolutions into a set of learnable positions. By using a bilinear interpolation trick to make these positions differentiable, the authors allow a small number of weights to "move" freely within a large receptive field, achieving the performance of massive kernels with the parameter efficiency of tiny ones.

What Problem Does This Paper Address?

In the battle between Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs), "receptive field" size has become a primary metric. ViTs naturally capture global context through attention, while traditional CNNs are often limited by small $3 \times 3$ kernels.

While you can simply increase kernel sizes (e.g., to $31 \times 31$ or $51 \times 51$), the number of parameters scales quadratically, making models heavy and difficult to train. Dilated Convolutions (DC) were invented to solve this by "inflating" the kernel with zeros, but their rigid, fixed-grid structure often leads to poor performance in general image classification. The authors identify this "grid rigidity" as a major bottleneck and seek a way to give CNNs the flexibility of large receptive fields without the parameter explosion or the sub-optimal constraints of a fixed grid.

Methods

The core innovation is DCLS (Dilated Convolution with Learnable Spacings). Instead of placing weights on a fixed grid, each weight is assigned floating-point coordinates within a predefined "dilated kernel size."

Comparison of dense, dilated, and DCLS kernels
  • Bilinear Interpolation: Since you cannot backpropagate through discrete pixel indices, the authors use bilinear interpolation. Each weight is "smeared" across the four nearest pixels on the grid based on its fractional position. This makes the positions differentiable, allowing the network to learn exactly where each weight should "look" during training.
  • Kernel Construction: The method constructs a sparse, large kernel from a small number of weights (the "kernel count"). For example, a DCLS kernel might use only 34 weights but allow them to move anywhere within a $17 \times 17$ area.
  • Optimization Tricks: The authors found that standard weight decay shouldn't be applied to positions (it forces them to the center). They also introduced "Synchronizing Positions," where layers in the same stage share the same learned positions to reduce parameters and improve stability.
  • Implementation: DCLS is designed as a "drop-in replacement" for standard convolutions. To maintain speed, it can be paired with "depthwise implicit GEMM" algorithms, which are highly optimized for sparse, large-kernel operations.

Datasets

The authors evaluated DCLS across the "triple crown" of computer vision tasks:

  • ImageNet-1K: For image classification and robustness testing (including ImageNet-C, -A, -R, and -Sketch).
  • ADE20K: For semantic segmentation.
  • COCO: For object detection and instance segmentation using the Cascade Mask-RCNN framework.

Key Insights and Ideas

  • Breaking the Grid: The most significant "aha moment" is that the rigidity of dilation was the problem, not the dilation itself. By letting the weights find their own optimal "spacings," the model avoids the "gridding artifacts" that plague standard dilated convolutions.
  • The "Center Bias" of Vision: After training, the authors observed that learned positions tend to cluster more densely toward the center of the receptive field. This aligns with the theory of "Effective Receptive Fields," suggesting that the most critical information is usually local, but a few "scout" weights are needed further out to capture context.
  • Efficiency in Depthwise Layers: DCLS is particularly powerful when used in depthwise separable convolutions (like those in ConvNeXt). Because the number of parameters in these layers is already small, adding a few position parameters has a negligible impact on the total model size but a massive impact on the model's "vision."

Key Results

Replacing standard depthwise convolutions with DCLS yields significant improvements without bloating the model.

Accuracy vs. Latency comparison for DCLS and baselines
  • ConvNeXt Improvements: Replacing standard $7 \times 7$ depthwise convolutions in ConvNeXt with DCLS (using a $17 \times 17$ dilated area) improved ImageNet-1K accuracy by +0.4% to +0.6% across Tiny, Small, and Base variants with almost no change in parameter count.
  • State-of-the-Art Scaling: ConvNeXt-B with DCLS reached 84.1% on ImageNet-1K, outperforming larger models like RepLKNet while being faster and more parameter-efficient.
  • Robustness: DCLS models showed significantly better resilience to noise and blur. On ImageNet-C (corruption), the DCLS version of ConvNeXt-T reduced the error rate from 41.6 to 41.5 (mean error across categories), showing a consistent edge in "out-of-distribution" scenarios.
  • Downstream Tasks: In object detection (COCO), DCLS provided a boost of up to +0.8 AP (Average Precision) over the baseline, proving that learnable spacings help the model better localize objects.

Limitations and Future Work

  • Throughput in Dense Convolutions: While DCLS is "free" for depthwise convolutions, it introduces a significant speed penalty when used in standard, non-separable convolutions (like in ResNet50) because the resulting kernels are not as easily optimized by current hardware.
  • Hyperparameter Tuning: The "dilated kernel size" (the boundary of where weights can move) still needs to be set manually, though the authors found that $17 \times 17$ is a robust default for most 2D tasks.
  • Beyond 2D: The paper briefly mentions 1D (audio) and 3D (video) applications. The authors suggest that DCLS could be a game-changer for audio processing (e.g., WaveNet), where capturing long-range temporal dependencies is crucial.

Summary updated

BibTeX
@inproceedings{hassani2023dilated,
  author = {Ismail Khalfaoui Hassani and Thomas Pellegrini and Timothée Masquelier},
  title = {{Dilated convolution with learnable spacings}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=Q3-1vRh3HOA},
}
Figure