Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Stacked Attention Networks for Image Question Answering

Stacked attention layers let image QA models answer questions in several reasoning steps

  • Problem Image QA models squeeze the whole image into one global vector, so answers that hinge on a few small regions get lost. Some questions also need several reasoning steps over the image.
  • Method Stacked Attention Networks (SANs) run several attention layers over VGGNet region features. Each layer uses the question to weight the regions, then adds that summary to a running query that predicts the answer.
  • Results SAN(2, CNN) reaches 61.6 accuracy on COCO-QA, against 55.0 for IMG-CNN.

Why one global feature falls short

Many image QA models condense the image into one global CNN feature, encode the question with an LSTM, and combine the two to infer an answer. This arrangement tends to miss answers that hinge on a small set of fine-grained regions, because the single vector mixes in content that is irrelevant to the answer.

The running example asks what sits in a basket on a bicycle, a question that names several objects and a relation among them. Answering it means first finding the objects and the relation the question refers to, then removing irrelevant objects until one region remains. The study therefore asks whether attention repeated over image regions can carry out that narrowing step by step.

Region features from a fixed VGGNet

The image side uses VGGNet as its encoder, and its parameters stay fixed while the SAN is trained. Features are taken from the last pooling layer rather than from the last inner product layer used in earlier models, because the pooling output keeps the spatial layout of the image.

A single-layer perceptron maps each region vector to the dimension of the question vector, giving the matrix \( v_I = \tanh(W_I f_I + b_I) \), whose i-th column is the vector of region i.

Two question encoders

The question is encoded either by an LSTM or by a CNN, and the study evaluates both inside the SAN. Each one-hot word vector is embedded by \( x_t = W_e q_t \), and the LSTM updates a memory cell through input, forget and output gates at each step. The final hidden state of the LSTM serves as the question vector, \( v_Q = h_T \).

The CNN variant applies convolution filters with window sizes one, two and three over the word embeddings, using tanh activations. Max pooling over time is applied to each feature map, and the pooled vectors are concatenated into \( v_Q = h \). On DAQUAR and COCO-QA the LSTM and word embedding dimension is 500, and the CNN filters are 128, 256 and 256, giving a 640-dimensional question vector.

On VQA the LSTM and the CNN are both enlarged to double their size.

One attention pass over regions

Given \( v_I \) and \( v_Q \), one layer computes \( h_A = \tanh(W_{I,A} v_I \oplus (W_{Q,A} v_Q + b_A)) \) and then \( p_I = \mathrm{softmax}(W_P h_A + b_P) \), which yields one attention probability per image region. Here \( \oplus \) adds the vector to every column of the matrix, so the k by m product \( W_{I,A} v_I \) receives the same question term at each region.

The attended image summary is the weighted sum \( \tilde v_I = \sum_i p_i v_i \), and the refined query is \( u = \tilde v_I + v_Q \). Because the weights are produced from the question, the summary leans toward regions relevant to the question instead of averaging all regions equally, which the authors present as the advantage over combining a global image vector with the question.

Stacking layers and predicting the answer

The layer summary \( \tilde v_I^k = \sum_i p_i^k v_i \) is added to the previous query, \( u^k = \tilde v_I^k + u^{k-1} \), so each layer adds visual evidence to the running query rather than replacing it.

After K such steps, the final query \( u^K \) predicts the answer through \( p_{ans} = \mathrm{softmax}(W_u u^K + b_u) \). In the example, the first layer spreads weight over the regions for basket, bicycle and sitting in, and the second layer concentrates on the dogs region. The experiments use one or two attention layers, since the authors found that three or more did not further improve performance.

Four benchmarks and their protocols

DAQUAR-ALL has 6,795 training questions and 5,673 test questions on mainly indoor scenes, and multi-word answers are excluded, which keeps about 90% of the data. DAQUAR-REDUCED is limited to 37 object categories and 25 test images, with 3,876 training samples and 297 test samples, and keeps 98% of the original data.

Its four question types make up 70%, 7%, 17% and 6% of the data, and every answer is a single word. VQA has human-labeled questions on COCO images with ten answers per question, 248,349 training questions and 121,512 validation questions. The top 1000 answers cover 82.67% of all answers, and the authors split the validation set into val1 and val2, with val2 held out for local testing.

The best model is also evaluated on the official test server.

