Visual Attention Network

Meng-Hao Guo, Chengze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shimin Hu

TL;DR

This paper introduces the Visual Attention Network (VAN), a novel deep learning architecture that addresses limitations of current self-attention models in computer vision. VAN utilizes a new "large kernel attention" (LKA) mechanism, which efficiently captures both local and long-range spatial dependencies while also considering channel adaptability, outperforming state-of-the-art Vision Transformers (ViTs) and Convolutional Neural Networks (CNNs) across various vision tasks.

What Problem Does This Paper Address?

Self-attention mechanisms, originally developed for Natural Language Processing (NLP), have shown great promise in computer vision. However, directly applying them to 2D images presents several challenges:

  1. Loss of 2D Structure: Treating images as 1D sequences ignores their inherent spatial relationships.
  2. Quadratic Complexity: The computational and memory demands of self-attention grow quadratically with image resolution, making it inefficient for high-resolution images.
  3. Limited Adaptability: Standard self-attention primarily captures spatial adaptability but overlooks channel adaptability, which is crucial as different channels often represent distinct features or objects.

Existing CNNs, while efficient and good at capturing local information, often lack the dynamic adaptability of attention mechanisms. This paper aims to bridge this gap by proposing a more suitable attention mechanism for vision tasks and a corresponding network architecture.

Methods

The core innovation is the Large Kernel Attention (LKA) module. LKA is designed to combine the strengths of both convolutions and self-attention while mitigating their weaknesses. It achieves this by decomposing a large kernel convolution into three components:

  1. Depth-wise Convolution (DW-Conv): Captures local contextual information.
  2. Depth-wise Dilated Convolution (DW-D-Conv): Captures long-range spatial dependencies with a dilated kernel.
  3. Pointwise Convolution (1x1 Conv): Handles channel interactions and adaptability.

This decomposition allows LKA to achieve long-range correlations and spatial adaptability without the quadratic complexity of standard self-attention. Crucially, it also incorporates channel adaptability, which is often overlooked by other attention mechanisms. The paper then builds the Visual Attention Network (VAN), a hierarchical backbone network that uses LKA modules within its stages. VAN is designed to be simple yet effective, surpassing existing models in various tasks.

Datasets

The paper evaluates VAN on several standard computer vision benchmarks:

  • ImageNet-1K: For image classification.
  • ImageNet-22K: For large-scale pre-training in image classification.
  • COCO: For object detection, instance segmentation, and panoptic segmentation.
  • ADE20K: For semantic segmentation.
  • CUB-200: For fine-grained classification.
  • COCO Human Pose Estimation Dataset: For pose estimation.

Key Insights and Ideas

  • Decomposition is Key: Decomposing large kernel convolutions into depth-wise, dilated depth-wise, and pointwise operations is an efficient way to capture both local and long-range spatial information.
  • Channel Adaptability Matters: Unlike many self-attention mechanisms, LKA explicitly considers channel adaptability, which is shown to be important for visual tasks.
  • Linear Complexity is Achievable: LKA achieves linear complexity with respect to image size, making it suitable for high-resolution images, unlike the quadratic complexity of standard self-attention.
  • Rethinking Self-Attention: The paper challenges the notion that self-attention is the only or best form of attention for vision, demonstrating that a well-designed attention mechanism (LKA) can outperform it.

Key Results

VAN demonstrates state-of-the-art performance across a wide range of tasks:

  • ImageNet Classification: VAN-B6 achieves 87.8% top-1 accuracy.
  • Panoptic Segmentation (COCO): VAN sets a new state-of-the-art with 58.2 PQ.
  • Semantic Segmentation (ADE20K): VAN-B2 surpasses Swin-T by 4% mIoU (50.1 vs. 46.1).
  • Object Detection (COCO): VAN-B2 achieves 2.6% higher AP than Swin-T (48.8 vs. 46.2).
  • Accuracy-Throughput Trade-off: VAN offers a better accuracy-throughput trade-off compared to Swin Transformer.
  • Efficiency: LKA's linear complexity allows for efficient processing of high-resolution images.

Limitations and Future Work

  • Ablation Studies: The paper includes ablation studies showing that each component of LKA (DW-Conv, DW-D-Conv, 1x1 Conv, and the attention mechanism itself) is critical for performance.
  • Kernel Size: The study suggests that a 21x21 kernel decomposition is optimal, with larger kernels showing diminishing returns.
  • Future Work: The authors plan to further improve VAN's structure by exploring multi-scale and multi-branch designs. They also aim to leverage VAN's properties for large-scale self-supervised learning and explore its applicability in other domains like NLP.

Summary updated

BibTeX
@article{guo2023visual,
  author = {Meng-Hao Guo and Chengze Lu and Zheng-Ning Liu and Ming-Ming Cheng and Shimin Hu},
  title = {{Visual Attention Network}},
  journal = {Comput. Vis. Media},
  year = {2023},
  doi = {10.1007/s41095-023-0364-2},
}
Figure