Beyond Attentive Tokens: Incorporating Token Importance and Diversity for Efficient Vision Transformers

Vision transformers have achieved significant improvements on various vision tasks but their quadratic interactions between tokens significantly reduce computational efficiency. Many pruning methods have been proposed to remove redundant tokens for efficient vision transformers recently. However, existing studies mainly focus on the token importance to preserve local attentive tokens but completely ignore the global token diversity. In this paper, we emphasize the cruciality of diverse global semantics and propose an efficient token decoupling and merging method that can jointly consider the token importance and diversity for token pruning. According to the class token attention, we decouple the attentive and inattentive tokens. In addition to preserving the most discriminative local tokens, we merge similar inattentive tokens and match homogeneous attentive tokens to maximize the token diversity. Despite its simplicity, our method obtains a promising trade-off between model complexity and classification accuracy. On DeiT-S, our method reduces the FLOPs by 35% with only a 0.2% accuracy drop. Notably, benefiting from maintaining the token diversity, our method can even improve the accuracy of DeiT-T by 0.1% after reducing its FLOPs by 40%.

PDF Abstract CVPR 2023 PDF CVPR 2023 Abstract

Datasets


Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Efficient ViTs ImageNet-1K (with DeiT-S) BAT (70%) Top 1 Accuracy 79.6 # 16
GFLOPs 3.0 # 23
Efficient ViTs ImageNet-1K (with DeiT-S) BAT (50%) Top 1 Accuracy 79.0 # 31
GFLOPs 2.3 # 5
Efficient ViTs ImageNet-1K (with DeiT-S) BAT (60%) Top 1 Accuracy 79.3 # 25
GFLOPs 2.6 # 12
Efficient ViTs ImageNet-1K (with DeiT-S) BAT (20%) Top 1 Accuracy 76.4 # 41
GFLOPs 1.6 # 1
Efficient ViTs ImageNet-1K (with DeiT-S) BAT (30%) Top 1 Accuracy 77.8 # 40
GFLOPs 1.8 # 2
Efficient ViTs ImageNet-1K (with DeiT-S) BAT (40%) Top 1 Accuracy 78.6 # 34
GFLOPs 2.0 # 3
Efficient ViTs ImageNet-1K (with DeiT-T) BAT Top 1 Accuracy 72.3 # 4
GFLOPs 0.8 # 8
Efficient ViTs ImageNet-1K (With LV-ViT-S) BAT Top 1 Accuracy 83.1 # 6
GFLOPs 4.7 # 5

Methods