arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.06446cs.CVcs.AIcs.CLcs.LG
收藏

SpectFormer:频率与注意力是视觉Transformer所需

SpectFormer: Frequency and Attention is what you need in a Vision Transformer

Microsoft(微软);University of Bath(巴斯大学)

Badri N. Patro, Vinay P. Namboodiri, Vijay Srinivas Agneeswaran

AI总结:

本文提出SpectFormer,将频谱层与多头注意力层结合用于视觉Transformer,在ImageNet-1K上小型版本达84.25%、基础版本达85.7%的top-1准确率,并在迁移学习和下游检测分割任务中表现优异。

摘要:

视觉Transformer已成功应用于图像识别任务。现有工作要么基于多头自注意力(如ViT、DeIT),与文本模型中的原始工作类似;要么更近期地基于频谱层(如FNet、GFNet、AFNO)。我们假设频谱层和多头注意力都发挥重要作用。我们通过本工作对这一假设进行研究,并观察到确实将频谱层与多头注意力层相结合能够提供更好的Transformer架构。因此,我们提出了新颖的Spectformer架构,用于结合频谱层和多头注意力层的Transformer。我们认为,由此得到的表示使Transformer能够恰当地捕获特征表示,并相较于其他Transformer表示获得更好的性能。例如,与GFNet-H和LiT相比,它在ImageNet上的top-1准确率提高了2%。SpectFormer-S在ImageNet-1K上达到84.25%的top-1准确率(小型版本的最新水平)。此外,SpectFormer-L达到85.7%,这是可比的Transformer基础版本的最新水平。我们进一步确保在其他场景中获得合理结果,例如在CIFAR-10、CIFAR-100、Oxford-IIIT-flower和Stanford Car等标准数据集上的迁移学习。随后,我们研究了其在MS-COCO数据集上的下游任务(如目标检测和实例分割)中的应用,并观察到SpectFormer表现出与最佳骨干网络相当的一致性能,并且可以进一步优化和改进。因此,我们认为,结合频谱层和注意力层正是视觉Transformer所需要的。

英文摘要:

Vision transformers have been applied successfully for image recognition tasks. There have been either multi-headed self-attention based (ViT \cite{dosovitskiy2020image}, DeIT, \cite{touvron2021training}) similar to the original work in textual models or more recently based on spectral layers (Fnet\cite{lee2021fnet}, GFNet\cite{rao2021global}, AFNO\cite{guibas2021efficient}). We hypothesize that both spectral and multi-headed attention plays a major role. We investigate this hypothesis through this work and observe that indeed combining spectral and multi-headed attention layers provides a better transformer architecture. We thus propose the novel Spectformer architecture for transformers that combines spectral and multi-headed attention layers. We believe that the resulting representation allows the transformer to capture the feature representation appropriately and it yields improved performance over other transformer representations. For instance, it improves the top-1 accuracy by 2\% on ImageNet compared to both GFNet-H and LiT. SpectFormer-S reaches 84.25\% top-1 accuracy on ImageNet-1K (state of the art for small version). Further, Spectformer-L achieves 85.7\% that is the state of the art for the comparable base version of the transformers. We further ensure that we obtain reasonable results in other scenarios such as transfer learning on standard datasets such as CIFAR-10, CIFAR-100, Oxford-IIIT-flower, and Standford Car datasets. We then investigate its use in downstream tasks such of object detection and instance segmentation on the MS-COCO dataset and observe that Spectformer shows consistent performance that is comparable to the best backbones and can be further optimized and improved. Hence, we believe that combined spectral and attention layers are what are needed for vision transformers.

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

↑