Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
102 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Accelerating Vision Transformers Based on Heterogeneous Attention Patterns (2310.07664v1)

Published 11 Oct 2023 in cs.CV

Abstract: 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.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (10)
  1. Deli Yu (4 papers)
  2. Teng Xi (11 papers)
  3. Jianwei Li (30 papers)
  4. Baopu Li (45 papers)
  5. Gang Zhang (139 papers)
  6. Haocheng Feng (33 papers)
  7. Junyu Han (53 papers)
  8. Jingtuo Liu (36 papers)
  9. Errui Ding (156 papers)
  10. Jingdong Wang (236 papers)