[论文解读] Vision Transformer with Super Token Sampling
本文提出超级标记视觉Transformer(STViT),一种分层视觉Transformer,通过引入超级标记以减少浅层中的冗余,学习视觉标记与超级标记之间的稀疏关联。通过将全局自注意力分解为稀疏关联图与低秩注意力,STViT实现了高效的全局上下文建模,在ImageNet-1K上达到86.4%的top-1准确率,并在COCO和ADE20K基准上取得最先进性能。
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.
研究动机与目标
- 解决视觉Transformer浅层局部特征学习中的高冗余问题。
- 在不牺牲长距离依赖的前提下,实现在网络早期阶段的高效且有效的全局上下文建模。
- 在保持全局表征能力的同时,降低自注意力机制的计算成本。
- 设计一种分层视觉Transformer主干网络,以极小的参数增加量超越现有方法。
提出的方法
- 引入超级标记作为语义上有意义的紧凑视觉内容表征,受超像素过分割的启发。
- 提出超级标记注意力(STA):一种包含三步的机制,包括稀疏关联学习、在超级标记上的自注意力计算以及特征重建到原始标记空间。
- 将标准全局自注意力分解为稀疏关联图与低维注意力矩阵的乘积,使FLOPs呈平方级降低。
- 采用快速采样算法通过稀疏关联学习预测超级标记,最大限度减少计算开销。
- 引入卷积位置编码(CPE)以实现跨分辨率的灵活位置编码。
- 结合带捷径连接的卷积前馈网络(ConvFFN),以增强局部特征学习并提升性能。
实验结果
研究问题
- RQ1我们能否在不依赖局部注意力或早期卷积的情况下,在视觉Transformer的早期阶段实现高效且有效的全局上下文建模?
- RQ2基于超像素原理生成的超级标记是否能有效减少浅层中的冗余,同时保持全局依赖建模能力?
- RQ3将全局自注意力分解为稀疏关联与低秩注意力是否能显著降低FLOPs而不引起性能下降?
- RQ4所提出的STViT主干网络在准确率、效率和跨视觉任务泛化能力方面与现有视觉Transformer相比表现如何?
主要发现
- STViT-S在ImageNet-1K上达到86.4%的top-1准确率,参数量为52M,优于Swin-T和DeiT-S。
- 在COCO目标检测任务中,STViT-S达到53.9 box AP和46.8 mask AP,优于具有相似或更大参数量的基线模型。
- 在ADE20K语义分割任务中,STViT-S取得51.9 mIOU,较Swin-T高出2.6 mIOU,较Uniformer高出1.2 mIOU。
- 消融实验表明,超级标记采样在早期阶段最为有效,一次采样迭代即可达到最优性能。
- 引入ConvFFN和CPE可一致提升性能,其中CPE带来最大增益(0.4%准确率提升)。
- STA显著降低FLOPs——例如,与DeiT-S的4.6G相比,仅需3.97G,同时保持或提升准确率。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。