Accelerating Vision Transformers Based on Heterogeneous Attention Patterns
Not on the map. Why?
Abstract (arXiv)
Recently, Vision Transformers (ViTs) have attracted a lot of attention in the field of computer vision. Generally, the powerful representative capacity of ViTs mainly benefits from the self-attention mechanism, which has a high computation complexity. To accelerate ViTs, we propose an integrated compression pipeline based on observed heterogeneous attention patterns across layers. On one hand, different images share more similar attention patterns in early layers than later layers, indicating that the dynamic query-by-key self-attention matrix may be replaced with a static self-attention matrix in early layers. Then, we propose a dynamic-guided static self-attention (DGSSA) method where the matrix inherits self-attention information from the replaced dynamic self-attention to effectively improve the feature representation ability of ViTs. On the other hand, the attention maps have more low-rank patterns, which reflect token redundancy, in later layers than early layers. In a view of linear dimension reduction, we further propose a method of global aggregation pyramid (GLAD) to reduce the number of tokens in later layers of ViTs, such as Deit. Experimentally, the integrated compression pipeline of DGSSA and GLAD can accelerate up to 121% run-time throughput compared with DeiT, which surpasses all SOTA approaches.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 38 of its 43 references that are in the map. First posted on arXiv 11 Oct 2023.
Builds on
38 of 43 references.
References · 38
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
- 2020End-to-End Object Detection with Transformerscited by 7,414
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
- 2020Deformable DETR: Deformable Transformers for End-to-End Object Detectioncited by 3,422
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2021SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformerscited by 2,940
- 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,962
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2020Reformer: The Efficient Transformercited by 1,668
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
26 more
- 2021MLP-Mixer: An all-MLP Architecture for Visioncited by 1,446
- 2020Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformerscited by 1,369
- 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,101
- 2022Token Merging: Your ViT But Fastercited by 1,021
- 2021CvT: Introducing Convolutions to Vision Transformerscited by 947
- 2020Pre-Trained Image Processing Transformercited by 893
- 2021DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsificationcited by 864
- 2018Image Transformercited by 772
- 2021Transformer in Transformercited by 633
- 2021Twins: Revisiting the Design of Spatial Attention in Vision Transformerscited by 565
- 2021ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biasescited by 484
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 471
- 2020End-to-End Video Instance Segmentation with Transformerscited by 443
- 2021Conditional Positional Encodings for Vision Transformerscited by 406
- 2021Bottleneck Transformers for Visual Recognitioncited by 364
- 2019On the Relationship between Self-Attention and Convolutional Layerscited by 300
- 2021Chasing Sparsity in Vision Transformers: An End-to-End Explorationcited by 183
- 2021Adaptive Token Sampling For Efficient Vision Transformerscited by 183
- 2021Evo-ViT: Slow-Fast Token Evolution for Dynamic Vision Transformercited by 177
- 2019Blockwise Self-Attention for Long Document Understandingcited by 159
- 2021HRFormer: High-Resolution Transformer for Dense Predictioncited by 149
- 2021Patch Slimming for Efficient Vision Transformerscited by 133
- 2021IA-RED2: Interpretability-Aware Redundancy Reduction for Vision Transformerscited by 127
- 2021Long-Short Transformer: Efficient Transformers for Language and Visioncited by 102
- 2023Joint Token Pruning and Squeezing Towards More Aggressive Compression of Vision Transformerscited by 81
- 2020Fixed Encoder Self-Attention Patterns in Transformer-Based Machine Translationcited by 43
Built on by
Not cited yet.