Vision Transformers with Hierarchical Attention

Yun Liu, Yu-Huan Wu, Guolei Sun et al.

2024 · Machine Intelligence Research · 199 citations

This paper tackles the high computational/space complexity associated with multi-head self-attention (MHSA) in vanilla vision transformers. To this end, we propose hierarchical MHSA (H-MHSA), a novel approach that computes sell-attention in a hierarchical fashion. Specifically, we first divide the input image into patches as commonly done, and each patch is viewed as a token. Then, the proposed H-MHSA learns token relationships within local patches, serving as local relationship modeling. Then, the small patches are merged into larger ones, and H-MHSA models the global dependencies for the sm…

Read the paper →

Explore this paper's citation graph on Constellation.