Abstract: Vision Transformers (ViTs) achieve strong performance in image classification but incur high computational costs from processing all image tokens. To reduce inference costs in large ViTs without compromising accuracy, we propose TinyDrop, a training-free token dropping framework guided by a lightweight vision model. The guidance model estimates the importance of tokens while performing inference, thereby selectively discarding low-importance tokens if large vit models need to perform attention calculations. The framework operates plug-and-play, requires no architectural modifications, and is compatible with diverse ViT architectures. Evaluations on standard image classification benchmarks demonstrate that our framework reduces FLOPs by up to 80% for ViTs with minimal accuracy degradation, highlighting its generalization capability and practical utility for efficient ViT-based classification.
Introduction: The Efficiency Bottleneck in Vision Transformers
Vision Transformers (ViTs) have revolutionized computer vision by leveraging self-attention to model long-range dependencies between image patches (tokens). However, this power comes at a significant computational cost: self-attention complexity scales quadratically with the number of tokens. In standard ViT architectures, every token—regardless of whether it represents a critical object or uninformative background like sky or empty space—is processed with equal weight.
For large-scale foundation models such as ViT-L or BEiTv2, this uniform processing creates a massive bottleneck for real-world deployment. While existing "token dropping" or "token merging" techniques attempt to mitigate this, they often require expensive fine-tuning or rely on static schedules that fail to adapt to the content of individual images. TinyDrop addresses these challenges by introducing a training-free, adaptive framework that identifies and discards redundant tokens before they reach the heavy target model.
The TinyDrop Framework
TinyDrop operates as a "smart filter" that utilizes a lightweight guidance model to direct the attention of a much larger, frozen target ViT. The process is entirely training-free and plug-and-play, requiring no architectural modifications to the underlying models.
The framework follows a five-step pipeline:
- Guidance Model Inference & Early Exit: A highly efficient model (e.g., EfficientNetV2) performs initial inference. If its confidence exceeds a threshold, the system exits early, accepting the small model's prediction and bypassing the large ViT entirely.
- Attention-Based Saliency Mapping: If the guidance model is not sufficiently confident, it generates a saliency map using Grad-CAM. This map highlights the regions most critical for classification.
- Adaptive Token Dropping: The system calculates a dynamic drop ratio based on the guidance model's confidence. For "easier" images where confidence is higher, tokens are dropped more aggressively, keeping only the top-$K$ most salient patches.
- Positional Embedding Adaptation: To ensure the target ViT can process the truncated sequence, TinyDrop dynamically adjusts absolute and relative positional embeddings to match the pruned token set.
- Target ViT Inference: The large, frozen ViT processes only the high-value tokens, significantly reducing the total FLOPs required for the final prediction.
Performance Evaluation
The TinyDrop framework was evaluated on the ImageNet-1K validation set (50,000 images) across various large-scale backbones, including ViT-L/16, BEiTv2-L, and DeiT3-L.
The results demonstrate that TinyDrop achieves a state-of-the-art efficiency-accuracy trade-off. While previous methods like ToMe, Zero-TP, and PaPr typically achieve FLOP reductions in the 35-50% range, TinyDrop consistently reduces computational costs by 70% to 87% with less than 1% accuracy degradation. For instance, when applied to a ViT-L/16 model (61.6 GFLOPs baseline), TinyDrop guided by EfficientFormerV2 reduced the cost to just 8.0 GFLOPs (-87.0%) while maintaining a high accuracy level (only 0.8% drop). Notably, these savings account for the overhead of running the guidance model and generating saliency maps.
Conclusion and Future Directions
TinyDrop proves that a "division of labor" between tiny and massive models is highly effective. By using a lightweight model to identify important features, we can unlock the power of large foundation models at a fraction of the usual cost. The framework's training-free nature makes it immediately applicable to off-the-shelf frozen models.
Future research will focus on refining the adaptive dropping function to minimize information loss in complex samples and extending the TinyDrop paradigm to multi-modal transformers and dense prediction tasks such as object detection and semantic segmentation.
Summary updated