SAMPL: Self-Attention Modelled Patch Learning for Efficient Visual Understanding
We study the patch selection problem for efficient transformer-based visual understanding wherein a sampler can be used to drop less informative patches at inference in order to speed up model execution on resource-constrained devices. As no labels are available on the saliency of the patches, existing works either try to solve an auxiliary task of locating distinctive patches or learn a policy network through the global image/video-level supervision. The former approach could drop redundant but important patches while the latter suffers from the weak supervision of a single class label per image/video. In this work, we observe that the attention weights in trained transformer-based models clearly highlight the salient regions in images and videos. Therefore, we propose a learned patch sampling framework called SAMPL that utilizes the attention weights as fine-grained patch-level supervision to learn a lightweight policy network for patch selection. To train SAMPL end-to-end with the transformer-based models, we introduce a new loss function based on the REINFORCE algorithm to match the distribution of patch selection probabilities and the attention scores. Experimental results on ImageNet, UCF101, Something-Something v2 and Kinetics-400 show that SAMPL can effectively increase the throughput by at least 1.5× while achieving competitive classification accuracy.
Authors
- Iqbal Mohomed (ORCID: https://orcid.org/0009-0008-0598-8966)
- Salar Hosseini Khorasgani (ORCID: https://orcid.org/0000-0001-6020-3406)
- Weiming Ren
- Zhiming Hu (ORCID: https://orcid.org/0000-0002-5465-2819)
Institutions
- Centre for Social Innovation (CA)
Publication Details
- Published
- 2025-03-26
- DOI
- https://doi.org/10.1145/3712676.3714447
- Primary Topic
- Human Pose and Action Recognition
- Type
- article
- Field-Weighted Citation Impact
- 0.00