Show, Recall, and Tell: Image Captioning with Recall Mechanism

Li Wang, Zechen Bai, Yonghua Zhang, Hongtao Lu

Abstract

Generating natural and accurate descriptions in image captioning remains a significant challenge. We propose a novel recall mechanism that imitates human captioning by retrieving relevant words from a past corpus. Our framework consists of a recall unit for text retrieval, a semantic guide (SG) for context generation, and a recalled-word slot (RWS) for direct word copying. A soft switch balances these branches, and a recalled-word reward (WR) is used during CIDEr optimization. Our proposed methods (SG+RWS+WR) achieve state-of-the-art results on the MSCOCO Karpathy test split, reaching BLEU-4 / CIDEr scores of 38.7 / 129.1.

1. Introduction

Most modern image captioning models follow a "one-shot" approach, generating descriptions based solely on the visual features of a specific image. However, humans often describe scenes by recalling similar past experiences. This paper addresses this gap by introducing a Recall Mechanism that allows a model to look at a large corpus of existing captions to find relevant words that might not be immediately obvious from visual features alone.

Overview of the Show, Recall, and Tell framework.

2. Methods

The proposed architecture integrates the recall mechanism into a standard encoder-decoder (specifically the "Up-Down") architecture through three main components:

2.1 Recall Unit

The Recall Unit is a text-retrieval module that finds the top $K$ most similar captions from the training corpus for a given input image. This process uses an image-text matching model trained with triplet loss, providing a contextually rich vocabulary for the generation process.

2.2 Semantic Guide (SG) and Recalled-Word Slot (RWS)

To utilize the recalled words effectively, the model employs two distinct branches:

  • Semantic Guide (SG): This branch processes recalled word embeddings to create a "recalled context," guiding the RNN decoder's high-level understanding of the scene.
  • Recalled-Word Slot (RWS): Inspired by pointer-generator networks, this branch allows the model to directly "copy" words from the retrieved set into the final caption.
Detailed architecture of the dual-branch recall mechanism.

2.3 Soft Switch and Optimization

A learnable Soft Switch ($s_t$) balances the two branches at each time step. Furthermore, during Reinforcement Learning (CIDEr optimization), a specific Recalled-Word Reward (WR) is introduced to encourage the effective use of the recall mechanism, boosting overall performance.

3. Results and Key Insights

The "SG+RWS+WR" model achieved significant improvements on the MSCOCO Karpathy test split, reaching a CIDEr score of 129.1 and a BLEU-4 score of 38.7.

Ablation studies revealed that retrieving the top 5 most similar captions provides the optimal balance between useful information and noise. Qualitatively, the recall mechanism enables the model to capture specific attributes and spatial relationships—such as the color of an airplane or its position relative to buildings—that baseline models often miss.

4. Conclusion

The recall mechanism successfully bridges the gap between visual perception and linguistic memory in image captioning. While performance is dependent on the quality of the retrieval module and the size of the corpus, this approach demonstrates the power of leveraging "past experiences" for more accurate and rich descriptions. Future work includes applying this mechanism to Transformer-based architectures.

Summary updated

Abstract

Generating natural and accurate descriptions in image cap-tioning has always been a challenge. In this paper, we pro-pose a novel recall mechanism to imitate the way human con-duct captioning. There are three parts in our recall mecha-nism : recall unit, semantic guide (SG) and recalled-wordslot (RWS). Recall unit is a text-retrieval module designedto retrieve recalled words for images. SG and RWS are de-signed for the best use of recalled words. SG branch cangenerate a recalled context, which can guide the process ofgenerating caption. RWS branch is responsible for copyingrecalled words to the caption. Inspired by pointing mecha-nism in text summarization, we adopt a soft switch to balancethe generated-word probabilities between SG and RWS. Inthe CIDEr optimization step, we also introduce an individualrecalled-word reward (WR) to boost training. Our proposedmethods (SG+RWS+WR) achieve BLEU-4 / CIDEr / SPICEscores of 36.6 / 116.9 / 21.3 with cross-entropy loss and 38.7 /129.1 / 22.4 with CIDEr optimization on MSCOCO Karpathytest split, which surpass the results of other state-of-the-artmethods.
BibTeX
@inproceedings{wang2020show,
  author = {Li Wang and Zechen Bai and Yonghua Zhang and Hongtao Lu},
  title = {{Show, Recall, and Tell: Image Captioning with Recall Mechanism}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i07.6898},
}
Figure