Improving Image Clustering with Artifacts Attenuation via Inference-Time Attention Engineering

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Nakamura, Kazumoto, Nozawa, Yuji, Lin, Yu-Chieh, Nakata, Kengo, Ng, Youyang
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866917796166762496
author Nakamura, Kazumoto
Nozawa, Yuji
Lin, Yu-Chieh
Nakata, Kengo
Ng, Youyang
author_facet Nakamura, Kazumoto
Nozawa, Yuji
Lin, Yu-Chieh
Nakata, Kengo
Ng, Youyang
contents The goal of this paper is to improve the performance of pretrained Vision Transformer (ViT) models, particularly DINOv2, in image clustering task without requiring re-training or fine-tuning. As model size increases, high-norm artifacts anomaly appears in the patches of multi-head attention. We observe that this anomaly leads to reduced accuracy in zero-shot image clustering. These artifacts are characterized by disproportionately large values in the attention map compared to other patch tokens. To address these artifacts, we propose an approach called Inference-Time Attention Engineering (ITAE), which manipulates attention function during inference. Specifically, we identify the artifacts by investigating one of the Query-Key-Value (QKV) patches in the multi-head attention and attenuate their corresponding attention values inside the pretrained models. ITAE shows improved clustering accuracy on multiple datasets by exhibiting more expressive features in latent space. Our findings highlight the potential of ITAE as a practical solution for reducing artifacts in pretrained ViT models and improving model performance in clustering tasks without the need for re-training or fine-tuning.
format Preprint
id arxiv_https___arxiv_org_abs_2410_04801
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Improving Image Clustering with Artifacts Attenuation via Inference-Time Attention Engineering
Nakamura, Kazumoto
Nozawa, Yuji
Lin, Yu-Chieh
Nakata, Kengo
Ng, Youyang
Computer Vision and Pattern Recognition
Machine Learning
The goal of this paper is to improve the performance of pretrained Vision Transformer (ViT) models, particularly DINOv2, in image clustering task without requiring re-training or fine-tuning. As model size increases, high-norm artifacts anomaly appears in the patches of multi-head attention. We observe that this anomaly leads to reduced accuracy in zero-shot image clustering. These artifacts are characterized by disproportionately large values in the attention map compared to other patch tokens. To address these artifacts, we propose an approach called Inference-Time Attention Engineering (ITAE), which manipulates attention function during inference. Specifically, we identify the artifacts by investigating one of the Query-Key-Value (QKV) patches in the multi-head attention and attenuate their corresponding attention values inside the pretrained models. ITAE shows improved clustering accuracy on multiple datasets by exhibiting more expressive features in latent space. Our findings highlight the potential of ITAE as a practical solution for reducing artifacts in pretrained ViT models and improving model performance in clustering tasks without the need for re-training or fine-tuning.
title Improving Image Clustering with Artifacts Attenuation via Inference-Time Attention Engineering
topic Computer Vision and Pattern Recognition
Machine Learning
url https://arxiv.org/abs/2410.04801