Decomposing and Interpreting Image Representations via Text in ViTs Beyond CLIP

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Balasubramanian, Sriram, Basu, Samyadeep, Feizi, Soheil
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866929551948382208
author Balasubramanian, Sriram
Basu, Samyadeep
Feizi, Soheil
author_facet Balasubramanian, Sriram
Basu, Samyadeep
Feizi, Soheil
contents Recent work has explored how individual components of the CLIP-ViT model contribute to the final representation by leveraging the shared image-text representation space of CLIP. These components, such as attention heads and MLPs, have been shown to capture distinct image features like shape, color or texture. However, understanding the role of these components in arbitrary vision transformers (ViTs) is challenging. To this end, we introduce a general framework which can identify the roles of various components in ViTs beyond CLIP. Specifically, we (a) automate the decomposition of the final representation into contributions from different model components, and (b) linearly map these contributions to CLIP space to interpret them via text. Additionally, we introduce a novel scoring function to rank components by their importance with respect to specific features. Applying our framework to various ViT variants (e.g. DeiT, DINO, DINOv2, Swin, MaxViT), we gain insights into the roles of different components concerning particular image features. These insights facilitate applications such as image retrieval using text descriptions or reference images, visualizing token importance heatmaps, and mitigating spurious correlations. We release our code to reproduce the experiments at https://github.com/SriramB-98/vit-decompose
format Preprint
id arxiv_https___arxiv_org_abs_2406_01583
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Decomposing and Interpreting Image Representations via Text in ViTs Beyond CLIP
Balasubramanian, Sriram
Basu, Samyadeep
Feizi, Soheil
Computer Vision and Pattern Recognition
Machine Learning
I.5.1
Recent work has explored how individual components of the CLIP-ViT model contribute to the final representation by leveraging the shared image-text representation space of CLIP. These components, such as attention heads and MLPs, have been shown to capture distinct image features like shape, color or texture. However, understanding the role of these components in arbitrary vision transformers (ViTs) is challenging. To this end, we introduce a general framework which can identify the roles of various components in ViTs beyond CLIP. Specifically, we (a) automate the decomposition of the final representation into contributions from different model components, and (b) linearly map these contributions to CLIP space to interpret them via text. Additionally, we introduce a novel scoring function to rank components by their importance with respect to specific features. Applying our framework to various ViT variants (e.g. DeiT, DINO, DINOv2, Swin, MaxViT), we gain insights into the roles of different components concerning particular image features. These insights facilitate applications such as image retrieval using text descriptions or reference images, visualizing token importance heatmaps, and mitigating spurious correlations. We release our code to reproduce the experiments at https://github.com/SriramB-98/vit-decompose
title Decomposing and Interpreting Image Representations via Text in ViTs Beyond CLIP
topic Computer Vision and Pattern Recognition
Machine Learning
I.5.1
url https://arxiv.org/abs/2406.01583