Skip to main content
QUICK REVIEW

[Paper Review] PromptCap: Prompt-Guided Task-Aware Image Captioning

Yushi Hu, Hang Hua|arXiv (Cornell University)|Nov 15, 2022
Multimodal Machine Learning ApplicationsComputer Science29 citations
TL;DR

PromptCap crafts question-aware captions guided by natural language prompts to bridge images and black-box LMs, achieving state-of-the-art results on knowledge-based VQA without end-to-end LM fine-tuning.

ABSTRACT

Knowledge-based visual question answering (VQA) involves questions that require world knowledge beyond the image to yield the correct answer. Large language models (LMs) like GPT-3 are particularly helpful for this task because of their strong knowledge retrieval and reasoning capabilities. To enable LM to understand images, prior work uses a captioning model to convert images into text. However, when summarizing an image in a single caption sentence, which visual entities to describe are often underspecified. Generic image captions often miss visual details essential for the LM to answer visual questions correctly. To address this challenge, we propose PromptCap (Prompt-guided image Captioning), a captioning model designed to serve as a better connector between images and black-box LMs. Different from generic captions, PromptCap takes a natural-language prompt to control the visual entities to describe in the generated caption. The prompt contains a question that the caption should aid in answering. To avoid extra annotation, PromptCap is trained by examples synthesized with GPT-3 and existing datasets. We demonstrate PromptCap's effectiveness on an existing pipeline in which GPT-3 is prompted with image captions to carry out VQA. PromptCap outperforms generic captions by a large margin and achieves state-of-the-art accuracy on knowledge-based VQA tasks (60.4% on OK-VQA and 59.6% on A-OKVQA). Zero-shot results on WebQA show that PromptCap generalizes well to unseen domains.

Motivation & Objective

  • Motivate knowledge-based VQA where external world knowledge is required to answer questions.
  • Address the gap where generic captions miss crucial visual details needed for VQA with LMs.
  • Propose a prompt-conditioned captioning model to describe task-relevant visual content.
  • Develop a data synthesis and filtering pipeline using GPT-3 to train the captioner without extra annotations.
  • Evaluate PromptCap in combination with GPT-3 for VQA and assess generalization to new domains.

Proposed method

  • Introduce PromptCap that generates captions conditioned on a natural language prompt containing the target question.
  • Synthesize training data by converting VQA question-answer pairs into prompt-guided captioning examples using GPT-3 in-context learning.
  • Filter GPT-3 generated captions with a soft VQA accuracy-based mechanism to select high-quality training samples.
  • Fine-tune an OFA-based captioning model to produce prompt-guided captions from image inputs and prompts.
  • Use PromptCap captions as inputs to GPT-3 in a PICa-style pipeline for VQA via in-context learning (no LM fine-tuning).
  • Improve GPT-3 in-context learning by selecting in-context examples via CLIP-based similarity to the test instance.

Experimental results

Research questions

  • RQ1Can question-aware, prompt-guided captions improve the ability of black-box LMs to perform knowledge-based VQA?
  • RQ2Do prompt-guided captions outperform generic captions in enabling GPT-3 to answer VQA questions?
  • RQ3How well does PromptCap generalize to unseen domains such as WebQA without task-specific fine-tuning?
  • RQ4What is the contribution of GPT-3, the prompt design, and in-context example selection to overall VQA performance?

Key findings

  • PromptCap captions, when paired with GPT-3, achieve state-of-the-art results on OK-VQA (60.4% accuracy) and A-OKVQA (59.6% direct-answer; 73.1% multiple-choice).
  • PromptCap consistently improves over a generic OFA caption (OFA-Cap) by 3.8% on OK-VQA, 5.3% on A-OKVQA, and 9.2% on VQAv2.
  • GPT-3 provides large gains on knowledge-based VQA over alternative LMs (e.g., Flan-T5-XXL), while gains on standard VQAv2 are smaller.
  • PromptCap generalizes to WebQA in 8-shot in-context learning, outperforming baselines with oracle sources on image queries.
  • CLIP-based retrieval of similar in-context examples further improves GPT-3 VQA performance.
  • Qualitative analysis shows PromptCap can elicit question-relevant details (e.g., brand, color) that enable correct GPT-3 answers, whereas generic captions often fail.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.