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

Show, Attend and Tell: Neural Image Caption Generation with Visual Attention

Attention over image regions lets a caption model look at different parts per word

  • Problem Earlier neural captioners squeeze the whole image into one top-layer vector. That vector drops detail that richer captions need.
  • Method Show, Attend and Tell adds learned attention over image locations to an LSTM decoder. At each word it weights a grid of convolutional features instead of using one summary vector.
  • Results The model reaches state-of-the-art results on Flickr8k, Flickr30k and MS COCO, and attention maps show it fixing on salient objects while writing.

Why one image vector limits captions

A captioning model has to name the objects in an image and also state how they relate in natural language. Most earlier neural captioners compress the whole image into one feature vector taken from the top layer of a pretrained convolutional network. That vector keeps the most salient objects, but it discards detail that could make a caption richer.

Some models also show the image only once, at the first step of the output sequence.

Human vision avoids a single static summary by letting attention bring salient features forward as they are needed. The authors borrow that idea and draw on attention in machine translation and object recognition. So the question is whether a decoder can learn where to look at each word, instead of relying on one summary vector.

Attention over convolutional locations

The key idea is to keep the image as a grid of spatial vectors and let the decoder take a weighted mix of them at each step. The encoder is a convolutional network that yields L annotation vectors, each D-dimensional, taken from a lower convolutional layer rather than a fully connected one. Each vector stays tied to one image location, so the decoder can focus on a subset of them.

At each step t, the attention model scores every annotation vector against the previous hidden state, as \(e_{ti}=f_{att}(a_i, h_{t-1})\). A softmax turns these scores into weights \(\alpha_{ti}=\exp(e_{ti})/\sum_{k=1}^{L}\exp(e_{tk})\) that sum to one. The context vector \(\hat{z}_t\) is the weighted combination of the annotation vectors under those weights.

Because the hidden state changes as the output advances, the next location the model looks at depends on the words already generated.

The decoder is an LSTM that takes the embedding of the previous word, the previous hidden state and the context vector. Its memory and hidden state follow the usual gates, with \(c_t = f_t \odot c_{t-1} + i_t \odot g_t\) and \(h_t = o_t \odot \tanh(c_t)\). The initial memory and hidden states come from an average of the annotation vectors passed through two separate MLPs.

Each word is then drawn from a deep output layer that combines the embedding, the hidden state and the context vector, with the K-word vocabulary.

Soft and hard training

The soft variant feeds in the expected context vector, which makes the whole model differentiable. It can therefore be trained end-to-end with standard backpropagation. The soft model also learns a gating scalar \(\beta_t=\sigma(f_\beta(h_{t-1}))\) that scales the context vector. Training adds a penalty, so the loss becomes \(L_d = -\log P(y|x) + \lambda \sum_i (1-\sum_t \alpha_{ti})^2\).

This term pushes each location's total attention over the steps toward one, which the authors say encourages equal attention across the image.

The hard variant treats the location \(s_t\) as a latent one-hot variable, sampled from a multinoulli distribution over the weights \(\alpha\). It maximizes a variational lower bound on the log-likelihood, and the gradient is estimated by Monte Carlo sampling, which the authors relate to REINFORCE. To reduce variance, a moving average baseline is updated as \(b_k = 0.9 \times b_{k-1} + 0.1 \times \log p(y|\tilde{s}_k, a)\).

An entropy term is added, and with probability 0.5 the sampled location is replaced by its expected value.

The soft model is trained with RMSProp on Flickr8k and with Adam on Flickr30k and MS COCO. Mini-batches of 64 captions share one sampled caption length, because training time grows with the longest sentence in an update. The authors use early stopping on BLEU, and dropout is the only other regularizer. On MS COCO the soft model took less than 3 days to train on one NVIDIA Titan Black GPU.

Benchmark caption scores

The two variants tie on BLEU-1, so the difference sits in the longer n-gram match of BLEU-4. The Flickr8k split is the predefined one, so these scores use the authors' own protocol. On the same split Hard-Attention also scored 20.30 METEOR, compared to 18.93 for Soft-Attention.

The gap is small here, so the two variants look close on this dataset. This split is the publicly available one from prior work, so these numbers are not from the Flickr8k split.

The authors present their results as state-of-the-art on the three benchmarks, within the comparison rows they chose. Those rows use GoogLeNet or Oxford VGG features, so the comparison keeps the encoder roughly matched. The COCO results come from a single model without an ensemble, which the authors state as a deliberate choice. The authors also report that their METEOR gain on MS COCO is large, which they link to their regularization and lower-level features.

Where the attention lands

To visualize the soft model, the authors upsample the 14×14 attention weights by a factor of 16 and smooth them with a Gaussian filter. The receptive fields of neighbouring 14×14 units overlap heavily, so the map is a coarse guide rather than a sharp mask. Figure 2 and Figure 3 show the attended region changing as each word is generated. The authors judge these alignments to match human intuition, and they say the mistake examples help explain why errors happened.

This evidence is visual, so it shows where attention falls on chosen examples rather than giving a measured score.

Limitations

BLEU is criticized, so the authors add METEOR as a second metric. The authors observed that validation log-likelihood stopped tracking BLEU in the later stages of training. Model selection therefore relies on BLEU, the most commonly reported metric.

The Flickr30k and MS COCO splits are not standardized, so the authors use the publicly available splits from prior work. The authors say split differences do not make a substantial difference in their experience, but they note the differences where they exist. All reported results come from a single model, so ensemble comparisons are not covered.

The experiments cover three caption datasets only, with the visual attention evidence kept qualitative. The hard variant's gradient is a Monte Carlo estimate, and the authors add variance-reduction terms to stabilize it.

Paper info

Authors
Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhutdinov, Richard Zemel, Yoshua Bengio
Venue
arXiv · Preprint
First published
2015-2-10
Added
2026-11-11
Updated
2016-4-19
Version
v3
arXiv
1502.03044
Category
cs.LG · cs.CV
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

Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhutdinov, Richard Zemel, Yoshua Bengio (2015). Show, Attend and Tell: Neural Image Caption Generation with Visual Attention. arXiv:1502.03044v3. https://arxiv.org/abs/1502.03044v3

BibTeX
@misc{xu2015show,
  title = {{Show, Attend and Tell: Neural Image Caption Generation with Visual Attention}},
  author = {Kelvin Xu and Jimmy Ba and Ryan Kiros and Kyunghyun Cho and Aaron Courville and Ruslan Salakhutdinov and Richard Zemel and Yoshua Bengio},
  year = {2015},
  eprint = {1502.03044},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1502.03044v3}
}

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