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

Deep Visual-Semantic Alignments for Generating Image Descriptions

Word-region alignments let a recurrent model describe image regions

  • Problem Fixed categories and templates limit image descriptions, and caption datasets don't say which words match which regions.
  • Method The Multimodal RNN learns word-region alignments with a bidirectional RNN over sentences, then generates descriptions of image regions from those alignments.
  • Results The alignment model scored 22.2 R@1 on Flickr30K image annotation, compared to 19.2 for a DeFrag reimplementation.

Why region descriptions need weakly labeled data

Most visual recognition work labels images with a fixed set of categories, which is a convenient but narrow modeling choice. Earlier description systems filled sentence templates with hard-coded concepts, so their output stayed limited in variety. The authors aim for dense descriptions that cover many entities and regions, learned from data instead of from templates.

Large caption datasets exist, but each caption mentions several entities whose locations in the image are unknown. In the paper's example, one phrase refers to a cat and another to a table, yet the caption never says where either sits. The authors treat such captions as weak labels, so the model has to discover which phrase goes with which region.

Scoring word-region alignments with a ranking loss

The key idea is to read each caption as weak supervision: a contiguous run of words points to some unknown place in the image. The earlier fragment-alignment work, DeFrag, relied on dependency tree relations, which need a parser trained on other text and fix the context window. The authors replace those relations with a bidirectional RNN over raw words, so each word's vector depends on its whole sentence.

On the image side, each picture contributes the whole image and the top 19 detected locations, which gives 20 vectors. Each location's 4096-dimensional fully connected activation is projected by a learned matrix into the multimodal embedding space. Word vectors start from 300-dimensional word2vec weights and stay fixed in the reported setup, although training them changed little.

The BRNN hidden size typically falls between 300 and 600 dimensions, with ReLU as the activation.

The image-sentence score sums, over the words of the sentence, the best match between each word and any region. In symbols, \( S_{kl} = \sum_{t \in g_l} \max_{i \in g_k} v_i^{T} s_t \). Taking the best region per word, instead of summing positive similarities as the earlier objective did, removes the extra multiple-instance term and its hyperparameters.

Training then uses a max-margin structured loss that pushes each matched pair above mismatched ones by a margin of 1, in both ranking directions.

Turning word alignments into phrase regions

Scoring each word on its own would scatter neighboring words across different regions, which doesn't yield coherent phrases. So the authors model the alignments as a chain Markov Random Field, where neighboring words get a bonus for sharing a region. The bonus is \( \psi^B_j(a_j,a_{j+1}) = \beta \, \mathbb{1}[a_j = a_{j+1}] \), so beta sets how strongly phrases are favored.

With beta at zero, each word keeps its own region, while a large beta pulls the whole sentence onto one region. The energy is minimized with dynamic programming, and the output is a set of regions, each annotated with a text segment. These segments then become the training pairs for the generator.

A generator conditioned on the image at the first step

The generator is a recurrent language model that also sees the image, and the authors feed the image in only once. At each step the hidden state is updated from the current word and the previous state: \( h_t = f(W_{hx} x_t + W_{hh} h_{t-1} + b_h + \mathbb{1}(t=1) \odot b_v) \). The image vector \( b_v = W_{hi}[\mathrm{CNN}_{\theta_c}(I)] \) enters only through that bias term on the first step.

Each output \( y_t \) is a softmax over the vocabulary plus one END token.

The authors found that injecting the image at the first step worked better than injecting it at every step, and the typical hidden layer has 512 neurons. Training starts from a START vector and an empty state, then asks the network to predict each next word, ending with END. The cost is the log probability of the target words, which is maximized through a softmax classifier.

At test time, beam search with beam size 7 can improve results over sampling or taking the argmax.

Ranking results on Flickr30K and MSCOCO

