ToSA: Token Selective Attention for Efficient Vision Transformers

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Singh, Manish Kumar, Yasarla, Rajeev, Cai, Hong, Lee, Mingu, Porikli, Fatih
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866914833605066752
author Singh, Manish Kumar
Yasarla, Rajeev
Cai, Hong
Lee, Mingu
Porikli, Fatih
author_facet Singh, Manish Kumar
Yasarla, Rajeev
Cai, Hong
Lee, Mingu
Porikli, Fatih
contents In this paper, we propose a novel token selective attention approach, ToSA, which can identify tokens that need to be attended as well as those that can skip a transformer layer. More specifically, a token selector parses the current attention maps and predicts the attention maps for the next layer, which are then used to select the important tokens that should participate in the attention operation. The remaining tokens simply bypass the next layer and are concatenated with the attended ones to re-form a complete set of tokens. In this way, we reduce the quadratic computation and memory costs as fewer tokens participate in self-attention while maintaining the features for all the image patches throughout the network, which allows it to be used for dense prediction tasks. Our experiments show that by applying ToSA, we can significantly reduce computation costs while maintaining accuracy on the ImageNet classification benchmark. Furthermore, we evaluate on the dense prediction task of monocular depth estimation on NYU Depth V2, and show that we can achieve similar depth prediction accuracy using a considerably lighter backbone with ToSA.
format Preprint
id arxiv_https___arxiv_org_abs_2406_08816
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle ToSA: Token Selective Attention for Efficient Vision Transformers
Singh, Manish Kumar
Yasarla, Rajeev
Cai, Hong
Lee, Mingu
Porikli, Fatih
Computer Vision and Pattern Recognition
In this paper, we propose a novel token selective attention approach, ToSA, which can identify tokens that need to be attended as well as those that can skip a transformer layer. More specifically, a token selector parses the current attention maps and predicts the attention maps for the next layer, which are then used to select the important tokens that should participate in the attention operation. The remaining tokens simply bypass the next layer and are concatenated with the attended ones to re-form a complete set of tokens. In this way, we reduce the quadratic computation and memory costs as fewer tokens participate in self-attention while maintaining the features for all the image patches throughout the network, which allows it to be used for dense prediction tasks. Our experiments show that by applying ToSA, we can significantly reduce computation costs while maintaining accuracy on the ImageNet classification benchmark. Furthermore, we evaluate on the dense prediction task of monocular depth estimation on NYU Depth V2, and show that we can achieve similar depth prediction accuracy using a considerably lighter backbone with ToSA.
title ToSA: Token Selective Attention for Efficient Vision Transformers
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2406.08816