Abstract
Visual attention plays an important role to understand images and demonstrates its effectiveness in generating natural language descriptions of images. On the other hand, recent studies show that language associated with an image can steer visual attention in the scene during our cognitive process. Inspired by this, we introduce a text-guided attention model for image captioning, which learns to drive visual attention using associated captions. For this model, we propose an exemplar-based learning approach that retrieves from training data associated captions with each image, and use them to learn attention on visual features. Our attention model enables to describe a detailed state of scenes by distinguishing small or confusable objects effectively. We validate our model on MS-COCO Captioning benchmark and achieve the state-of-the-art performance in standard metrics.
1. Introduction
Traditional visual attention mechanisms in image captioning typically compute attention weights based on visual features and the current hidden state of the language decoder. However, psychological research suggests that language often acts as a prior, steering visual attention toward specific regions before full scene processing is complete.
This paper introduces a text-guided attention model that leverages "guidance captions"—retrieved from visually similar images in a training set—to prime the model's focus. By using existing human descriptions as a prior, the model can better navigate cluttered scenes and distinguish between fine-grained or confusable objects.
2. Methodology
The proposed system utilizes an exemplar-based approach to guide visual attention through four primary stages:
2.1 Guidance Caption Extraction
For a target image, the system retrieves the $n$ most visually similar images from the training database. It then identifies the most representative "guidance captions" by calculating consensus scores using the CIDEr metric.
2.2 Dual Encoding and Attention
The model employs a CNN (e.g., ResNet) to extract spatial feature maps and a Skip-Thought Vector (STV) encoder to transform guidance captions into semantic vectors. The Text-Guided Attention (T-ATT) module then integrates these visual and textual features to generate an attention weight map, highlighting relevant regions while filtering out noise.
2.3 Decoding
The resulting context vector, representing the attended visual features, is passed to an LSTM decoder to generate the final natural language caption. To ensure robustness, the model is trained using a sampling-based scheme that randomly selects from the top $k$ consensus captions.
3. Experimental Results
The model was evaluated on the MS-COCO dataset using standard Karpathy splits. The "Ours-ATT-kCC" variant achieved state-of-the-art results at the time of publication:
- Quantitative Performance: The model outperformed established baselines such as NIC and Hard-ATT. Notably, it achieved a CIDEr score of 1.024 using a ResNet backbone, a significant improvement over previous benchmarks.
- Qualitative Precision: The text-guided mechanism allowed the model to capture fine-grained details (e.g., distinguishing "broccoli on a table" from a generic "pile of broccoli") that purely visual attention models often missed.
4. Discussion and Conclusion
The primary strength of this approach lies in using language as a visual prior, providing a "global hint" that improves attention accuracy. However, the model's performance is intrinsically linked to the quality of the retrieval database. Future research could explore dynamic attention updates during the generation process or more efficient retrieval methods to reduce inference latency.
Summary updated