Ranking is evaluated in both directions, so an image is retrieved from a sentence and a sentence from an image, using the image-sentence score. Performance is reported as Recall@K, the fraction of queries whose correct item lands in the top K, plus the median rank of the closest ground truth. Flickr8K and Flickr30K each use 1,000 validation images, 1,000 test images, and the rest for training.

On Flickr30K image annotation, the BRNN model scored R@1 of 22.2, compared to 19.2 for the authors' reimplementation of DeFrag. The reimplementation was necessary because the authors changed word vectors, dropout and cross-validation ranges, so the fair comparison is against their rerun.

Swapping the BRNN back to dependency tree relations, while keeping the new cost, gave R@1 of 20.0 on the same task. The authors attribute the gain over the reimplementation to the simpler cost, because that variant differs from the reimplementation only in the loss. Replacing dependency relations with the BRNN added further gains, which the authors read as the BRNN capturing context longer than two words.

On MSCOCO, the model scored 38.4 R@1 for image annotation on 1K test images and 16.5 on the 5K test set. The authors aren't aware of other published MSCOCO ranking results, so these numbers have no direct baseline.

Visually discriminative words, such as kayaking, get embeddings of larger magnitude, so they carry more weight in the image-sentence score. Stop words such as now and simply sit near the origin, which reduces their influence.

Full-image captions against nearest neighbor retrieval

For full images the generator uses VGGNet features and is compared with a nearest neighbor baseline on 1,000 MSCOCO test images. The nearest neighbor baseline gives each test image the sentence of the most similar training image, using L2 distance on VGGNet fc7 features. The Multimodal RNN scored BLEU-4 23.0 and CIDEr 66.0, compared to 10.0 and 38.3 for nearest neighbor.

Beam size changes how often outputs match training sentences: about 60% at beam size 7, but 25% at beam size 1. Lower beam size also lowers CIDEr, from 0.66 to 0.61. Generation takes only a fraction of a second per image.

Vinyals et al. and Donahue et al. are later preprints with different CNNs and sequence learners, so their rows are not controlled comparisons. The authors attribute those models' weaker numbers largely to their AlexNet features, and they say their own model favors simplicity and speed.

Region descriptions trained on inferred alignments

The region annotations were used only at test time, with nine annotators per image drawing five boxes and labeling each. Across 200 MSCOCO test images, 9,000 snippets averaged 2.3 words. These snippets differ from full captions, featuring items such as heating vent and chimney that rarely make it into a sentence about the whole image.

On BLEU-1 the region-level RNN scored 35.2, compared to 14.2 for the full-frame model and 22.9 for nearest neighbor. The full-frame model was trained only on whole images, so the region test also changes its input and mixes training and input effects. The region model also led on CIDEr, 61.6 compared to 20.3 for the full-frame model. The authors note that sentence length is hard to control with an RNN, and the full-frame sentences were longer.

Limitations

The generator describes one input array of pixels at a fixed resolution, so it can't select parts of the image as it writes. The authors suggest several glances around the image to find all entities and their context before describing. Image information enters only through additive bias interactions, which the authors call less expressive than multiplicative ones.

The pipeline uses two separate models, and training end to end from image-sentence data to region annotations remains open. The region evaluation covers 200 MSCOCO test images, and its main table reports BLEU.

Paper info

Authors
Andrej Karpathy, Li Fei-Fei
Venue
arXiv · Preprint
First published
2014-12-7
Added
2026-11-12
Updated
2015-4-14
Version
v2
arXiv
1412.2306
Category
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

Andrej Karpathy, Li Fei-Fei (2014). Deep Visual-Semantic Alignments for Generating Image Descriptions. arXiv:1412.2306v2. https://arxiv.org/abs/1412.2306v2

BibTeX
@misc{karpathy2014deep,
  title = {{Deep Visual-Semantic Alignments for Generating Image Descriptions}},
  author = {Andrej Karpathy and Li Fei-Fei},
  year = {2014},
  eprint = {1412.2306},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1412.2306v2}
}

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