SparseViT: Revisiting Activation Sparsity for Efficient High-Resolution Vision Transformer

Abstract

High-resolution images enable neural networks to learn richer visual representations. However, this improved performance comes at the cost of growing computational complexity, hindering their usage in latency-sensitive applications. As not all pixels are equal, skipping computations for less-important regions offers a simple and effective measure to reduce the computation. This, however, is hard to be translated into actual speedup for CNNs since it breaks the regularity of the dense convolution workload. In this paper, we introduce SparseViT that revisits activation sparsity for recent window-based vision transformers (ViTs). As window attentions are naturally batched over blocks, actual speedup with window activation pruning becomes possible: i.e., 50% latency reduction with 60% sparsity. Different layers should be assigned with different pruning ratios due to their diverse sensitivities and computational costs. We introduce sparsity-aware adaptation and apply the evolutionary search to efficiently find the optimal layerwise sparsity configuration within the vast search space. SparseViT achieves speedups of 1.5x, 1.4x, and 1.3x compared to its dense counterpart in monocular 3D object detection, 2D instance segmentation, and 2D semantic segmentation, respectively, with negligible to no loss of accuracy.

Cite

Text

Chen et al. "SparseViT: Revisiting Activation Sparsity for Efficient High-Resolution Vision Transformer." Conference on Computer Vision and Pattern Recognition, 2023. doi:10.1109/CVPR52729.2023.00205

Markdown

[Chen et al. "SparseViT: Revisiting Activation Sparsity for Efficient High-Resolution Vision Transformer." Conference on Computer Vision and Pattern Recognition, 2023.](https://mlanthology.org/cvpr/2023/chen2023cvpr-sparsevit/) doi:10.1109/CVPR52729.2023.00205

BibTeX

@inproceedings{chen2023cvpr-sparsevit,
  title     = {{SparseViT: Revisiting Activation Sparsity for Efficient High-Resolution Vision Transformer}},
  author    = {Chen, Xuanyao and Liu, Zhijian and Tang, Haotian and Yi, Li and Zhao, Hang and Han, Song},
  booktitle = {Conference on Computer Vision and Pattern Recognition},
  year      = {2023},
  pages     = {2061-2070},
  doi       = {10.1109/CVPR52729.2023.00205},
  url       = {https://mlanthology.org/cvpr/2023/chen2023cvpr-sparsevit/}
}