TL;DR
Visual question answering (VQA) asks a machine a free-form question about a photo and expects a short natural-language answer, such as "yellow" for "What color is the banana?". The paper by Agrawal, Lu, Antol and colleagues defines this task, builds a large dataset for it from about 200,000 MS COCO photos plus 50,000 cartoon-style abstract scenes, and sets baselines and a neural model that combines a CNN image encoder with an LSTM question encoder.
Builds on: Convolutional Neural Network, Long Short-Term Memory, Word Embedding, Transfer Learning · Leads to: Vision-Language Model, BLIP-2, CLIP
Why it mattered
The task became a standard benchmark for multimodal AI. Systems that answer questions about images need to recognise objects, read text in a scene, count, and use common sense, all at once. Later vision-language models report VQA accuracy as a headline number, and the VQA challenge, which the authors launched with an annual workshop, gave the field a shared leaderboard with a fixed test split.
The paper also changed how people judged such systems. Open-ended answers are hard to score, so the authors designed a scoring rule based on how many human annotators gave the same answer. That rule let the community track progress without a human judge for every answer.
The problem
Before this paper, most visual question answering work used small or synthetic settings. One dataset answered questions from a closed list of 16 colours or 894 object categories. Another generated questions from templates over a fixed vocabulary of objects and relations. These settings were too narrow to show whether a model understood images in a general way.
Image captioning was the nearest large task, but a caption is generic. A caption such as "a man riding a wave on a surfboard" does not say what colour the board is or how many people stand on the beach. Captions help with some questions, and the paper measures how much, but they cannot replace the image.
The paper therefore asked for three things: free-form questions that need the image, a dataset large enough to train neural networks, and an automatic score that does not depend on a fixed answer list. Everything in the lesson follows from those three goals.
How it works
The paper has two parts that a reader must follow in order: how the dataset is built and scored, then how the baseline model reads an image and a question. Here is the model's path for one example, the image of a banana bowl and the question "What color is the banana?".
- Input. The model receives one image and one question as words. The image is a photograph from MS COCO.
- Image encoder. The image goes through a pretrained VGG convolutional network. Its last hidden layer gives 4096 numbers that summarise the whole scene. The VGG weights stay frozen during training. Check: the output has 4096 entries, one per hidden unit.
- Normalise the image vector. The 4096 numbers are scaled so that their length (the square root of the sum of squares) is 1. This is the "norm I" variant, which the ablations show helps a little. Check: squaring the scaled numbers and adding them gives 1.
- Project the image. A linear layer followed by tanh maps the 4096 numbers to 1024 numbers, so the image lives in the same size of space as the question. Check: the output has 1024 entries, each between minus 1 and 1.
- Question words to vectors. Each word of the question is looked up in a learned table and turned into a 300-number vector. A linear layer and tanh then transform it. "What", "color", "is", "the", "banana" become five 300-number vectors.
- Read the question. A two-layer LSTM reads the five vectors one word at a time. For each of the two layers it keeps a cell state and a hidden state of 512 numbers each, so it has 2 times 2 times 512 equals 2048 numbers. A linear layer and tanh turn these into 1024 numbers. Check: the result has 1024 entries, the same size as the projected image.
- Fuse. The two 1024-number vectors are multiplied entry by entry. Entry 3 of the image vector multiplies entry 3 of the question vector, and so on. This gives one 1024-number joint vector.
- Classify. The joint vector goes through a small multilayer perceptron with two hidden layers of 1000 tanh units each, with dropout of 0.5, and then a softmax over the 1000 most frequent answers in the training data.
- Output. The answer with the highest probability is returned. For this example it is most likely "yellow". The model is trained with cross-entropy loss against the human answers.
flowchart LR I["Image"] --> V["VGG network<br/>4096 numbers"] V --> N["Scale to length 1"] N --> P["Linear layer + tanh<br/>1024 numbers"] Q["Question words"] --> E["Word vectors<br/>300 each"] E --> L["Two-layer LSTM<br/>2048 numbers"] L --> F["Linear layer + tanh<br/>1024 numbers"] P --> M["Entry-wise product<br/>1024 numbers"] F --> M M --> C["MLP: 2 hidden layers<br/>1000 units, dropout 0.5"] C --> S["Softmax over 1000 answers"]
Two design choices are worth noticing. The question and the image are encoded independently and only meet at step 7, which the paper calls late fusion. And the model answers from a fixed list of 1000 answers, which covers 82.67 percent of the training and validation answers. Answers outside the list cannot be produced.
The math
The paper uses three formulas: the accuracy score, the fusion, and the output distribution. Each mirrors a part of the walkthrough.
For a predicted answer and an image-question pair with ten human answers, the accuracy is the number of humans who gave , divided by 3, and clipped at 1. An answer that at least three humans gave is therefore fully correct.
Step 1 in symbols: the accuracy score
Write for the number of the ten annotators who gave answer . Then
The paper averages this over all ways of dropping one annotator, so that the human and machine scores are computed on the same footing. The plot shows the shape of the rule. Two annotators give a score of two thirds, and three or more give the full score.
- score
Step 3 in symbols: scaling the image vector
Let be the VGG activations. The normalised version is , where is the length of . The paper reports that this scaling adds 0.16 points to open-ended accuracy in its ablation.
Steps 4 to 7 in symbols: fusion
Let be the question vector after the LSTM's linear layer and tanh, and let be the projected image vector. Fusion is
where means entry-wise multiplication and are the weights and bias of the image layer. A tiny check with three numbers: if and , then . Each entry is the product of the two entries in the same position.
Concatenation would instead stack the two vectors into a 2048-number vector. The paper tested this and found it 0.95 points worse on open-ended accuracy.
Step 8 in symbols: the output distribution
The classifier produces one score for each of the answers. The softmax turns them into probabilities:
For a toy case with three answers and scores , the sum of exponentials is , so the probabilities are about , and . They add to 1, and the largest one is chosen.
Results
The paper's main results are on the VQA real-image split. The numbers below are from its Table II (test-dev) and Table I (human accuracy). Accuracies are percentages.
| Model (open-ended, test-dev) | All | Yes/No | Number | Other |
|---|---|---|---|---|
| Always answer "yes" | 29.66 | 70.81 | 0.39 | 1.15 |
| Nearest neighbour | 42.70 | 71.89 | 24.36 | 21.94 |
| Bag-of-words question only | 48.09 | 75.66 | 36.70 | 27.14 |
| Image only (VGG) | 28.13 | 64.01 | 0.42 | 3.77 |
| LSTM question only | 48.76 | 78.20 | 35.68 | 26.59 |
| LSTM question + image | 53.74 | 78.94 | 35.24 | 36.42 |
| Deeper LSTM question + normalised image | 57.75 | 80.50 | 36.77 | 43.08 |
Three findings follow from the table. First, the image alone is weak: it scores below the constant "yes" answer on open-ended questions, because most questions need the question text. Second, the question alone is strong: a language-only LSTM scores 48.76, which beats the nearest-neighbour baseline. The authors attribute this to statistical regularities in the questions. For instance "What color is the banana?" is often answered "yellow" without looking. Third, the image adds the most on "Other" questions, where the LSTM question-only model moves from 26.59 to 36.42 when the image is added.
On test-standard, the best model reaches 58.16 open-ended and 63.09 multiple-choice. Humans given the image answer 83.30 percent of real-image questions correctly (Table I), so the model remains far below people. The ablations show that element-wise fusion beats concatenation, that a vocabulary of 1000 answers beats 500, and that truncating the rare question words changes results by only 0.24 points or less.
The limits are clear in the paper's own analysis. Counting is weak: the model does well on common objects such as "tennis" and "bathroom" but struggles with the answers "2", "1" and "3", and with higher counts it is worse still. The scoring rule matches answers as strings after simple normalisation, so two words with the same meaning count as different answers.
Reading guide
The paper has a long dataset section, so read it in this order.
- Introduction and Section I. The motivation is that VQA needs several AI skills at once. You need Convolutional Neural Network features for recognition and Long Short-Term Memory for the question, which you can learn from this lesson's walkthrough.
- Section II, related work. Skim it. The key contrast is with Image Captioning, which produces generic descriptions, and with the earlier closed-world VQA datasets.
- Section III, dataset collection and scoring. Read the accuracy paragraph closely; it is the Math section above. The question-collection interface is a design choice worth noticing, not a prerequisite.
- Section IV, analysis. The answer-length and yes-no statistics use only counting. The commonsense study is about human perception, not the model.
- Section V, baselines and methods. This is the model. Map each paragraph to the steps above. It uses Word Embedding for the question words, Softmax for the output and Cross-Entropy Loss for training, with Dropout in the classifier. The image network is the VGG model, and Transfer Learning explains why its weights are reused.
- Section V-C, results. Compare Table II with the ablation Table IV. The accuracy scale is the one defined in Section III.
- Section VI and the appendix. The challenge and workshop are context. Appendix I compares captions with questions, and it is the best place to see why the paper argues that VQA needs more than captions.
Check yourself
QuestionAn answer is given by 2 of the 10 annotators. Using the formula in the Math section, what is its VQA accuracy? Give a decimal to three places.Show answer
Compute . Two annotators is below the three needed for full credit, so the score is the fraction 2 over 3.
QuestionFuse the image vector with the question vector by entry-wise multiplication. What is the result?Show answer
Multiply entry by entry: , , . The result is . Each entry depends only on the two entries in its own position, which is why the two vectors must have the same length.
QuestionThe paper found that element-wise fusion beats concatenation. Give one reason the design choice matters for a model that must answer from 1000 fixed answers.Show answer
Element-wise fusion keeps the joint vector at 1024 numbers, so the classifier that follows has the same size as before. Concatenation makes it 2048 numbers and doubles the parameters of the next fully connected layer, which the paper reports as a small loss in accuracy. The fused vector is a product of image and question features in one shared space, so the classifier must learn from interactions rather than from two separate blocks.
QuestionA visually impaired user asks a model 'Is the stove on?' The model answers 'yes' with no look at the image. Using the statistics in the paper, why is this a warning sign?Show answer
The paper reports that 58.83 percent of yes-no answers on real images are "yes", so always answering "yes" is a strong default. The constant-"yes" baseline scores 70.81 on yes-no questions with no image at all. A model that answers "yes" without looking has learned the prior, not the scene, and it will be wrong whenever the stove is off. The paper's point is that answers must depend on the image.
Sources
- Agrawal, Lu, Antol, Mitchell, Zitnick, Batra, Parikh, "VQA: Visual Question Answering" (2015): arXiv:1505.00468
- DOI record: 10.48550/arXiv.1505.00468
- VQA dataset and challenge: visualqa.org