VISION DIFFMASK: Faithful Interpretation of Vision Transformers with Differentiable Patch Masking

Angelos Nalmpantis, Apostolos Panagiotopoulos, John Gkountouras, Konstantinos Papakostas, Wilker Aziz
4/13/2023
9 citations
cs.CVcs.AIcs.LG
transformer-attention

Official code: AngelosNal/Vision-DiffMask (32 stars, Jupyter Notebook, MIT, PyTorch, last commit 2024-03-05).

Abstract

The lack of interpretability of the Vision Transformer may hinder its use in critical real-world applications despite its effectiveness. To overcome this issue, we propose a post-hoc interpretability method called VISION DIFFMASK, which uses the activations of the model's hidden layers to predict the relevant parts of the input that contribute to its final predictions.

Show full abstract

Our approach uses a gating mechanism to identify the minimal subset of the original input that preserves the predicted distribution over classes. We demonstrate the faithfulness of our method, by introducing a faithfulness task, and comparing it to other state-of-the-art attribution methods on CIFAR-10 and ImageNet-1K, achieving compelling results. To aid reproducibility and further extension of our work, we open source our implementation: https://github.com/AngelosNal/Vision-DiffMask

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

Official PyTorch implementation of Vision DiffMask, a post-hoc interpretation method for vision models.

323Jupyter Notebook, PythonMay 4, 20222 years agoMIT
computer-visiondeep-learninginterpretabilitypytorchvision-transformer

Similar Papers

Cite this paper

@article{nalmpantis2023vision,
  title  = {VISION DIFFMASK: Faithful Interpretation of Vision Transformers with Differentiable Patch Masking},
  author = {Angelos Nalmpantis and Apostolos Panagiotopoulos and John Gkountouras and Konstantinos Papakostas and Wilker Aziz},
  year   = {2023},
  eprint = {2304.06391},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.06391v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2304.06391.svg)](https://codeofpaper.com/paper/2304.06391)

Discussion