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

基于超令牌采样的视觉Transformer

Vision Transformer with Super Token Sampling

Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);University of Chinese Academy of Sciences(中国科学院大学);ShanghaiTech University(上海科技大学);University of Science and Technology of China(中国科学技术大学);Nanjing University(南京大学)

Huaibo Huang, Xiaoqiang Zhou, Jie Cao, Ran He, Tieniu Tan

AI总结:

本文提出超令牌注意力(STA)机制,通过稀疏关联采样超令牌并在低维空间进行自注意力,在视觉Transformer早期高效建模全局依赖,在ImageNet、COCO和ADE20K上取得强性能。

摘要:

视觉Transformer在许多视觉任务上取得了令人瞩目的性能。然而,它在浅层捕获局部特征时可能存在较高的冗余。因此,现有方法通常采用局部自注意力或早期卷积,但这牺牲了捕获长程依赖的能力。由此产生一个挑战:我们能否在神经网络的早期阶段实现高效且有效的全局上下文建模?为了解决这一问题,我们从超像素的设计中获得启发——超像素减少了后续处理中图像基元的数量——并将超令牌引入视觉Transformer。超令牌旨在提供一种具有语义意义的视觉内容划分,从而在减少自注意力中令牌数量的同时保留全局建模能力。具体来说,我们提出了一种简单而强大的超令牌注意力(STA)机制,包含三个步骤:第一步通过稀疏关联学习从视觉令牌中采样超令牌,第二步在超令牌上执行自注意力,最后将它们映射回原始令牌空间。STA将普通的全局注意力分解为稀疏关联图与低维注意力的乘积,从而在捕获全局依赖时实现高效率。基于STA,我们开发了一个层次化视觉Transformer。大量实验证明了其在多种视觉任务上的强大性能。特别是在没有任何额外训练数据或标签的情况下,它在ImageNet-1K上以不到100M参数取得了86.4%的top-1准确率。它还在COCO检测任务上取得了53.9 box AP和46.8 mask AP,并在ADE20K语义分割任务上取得了51.9 mIOU。代码已发布于 https://github.com/hhb072/STViT。

英文摘要:

Vision transformer has achieved impressive performance for many vision tasks. However, it may suffer from high redundancy in capturing local features for shallow layers. Local self-attention or early-stage convolutions are thus utilized, which sacrifice the capacity to capture long-range dependency. A challenge then arises: can we access efficient and effective global context modeling at the early stages of a neural network? To address this issue, we draw inspiration from the design of superpixels, which reduces the number of image primitives in subsequent processing, and introduce super tokens into vision transformer. Super tokens attempt to provide a semantically meaningful tessellation of visual content, thus reducing the token number in self-attention as well as preserving global modeling. Specifically, we propose a simple yet strong super token attention (STA) mechanism with three steps: the first samples super tokens from visual tokens via sparse association learning, the second performs self-attention on super tokens, and the last maps them back to the original token space. STA decomposes vanilla global attention into multiplications of a sparse association map and a low-dimensional attention, leading to high efficiency in capturing global dependencies. Based on STA, we develop a hierarchical vision transformer. Extensive experiments demonstrate its strong performance on various vision tasks. In particular, without any extra training data or label, it achieves 86.4% top-1 accuracy on ImageNet-1K with less than 100M parameters. It also achieves 53.9 box AP and 46.8 mask AP on the COCO detection task, and 51.9 mIOU on the ADE20K semantic segmentation task. Code is released at https://github.com/hhb072/STViT.

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

↑