Neural Image Caption Generation with Weighted Training and Reference

Guiguang Ding, Minghai Chen, Sicheng Zhao, Hui Chen, Jungong Han, Qiang Liu

Introduction

Image captioning—the task of automatically generating a natural language description for a given image—has traditionally relied on an encoder-decoder architecture. While these models have made significant strides, they often struggle with two core issues: information inadequateness and misrecognition. Standard models treat every word in a training sentence with equal importance, failing to prioritize the semantic "anchors" like nouns and verbs. Furthermore, they often misidentify objects when visual data is ambiguous, relying too heavily on internal language biases.

To address these challenges, this paper introduces R-LSTM (Reference-based Long Short Term Memory), a framework that prioritizes critical semantic content during training and utilizes similar "reference" images to guide the generation process.

The R-LSTM Framework

The R-LSTM model improves upon the standard pipeline through two novel stages: Weighted Training and Reference-based Generation.

1. Weighted Training

Instead of utilizing a standard cross-entropy loss where every word is treated equally, the authors assign specific weights to words based on three distinct criteria:

  • Overall Occurrence: Using Kernel Density Estimation (KDE), the model calculates the relevance of a word to a specific image relative to the entire dataset.
  • Part-of-Speech (POS): Nouns and verbs are assigned higher weights to emphasize core actions and objects, while prepositions and conjunctions are suppressed.
  • Synonyms: By integrating WordNet, the model groups similar meanings, ensuring it learns underlying concepts rather than just specific vocabulary strings.

2. Reference-based Generation

During the inference phase, the model does not rely solely on the LSTM's internal probability. Instead, it performs a k-Nearest Neighbor (k-NN) search to identify similar images in the training set. It then calculates a consensus score based on the captions of these similar images. The final word choice is a balance between the model's internal logic and this external consensus, effectively acting as a regularizer against misidentification.

Experimental Results

The model was evaluated on the MS COCO and Flickr30k datasets using standard Karpathy splits. R-LSTM outperformed state-of-the-art (SOTA) methods across all major metrics, including BLEU, METEOR, ROUGE-L, and CIDEr.

Quantitative and Qualitative Success

On the MS COCO dataset, the model achieved a notable 10.37% improvement in the CIDEr metric, rising from 96.4 to 106.4. Qualitatively, the model demonstrates a superior ability to identify objects correctly by looking at similar reference images when the primary image is ambiguous.

Comparison of captioning results: Red text indicates errors from baseline models (e.g., misidentifying a man as a woman or a couch as a table), while green text shows the corrected R-LSTM output.

As shown in the examples above, the reference-based approach allows the model to correct errors where a baseline model might misidentify a "man" as a "woman" or a "couch" as a "table." The ablation studies confirmed that while weighted training is beneficial, the reference-based generation provides the most significant performance boost.

Conclusion and Future Work

The R-LSTM framework proves that "looking at examples" is a highly effective strategy for neural image captioning. By focusing on content-heavy words and leveraging the "wisdom of the crowd" via k-NN references, the model produces more descriptive and accurate captions. Future work may explore reducing the computational overhead of the k-NN search and implementing dynamic weighting through attention mechanisms to further refine the model's focus.

Summary updated

BibTeX
@article{ding2019neural,
  author = {Guiguang Ding and Minghai Chen and Sicheng Zhao and Hui Chen and Jungong Han and Qiang Liu},
  title = {{Neural Image Caption Generation with Weighted Training and Reference}},
  journal = {Cogn. Comput.},
  year = {2019},
  doi = {10.1007/s12559-018-9581-x},
}
Figure