arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.03703cs.CV
收藏

CAS-ViT:面向高效移动应用的卷积加性自注意力视觉Transformer

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

SenseTime Research(商汤科技研究院);Tsinghua University(清华大学);University of Washington(华盛顿大学);University of Copenhagen(哥本哈根大学)

Tianfang Zhang, Lei Li, Yang Zhou, Wentao Liu, Chen Qian, Jenq-Neng Hwang, Xiangyang Ji

AI总结:

针对视觉Transformer因复杂运算难以在移动设备部署的问题,提出采用卷积加性token混合器的CAS-ViT,在多视觉任务上实现了性能与推理效率的更优平衡。

摘要:

视觉Transformer(ViTs)凭借其token混合器强大的全局上下文建模能力,成为神经网络领域的革命性进展。然而,尽管已有研究付出了大量努力,其成对token亲和性计算与复杂矩阵运算仍限制了它在资源受限场景(如移动设备)及实时应用中的部署。本文提出CAS-ViT:卷积加性自注意力视觉Transformer,旨在移动应用场景中实现效率与性能的平衡。首先,我们认为token混合器获取全局上下文信息的能力依赖于空间、通道等多维度的信息交互。随后,我们提出卷积加性token混合器(CATM),采用底层空间注意力与通道注意力作为新型交互形式,该模块消除了矩阵乘法、Softmax等繁琐复杂的运算。我们构建了卷积加性自注意力(CAS)块的混合架构,每个块均采用CATM,并进一步搭建了一系列轻量级网络,可轻松扩展至各类下游任务。最后,我们在图像分类、目标检测、实例分割、语义分割等多种视觉任务上评估了CAS-ViT的性能。其中M型和T型模型在ImageNet-1K数据集上仅需12M/21M参数,即可达到83.0%/84.1%的top-1准确率。同时,在GPU、ONNX及iPhone设备上的吞吐量评估结果也显示,其性能优于其他主流先进骨干网络。大量实验表明,我们的方法在性能、推理效率与易部署性之间实现了更优的平衡。代码与模型可在以下链接获取:https://github.com/Tianfang-Zhang/CAS-ViT

英文摘要:

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}

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