Exploring Annotation-free Image Captioning with Retrieval-augmented Pseudo Sentence Generation

Zhiyuan Li, Dongnan Liu, Heng Wang, Chaoyi Zhang, Weidong Cai

TL;DR

RaPSG (Retrieval-augmented Pseudo Sentence Generation) is a novel framework that trains high-performing image captioners without requiring a single human-annotated image-text pair. By distilling knowledge from large pre-trained models (LPMs) to synthesize diverse, high-quality "pseudo-sentences" from retrieved region descriptions, it outperforms massive models like Flamingo3B while using a fraction of the data and parameters.

What Problem Does This Paper Address?

Modern image captioning models are data-hungry, typically requiring millions of human-annotated image-sentence pairs to achieve high performance. Collecting these is expensive and time-consuming.

Existing "annotation-free" alternatives have significant drawbacks:

  1. Unsupervised/Weakly-supervised methods often "crawl" whole sentences from external corpora. As shown in Figure 1(a), these crawled sentences are often noisy or irrelevant (e.g., naming a stadium rather than describing the action in the image).
  2. Large-scale pre-training (like Flamingo or BLIP-2) requires massive computational resources and billions of external image-text pairs to learn a "mapper" between vision and language.

The authors aim to bridge this gap by generating accurate, diverse, and fluent training labels on-the-fly using the prior knowledge already embedded in frozen LPMs.

The comparison between whole sentence crawling strategy and the generation-based RaPSG method.

Methods

The core of the paper is the RaPSG framework, which operates in two main stages to create a high-quality training set of pseudo-labels:

  • Stage I: Region-to-Sentence Summarization: For a given image, the system uses CLIP to retrieve the top-$k$ most relevant region descriptions from an external corpus (Visual Genome). These short, choppy descriptions are grouped by semantic similarity using Sent-BERT and then "glued" into coherent sentences using the summarization capabilities of BART.
  • Stage II: Generative Refinement: A preliminary captioner is trained on Stage I data. Then, LLaMA-7B is used to synthesize a final, more detailed pseudo-sentence by combining the preliminary captioner's predictions with the original retrieved region descriptions.
  • Fluency Filter: To handle the "hallucinations" or awkward phrasing common in AI-generated text, the authors use a self-supervised filter. It ranks the generated pseudo-sentences against the model's own predictions using the CIDEr metric, keeping only the most "natural" ones for training (see Figure 5).
  • CLIP Guidance: To ensure the model doesn't lose sight of the actual image content, a contrastive loss (InfoNCE) is applied, forcing the generated captions to remain close to the image in CLIP's shared embedding space.
The overview of the proposed framework, featuring RaPSG, the fluency filter, and CLIP guidance.

Datasets

The authors evaluated RaPSG on two primary benchmarks:

  • MSCOCO: The gold standard for image captioning.
  • Flickr30k: A popular dataset for evaluating model robustness across different domains.
  • Visual Genome (VG): Used as the external "mismatching" corpus for retrieving region descriptions (with overlaps to MSCOCO removed to ensure a fair test).

Key Insights and Ideas

  • Regions over Sentences: The "aha moment" is that retrieving region-level descriptions is far more effective than retrieving whole sentences. Regions provide the raw building blocks (objects, attributes) that a language model can then assemble into a perfectly tailored description for a new image.
  • Summarization as Distillation: Using BART and LLaMA as "summarizers" effectively distills the broad knowledge of these LLMs into the specific task of image captioning without needing to fine-tune the LLMs themselves.
  • Self-Correction via Fluency: The model uses its own evolving "common sense" (via the fluency filter) to clean its training data, creating a virtuous cycle of improvement.
A comparison showing how the fluency filter selects more natural-sounding sentences.

Key Results

RaPSG demonstrates remarkable efficiency and accuracy:

  • Outperforming Giants: On MSCOCO, RaPSG (using a DIFNet backbone) achieved a CIDEr score of 78.1, surpassing Flamingo3B (73.0). Remarkably, RaPSG has roughly 30x fewer trainable parameters and was trained on only 0.45M pseudo-sentences (0.14% of the data used by Flamingo).
  • Semi-Supervised Prowess: When given just 1% of human labels to fine-tune, the model reached a CIDEr score of 93.4, an 8.9-point improvement over previous state-of-the-art methods.
  • Cross-Domain Robustness: The model showed significant gains in zero-shot cross-domain tasks (e.g., training on one dataset and testing on another), proving that the pseudo-sentence generation generalizes well.

Limitations and Future Work

The authors note that the summarization step (BART) can sometimes struggle with complex spatial relationships or a "batch of similar objects," occasionally leading to slightly nonsensical sentences like "kite flying in a park is fun" instead of "flying a kite in a park is fun."

Future work could involve using even more powerful LLMs or specialized vision-language models to better capture these intricate relational details during the pseudo-sentence generation phase.

Summary updated

BibTeX
@inproceedings{li2024exploring,
  author = {Zhiyuan Li and Dongnan Liu and Heng Wang and Chaoyi Zhang and Weidong Cai},
  title = {{Exploring Annotation-free Image Captioning with Retrieval-augmented Pseudo Sentence Generation}},
  booktitle = {Mmasia},
  year = {2024},
  doi = {10.1145/3696409.3700223},
}
Figure