Pale Transformer: A General Vision Transformer Backbone with Pale-Shaped Attention

Sitong Wu, Tianyi Wu, Haoru Tan, Guodong Guo
12/28/2021
90 citations
cs.CV
transformer-attention

Official code: BR-IDL/PaddleViT (1,235 stars, Python, Apache-2.0, last commit 2022-09-07).

Abstract

Recently, Transformers have shown promising performance in various vision tasks. To reduce the quadratic computation complexity caused by the global self-attention, various methods constrain the range of attention within a local region to improve its efficiency.

Show full abstract

Consequently, their receptive fields in a single attention layer are not large enough, resulting in insufficient context modeling. To address this issue, we propose a Pale-Shaped self-Attention (PS-Attention), which performs self-attention within a pale-shaped region. Compared to the global self-attention, PS-Attention can reduce the computation and memory costs significantly. Meanwhile, it can capture richer contextual information under the similar computation complexity with previous local self-attention mechanisms. Based on the PS-Attention, we develop a general Vision Transformer backbone with a hierarchical architecture, named Pale Transformer, which achieves 83.4%, 84.3%, and 84.9% Top-1 accuracy with the model size of 22M, 48M, and 85M respectively for 224 ImageNet-1K classification, outperforming the previous Vision Transformer backbones. For downstream tasks, our Pale Transformer backbone performs better than the recent state-of-the-art CSWin Transformer by a large margin on ADE20K semantic segmentation and COCO object detection & instance segmentation. The code will be released on https://github.com/BR-IDL/PaddleViT.

View on arXivView PDF

Code Implementations(1)

BR-IDL/PaddleViTOfficial100%
Apache-2.0

:robot: PaddleViT: State-of-the-art Visual Transformer and MLP Models for PaddlePaddle 2.0+

1,235327Python, ShellAug 30, 20214 years agoApache-2.0
classificationcomputer-visioncvdeep-learningdetection+9 more

Similar Papers

Cite this paper

@article{wu2021pale,
  title  = {Pale Transformer: A General Vision Transformer Backbone with Pale-Shaped Attention},
  author = {Sitong Wu and Tianyi Wu and Haoru Tan and Guodong Guo},
  year   = {2021},
  eprint = {2112.14000},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2112.14000}
}

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/2112.14000.svg)](https://codeofpaper.com/paper/2112.14000)

Discussion