Skip to main content
QUICK REVIEW

[Paper Review] Watch What You Just Said: Image Captioning with Text-Conditional Attention

Luowei Zhou, Chenliang Xu|arXiv (Cornell University)|Jun 15, 2016
Multimodal Machine Learning ApplicationsComputer Science39 references20 citations
TL;DR

This paper proposes text-conditional attention for image captioning, where the model dynamically focuses on image features based on previously generated text, improving context-aware caption generation. By integrating text-conditional attention into a joint end-to-end gLSTM framework with CNN fine-tuning, the method outperforms state-of-the-art models on MS-COCO across automatic and human evaluation metrics.

ABSTRACT

Attention mechanisms have attracted considerable interest in image captioning due to its powerful performance. However, existing methods use only visual content as attention and whether textual context can improve attention in image captioning remains unsolved. To explore this problem, we propose a novel attention mechanism, called extit{text-conditional attention}, which allows the caption generator to focus on certain image features given previously generated text. To obtain text-related image features for our attention model, we adopt the guiding Long Short-Term Memory (gLSTM) captioning architecture with CNN fine-tuning. Our proposed method allows joint learning of the image embedding, text embedding, text-conditional attention and language model with one network architecture in an end-to-end manner. We perform extensive experiments on the MS-COCO dataset. The experimental results show that our method outperforms state-of-the-art captioning methods on various quantitative metrics as well as in human evaluation, which supports the use of our text-conditional attention in image captioning.

Motivation & Objective

  • To address the limitation of existing attention mechanisms that rely solely on visual cues and ignore textual context during image captioning.
  • To explore whether and how textual context can improve attention by conditioning image feature selection on previously generated words.
  • To overcome the representational disconnect between pre-trained CNN features and language generation by enabling joint end-to-end training of image and text embeddings.
  • To develop a time-dependent attention mechanism that conditions on 1-gram to n-gram text contexts, including full sentence-level guidance.
  • To improve caption quality by enabling the model to infer partially visible or ambiguous visual elements using linguistic context

Proposed method

  • Proposes a text-conditional attention mechanism that conditions image feature selection on the hidden state of the LSTM decoder, using previously generated text as context.
  • Introduces a guiding LSTM (gLSTM) architecture with end-to-end training, jointly learning image embeddings, text embeddings, attention weights, and language modeling.
  • Employs a learnable embedding matrix to map text context to dynamic image feature attention, enabling time-dependent, context-aware feature selection.
  • Supports multiple conditional regimes: 1-gram, 2-gram, n-gram, and full sentence-conditional attention, with the latter being the most comprehensive.
  • Fine-tunes the CNN backbone during training to align visual representations with the language generation task, reducing representational disconnect.
  • Implements the model based on NeuralTalk2, extending it with text-conditional attention and end-to-end joint optimization

Experimental results

Research questions

  • RQ1Can textual context improve image attention in image captioning, especially when visual evidence is weak or ambiguous?
  • RQ2Does conditioning image feature attention on previously generated text lead to more coherent and accurate captions?
  • RQ3Can a joint end-to-end framework that learns image and text embeddings, attention, and language modeling together outperform decoupled or pre-trained feature approaches?
  • RQ4How does time-dependent text-conditional attention (from 1-gram to sentence-level) affect caption quality compared to fixed or visual-only attention?
  • RQ5To what extent does text-conditional attention reduce errors from ambiguous or partially visible visual features?

Key findings

  • The proposed text-conditional attention mechanism significantly improves captioning performance over the baseline NeuralTalk2 on the MS-COCO dataset.
  • The method outperforms state-of-the-art approaches on all standard metrics, including BLEU-1 (0.717), BLEU-4 (0.300), METEOR (0.248), ROUGE-L (0.515), and CIDEr-D (0.923) on the test split.
  • Human evaluation confirms that captions generated with text-conditional attention are more natural and contextually accurate, especially in inferring partially visible objects.
  • The sentence-conditional model achieves the highest performance, indicating that full contextual history improves attention and generation quality.
  • Qualitative results show that the model correctly infers objects like 'sofa' and 'TV' from textual context even with weak visual evidence, demonstrating robustness to partial visibility.
  • Despite some failure cases due to training data bias (e.g., inferring 'sofa' from 'sitting'), the model shows improved reasoning over visual-linguistic ambiguity compared to baselines.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.