Token Transformation Matters: Towards Faithful Post-hoc Explanation for Vision Transformer
Preprint
Abstract
While Transformers have rapidly gained popularity in various computer vision applications, post-hoc explanations of their internal mechanisms remain largely unexplored. Vision Transformers extract visual information by representing image regions as transformed tokens and integrating them via attention weights. However, existing post-hoc explanation methods merely consider these attention weights, neglecting crucial information from the transformed tokens, which fails to accurately illustrate the rationales behind the models' predictions. To incorporate the influence of token transformation into interpretation, we propose TokenTM, a novel post-hoc explanation method that utilizes our introduced measurement of token transformation effects. Specifically, we quantify token transformation effects by measuring changes in token lengths and correlations in their directions pre- and post-transformation. Moreover, we develop initialization and aggregation rules to integrate both attention weights and token transformation effects across all layers, capturing holistic token contributions throughout the model. Experimental results on segmentation and perturbation tests demonstrate the superiority of our proposed TokenTM compared to state-of-the-art Vision Transformer explanation methods.Keywords
All Related Versions
This publication has 26 references indexed in Scilit:
- Transformer Interpretability Beyond Attention Visualization2021
- Adaptive Cross-Modal Prototypes for Cross-Domain Visual-Language Retrieval2021
- End-to-End Object Detection with Transformers2020
- Understanding Individual Decisions of CNNs via Contrastive Backpropagation2019
- Explaining nonlinear classification decisions with deep Taylor decompositionPattern Recognition, 2017
- Layer-Wise Relevance Propagation for Neural Networks with Local Renormalization Layers2016
- Deep Residual Learning for Image Recognition2016
- Learning Deep Features for Discriminative Localization2016
- Visualizing Deep Convolutional Neural Networks Using Natural Pre-imagesInternational Journal of Computer Vision, 2016
- ImageNet Auto-Annotation with Segmentation PropagationInternational Journal of Computer Vision, 2014