From Images to Textual Prompts: Zero-shot VQA with Frozen Large Language Models

Jiaxian Guo, Junnan Li, Dongxu Li, Anthony Meng Huat Tiong, Boyang Li +2 more
12/21/2022
cs.CVcs.MM

Official code: salesforce/LAVIS (11,261 stars, BSD-3-Clause, last commit 2024-11-18).

Abstract

Large language models (LLMs) have demonstrated excellent zero-shot generalization to new language tasks. However, effective utilization of LLMs for zero-shot visual question-answering (VQA) remains challenging, primarily due to the modality disconnection and task disconnection between LLM and VQA task. End-to-end training on vision and language data may bridge the disconnections, but is inflexible and computationally expensive. To address this issue, we propose \emph{Img2Prompt}, a plug-and-play module that provides the prompts that can bridge the aforementioned modality and task disconnections, so that LLMs can perform zero-shot VQA tasks without end-to-end training. In order to provide such prompts, we further employ LLM-agnostic models to provide prompts that can describe image content and self-constructed question-answer pairs, which can effectively guide LLM to perform zero-shot VQA tasks. Img2Prompt offers the following benefits: 1) It can flexibly work with various LLMs to perform VQA. 2)~Without the needing of end-to-end training, it significantly reduces the cost of deploying LLM for zero-shot VQA tasks. 3) It achieves comparable or better performance than methods relying on end-to-end training. For example, we outperform Flamingo \cite{Deepmind:Flamingo2022} by 5.6\% on VQAv2. On the challenging A-OKVQA dataset, our method even outperforms few-shot methods by as much as 20\%.

View on arXivView PDF

Code Implementations(1)

salesforce/LAVISOfficial100%
BSD-3-Clause

LAVIS - A One-stop Library for Language-Vision Intelligence

11,2611,108Shell, PythonAug 24, 20221 years agoBSD-3-Clause
deep-learningdeep-learning-libraryimage-captioningmultimodal-datasetsmultimodal-deep-learning+6 more

Similar Papers

Cite this paper

@article{guo2022from,
  title  = {From Images to Textual Prompts: Zero-shot VQA with Frozen Large Language Models},
  author = {Jiaxian Guo and Junnan Li and Dongxu Li and Anthony Meng Huat Tiong and Boyang Li and Dacheng Tao and Steven C. H. Hoi},
  year   = {2022},
  eprint = {2212.10846},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.10846}
}

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

Discussion