What is visual question answering?
Visual question answering (VQA) is the task of producing an accurate natural language answer, given an image and a natural language question about that image.
Unlike image captioning, which describes an image in a generic sentence, VQA targets a specific question, so it needs a more detailed understanding of the image and more complex reasoning. It is the visual counterpart of text-based question answering.
- Topic
- Machine learning, models and training
- Also known as
- VQA
- Origin
- VQA task and dataset, 2015
How visual question answering works
- Vision and language encoders turn the image and the question into numerical representations.
- The two representations are fused in a common space; early models used element-wise multiplication.
- Early models chose from the 1000 most frequent answers; vision-language models take the question as a prompt and generate the answer as text.
- Open-ended answers are scored against the answers people gave to the same question.
In more detail
How is VQA scored?
The first VQA dataset gathered 10 answers for each question from different people. In the open-ended task an answer counts as 100% accurate if at least three people gave exactly that answer. Before comparison, all responses are lowercased and numbers are converted to digits; punctuation and articles are removed.
Commonly confused terms
| Term | How it differs |
|---|---|
| Vision-language model | A vision-language model is a type of model that processes images and text together. Visual question answering is one of the tasks such models solve; the same model can also be used for other tasks such as captioning. |
Why visual question answering matters for on-premises AI
One study paired each question with two similar images leading to different answers; models did significantly worse on this balanced dataset, showing they had exploited language patterns rather than the image. DocVQA contains 50,000 questions on more than 12,000 document images, where models fell well short of 94.36% human accuracy. Organisations should therefore test VQA on their own documents and images.
An insurer uses visual question answering on invoice and policy images uploaded by customers: staff ask for details such as the invoice date or total amount and the model reads the answer from the image; inconsistent answers go to staff for approval.
Common questions
What is the difference between visual question answering and image captioning?
Captioning describes an image in a generic sentence. Visual question answering answers a specific question, so it needs the relevant region of the image and more detailed reasoning.
Can VQA be used on documents?
Yes. On document images the model needs not only to read the text but to interpret it within the layout and structure of the document.
Why can VQA models go wrong?
Models can exploit language patterns instead of looking at the image; in the first VQA dataset the answers to yes or no questions were skewed towards yes. Balanced datasets and human review reduce this risk.
Related terms
- Vision-language model
- Question answering
- Multimodal model
- Image captioning
- Intelligent document processing
Sources
- VQA: Visual Question Answering, arXiv, 2015
- Making the V in VQA Matter: Elevating the Role of Image Understanding in Visual Question Answering, arXiv, 2016
- DocVQA: A Dataset for VQA on Document Images, arXiv, 2020
- Flamingo: a Visual Language Model for Few-Shot Learning, arXiv, 2022
In the glossary: Glossary, R to Z