arXiv:2506.15940cs.CV2025-06NeurIPS被引 1

用多段线路径掩码增强ViT的空间关系建模能力

Polyline Path Masked Attention for Vision Transformer

论文配图:Polyline Path Masked Attention for Vision Transformer
图 1 · 摘自论文原文
  • 设计多段线路径掩码,更好保留图像块邻接关系
  • 在ADE20K上达52.3% mIoU,优于现有SOTA模型
  • 适合需要精准空间建模的视觉任务研究者

全局依赖建模与空间位置建模是深度学习架构设计的核心问题。近期,视觉变换器(ViTs)凭借自注意力机制的强大全局依赖建模能力取得了显著成功。同时,Mamba2通过结构化掩码显式建模空间邻接先验,在自然语言处理中展现出巨大潜力。本文提出多段线路径掩码注意力(PPMA),将ViT的自注意力机制与改进的Mamba2结构化掩码相结合,发挥两者优势。具体地,我们引入二维多段线路径扫描策略,重构结构化掩码为多段线路径掩码,更有效保持图像块间的邻接关系。我们对所提掩码的结构特性进行理论分析,并设计高效计算算法。进一步将该掩码嵌入ViT自注意力机制,实现空间邻接先验的显式建模。在标准基准上的大量实验表明,我们的模型在图像分类、目标检测和分割任务上均超越基于状态空间模型和Transformer的现有最先进方法。例如,所提出的PPMA-T/S/B模型在ADE20K语义分割任务上分别达到48.7%/51.1%/52.3%的mIoU,分别优于RMT-T/S/B模型0.7%/1.3%/0.3%。代码已开源。

原文摘要 · Abstract (English)

Global dependency modeling and spatial position modeling are two core issues of the foundational architecture design in current deep learning frameworks. Recently, Vision Transformers (ViTs) have achieved remarkable success in computer vision, leveraging the powerful global dependency modeling capability of the self-attention mechanism. Furthermore, Mamba2 has demonstrated its significant potential in natural language processing tasks by explicitly modeling the spatial adjacency prior through the structured mask. In this paper, we propose Polyline Path Masked Attention (PPMA) that integrates the self-attention mechanism of ViTs with an enhanced structured mask of Mamba2, harnessing the complementary strengths of both architectures. Specifically, we first ameliorate the traditional structured mask of Mamba2 by introducing a 2D polyline path scanning strategy and derive its corresponding structured mask, polyline path mask, which better preserves the adjacency relationships among image tokens. Notably, we conduct a thorough theoretical analysis on the structural characteristics of the proposed polyline path mask and design an efficient algorithm for the computation of the polyline path mask. Next, we embed the polyline path mask into the self-attention mechanism of ViTs, enabling explicit modeling of spatial adjacency prior. Extensive experiments on standard benchmarks, including image classification, object detection, and segmentation, demonstrate that our model outperforms previous state-of-the-art approaches based on both state-space models and Transformers. For example, our proposed PPMA-T/S/B models achieve 48.7%/51.1%/52.3% mIoU on the ADE20K semantic segmentation task, surpassing RMT-T/S/B by 0.7%/1.3%/0.3%, respectively. Code is available at https://github.com/zhongchenzhao/PPMA.

视觉transformer空间建模注意力机制语义分割

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。