视觉Transformer需要寄存器
Vision Transformers Need Registers

原始链接: https://arxiv.org/abs/2309.16588

Darcet 等人的这篇论文识别并分析了视觉Transformer(ViT)生成的特征图中的伪影,包括监督学习和自监督学习模型。这些伪影表现为在推理过程中,高范数token主要出现在无信息背景区域,实际上被重新用于内部计算。 作者提出了一种解决方案,即在ViT的输入序列中引入额外的“寄存器”token。这些寄存器token旨在承担目前由背景token执行的角色。 研究人员证明,这种寄存器token方法有效消除了在监督学习和自监督学习ViT模型中观察到的伪影。此外,它还提高了性能,在密集视觉预测任务上为自监督ViT设定了新的最先进水平。该方法还促进了大型模型的目标发现,并产生了更平滑的特征图和注意力图,有利于后续的视觉处理。本质上,添加寄存器token使网络能够更有效率地运行。

Hacker News 正在讨论一篇题为“视觉Transformer需要寄存器”的论文,该论文探索了一种增强视觉Transformer特征图清晰度的方法。 该技术使用“寄存器”,类似于多个CLS token。一位用户指出,虽然在象棋神经网络中实验使用多个全局token并没有带来显著改进,但其他人已经看到了好处。 具体来说,寄存器并非主要用于性能提升,而是为了改进特征图的生成。UForm的一位代表指出,该技术得到了很好的采用,尤其是在边缘部署中,任何优化都很有帮助。另一位用户报告说,在DINOv2中使用寄存器进行图像嵌入任务时,性能提升了2-3%,由于推理开销极小,因此认为这是值得的。该技术也被提及应用于Facebook的VGGT中。此前,Hacker News在两年前和一年前也讨论过这篇论文。

原文

View a PDF of the paper titled Vision Transformers Need Registers, by Timoth\'ee Darcet and 2 other authors

View PDF HTML (experimental)
Abstract:Transformers have recently emerged as a powerful tool for learning visual representations. In this paper, we identify and characterize artifacts in feature maps of both supervised and self-supervised ViT networks. The artifacts correspond to high-norm tokens appearing during inference primarily in low-informative background areas of images, that are repurposed for internal computations. We propose a simple yet effective solution based on providing additional tokens to the input sequence of the Vision Transformer to fill that role. We show that this solution fixes that problem entirely for both supervised and self-supervised models, sets a new state of the art for self-supervised visual models on dense visual prediction tasks, enables object discovery methods with larger models, and most importantly leads to smoother feature maps and attention maps for downstream visual processing.
From: Timothée Darcet [view email]
[v1] Thu, 28 Sep 2023 16:45:46 UTC (5,243 KB)
[v2] Fri, 12 Apr 2024 09:38:33 UTC (6,803 KB)
联系我们 contact @ memedata.com