I Vision Transformer non hanno bisogno di registri addestrati.
Vision Transformers Don't Need Trained Registers
June 9, 2025
Autori: Nick Jiang, Amil Dravid, Alexei Efros, Yossi Gandelsman
cs.AI
Abstract
Indaghiamo il meccanismo alla base di un fenomeno precedentemente identificato nei Vision Transformers: l'emergenza di token ad alta norma che portano a mappe di attenzione rumorose. Osserviamo che in diversi modelli (ad esempio, CLIP, DINOv2), un insieme sparso di neuroni è responsabile della concentrazione di attivazioni ad alta norma su token anomali, portando a schemi di attenzione irregolari e degradando l'elaborazione visiva a valle. Mentre la soluzione esistente per rimuovere questi outlier prevede il riaddestramento dei modelli da zero con l'aggiunta di token di registro appresi, utilizziamo le nostre scoperte per creare un approccio privo di addestramento per mitigare questi artefatti. Spostando le attivazioni ad alta norma dai neuroni di registro da noi scoperti in un token aggiuntivo non addestrato, possiamo mimare l'effetto dei token di registro su un modello già addestrato senza registri. Dimostriamo che il nostro metodo produce mappe di attenzione e feature più pulite, migliora le prestazioni rispetto ai modelli di base in diverse attività visive a valle e ottiene risultati comparabili a modelli addestrati esplicitamente con token di registro. Estendiamo quindi i registri al momento del test a modelli visione-linguaggio pronti all'uso per migliorarne l'interpretabilità. I nostri risultati suggeriscono che i registri al momento del test assumono efficacemente il ruolo dei token di registro durante il test, offrendo una soluzione priva di addestramento per qualsiasi modello pre-addestrato rilasciato senza di essi.
English
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.