Zero-shot Translation of Attention Patterns in VQA Models to Natural Language

Leonard Salewski, A. Sophia Koepke, Hendrik P. A. Lensch, Zeynep Akata
11/8/2023
cs.CVcs.AIcs.CL

Official code: ExplainableML/ZS-A2T (3 stars, last commit 2023-07-28).

Abstract

Converting a model's internals to text can yield human-understandable insights about the model. Inspired by the recent success of training-free approaches for image captioning, we propose ZS-A2T, a zero-shot framework that translates the transformer attention of a given model into natural language without requiring any training. We consider this in the context of Visual Question Answering (VQA). ZS-A2T builds on a pre-trained large language model (LLM), which receives a task prompt, question, and predicted answer, as inputs. The LLM is guided to select tokens which describe the regions in the input image that the VQA model attended to. Crucially, we determine this similarity by exploiting the text-image matching capabilities of the underlying VQA model. Our framework does not require any training and allows the drop-in replacement of different guiding sources (e.g. attribution instead of attention maps), or language models. We evaluate this novel task on textual explanation datasets for VQA, giving state-of-the-art performances for the zero-shot setting on GQA-REX and VQA-X. Our code is available at: https://github.com/ExplainableML/ZS-A2T.

View on arXivView PDF

Code Implementations(1)

[GCPR 2023] Zero-shot Translation of Attention Patterns in VQA Models to Natural Language

30Jul 28, 20233 years ago
attention-rolloutgcpr-2023gqagqa-rexllm+5 more

Similar Papers

Cite this paper

@article{salewski2023zeroshot,
  title  = {Zero-shot Translation of Attention Patterns in VQA Models to Natural Language},
  author = {Leonard Salewski and A. Sophia Koepke and Hendrik P. A. Lensch and Zeynep Akata},
  year   = {2023},
  eprint = {2311.05043},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.05043v1}
}

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

Discussion