AT-SNN: Adaptive Tokens for Vision Transformer on Spiking Neural Network

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Kang, Donghwa, Lee, Youngmoon, Lee, Eun-Kyu, Kang, Brent, Lee, Jinkyu, Baek, Hyeongboo
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866909293517733888
author Kang, Donghwa
Lee, Youngmoon
Lee, Eun-Kyu
Kang, Brent
Lee, Jinkyu
Baek, Hyeongboo
author_facet Kang, Donghwa
Lee, Youngmoon
Lee, Eun-Kyu
Kang, Brent
Lee, Jinkyu
Baek, Hyeongboo
contents In the training and inference of spiking neural networks (SNNs), direct training and lightweight computation methods have been orthogonally developed, aimed at reducing power consumption. However, only a limited number of approaches have applied these two mechanisms simultaneously and failed to fully leverage the advantages of SNN-based vision transformers (ViTs) since they were originally designed for convolutional neural networks (CNNs). In this paper, we propose AT-SNN designed to dynamically adjust the number of tokens processed during inference in SNN-based ViTs with direct training, wherein power consumption is proportional to the number of tokens. We first demonstrate the applicability of adaptive computation time (ACT), previously limited to RNNs and ViTs, to SNN-based ViTs, enhancing it to discard less informative spatial tokens selectively. Also, we propose a new token-merge mechanism that relies on the similarity of tokens, which further reduces the number of tokens while enhancing accuracy. We implement AT-SNN to Spikformer and show the effectiveness of AT-SNN in achieving high energy efficiency and accuracy compared to state-of-the-art approaches on the image classification tasks, CIFAR10, CIFAR-100, and TinyImageNet. For example, our approach uses up to 42.4% fewer tokens than the existing best-performing method on CIFAR-100, while conserving higher accuracy.
format Preprint
id arxiv_https___arxiv_org_abs_2408_12293
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle AT-SNN: Adaptive Tokens for Vision Transformer on Spiking Neural Network
Kang, Donghwa
Lee, Youngmoon
Lee, Eun-Kyu
Kang, Brent
Lee, Jinkyu
Baek, Hyeongboo
Artificial Intelligence
Computer Vision and Pattern Recognition
In the training and inference of spiking neural networks (SNNs), direct training and lightweight computation methods have been orthogonally developed, aimed at reducing power consumption. However, only a limited number of approaches have applied these two mechanisms simultaneously and failed to fully leverage the advantages of SNN-based vision transformers (ViTs) since they were originally designed for convolutional neural networks (CNNs). In this paper, we propose AT-SNN designed to dynamically adjust the number of tokens processed during inference in SNN-based ViTs with direct training, wherein power consumption is proportional to the number of tokens. We first demonstrate the applicability of adaptive computation time (ACT), previously limited to RNNs and ViTs, to SNN-based ViTs, enhancing it to discard less informative spatial tokens selectively. Also, we propose a new token-merge mechanism that relies on the similarity of tokens, which further reduces the number of tokens while enhancing accuracy. We implement AT-SNN to Spikformer and show the effectiveness of AT-SNN in achieving high energy efficiency and accuracy compared to state-of-the-art approaches on the image classification tasks, CIFAR10, CIFAR-100, and TinyImageNet. For example, our approach uses up to 42.4% fewer tokens than the existing best-performing method on CIFAR-100, while conserving higher accuracy.
title AT-SNN: Adaptive Tokens for Vision Transformer on Spiking Neural Network
topic Artificial Intelligence
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2408.12293