[Paper Review] From Images to Textual Prompts: Zero-shot VQA with Frozen Large Language Models
This paper proposes Img2LLM, a plug-and-play module that enables frozen large language models (LLMs) to perform zero-shot visual question answering (VQA) by generating synthetic image captions and corresponding question-answer pairs as prompts. The method achieves state-of-the-art zero-shot VQA performance—outperforming Flamingo by 5.6% on VQAv2 and few-shot methods by up to 20% on A-OKVQA—without end-to-end fine-tuning or specialized training.
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\%.
Motivation & Objective
- To address the modality and task disconnect between vision and language in zero-shot VQA using frozen LLMs.
- To eliminate the need for costly end-to-end fine-tuning of vision-language models.
- To enable flexible, low-cost deployment of LLMs for VQA by decoupling vision understanding from language generation.
- To improve zero-shot VQA generalization without relying on annotated few-shot exemplars.
Proposed method
- Img2LLM uses a vision-language model (e.g., BLIP) and a question-generation model to generate synthetic image captions and corresponding question-answer pairs from a test image and question.
- The synthetic QA pairs are used as prompts to guide the frozen LLM in answering the input question.
- The method dynamically generates prompts per test sample, avoiding reliance on static few-shot exemplars.
- It employs a prompt design that concatenates all captions first, followed by all QA pairs (CCC-QAQAQA), which outperforms interleaved designs.
- Caption selection is optimized using frequency-based filtering to improve prompt quality and reduce noise.
- The approach is LLM-agnostic and supports plug-and-play integration with any off-the-shelf LLM.
Experimental results
Research questions
- RQ1Can a frozen LLM perform zero-shot VQA without end-to-end fine-tuning by leveraging synthetic visual prompts?
- RQ2How does the prompt design (e.g., CCC-QAQAQA vs. CQA-CQA-CQA) affect VQA performance?
- RQ3Can dynamic, image- and question-specific synthetic QA pairs outperform static few-shot exemplars in zero-shot settings?
- RQ4What impact does caption selection strategy (e.g., max/min frequency) have on prompt quality and downstream VQA accuracy?
- RQ5How does the method compare to end-to-end trained models like Flamingo in zero-shot VQA benchmarks?
Key findings
- Img2LLM outperforms Flamingo by 5.6% on the VQAv2 validation set, achieving 59.5% accuracy with OPT-30B.
- On the challenging A-OKVQA benchmark, Img2LLM surpasses few-shot methods by up to 20% in accuracy.
- The CCC-QAQAQA prompt design significantly outperforms CQA-CQA-CQA, achieving 59.5% on VQAv2 and 41.8% on OK-VQA.
- Using question-relevant captions with filtering improves performance to 59.5% on VQAv2 and 41.8% on OK-VQA, compared to 57.1% and 39.8% with complete image captions.
- The method reduces inference overhead to 24.4% additional time on A100 GPUs, avoiding the 500K+ TPU-hour cost of end-to-end training like Flamingo.
- Ablation studies confirm that prompt design and caption selection strategy significantly impact performance, with min-frequency caption selection providing a performance boost.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.