FasterViT: Fast Vision Transformers with Hierarchical Attention

Abstract

We design a new family of hybrid CNN-ViT neural networks, named FasterViT, with a focus on high image throughput for computer vision (CV) applications. FasterViT combines the benefits of fast local representation learning in CNNs and global modeling properties in ViT. Our newly introduced Hierarchical Attention (HAT) approach decomposes global self-attention with quadratic complexity into a multi-level attention with reduced computational costs. We benefit from efficient window-based self-attention. Each window has access to dedicated carrier tokens that participate in local and global representation learning. At a high level, global self-attentions enable the efficient cross-window communication at lower costs. FasterViT achieves a SOTA Pareto-front in terms of accuracy and image throughput. We have extensively validated its effectiveness on various CV tasks including classification, object detection and segmentation. We also show that HAT can be used as a plug-and-play module for existing networks and enhance them. We further demonstrate significantly faster and more accurate performance than competitive counterparts for images with high resolution. Code is available at https://github.com/NVlabs/FasterViT.

Cite

Text

Hatamizadeh et al. "FasterViT: Fast Vision Transformers with Hierarchical Attention." International Conference on Learning Representations, 2024.

Markdown

[Hatamizadeh et al. "FasterViT: Fast Vision Transformers with Hierarchical Attention." International Conference on Learning Representations, 2024.](https://mlanthology.org/iclr/2024/hatamizadeh2024iclr-fastervit/)

BibTeX

@inproceedings{hatamizadeh2024iclr-fastervit,
  title     = {{FasterViT: Fast Vision Transformers with Hierarchical Attention}},
  author    = {Hatamizadeh, Ali and Heinrich, Greg and Yin, Hongxu and Tao, Andrew and Alvarez, Jose M. and Kautz, Jan and Molchanov, Pavlo},
  booktitle = {International Conference on Learning Representations},
  year      = {2024},
  url       = {https://mlanthology.org/iclr/2024/hatamizadeh2024iclr-fastervit/}
}