Interpreting and Improving Attention From the Perspective of Large Kernel Convolution

Chenghao Li, Chaoning Zhang, Boheng Zeng, Yi Lu, Pengbo Shi +5 more
1/11/2024
cs.CV

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Attention mechanisms have significantly advanced visual models by capturing global context effectively. However, their reliance on large-scale datasets and substantial computational resources poses challenges in data-scarce and resource-constrained scenarios. Moreover, traditional self-attention mechanisms lack inherent spatial inductive biases, making them suboptimal for modeling local features critical to tasks involving smaller datasets. In this work, we introduce Large Kernel Convolutional Attention (LKCA), a novel formulation that reinterprets attention operations as a single large-kernel convolution. This design unifies the strengths of convolutional architectures locality and translation invariance with the global context modeling capabilities of self-attention. By embedding these properties into a computationally efficient framework, LKCA addresses key limitations of traditional attention mechanisms. The proposed LKCA achieves competitive performance across various visual tasks, particularly in data-constrained settings. Experimental results on CIFAR-10, CIFAR-100, SVHN, and Tiny-ImageNet demonstrate its ability to excel in image classification, outperforming conventional attention mechanisms and vision transformers in compact model settings. These findings highlight the effectiveness of LKCA in bridging local and global feature modeling, offering a practical and robust solution for real-world applications with limited data and resources.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2024interpreting,
  title  = {Interpreting and Improving Attention From the Perspective of Large Kernel Convolution},
  author = {Chenghao Li and Chaoning Zhang and Boheng Zeng and Yi Lu and Pengbo Shi and Qingzi Chen and Jirui Liu and Lingyun Zhu and Yang Yang and Heng Tao Shen},
  year   = {2024},
  eprint = {2401.05738},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.05738v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2401.05738.svg)](https://codeofpaper.com/paper/2401.05738)

Discussion