All models

Show-Attend-Tell

An image captioning model whose LSTM decoder uses soft attention over a 14×14 grid of CNN features for each word.

Multimodal · 850 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (199 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
55.4M
Operations
850
Framework
PyTorch
Recurrent
Yes
Published
ICML 2015
Cited by
8,248 (as of 23 October 2026)
Authors
Kelvin Xu, Jimmy Ba, Ryan Kiros and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m2803
Graph hash
4063ef687a90f1bf8af93eac1480de2794eb43d87185c255ca49b57d67ecc7b0
Skeleton hash
14a99d96cfa45fe14844909feb2df7686ccddc0b3ca647a8d0b05b5d0d15f042
Architecture hash
10d42d8ad61616dfb0b25af84d16f2aded1248892ee6c12794eec0f571c21138
Diagram SHA-256
b6d2339542346044ab1c667137213c3cbbe9d5206c20248ab8f5e97c99ab422b
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

Show, Attend and Tell is an image captioning model that attends to different parts of the picture while it writes the caption. Earlier captioning models, the paper notes, represented the image as a single feature vector from the top layer of a pre-trained convolutional network. Here the features come from a lower convolutional layer instead of a fully connected one, so the decoder can focus on parts of the image.

The paper's encoder is the Oxford VGGnet pretrained on ImageNet, used without finetuning. Its 14×14×512 feature map is flattened into 196 annotation vectors of 512 dimensions. At each step a multilayer perceptron, conditioned on the decoder's previous hidden state, gives each annotation vector a weight. This model uses the soft, deterministic form of attention, which computes a weighted combination of the annotation vectors. Because that version is smooth and differentiable, it trains end to end with standard backpropagation. The paper's other variant, hard attention, is stochastic and is trained by maximizing an approximate variational lower bound.

The soft model also predicts a gating scalar from the previous hidden state at each step. In training, a doubly stochastic regularization term encourages equal attention to every part of the image over the course of a caption. The paper visualizes the attention to show where the model looks as it generates each word. It evaluates the approach on three benchmark datasets, Flickr8k, Flickr30k and MS COCO.

Key idea. The paper introduces an attention based model that learns to describe the content of images, trained either deterministically with standard backpropagation or stochastically by maximizing a variational lower bound.

  • Show, Attend and Tell
  • Show-Attend-Tell
  • SAT
  • image captioning
  • visual attention
  • soft attention
  • attention-based captioning
  • neural image caption generation
  • arctic-captions

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{xu2016showattendtellneural,
      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={2016},
      eprint={1502.03044},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1502.03044}, 
}