Skip to main content
QUICK REVIEW

[论文解读] CrossFormer: A Versatile Vision Transformer Based on Cross-scale Attention

Wenxiao Wang, Yao Lu|arXiv (Cornell University)|Jul 31, 2021
Advanced Neural Network Applications参考文献 39被引用 46
一句话总结

CrossFormer 提出了一种视觉变换器架构,通过跨尺度嵌入层(CEL)和长短距离注意力(LSDA),实现了跨尺度注意力,从而有效建模多空间尺度下的特征。通过同时保留小尺度与大尺度特征,并引入动态位置偏置,CrossFormer 在目标检测与分割任务中达到了最先进性能。

ABSTRACT

Transformers have made much progress in dealing with visual tasks. However, existing vision transformers still do not possess an ability that is important to visual input: building the attention among features of different scales. The reasons for this problem are two-fold: (1) Input embeddings of each layer are equal-scale without cross-scale features; (2) Some vision transformers sacrifice the small-scale features of embeddings to lower the cost of the self-attention module. To make up this defect, we propose Cross-scale Embedding Layer (CEL) and Long Short Distance Attention (LSDA). In particular, CEL blends each embedding with multiple patches of different scales, providing the model with cross-scale embeddings. LSDA splits the self-attention module into a short-distance and long-distance one, also lowering the cost but keeping both small-scale and large-scale features in embeddings. Through these two designs, we achieve cross-scale attention. Besides, we propose dynamic position bias for vision transformers to make the popular relative position bias apply to variable-sized images. Based on these proposed modules, we construct our vision architecture called CrossFormer. Experiments show that CrossFormer outperforms other transformers on several representative visual tasks, especially object detection and segmentation. The code has been released: this https URL.

研究动机与目标

  • 为解决现有视觉变换器在单层中通常仅处理单一尺度特征,缺乏跨尺度特征建模的问题。
  • 在不增加计算成本的前提下,保留自注意力机制中的小尺度与大尺度特征。
  • 通过动态位置偏置,使相对位置偏置能够适应可变尺寸的输入图像,提升泛化能力。
  • 设计一种统一的视觉变换器架构,有效整合多尺度表征,以提升视觉理解能力。

提出的方法

  • 跨尺度嵌入层(CEL)将来自多个图像块尺度的特征融合为单一嵌入,实现跨尺度表征学习。
  • 长短距离注意力(LSDA)将自注意力分解为短距离与长距离两部分,同时在保持特征保真度的同时降低计算成本。
  • 引入动态位置偏置,以适应可变尺寸输入,提升视觉变换器在可变输入尺寸下的泛化能力。
  • 将 CEL 与 LSDA 集成到统一的变换器主干网络中,形成 CrossFormer,专为视觉任务优化。
  • 在标准视觉基准上,采用标准训练协议进行端到端训练。

实验结果

研究问题

  • RQ1视觉变换器如何有效关注不同空间尺度的特征?
  • RQ2多尺度特征表征是否能在不增加计算复杂度的前提下保留在自注意力机制中?
  • RQ3相对位置偏置如何适应视觉变换器中可变尺寸的图像输入?
  • RQ4跨尺度注意力在目标检测与分割任务中的性能提升程度如何?

主要发现

  • CrossFormer 在目标检测与实例分割基准上达到了最先进性能,优于现有的视觉变换器。
  • 通过 CEL 与 LSDA 实现的跨尺度注意力集成,带来了显著的准确率提升,尤其在细粒度视觉任务中表现突出。
  • 动态位置偏置使模型在不同输入尺寸下具备有效泛化能力,提升了在真实场景中的鲁棒性。
  • 模型在保持计算效率的同时,增强了多尺度下的特征表征能力,表现为在多样化视觉任务中持续取得性能增益。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。