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.
翻译:暂无翻译