Aligning where to see and what to tell: image caption with region-based attention and scene factorization.

Junqi Jin, Kun Fu, Runpeng Cui, Fei Sha, Changshui ZhangarXiv 2015

TL;DR

This paper introduces an image captioning system that mimics human perception by aligning word generation with dynamic shifts in visual attention across specific image regions. By combining this localized attention with "scene factorization"—a technique that adapts the language model to global contexts like "kitchen" or "park"—the authors achieved state-of-the-art performance on major benchmarks like MSCOCO and Flickr30K.

What Problem Does This Paper Address?

Generating a natural language description for an image is a complex task that requires bridging the gap between computer vision and natural language processing. While early deep learning models made strides by using global image features to "prime" a language model, they often lacked fine-grained understanding.

The authors identify two main gaps:

  1. Visual Grounding: Humans don't just look at a whole image and spit out a sentence; we shift our focus between salient objects and regions as we speak.
  2. Contextual Adaptation: The vocabulary and phrasing we use depend heavily on the overall scene. A dog in a park is "running," while a dog in a pet store might be "getting groomed." Standard models often used a "one-size-fits-all" language model that ignored these global semantic biases.

Methods

The proposed system consists of three innovative components integrated into a Recurrent Neural Network (RNN) framework:

  1. Multi-Scale Region Representation: Instead of a single global vector, the model represents an image as a collection of "good" patches. Using selective search and a custom "objectness" classifier, the system identifies up to 30 salient regions at various scales. These are processed through a VGG-16 CNN to extract high-dimensional features. Image representation with localized regions at multiple scales
Figure 2: Image representation with localized regions at multiple scales. The image is hierarchically segmented and top regions containing salient visual information are selected. Those regions are analyzed with a Convolutional Neural Net (CNN) trained for object recognition. Resulting visual features, along with the spatial and geometric information are concatenated as feature vectors. See texts for details.
  1. Attention-Based Decoder: The model uses a stacked Long Short-Term Memory (LSTM) architecture. At each time step, the model predicts a "visual attention" shift—deciding which image patch to focus on next based on the previously generated word and the current hidden state. This creates a trajectory of visual focus that aligns with the sentence structure. The parallel processes of generating a new word and shifting visual attentions
The parallel processes of generating a new word and shifting visual attentions
  1. Scene-Factored LSTM (SF-LSTM): To handle global context, the authors use Latent Dirichlet Allocation (LDA) to discover "topics" within the training captions. A separate CNN (Places-205) predicts these topics from the image to create a "scene vector." This vector is then used to factorize the weight matrices of the LSTM, effectively "personalizing" the language model for that specific scene type. The architectural diagram of the image caption system
Figure 1: The architectural diagram of our image caption system. An image is first analyzed and represented with multiple visual regions from which visual features are extracted (section 3.1). The visual feature vectors are then fed into a recurrent neural network architecture which predicts both the sequence of focusing on different regions and the sequence of generating words based on the transition of visual attentions (section 3.2). The neural network model is also governed by a scene vector, a global visual context extracted from the whole image. Intuitively, it selects a scene-specific language model for generating texts (cf section 3.3).

Datasets

The authors evaluated their system on three standard benchmarks:

  • MSCOCO: The primary benchmark, using the standard 2014 splits.
  • Flickr8K: A smaller dataset of 8,000 images.
  • Flickr30K: A dataset of 31,000 images with more descriptive captions.

Key Insights and Ideas

  • Parallel Structures: The core philosophy is that images and sentences share a parallel "flow of abstract meaning." The hidden states of the LSTM serve as the bridge, predicting both the next word and the next visual region to attend to.
  • Scale Matters for Semantics: The authors found that different linguistic constituents require different visual scales. Nouns (like "bird") might be found in small, tight patches, while verbs (like "flying") often require larger patches to capture the necessary action context.
  • Soft vs. Hard Scene Assignment: Rather than forcing an image into a single category (e.g., "indoors"), the scene vector uses a "soft" probability distribution across 80 topics. This allows the model to blend language styles for complex scenes.

Key Results

The system significantly outperformed then-current leaders like Google NIC and mRNN.

  • Quantitative: On the MSCOCO dataset, the full model (using region-based attention, scene factorization, and beam search) achieved a BLEU-4 score of 28.2 and a CIDEr-D score of 83.8, setting a new state-of-the-art at the time.
  • Ablation Studies: The authors proved that both components—attention and scene factorization—contribute independently to the performance boost. Adding scene factorization to a base model improved the CIDEr-D score from 70.7 to 74.3, and adding attention further pushed it to 78.3 (using greedy search).
  • Qualitative Impact: By manually "distorting" the scene vector, the authors showed they could change the model's output. For an image of a baby with a toothbrush, changing the scene vector to a "food" topic caused the model to describe the baby "eating a slice of pizza," demonstrating how strongly the scene context biases word selection.

Limitations and Future Work

  • Parameter Complexity: The scene factorization method involves a tradeoff; while it specializes the model, it increases the number of parameters to learn, which can lead to overfitting if not carefully regularized.
  • Patch Selection Dependency: The system relies on a separate pre-processing step (selective search and an objectness classifier) to find patches. The authors suggest that an end-to-end approach for region proposal might be a promising future direction.
  • Language Independence: While the model shares some parameters across scenes, the authors note that learning entirely independent language models for different scenes might lose the "commonness" shared by all natural language.

Summary updated

BibTeX
@misc{jin2015aligning,
  author = {Junqi Jin and Kun Fu and Runpeng Cui and Fei Sha and Changshui Zhang},
  title = {{Aligning where to see and what to tell: image caption with region-based attention and scene factorization.}},
  year = {2015},
  eprint = {1506.06272},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1506.06272},
}
Figure