Skip to main content
QUICK REVIEW

[Paper Review] X-volution: On the unification of convolution and self-attention

Xuanhong Chen, Hang Wang|arXiv (Cornell University)|Jun 4, 2021
Computability, Logic, AI AlgorithmsComputer Science34 references23 citations
TL;DR

This paper proposes X-volution, a novel neural network module that unifies convolution and self-attention by approximating global self-attention via a learnable, convolutional transformation of shifted feature maps. The method enables joint local and non-local feature learning through a multi-branch architecture, which can be reparameterized into a single standard convolution for inference, achieving state-of-the-art performance with +1.2% top-1 accuracy on ImageNet and +1.7 AP on COCO object detection.

ABSTRACT

Convolution and self-attention are acting as two fundamental building blocks in deep neural networks, where the former extracts local image features in a linear way while the latter non-locally encodes high-order contextual relationships. Though essentially complementary to each other, i.e., first-/high-order, stat-of-the-art architectures, i.e., CNNs or transformers lack a principled way to simultaneously apply both operations in a single computational module, due to their heterogeneous computing pattern and excessive burden of global dot-product for visual tasks. In this work, we theoretically derive a global self-attention approximation scheme, which approximates a self-attention via the convolution operation on transformed features. Based on the approximated scheme, we establish a multi-branch elementary module composed of both convolution and self-attention operation, capable of unifying both local and non-local feature interaction. Importantly, once trained, this multi-branch module could be conditionally converted into a single standard convolution operation via structural re-parameterization, rendering a pure convolution styled operator named X-volution, ready to be plugged into any modern networks as an atomic operation. Extensive experiments demonstrate that the proposed X-volution, achieves highly competitive visual understanding improvements (+1.2% top-1 accuracy on ImageNet classification, +1.7 box AP and +1.5 mask AP on COCO detection and segmentation).

Motivation & Objective

  • To address the lack of a principled way to jointly integrate convolution and self-attention in a single neural network module due to their heterogeneous computational patterns.
  • To develop a low-complexity, differentiable approximation of global self-attention that enables efficient computation in vision tasks.
  • To design a multi-branch module that preserves the optimization stability of convolution while capturing long-range dependencies via self-attention.
  • To enable structural re-parameterization such that the trained multi-branch module can be converted into a single, efficient convolutional layer for inference.

Proposed method

  • Proposes Pixel Shift Self-Attention (PSSA), an O(n) approximation of global self-attention that replaces dot-product attention with element-wise operations on feature maps shifted in eight directions.
  • Constructs a multi-branch X-volution module with a standard 3×3 and dilated 5×5 convolution branch, and a PSSA branch for non-local feature interaction.
  • Applies learnable shift operations and element-wise multiplication between original and shifted features to generate dynamic attention maps.
  • Employs batch normalization before the final output to stabilize training and improve generalization.
  • Utilizes structural re-parameterization to merge the multi-branch architecture into a single standard convolution after training, enabling inference efficiency.

Experimental results

Research questions

  • RQ1Can global self-attention be effectively and efficiently approximated using only convolutional operations on transformed features?
  • RQ2Can a unified module combining convolution and self-attention be trained stably and achieve better performance than standalone CNNs or Transformers?
  • RQ3Does the multi-branch design with structural re-parameterization allow the model to maintain the optimization benefits of convolution while gaining the representational power of self-attention?
  • RQ4Can the resulting X-volution module be deployed as a plug-in replacement in existing networks without architectural changes?

Key findings

  • X-volution achieves +1.2% top-1 accuracy on ImageNet-1K classification compared to a ResNet-50 baseline.
  • On COCO object detection, X-volution improves box AP by +1.7 points and mask AP by +1.5 points over the baseline.
  • Under longer training schedules (e.g., 3x and 6x), the performance gain of X-volution increases, reaching a +2.0 AP improvement on COCO under the 3x setting.
  • The PSSA approximation achieves comparable performance to standard convolution under short training schedules, but outperforms it as training progresses, indicating better long-range modeling capability.
  • The reparameterized X-volution module maintains high performance while being deployable as a standard convolution, enabling efficient inference.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.