CAS-ViT: Convolutional Additive Self-attention Vision Transformers for Efficient Mobile Applications

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Tianfang, Li, Lei, Zhou, Yang, Liu, Wentao, Qian, Chen, Hwang, Jenq-Neng, Ji, Xiangyang
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912153931350016
author Zhang, Tianfang
Li, Lei
Zhou, Yang
Liu, Wentao
Qian, Chen
Hwang, Jenq-Neng
Ji, Xiangyang
author_facet Zhang, Tianfang
Li, Lei
Zhou, Yang
Liu, Wentao
Qian, Chen
Hwang, Jenq-Neng
Ji, Xiangyang
contents Vision Transformers (ViTs) mark a revolutionary advance in neural networks with their token mixer's powerful global context capability. However, the pairwise token affinity and complex matrix operations limit its deployment on resource-constrained scenarios and real-time applications, such as mobile devices, although considerable efforts have been made in previous works. In this paper, we introduce CAS-ViT: Convolutional Additive Self-attention Vision Transformers, to achieve a balance between efficiency and performance in mobile applications. Firstly, we argue that the capability of token mixers to obtain global contextual information hinges on multiple information interactions, such as spatial and channel domains. Subsequently, we propose Convolutional Additive Token Mixer (CATM) employing underlying spatial and channel attention as novel interaction forms. This module eliminates troublesome complex operations such as matrix multiplication and Softmax. We introduce Convolutional Additive Self-attention(CAS) block hybrid architecture and utilize CATM for each block. And further, we build a family of lightweight networks, which can be easily extended to various downstream tasks. Finally, we evaluate CAS-ViT across a variety of vision tasks, including image classification, object detection, instance segmentation, and semantic segmentation. Our M and T model achieves 83.0\%/84.1\% top-1 with only 12M/21M parameters on ImageNet-1K. Meanwhile, throughput evaluations on GPUs, ONNX, and iPhones also demonstrate superior results compared to other state-of-the-art backbones. Extensive experiments demonstrate that our approach achieves a better balance of performance, efficient inference and easy-to-deploy. Our code and model are available at: \url{https://github.com/Tianfang-Zhang/CAS-ViT}
format Preprint
id arxiv_https___arxiv_org_abs_2408_03703
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle CAS-ViT: Convolutional Additive Self-attention Vision Transformers for Efficient Mobile Applications
Zhang, Tianfang
Li, Lei
Zhou, Yang
Liu, Wentao
Qian, Chen
Hwang, Jenq-Neng
Ji, Xiangyang
Computer Vision and Pattern Recognition
Vision Transformers (ViTs) mark a revolutionary advance in neural networks with their token mixer's powerful global context capability. However, the pairwise token affinity and complex matrix operations limit its deployment on resource-constrained scenarios and real-time applications, such as mobile devices, although considerable efforts have been made in previous works. In this paper, we introduce CAS-ViT: Convolutional Additive Self-attention Vision Transformers, to achieve a balance between efficiency and performance in mobile applications. Firstly, we argue that the capability of token mixers to obtain global contextual information hinges on multiple information interactions, such as spatial and channel domains. Subsequently, we propose Convolutional Additive Token Mixer (CATM) employing underlying spatial and channel attention as novel interaction forms. This module eliminates troublesome complex operations such as matrix multiplication and Softmax. We introduce Convolutional Additive Self-attention(CAS) block hybrid architecture and utilize CATM for each block. And further, we build a family of lightweight networks, which can be easily extended to various downstream tasks. Finally, we evaluate CAS-ViT across a variety of vision tasks, including image classification, object detection, instance segmentation, and semantic segmentation. Our M and T model achieves 83.0\%/84.1\% top-1 with only 12M/21M parameters on ImageNet-1K. Meanwhile, throughput evaluations on GPUs, ONNX, and iPhones also demonstrate superior results compared to other state-of-the-art backbones. Extensive experiments demonstrate that our approach achieves a better balance of performance, efficient inference and easy-to-deploy. Our code and model are available at: \url{https://github.com/Tianfang-Zhang/CAS-ViT}
title CAS-ViT: Convolutional Additive Self-attention Vision Transformers for Efficient Mobile Applications
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2408.03703