2025-06-10 · 进阶 · 机器学习 · 计算机视觉

Vision Transformers Don't Need Trained Registers

本文提出了一种在测试时添加注册标记的方法,以改善视觉Transformer的性能和可解释性,而不需要重新训练模型。

更新于 2025-06-11。作者:Nick Jiang、Amil Dravid、Alexei Efros、Yossi Gandelsman。

中文摘要

我们研究了在视觉Transformer中之前已识别现象背后的机制——高范数标记的出现导致噪声注意力图。我们观察到,在多个模型(例如,CLIP、DINOv2)中,一组稀疏的神经元负责将高范数激活集中在异常标记上,从而导致不规则的注意力模式和下游视觉处理的退化。尽管现有的去除这些异常的解决方案涉及重新训练模型,并使用额外的学习注册标记,但我们利用我们的发现创造了一种无需训练的缓解这些伪影的方法。通过将高范数激活从我们发现的注册神经元转移到额外的未训练标记,我们可以模仿注册标记对已训练无注册标记的模型的影响。我们证明我们的方法产生了更干净的注意力和特征图,在多个下游视觉任务中提高了基线模型的表现,并达到了与显式训练注册标记的模型相当的结果。然后,我们将测试时间注册扩展到现成的视觉-语言模型,以改善它们的可解释性。我们的结果表明,测试时间注册在测试时有效地承担了注册标记的角色,为任何未包含注册标记发布的预训练模型提供了一种无需训练的解决方案。

英文摘要

We investigate the mechanism underlying a previously identified phenomenon in Vision Transformers -- the emergence of high-norm tokens that lead to noisy attention maps. We observe that in multiple models (e.g., CLIP, DINOv2), a sparse set of neurons is responsible for concentrating high-norm activations on outlier tokens, leading to irregular attention patterns and degrading downstream visual processing. While the existing solution for removing these outliers involves retraining models from scratch with additional learned register tokens, we use our findings to create a training-free approach to mitigate these artifacts. By shifting the high-norm activations from our discovered register neurons into an additional untrained token, we can mimic the effect of register tokens on a model already trained without registers. We demonstrate that our method produces cleaner attention and feature maps, enhances performance over base models across multiple downstream visual tasks, and achieves results comparable to models explicitly trained with register tokens. We then extend test-time registers to off-the-shelf vision-language models to improve their interpretability. Our results suggest that test-time registers effectively take on the role of register tokens at test-time, offering a training-free solution for any pre-trained model released without them.

解读

一句话总结

本文提出了一种在测试时添加注册标记的方法,以改善视觉Transformer的性能和可解释性,而不需要重新训练模型。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt