研究揭示视觉 Transformer 全局信息泄漏机制:阻断 patch 对 [CLS] 的注意力可修复局部特征
Vision Transformers Need Separated Local and Global Information Processing
做分割或目标检测的朋友可以看看,DINO 这类自监督 ViT 训练到一定规模后局部特征会变差,这篇论文把根因找到了,不用重训,动一下注意力矩阵就能修。
一篇 arXiv 论文研究自监督视觉 Transformer(ViT)训练规模扩大后局部特征退化的问题:无信息的背景 patch 会存储全局类别信息。作者定位到根因是局部 patch token 通过自注意力直接读取全局 [CLS] token 的信息,并发现这种直接读取发生在 high-norm token 和 attention sink 出现之前。
论文给出两条修复路径:直接从已损坏的预训练模型中移除 patch-to-[CLS] 注意力通路,可提升目标发现和零样本分割等密集任务的性能;或用校准图像对 value 投影矩阵做手术,或在不用 register 的情况下微调 ViT 以压缩 patch 到 [CLS] 注意力的长尾。实验显示限制 patch-to-[CLS] 注意力能一致地修复表现全局信息汇行为的 ViT。
Vision Transformers Need Separated Local and Global Information Processing
Self-supervised vision transformers have become common foundation models for several applications. However, when trained at scale, these models suffer from degraded local feature representations, in which often uninformative image-background patches store global class information. While several interventions have been proposed to detect and alleviate this problem, the underlying mechanism responsible for the formation of these global tokens remains underexplored. In this work, we investigate the root cause of this information leakage from the global [CLS] token to local patch tokens. Our analysis identifies local patch tokens' direct readout of global [CLS] information through self-attention as one of the direct causes of this phenomenon. We show that direct [CLS] readout precedes the emergence of high-norm tokens and attention sinks. Preventing the readout can remarkably enhance the local feature quality of vision transformers. Simply removing the problematic pathway from corrupted pretrained models improves performance on several dense tasks, including object discovery and zero-shot segmentation. We show that it is possible to further clean corrupted pretrained models through (i) value-projection-matrix surgery using calibration images or (ii) fine-tuning vision transformers (ViTs) to minimize the long tail of patch-to-[CLS] attention without using registers. Our experiments show that restricting patch-to-[CLS] attention consistently repairs ViTs exhibiting global-information-sink behavior and improves their performance on dense downstream tasks.
This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include ViT, attention sink, self-supervised learning.
Source attribution: curated from arXiv cs.AI (@Mingze Ma, Ravi Garg, Simon Lucey).