On VQA, an answer receives min(number of matching human labels / 3, 1) credit. All models are trained with stochastic gradient descent with momentum 0.9 and batch size 100, with the learning rate chosen by grid search, and gradient clipping and dropout are applied.

Accuracy against prior models

On DAQUAR-ALL, the two-layer SANs exceed the two strongest baselines, IMG-CNN and Ask-Your-Neurons, by 5.9% and 7.6% absolute accuracy. In Table 1, SAN(2, CNN) scores 29.3 against 23.4 for IMG-CNN.

On DAQUAR-REDUCED, SAN(2, LSTM) is 6.5%, 10.4%, 11.5% and 33.5% ahead in accuracy of IMG-CNN, 2-VIS+BLSTM, Ask-Your-Neurons and Multi-World, respectively. Its accuracy is 46.2, against 39.7 for IMG-CNN in the table.

On COCO-QA, SAN(2, CNN) reaches 61.6 accuracy against 55.0 for IMG-CNN. The two-layer SANs lead the best baselines, IMG-CNN and the IMG+BOW and 2-VIS+BLSTM models, by 5.1% and 6.6% in accuracy.

On the VQA test server, SAN(2, CNN) scores 58.7 All on test-dev, against 53.7 for LSTM Q+I, and 58.9 All on test-std. The text places the test-dev gain over LSTM Q+I at 4.8% absolute.

On the authors' own val2 partition, SAN(2, CNN) reaches 57.6 against 56.9 for SAN(1, CNN), and this partition reports only SAN variants without baselines. The LSTM and CNN question models give similar results for the two-layer SAN across the data sets.

Gains by question type

On Color, its accuracy is 57.9, against 52.0 for IMG+BOW and 49.5 for 2-VIS+BLSTM.

On VQA, the largest gain over LSTM Q+I is on the Other type, where SAN(2, CNN) scores 46.1 against 36.4, a 9.7% improvement. Number improves by 1.4% and Yes/No by 0.4%, and the authors note that Other covers questions like those of the Color, Objects and Location types in COCO-QA.

Second layer versus one layer

With the same question model, the two-layer variant has the higher accuracy on DAQUAR-ALL, DAQUAR-REDUCED, COCO-QA and the VQA partition. The DAQUAR-ALL gap is small, 28.9 against 29.3 for the LSTM variants and 29.2 against 29.3 for the CNN variants.

The per-type gains from one to two layers are 2.2% on Color, 1.3% on Location, 1.0% on Objects and 0.4% on Number in COCO-QA. On VQA they are 1.4% on Other and 0.2% on Number, with Yes/No flat. The authors also tried three or more attention layers and found no further improvement over two.

Attention maps and error types

The authors visualize attention on sample COCO-QA test images, up-sampling each 14×14 attention map and smoothing it with a Gaussian filter to the 448×448 image size. In the first layer, attention is spread over many objects tied to the question, while in the second layer it concentrates on the region that leads to the answer. For the horn colour question, the first layer recognizes a woman, and the second layer focuses on her head and yields the answer red.

The authors sampled 100 COCO-QA test images where the SAN makes mistakes and group the errors as 22% with attention on wrong regions, 42% with attention on the right region but a wrong answer, 31% with ambiguous answers and 5% with clearly wrong labels. One example predicts vase where the label is pot, which the authors consider visually reasonable.

Limitations

On VQA the SAN improves Yes/No questions only slightly, which the authors attribute to Yes/No answers depending mainly on the question rather than on visual detail. Three or more attention layers are mentioned only as giving no further improvement, and no table for that setting is given.

All region features come from one fixed VGGNet, so the image encoder is not varied in the reported experiments. The error analysis covers only 100 sampled COCO-QA test images. The attention maps are qualitative examples on sample images, and the paper does not score them against region annotations.

Paper info

Authors
Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, Alex Smola
Venue
arXiv · Preprint
First published
2015-11-7
Added
2026-11-12
Updated
2016-1-26
Version
v2
arXiv
1511.02274
Category
cs.LG · cs.CL · cs.CV · cs.NE
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, Alex Smola (2015). Stacked Attention Networks for Image Question Answering. arXiv:1511.02274v2. https://arxiv.org/abs/1511.02274v2

BibTeX
@misc{yang2015stacked,
  title = {{Stacked Attention Networks for Image Question Answering}},
  author = {Zichao Yang and Xiaodong He and Jianfeng Gao and Li Deng and Alex Smola},
  year = {2015},
  eprint = {1511.02274},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1511.02274v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up