Image Captioning based on Feature Refinement and Reflective Decoding

Ghadah Alabduljabbar, Hafida Benhidour, Said KerrachearXiv 2022 · DOI

Abstract

Generating accurate and coherent image captions requires a deep understanding of visual relationships and the ability to maintain linguistic context over time. This paper proposes an enhanced encoder-decoder framework that addresses these challenges through two primary innovations: a visual feature refining module and a reflective attention module. By utilizing Attention-on-Attention (AoA) to model object interactions and a "look-back" mechanism to ensure historical coherence, the proposed model achieves state-of-the-art results on the Flickr30K benchmark.

Introduction

Image captioning sits at the intersection of computer vision and natural language processing, requiring a system to translate complex visual scenes into grammatically correct prose. Despite significant progress, two major bottlenecks persist: visual ambiguity, where features are extracted in isolation, and sequential drift, where decoders lose track of the generated sentence's history. This work introduces an architecture designed to mitigate these issues by refining visual representations and reflecting on generated text.

Proposed Architecture

The framework follows a classic encoder-decoder structure but introduces significant upgrades to both components to improve how the model perceives images and generates text.

Overview of the proposed encoder-decoder architecture featuring a refining model and reflective attention.

1. Feature Refinement in the Encoder

To combat visual ambiguity, the encoder employs a ResNet-101 backbone followed by a Refining Model. This module utilizes an Attention-on-Attention (AoA) mechanism to determine the relevance between different spatial features. By modeling these relationships, the encoder produces "smoothed" representations that capture how objects interact within a scene, providing a more semantic foundation for the decoder.

2. Reflective Decoding

The decoder is built upon a two-layer LSTM structure enhanced by a Reflective Attention Module (RefAM). While the first layer performs standard top-down visual attention, the RefAM allows the model to selectively "look back" at all previously generated hidden states.

Detailed structure of the decoder part, highlighting the Reflective Attention Module (RefAM).

By treating the history of hidden states as a searchable database, the RefAM ensures that each new word is contextually consistent with the entire preceding sequence, preventing the model from becoming repetitive or nonsensical during longer captions.

Experimental Evaluation

The model was evaluated on the Flickr30K dataset using the standard Karpathy splits (29K training, 1K validation, 1K testing). The researchers compared their full model, RefiningVisAttRefAtt, against several baselines.

Key Results

The proposed model demonstrated significant improvements across standard evaluation metrics:

  • CIDEr: 52.69 (vs. 40.81 baseline)
  • METEOR: 20.30 (vs. 17.94 baseline)
  • ROUGE-L: 46.51 (vs. 43.62 baseline)
  • BLEU-4: 24.86 (vs. 20.07 baseline)

The substantial gain in CIDEr scores highlights the model's ability to capture semantic richness. Interestingly, while BLEU-4 scores improved significantly over the baseline, they were slightly lower than a version of the model without encoder refinement, suggesting a trade-off between n-gram precision and semantic depth.

Conclusion and Future Work

This work demonstrates that refining visual features and incorporating reflective memory in the decoder significantly enhances image captioning performance. Future research will explore the use of region-based features (e.g., from Faster R-CNN) to model object relationships even more explicitly and investigate more advanced backbones to further improve the quality of initial visual features.

Summary updated

BibTeX
@misc{alabduljabbar2022image,
  author = {Ghadah Alabduljabbar and Hafida Benhidour and Said Kerrache},
  title = {{Image Captioning based on Feature Refinement and Reflective Decoding}},
  year = {2022},
  eprint = {2206.07986},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.07986},
}
Figure