Evcap: Retrieval-Augmented Image Captioning with External Visual-Name Memory for Open-World Comprehension

Jiaxuan Li, Duc Minh Vo, Akihiro Sugimoto, Hideki Nakayama

Abstract

EVCAP is a retrieval-augmented image captioning model designed for open-world comprehension. By leveraging an external visual-name memory and a lightweight architecture (3.97M trainable parameters), EVCAP enables Large Language Models (LLMs) to describe novel objects and unusual scenes without expensive retraining. It achieves performance competitive with models 300 times its size while mitigating linguistic biases common in traditional retrieval-augmented methods.

Introduction

Standard image captioning models are limited by a "knowledge cut-off," struggling to describe objects or contexts not present in their training data. While scaling models to billions of parameters or using retrieval-augmented methods (retrieving full captions) are common solutions, they are often computationally expensive or prone to "stereotyping." For instance, a model might see "skates" and "wood floor" but hallucinate an "ice rink" because of linguistic priors in retrieved text. EVCAP addresses these challenges by retrieving specific object names rather than full narratives, providing factual anchors for a frozen LLM.

Methodology

The EVCAP architecture integrates an external memory into a frozen Vicuna-13B LLM through a lightweight adapter.

The EVCAP pipeline: Object Name Retrieval from External Visual-Name Memory, followed by Attentive Fusion and Caption Generation.

External Visual-Name Memory

Instead of storing complex sentences, EVCAP stores pairs of image embeddings and object names. This memory is populated using 1,203 categories from the LVIS dataset, augmented with synthetic images from Stable Diffusion to ensure visual diversity across different angles and contexts.

Retrieval and Fusion

  1. Object Name Retrieval: A frozen Vision Transformer (ViT) and trainable query tokens identify the top-K most similar object names in the memory via cosine similarity.
  2. Attentive Fusion: A customized, lightweight Q-Former (3.97M parameters) processes retrieved names and original image features. It uses cross-attention to filter irrelevant names and distill visual-name features.
  3. Frozen LLM Decoder: These distilled features are projected into the latent space of a frozen Vicuna-13B, which generates the final caption based on the provided factual anchors.

Results and Discussion

EVCAP demonstrates significant efficiency and robustness in "open-world" scenarios.

Performance comparison on COCO and NoCaps benchmarks, alongside a qualitative example of EVCAP correctly identifying ice skates on a wooden floor.

Efficiency and Performance

Despite having only 3.97M trainable parameters, EVCAP outperformed MiniGPT4 by over 10 CIDEr points on the NoCaps benchmark. Its CIDEr score of 119.3 on NoCaps is competitive with much larger models like BLIP-2 (1.2B trainable parameters) and REVEAL (2.1B trainable parameters).

Commonsense Robustness

On the WHOOPS dataset, which contains commonsense-violating images, EVCAP successfully identified "ice skates" on a "wood floor." In contrast, models like SmallCap incorrectly predicted "skateboard" or "ice rink," highlighting EVCAP's ability to overcome linguistic biases through precise object-name retrieval.

Zero-Shot Adaptation

A key advantage of the external memory is its "plug-and-play" nature. New objects can be added to the model's vocabulary by simply updating the database with a few images and names, requiring no further fine-tuning of the neural network.

Conclusion

EVCAP provides a scalable and efficient solution for open-world image captioning. By focusing on object-name retrieval and a lightweight fusion mechanism, it bridges the gap between massive pre-trained knowledge and the ever-evolving real world, achieving state-of-the-art results with minimal computational overhead.

Summary updated

BibTeX
@inproceedings{li2023evcap,
  author = {Jiaxuan Li and Duc Minh Vo and Akihiro Sugimoto and Hideki Nakayama},
  title = {{Evcap: Retrieval-Augmented Image Captioning with External Visual-Name Memory for Open-World Comprehension}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure