Token Transformation Matters: Towards Faithful Post-Hoc Explanation for Vision Transformer

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.

Cite

Text

Wu et al. "Token Transformation Matters: Towards Faithful Post-Hoc Explanation for Vision Transformer." Conference on Computer Vision and Pattern Recognition, 2024. doi:10.1109/CVPR52733.2024.01039

Markdown

[Wu et al. "Token Transformation Matters: Towards Faithful Post-Hoc Explanation for Vision Transformer." Conference on Computer Vision and Pattern Recognition, 2024.](https://mlanthology.org/cvpr/2024/wu2024cvpr-token/) doi:10.1109/CVPR52733.2024.01039

BibTeX

@inproceedings{wu2024cvpr-token,
  title     = {{Token Transformation Matters: Towards Faithful Post-Hoc Explanation for Vision Transformer}},
  author    = {Wu, Junyi and Duan, Bin and Kang, Weitai and Tang, Hao and Yan, Yan},
  booktitle = {Conference on Computer Vision and Pattern Recognition},
  year      = {2024},
  pages     = {10926-10935},
  doi       = {10.1109/CVPR52733.2024.01039},
  url       = {https://mlanthology.org/cvpr/2024/wu2024cvpr-token/}
}