Bandit-based Attention Mechanism in Vision Transformers
Vision Transformers (ViT) have demonstrated remarkable performance on many computer vision tasks. However, their high computational cost and quadratic complexity pose chal-lenges for deployment in resource-constrained environments. The core of Vision Transformers is the self-attention mecha-nism which aggregates information from different image re-gions, or patches. In a conventional ViT, processing involves attention to all patches, creating a substantial computational bottleneck and extended training times. We hypothesize that applying soft attention to all patches may be unnecessary and instead focusing on relevant and significant patches (hard attention) would be sufficient. To address this, we introduce a module within the Vision Transformer that allows the at-tention mechanism to selectively process only the essential patches. We propose a novel bandit-based attention mecha-nism that leverages the idea of exploration and exploitation. The extensive experimentation across various datasets il-lustrates that the proposed bandit attention-based ViT not only achieves superior performance compared to the existing state-of-the-art vision transformer models but also results in greater throughput and lower computational time in the training as well as the inference. The code is publicly avail-able at https://github.com/aquorio15/bandit_wacv
Authors
- Raghuram Bharadwaj Diddigi (ORCID: https://orcid.org/0000-0003-0233-0698)
- Achyut Mani Tripathi (ORCID: https://orcid.org/0000-0003-0548-9688)
- K. J. Prabuchandran
- Amartya Roy Chowdhury
Institutions
- International Institute of Information Technology Bangalore (IN)
- Indian Institute of Technology Dharwad (IN)
- Indian Institute of Information Technology Dharwad
Publication Details
- Published
- 2025-02-26
- DOI
- https://doi.org/10.1109/wacv61041.2025.00929
- Citations
- 2
- Primary Topic
- CCD and CMOS Imaging Sensors
- Type
- article
- Field-Weighted Citation Impact
- 1.46