Optimizing Relevance Maps of Vision Transformers Improves Robustness

Hila Chefer, Idan Schwartz, Lior Wolf
6/2/2022
cs.CV
transformer-attention

Official code: hila-chefer/RobustViT (134 stars, Jupyter Notebook, last commit 2022-11-22).

Abstract

It has been observed that visual classification models often rely mostly on the image background, neglecting the foreground, which hurts their robustness to distribution changes. To alleviate this shortcoming, we propose to monitor the model's relevancy signal and manipulate it such that the model is focused on the foreground object.

Show full abstract

This is done as a finetuning step, involving relatively few samples consisting of pairs of images and their associated foreground masks. Specifically, we encourage the model's relevancy map (i) to assign lower relevance to background regions, (ii) to consider as much information as possible from the foreground, and (iii) we encourage the decisions to have high confidence. When applied to Vision Transformer (ViT) models, a marked improvement in robustness to domain shifts is observed. Moreover, the foreground masks can be obtained automatically, from a self-supervised variant of the ViT model itself; therefore no additional supervision is required.

View on arXivView PDF

Code Implementations(1)

[NeurIPS 2022] Official PyTorch implementation of Optimizing Relevance Maps of Vision Transformers Improves Robustness. This code allows to finetune the explainability maps of Vision Transformers to enhance robustness.

13414Jupyter Notebook, PythonMay 26, 20224 years ago
explainabilityneuripsneurips-2022robustnessvision-transformer

Similar Papers

Cite this paper

@article{chefer2022optimizing,
  title  = {Optimizing Relevance Maps of Vision Transformers Improves Robustness},
  author = {Hila Chefer and Idan Schwartz and Lior Wolf},
  year   = {2022},
  eprint = {2206.01161},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.01161}
}

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/2206.01161.svg)](https://codeofpaper.com/paper/2206.01161)

Discussion