Show, Attend and Tell: Neural Image Caption Generation with Visual Attention
Written for the Research library (claude-opus-5-5) from the paper text, in our own words: the license "arXiv — non-exclusive licence to distribute" does not allow redistributing the text itself. Original — arxiv.org/pdf/1502.03044
Summary
The paper looks at image captioning: generating a natural-language sentence that describes a photo. Earlier neural captioners squeezed the whole image into one vector taken from the top of a convnet, which can throw away detail. The authors keep a spatial grid of lower-layer convolutional features from the 19-layer Oxford VGG network. An LSTM decoder then learns to weight different image regions as it produces each word. They propose two versions of this attention. The "soft" version is deterministic and trained with ordinary backpropagation. The "hard" version picks one location stochastically and is trained by maximizing a variational lower bound, which is equivalent to REINFORCE. They evaluate on Flickr8k, Flickr30k and MS COCO using BLEU and METEOR and report state-of-the-art results from a single model without ensembling. Plotting the attention weights shows where the model looks for each word, and these alignments mostly match human intuition. The maps also help explain errors. This work became a foundational reference for visual attention in encoder–decoder models.
Key points
- The encoder uses a 14×14 feature map from a lower convolutional layer of VGG, not a fully connected layer. Attention is computed over these regions by an MLP conditioned on the previous LSTM hidden state.
- Hard attention scored best on BLEU-4 on all three datasets: 21.3 on Flickr8k, 19.9 on Flickr30k and 25.0 on MS COCO. Soft attention scored 19.5, 19.1 and 24.3.
- On MS COCO, soft attention reached a METEOR of 23.90, a large improvement over earlier reported scores.
- Setup: vocabulary fixed at 10,000 words, the public Karpathy & Li splits for Flickr30k and COCO, and a single model compared only against systems using GoogLeNet or VGG features.
- The model attends to regions without using object detectors, so it can also focus on salient areas that aren't objects.
Cited by
- Quantifying Attention Flow in Transformers
- Understanding intermediate layers using linear classifier probes
- SPICE: Semantic Propositional Image Caption Evaluation
- Neural Module Networks
- Learning to Compose Neural Networks for Question Answering
- An Actor-Critic Algorithm for Sequence Prediction
- e-SNLI: Natural Language Inference with Natural Language Explanations
- Neural Legal Judgment Prediction in English
- Attention-Based Models for Speech Recognition
- Long-term Recurrent Convolutional Networks for Visual Recognition and Description
- Learning to Ask: Neural Question Generation for Reading Comprehension
- Multi30K: Multilingual English-German Image Descriptions
- Linguistic realisation as machine translation: Comparing different MT models for AMR-to-text generation
- The Goldilocks Principle: Reading Children's Books with Explicit Memory Representations
- Lexically Constrained Decoding for Sequence Generation Using Grid Beam Search
- Attention is not Explanation
- Categorical Reparameterization with Gumbel-Softmax
- TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehension
- OpenNMT: Open-Source Toolkit for Neural Machine Translation
- Visual Genome: Connecting Language and Vision Using Crowdsourced Dense Image Annotations
- Ask Me Anything: Dynamic Memory Networks for Natural Language Processing
- Neural Text Generation from Structured Data with Application to the Biography Domain
- A Diversity-Promoting Objective Function for Neural Conversation Models
- Multi-task Sequence to Sequence Learning
- The Concrete Distribution: A Continuous Relaxation of Discrete Random Variables
- Encode, Tag, Realize: High-Precision Text Editing
- Generation and Comprehension of Unambiguous Object Descriptions
- Style Transfer Through Back-Translation
- Sequence Level Training with Recurrent Neural Networks
- Self-critical Sequence Training for Image Captioning
- "Why Should I Trust You?": Explaining the Predictions of Any Classifier
- Evaluating Historical Text Normalization Systems: How Well Do They Generalize?
- Reasoning about Entailment with Neural Attention
- Object Hallucination in Image Captioning
- Efficient Content-Based Sparse Attention with Routing Transformers
- A simple neural network module for relational reasoning
- LAION-5B: An open large-scale dataset for training next generation image-text models
- Conceptual Captions: A Cleaned, Hypernymed, Image Alt-text Dataset For Automatic Image Captioning
- ViperGPT: Visual Inference via Python Execution for Reasoning
- Modeling Coverage for Neural Machine Translation
- Attention is not not Explanation
- Hierarchical Attention Networks for Document Classification
- ABCNN: Attention-Based Convolutional Neural Network for Modeling Sentence Pairs
- Modeling Context in Referring Expressions
- ActivityNet-QA: A Dataset for Understanding Complex Web Videos via Question Answering
- Sentence Simplification with Deep Reinforcement Learning
- Attention-Based Bidirectional Long Short-Term Memory Networks for Relation Classification
- Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Books
- Visual7W: Grounded Question Answering in Images
- Texygen: A Benchmarking Platform for Text Generation Models
Cite
@misc{xu2015show,
title = {{Show, Attend and Tell: Neural Image Caption Generation with Visual Attention}},
author = {Xu, Kelvin and Ba, Jimmy and Kiros, Ryan and Cho, Kyunghyun and Courville, Aaron and Salakhutdinov, Ruslan and Zemel, Richard and Bengio, Yoshua},
year = {2015},
doi = {10.48550/arxiv.1502.03044},
eprint = {1502.03044},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.1502.03044}
}References
- Ba, Jimmy Lei, Mnih, Volodymyr, and Kavukcuoglu, Koray. Multiple object recognition with visual attention. arXiv:1412.7755, December 2014. — [arXiv:1412.7755](https://arxiv.org/abs/1412.7755) find
- Bahdanau, Dzmitry, Cho, Kyunghyun, and Bengio, Yoshua. Neural machine translation by jointly learning to align and translate. arXiv:1409.0473, September 2014. find our card
- Baldi, Pierre and Sadowski, Peter. The dropout learning algorithm. Artificial intelligence, 210:78–122, 2014. find
- Bastien, Frederic, Lamblin, Pascal, Pascanu, Razvan, Bergstra, James, Goodfellow, Ian, Bergeron, Arnaud, Bouchard, Nicolas, Warde-Farley, David, and Bengio, Yoshua. Theano: new features and speed improvements. Submited to the Deep Learning and Unsupervised Feature Learning NIPS 2012 Workshop, 2012. find
- Bergstra, James, Breuleux, Olivier, Bastien, Frédéric, Lamblin, Pascal, Pascanu, Razvan, Desjardins, Guillaume, Turian, Joseph, Warde-Farley, David, and Bengio, Yoshua. Theano: a CPU and GPU math expression compiler. In Proceedings of the Python for Scientific Computing Conference (SciPy), 2010. find
- Chen, Xinlei and Zitnick, C Lawrence. Learning a recurrent visual representation for image caption generation. arXiv preprint arXiv:1411.5654, 2014. — [arXiv:1411.5654](https://arxiv.org/abs/1411.5654) find
- Cho, Kyunghyun, van Merrienboer, Bart, Gulcehre, Caglar, Bougares, Fethi, Schwenk, Holger, and Bengio, Yoshua. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In EMNLP, October 2014. find
- Corbetta, Maurizio and Shulman, Gordon L. Control of goal-directed and stimulus-driven attention in the brain. Nature reviews neuroscience, 3(3):201–215, 2002. find
- Denil, Misha, Bazzani, Loris, Larochelle, Hugo, and de Freitas, Nando. Learning where to attend with deep architectures for image tracking. Neural Computation, 2012. find
- Denkowski, Michael and Lavie, Alon. Meteor universal: Language specific translation evaluation for any target language. In Proceedings of the EACL 2014 Workshop on Statistical Machine Translation, 2014. find our card
- Donahue, Jeff, Hendrikcs, Lisa Anne, Guadarrama, Se-gio, Rohrbach, Marcus, Venugopalan, Subhashini, Saenko, Kate, and Darrell, Trevor. Long-term recurrent convolutional networks for visual recognition and description. arXiv:1411.4389v2, November 2014. find our card
- Elliott, Desmond and Keller, Frank. Image description using visual dependency representations. In EMNLP, 2013. find
- Fang, Hao, Gupta, Saurabh, Iandola, Forrest, Srivastava, Rupesh, Deng, Li, Dollár, Piotr, Gao, Jianfeng, He, Xiaodong, Mitchell, Margaret, Platt, John, et al. From captions to visual concepts and back. arXiv:1411.4952, November 2014. find
- Hochreiter, S. and Schmidhuber, J. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997. find
- Hodosh, Micah, Young, Peter, and Hockenmaier, Julia. Framing image description as a ranking task: Data, models and evaluation metrics. Journal of Artificial Intelligence Research, pp. 853–899, 2013. find
- Karpathy, Andrej and Li, Fei-Fei. Deep visual-semantic alignments for generating image descriptions. arXiv:1412.2306, December 2014. find our card
- Kingma, Diederik P. and Ba, Jimmy. Adam: A Method for Stochastic Optimization. arXiv:1412.6980, December 2014. find
- Kiros, Ryan, Salahutdinov, Ruslan, and Zemel, Richard. Multimodal neural language models. In International Conference on Machine Learning, pp. 595–603, 2014a. find
- Kiros, Ryan, Salakhutdinov, Ruslan, and Zemel, Richard. Unifying visual-semantic embeddings with multimodal neural language models. arXiv:1411.2539, November 2014b. find our card
- Krizhevsky, Alex, Sutskever, Ilya, and Hinton, Geoffrey. ImageNet classification with deep convolutional neural networks. In NIPS. 2012. find
- Kulkarni, Girish, Premraj, Visruth, Ordonez, Vicente, Dhar, Sagnik, Li, Siming, Choi, Yejin, Berg, Alexander C, and Berg, Tamara L. Babytalk: Understanding and generating simple image descriptions. PAMI, IEEE Transactions on, 35(12):2891– 2903, 2013. find
- Kuznetsova, Polina, Ordonez, Vicente, Berg, Alexander C, Berg, Tamara L, and Choi, Yejin. Collective generation of natural image descriptions. In Association for Computational Linguistics. ACL, 2012. find
- Kuznetsova, Polina, Ordonez, Vicente, Berg, Tamara L, and Choi, Yejin. Treetalk: Composition and compression of trees for image descriptions. TACL, 2(10):351–362, 2014. find
- Larochelle, Hugo and Hinton, Geoffrey E. Learning to combine foveal glimpses with a third-order boltzmann machine. In NIPS, pp. 1243–1251, 2010. find
- Li, Siming, Kulkarni, Girish, Berg, Tamara L, Berg, Alexander C, and Choi, Yejin. Composing simple image descriptions using web-scale n-grams. In Computational Natural Language Learning. ACL, 2011. find
- Lin, Tsung-Yi, Maire, Michael, Belongie, Serge, Hays, James, Perona, Pietro, Ramanan, Deva, Dollár, Piotr, and Zitnick, C Lawrence. Microsoft coco: Common objects in context. In ECCV, pp. 740–755. 2014. find our card
- Mao, Junhua, Xu, Wei, Yang, Yi, Wang, Jiang, and Yuille, Alan. Deep captioning with multimodal recurrent neural networks (m-rnn). arXiv:1412.6632, December 2014. find
- Mitchell, Margaret, Han, Xufeng, Dodge, Jesse, Mensch, Alyssa, Goyal, Amit, Berg, Alex, Yamaguchi, Kota, Berg, Tamara, Stratos, Karl, and Daumé III, Hal. Midge: Generating image descriptions from computer vision detections. In European Chapter of the Association for Computational Linguistics, pp. 7… find
- Mnih, Volodymyr, Hees, Nicolas, Graves, Alex, and Kavukcuoglu, Koray. Recurrent models of visual attention. In NIPS, 2014. find
- Pascanu, Razvan, Gulcehre, Caglar, Cho, Kyunghyun, and Bengio, Yoshua. How to construct deep recurrent neural networks. In ICLR, 2014. find
- Rensink, Ronald A. The dynamic representation of scenes. Visual cognition, 7(1-3):17–42, 2000. find
- Russakovsky, Olga, Deng, Jia, Su, Hao, Krause, Jonathan, Satheesh, Sanjeev, Ma, Sean, Huang, Zhiheng, Karpathy, Andrej, Khosla, Aditya, Bernstein, Michael, Berg, Alexander C., and Fei-Fei, Li. ImageNet Large Scale Visual Recognition Challenge, 2014. find our card
- Simonyan, K. and Zisserman, A. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. find our card
- Snoek, Jasper, Larochelle, Hugo, and Adams, Ryan P. Practical bayesian optimization of machine learning algorithms. In NIPS, pp. 2951–2959, 2012. find
- Snoek, Jasper, Swersky, Kevin, Zemel, Richard S, and Adams, Ryan P. Input warping for bayesian optimization of non-stationary functions. arXiv preprint arXiv:1402.0929, 2014. — [arXiv:1402.0929](https://arxiv.org/abs/1402.0929) find
- Srivastava, Nitish, Hinton, Geoffrey, Krizhevsky, Alex, Sutskever, Ilya, and Salakhutdinov, Ruslan. Dropout: A simple way to prevent neural networks from overfitting. JMLR, 15, 2014. find
- Sutskever, Ilya, Vinyals, Oriol, and Le, Quoc VV. Sequence to sequence learning with neural networks. In NIPS, pp. 3104– 3112, 2014. find
- Szegedy, Christian, Liu, Wei, Jia, Yangqing, Sermanet, Pierre, Reed, Scott, Anguelov, Dragomir, Erhan, Dumitru, Vanhoucke, Vincent, and Rabinovich, Andrew. Going deeper with convolutions. arXiv preprint arXiv:1409.4842, 2014. — [arXiv:1409.4842](https://arxiv.org/abs/1409.4842) find
- Tang, Yichuan, Srivastava, Nitish, and Salakhutdinov, Ruslan R. Learning generative models with visual attention. In NIPS, pp. 1808–1816, 2014. find
- Tieleman, Tijmen and Hinton, Geoffrey. Lecture 6.5 - rmsprop. Technical report, 2012. find
- Vinyals, Oriol, Toshev, Alexander, Bengio, Samy, and Erhan, Dumitru. Show and tell: A neural image caption generator. arXiv:1411.4555, November 2014. find our card
- Weaver, Lex and Tao, Nigel. The optimal reward baseline for gradient-based reinforcement learning. In Proc. UAI’2001, pp. 538–545, 2001. find
- Williams, Ronald J. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992. find
- Yang, Yezhou, Teo, Ching Lik, Daumé III, Hal, and Aloimonos, Yiannis. Corpus-guided sentence generation of natural images. In EMNLP, pp. 444–454. ACL, 2011. find
- Young, Peter, Lai, Alice, Hodosh, Micah, and Hockenmaier, Julia. From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions. TACL, 2:67–78, 2014. find
- Zaremba, Wojciech, Sutskever, Ilya, and Vinyals, Oriol. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, September 2014. find our card