[Paper Review] SaiT: Sparse Vision Transformers through Adaptive Token Pruning
SaiT proposes a unified, adaptive token pruning framework for vision transformers that dynamically adjusts patch token sparsity based on input image complexity, enabling on-the-fly accuracy-throughput tradeoffs without retraining. By combining dense/sparse alternate training, knowledge distillation, and parameter-free adaptive pruning, SaiT reduces FLOPs by 39–43% and boosts throughput by 67–91% with less than 0.5% accuracy drop across DeiT and LVViT models.
While vision transformers have achieved impressive results, effectively and efficiently accelerating these models can further boost performances. In this work, we propose a dense/sparse training framework to obtain a unified model, enabling weight sharing across various token densities. Thus one model offers a range of accuracy and throughput tradeoffs for different applications. Besides, we introduce adaptive token pruning to optimize the patch token sparsity based on the input image. In addition, we investigate knowledge distillation to enhance token selection capability in early transformer modules. Sparse adaptive image Transformer (SaiT) offers varying levels of model acceleration by merely changing the token sparsity on the fly. Specifically, SaiT reduces the computation complexity (FLOPs) by 39% - 43% and increases the throughput by 67% - 91% with less than 0.5% accuracy loss for various vision transformer models. Meanwhile, the same model also provides the zero accuracy drop option by skipping the sparsification step. SaiT achieves better accuracy and computation tradeoffs than state-of-the-art transformer and convolutional models.
Motivation & Objective
- To address the inefficiency of fixed-complexity vision transformers in edge and real-time applications.
- To enable a single unified model that supports multiple accuracy and throughput configurations without retraining.
- To dynamically adjust token sparsity based on input image complexity to optimize computation.
- To preserve high accuracy under sparse inference through knowledge distillation and joint dense/sparse training.
- To reduce computational cost (FLOPs) and improve inference speed with minimal accuracy degradation.
Proposed method
- Proposes a dense/sparse alternate training framework to train a single unified vision transformer model that supports varying token sparsity levels.
- Introduces adaptive token pruning that selects tokens based on cumulative attention score probability mass, dynamically adjusting sparsity per input image.
- Employs knowledge distillation from a DINO teacher to improve token importance estimation in early transformer layers.
- Uses a mass-based sparsification strategy that accumulates the most important tokens up to a probability threshold, avoiding fixed token counts.
- Applies parameter-free pruning by skipping attention computation on low-importance tokens, minimizing additional computation.
- Sets the optimal mass threshold at 0.7 to balance performance across diverse token densities (0.2–0.9).
Experimental results
Research questions
- RQ1Can a single vision transformer model support multiple accuracy and throughput tradeoffs without retraining?
- RQ2How can token sparsity be adaptively adjusted based on input image complexity to minimize computation?
- RQ3What is the optimal combination of training strategy and distillation to preserve accuracy under sparse inference?
- RQ4How does adaptive pruning compare to fixed-ratio or value-based pruning in terms of accuracy and efficiency?
- RQ5Can knowledge distillation from a DINO teacher improve token importance learning in early layers for sparse inference?
Key findings
- SaiT reduces FLOPs by 39–43% and increases throughput by 67–91% across DeiT and LVViT models with less than 0.5% accuracy drop.
- The model maintains baseline accuracy (79.8%) when sparsification is skipped, enabling zero-accuracy-loss operation.
- Using DINO as a distillation teacher improves top-1 accuracy by 1.6% (dense) and 2.3% (sparse) over DeiT-S.
- The mass-based adaptive pruning strategy outperforms value-based pruning at token densities below 0.5.
- A mass threshold of 0.7 yields optimal performance across a wide range of token densities (0.2–0.9).
- The unified model achieves 35–71% higher throughput and 43% lower FLOPs than baseline models, outperforming state-of-the-art CNN and transformer models in efficiency-accuracy tradeoffs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.