Image Captioning with Bidirectional Semantic Attention-Based Guiding of Long Short-Term Memory

Pengfei Cao, Zhongyi Yang, Liang Sun, Yanchun Liang, Mary Qu Yang, Renchu Guan

Overview

The Bag-LSTM (Bidirectional semantic Attention-based Guiding of LSTM) model represents a significant advancement in image captioning. By dynamically refining image features based on generated text and employing a bidirectional architecture, the model captures both historical and future contextual information. This approach addresses the limitations of static visual inputs and unidirectional text generation, leading to substantial performance gains on standard benchmarks like MSCOCO and Flickr8k.

The Challenge of Image Captioning

Image captioning requires bridging the gap between Computer Vision (CV) and Natural Language Processing (NLP). Traditional encoder-decoder frameworks often struggle with two specific bottlenecks:

  1. Static Visual Information: Many models treat image features as a fixed input, failing to adjust the visual focus as the sentence evolves.
  2. Unidirectional Context: Standard LSTMs generate text from left to right, ignoring the global structure where future words can inform the choice of current words.

The Bag-LSTM Approach

To overcome these hurdles, the authors propose the Bag-LSTM framework. This model "consciously" refines its visual focus during the generation process by integrating semantic feedback into the feature extraction pipeline.

High-level architecture of the Bag-LSTM model showing the flow from image features to a sequence of words.

Core Components

  • Semantic Attention Mechanism: Unlike spatial attention, which focuses on specific image regions, semantic attention refines the global image feature vector based on the words already generated. This feedback loop ensures the CNN extracts features relevant to the current state of the sentence.
  • Bidirectional Guiding LSTM (Bi-gLSTM): The "guiding" LSTM (gLSTM) accepts these refined, text-conditional image features at every time step. By processing the sequence in both forward and backward directions, the model captures long-term interactions between visual signals and semantic context.
Detailed architecture of the Bi-gLSTM framework, highlighting the interaction between the CNN, attention modules, and the bidirectional LSTM layers.
  • Sentence Selection Algorithms: To reconcile the outputs of the bidirectional passes, the authors developed Log-based and Mean-based selection methods. The Log-based method avoids generic descriptions by emphasizing words with modest probabilities, while the Mean-based method averages word probabilities across the sentence.

Evaluation and Results

The model was tested on the Flickr8k and MSCOCO datasets using standard "Karpathy splits." The results demonstrate the effectiveness of the bidirectional semantic attention:

  • CIDEr Score: On MSCOCO, the Bag-LSTM+mean model achieved a score of 99.8, a 51.2% improvement over the Bidirectional Recurrent Neural Network (BRNN) baseline.
  • BLEU-4: The model outperformed traditional "Soft-Attention" and "Hard-Attention" models by approximately 22-25%.

Qualitative analysis shows that the model successfully aligns specific visual elements (e.g., "surfboards") with high-confidence text generation, resulting in more descriptive and grounded captions.

Conclusion and Future Work

While Bag-LSTM is highly effective, its complexity makes it susceptible to overfitting, requiring careful regularization techniques like dropout. Occasional visual misinterpretations also occur when the training data lacks specific examples. Future research will explore extending this bidirectional semantic attention framework to video captioning and Visual Question Answering (VQA), where temporal dynamics and context are even more critical.

Summary updated

BibTeX
@article{cao2019image,
  author = {Pengfei Cao and Zhongyi Yang and Liang Sun and Yanchun Liang and Mary Qu Yang and Renchu Guan},
  title = {{Image Captioning with Bidirectional Semantic Attention-Based Guiding of Long Short-Term Memory}},
  journal = {Neural Process. Lett.},
  year = {2019},
  doi = {10.1007/s11063-018-09973-5},
}
Figure