Introduction
Zero-shot image captioning represents a significant frontier in computer vision and natural language processing, aiming to describe visual content without the need for paired image-text training data. While Large-scale Vision-Language Models (VLMs) like CLIP and Large Language Models (LLMs) like GPT have enabled progress in this area, they frequently struggle with two primary issues: modality bias and object hallucination.
Modality bias occurs when the LLM’s internal language prior overrides visual evidence, leading to descriptions based on common word associations rather than the actual image. Object hallucination is a related failure where models misidentify novel or out-of-domain (OOD) objects as familiar ones from their training set. This paper introduces ViECap, a novel approach that utilizes "Entity-aware Transferable Decoding" to mitigate these issues and achieve state-of-the-art performance in zero-shot scenarios.
The Problem: Modality Bias and Hallucination
Current "early-guidance" methods typically project CLIP image embeddings into the LLM as "soft prompts." While effective for in-domain data, these abstract vector representations often overfit to the training corpus. When the model encounters an OOD object—such as a "sea turtle" if it was only trained on common household objects—the soft prompt may "drift," causing the LLM to hallucinate a more familiar but incorrect label, like "surfboard."
To address this, researchers have sought ways to ground the LLM's generation in more stable visual evidence. ViECap addresses this by bridging the gap between abstract visual features and explicit textual concepts.
The ViECap Framework
ViECap introduces a dual-prompting strategy that combines global context with specific object anchors. The architecture relies on two distinct types of guidance:
- Soft Prompts: These are learnable vectors projected from CLIP embeddings. They are designed to capture the global context and atmospheric details of an image (e.g., "a sunny day at the beach").
- Hard Prompts: These are explicit nouns (entities) detected via a CLIP-based entity classifier. These entities act as "anchors" for the LLM. For an OOD image, the classifier identifies specific objects like "sea turtle," which are then formatted into a template: "There are sea turtle in the image."
The Entity Masking Strategy
A critical discovery during the development of ViECap was the "copy-then-paste" shortcut. If the LLM is provided with explicit entities, it often learns to simply repeat those nouns without integrating them into a coherent or contextually accurate description.
To break this habit, the authors implemented an Entity Masking Strategy during the training phase. By randomly dropping nouns from the hard prompts, the LLM is forced to rely on the soft prompts to recover the missing information. This synergy ensures the model synthesizes the global visual context with the specific objects, leading to more descriptive and accurate captions.
Text-Only Training Paradigm
ViECap is trained using a text-only paradigm, mapping CLIP text embeddings to captions. This allows the model to leverage the massive alignment already present in CLIP without requiring expensive paired image-text data for fine-tuning. This approach significantly enhances the model's ability to generalize to new domains.
Experimental Evaluation
The researchers evaluated ViECap across several benchmarks to test general performance, transferability, and stylistic flexibility:
- COCO: Used for standard in-domain (ID) performance evaluation.
- NoCaps: Designed to test OOD performance on objects not present in the COCO training set.
- Flickr30k: Utilized for cross-domain evaluation.
- FlickrStyle10K: Used to assess the model's ability to generate captions in specific styles, such as "romantic" or "humorous."
Key Results and Insights
ViECap demonstrated significant improvements over existing state-of-the-art (SOTA) methods, particularly in out-of-domain scenarios:
- OOD Superiority: On the NoCaps OOD subset, ViECap achieved a CIDEr score of 65.0, a substantial increase over previous text-only methods like CapDec (28.7) and DeCap (25.8).
- Cross-Domain Transfer: When trained on COCO and tested on Flickr30k, ViECap set new records across all primary metrics, including B@4, METEOR, CIDEr, and SPICE.
- Data Efficiency: The model is remarkably efficient; even when trained on only 0.1% of the COCO dataset, it outperformed previous SOTA models on OOD tasks. This suggests that ViECap learns a generalizable decoding strategy rather than simple data memorization.
- Scalability: Performance continued to improve as the underlying LLM was scaled up (e.g., from GPT-2 to OPT-2.7B), indicating the method is well-suited for future foundation models.
Conclusion and Future Work
ViECap successfully demonstrates that explicit visual entities can serve as robust anchors to prevent object hallucination in zero-shot image captioning. By combining these "hard prompts" with global "soft prompts" and utilizing a strategic masking technique, the model achieves unprecedented transferability.
While highly effective, the model is currently limited by the vocabulary of its entity classifier. Future work may involve integrating more complex visual relationships—such as actions and spatial attributes—into the hard prompts to generate even richer and more nuanced descriptions.
Summary updated