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
SpectralKD: A Unified Framework for Interpreting and Distilling Vision Transformers via Spectral Analysis
College of Computer Science and Technology, Zhejiang University(浙江大学计算机科学与技术学院);School of Aeronautics and Astronautics, Zhejiang University(浙江大学航空航天学院)
Mechanistic Interpretability of Fine-Tuned Vision Transformers on Distorted Images: Decoding Attention Head Behavior for Transparent and Trustworthy AI
Krembil Research Institute, University Health Network(肯贝尔研究所,大学健康网络)
Boosting Generative Adversarial Transferability with Self-supervised Vision Transformer Features
School of Cyberspace Science and Technology, Beijing Institute of Technology(网络安全科学与技术学院,北京理工大学);School of Computer Science and Technology, Beijing Institute of Technology(计算机科学与技术学院,北京理工大学)
D-Scope: Decomposing and Steering Diffusion Transformers with Sparse Autoencoders
Pivotal Research;Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);Schmidt Sciences(施密特科学);Stanford University(斯坦福大学);University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)
Dynamic Accumulated Attention Map for Interpreting Evolution of Decision-Making in Vision Transformer
Griffith University(格里菲斯大学);Institute for Integrated and Intelligent Systems, Griffith University(格里菲斯大学集成智能系统研究所);Shaanxi University of Science and Technology(陕西科技大学)