arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.08166cs.CV
收藏

学习以对象为中心的注意力

Learning Object Focused Attention

Temple University(天普大学)

Vivek Trivedy, Amani Almalki, Longin Jan Latecki

AI总结:

本文提出对象聚焦注意力(OFA)损失,通过在选定注意力层上增加辅助损失,使视觉Transformer显式建模对象内部图像块,从而提升分类精度、分布外泛化能力和基于对象形状的表征学习,且推理无额外开销。

摘要:

我们提出一种对视觉Transformer(ViTs)训练的改进方法,使其在注意力计算过程中能够显式地建模对象。具体做法是在选定的注意力层上增加一个新分支,计算一个我们称之为对象聚焦注意力(OFA)损失的辅助损失。我们将注意力限制在属于同一对象类别的图像块上,使ViTs通过聚焦于对象内部图像块而非背景等其他图像块,更好地理解构型(或整体性)对象形状。我们提出的归纳偏置很容易融入Transformer的注意力框架,因为它只在选定的注意力层上增加一个辅助损失。此外,我们的方法在推理阶段没有额外开销。我们还尝试了多尺度掩码以进一步提升OFA模型的性能,并为利用我们的方法进行自监督学习提供了前进路径。我们的实验结果表明,带有OFA的ViTs相比其基础模型取得了更好的分类结果,对分布外(OOD)数据和对抗性损坏图像表现出更强的泛化能力,并且学习到的表征基于对象形状而非通过一般纹理产生的虚假相关性。针对我们的OOD设置,我们利用COCO数据集和Stable Diffusion修复技术生成了一个新数据集,并计划与社区共享。

英文摘要:

We propose an adaptation to the training of Vision Transformers (ViTs) that allows for an explicit modeling of objects during the attention computation. This is achieved by adding a new branch to selected attention layers that computes an auxiliary loss which we call the object-focused attention (OFA) loss. We restrict the attention to image patches that belong to the same object class, which allows ViTs to gain a better understanding of configural (or holistic) object shapes by focusing on intra-object patches instead of other patches such as those in the background. Our proposed inductive bias fits easily into the attention framework of transformers since it only adds an auxiliary loss over selected attention layers. Furthermore, our approach has no additional overhead during inference. We also experiment with multiscale masking to further improve the performance of our OFA model and give a path forward for self-supervised learning with our method. Our experimental results demonstrate that ViTs with OFA achieve better classification results than their base models, exhibit a stronger generalization ability to out-of-distribution (OOD) and adversarially corrupted images, and learn representations based on object shapes rather than spurious correlations via general textures. For our OOD setting, we generate a novel dataset using the COCO dataset and Stable Diffusion inpainting which we plan to share with the community.

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

↑