arXiv:2506.12982cs.CV2025-06被引 1

融合局部与全局注意力的视觉变压器,提升医学图像分类精度

DuoFormer: Leveraging Hierarchical Representations by Local and Global Attention Vision Transformer

  • 用CNN生成分层特征,通过创新补丁标记适配Transformer输入
  • 引入尺度间与尺度内注意力机制,分类准确率显著优于基线模型
  • 组件可插拔,适用于多种CNN架构和医疗图像任务

尽管变压器在医疗应用中广泛使用,但通过变压器进行多尺度学习的研究仍有限,而分层表示对计算机辅助医疗诊断具有优势。我们提出一种新型分层变压器模型,有效结合卷积神经网络(CNNs)的特征提取能力与视觉变压器(ViTs)的表征潜力。针对ViTs缺乏归纳偏置且依赖大规模训练数据的问题,模型采用CNN主干生成分层视觉表示,并通过创新的补丁标记过程将其适配为变压器输入,保留继承的多尺度归纳偏置。我们还引入一种尺度级注意力机制,直接捕捉尺度内与尺度间关联,该机制通过增强空间理解与保持全局感知,分别实现局部与全局注意力。模型在分类准确率上显著优于基线模型,有效弥合了卷积神经网络(CNNs)与视觉变压器(ViTs)之间的差距。各组件设计为即插即用,适用于不同CNN架构,并可扩展至多种应用场景。代码已公开于https://github.com/xiaoyatang/DuoFormer.git。

原文摘要 · Abstract (English)

Despite the widespread adoption of transformers in medical applications, the exploration of multi-scale learning through transformers remains limited, while hierarchical representations are considered advantageous for computer-aided medical diagnosis. We propose a novel hierarchical transformer model that adeptly integrates the feature extraction capabilities of Convolutional Neural Networks (CNNs) with the advanced representational potential of Vision Transformers (ViTs). Addressing the lack of inductive biases and dependence on extensive training datasets in ViTs, our model employs a CNN backbone to generate hierarchical visual representations. These representations are adapted for transformer input through an innovative patch tokenization process, preserving the inherited multi-scale inductive biases. We also introduce a scale-wise attention mechanism that directly captures intra-scale and inter-scale associations. This mechanism complements patch-wise attention by enhancing spatial understanding and preserving global perception, which we refer to as local and global attention, respectively. Our model significantly outperforms baseline models in terms of classification accuracy, demonstrating its efficiency in bridging the gap between Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs). The components are designed as plug-and-play for different CNN architectures and can be adapted for multiple applications. The code is available at https://github.com/xiaoyatang/DuoFormer.git.

视觉变压器医学图像分层表示注意力机制

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