Introduction
Image captioning requires a model to translate visual information into natural language. While reinforcement learning (RL) has significantly improved captioning by optimizing sequence-level rewards (like CIDEr), most efforts have focused on the "language policy"—deciding which word comes next. However, human vision is not a static scan; it is a sequential decision-making process. To describe a complex scene, such as a "man riding a horse," a model must relate disparate image regions over time.
Traditional attention mechanisms often fail to capture these relationships because they treat each "gaze" as independent, relying on a weak language model state to remember visual history. This paper introduces the Context-Aware Visual Policy (CAVP) network, which explicitly treats visual attention as a policy that remembers previous gazes to better capture compositions and attributes.
The Context-Aware Visual Policy (CAVP)
The CAVP framework shifts the focus from optimizing just the language model to optimizing the visual encoder itself. It treats the visual attention mechanism as a dynamic agent that decides where to look based on its own history.
The architecture is decomposed into four specialized sub-policy networks:
- Single Sub-policy ($\pi^s$): Identifies individual salient regions in the image.
- Context Sub-policy ($\pi^c$): Scans previous visual attentions to determine which historical "gazes" are relevant to the current step.
- Composition Sub-policy ($\pi^p$): Fuses the current region with the selected historical context to form a "compositional" feature.
- Output Sub-policy ($\pi^o$): Synthesizes these features into a final representation ($v_t$) for the language model.
Training Strategy
The model is trained in two stages. Initially, it uses standard cross-entropy (XE) loss. Subsequently, it is fine-tuned using an actor-critic policy gradient method. The authors employ a "self-critic" baseline, comparing the reward of a sampled caption against a greedy-searched baseline to stabilize the gradient updates.
Experimental Results
The CAVP model was evaluated on the MS-COCO dataset using the Karpathy split and the official online leaderboard.
Quantitative Performance
CAVP achieved state-of-the-art results, reaching a CIDEr score of 121.6 on the offline test split and 123.8 on the online server. Beyond standard n-gram metrics, the model showed significant gains in SPICE scores, which measure semantic quality. Specifically, it outperformed the strong "Up-Down" baseline in capturing Relations (6.24 vs 5.90) and Attributes (9.36 vs 8.82), validating the effectiveness of the compositional visual policy.
Qualitative Insights
Visualizations confirm that the model successfully "links" regions. For instance, when generating the word "brushing," the context-aware policy explicitly looks back at both the "hand" and the "toothbrush" regions simultaneously, demonstrating a higher level of scene understanding than traditional attention.
Conclusion
By making visual context explicit rather than implicit, the CAVP framework allows image captioning models to perform complex relational reasoning. While the multi-stage architecture increases computational complexity, the gains in semantic accuracy and relational understanding mark a significant step forward. Future work may involve integrating CAVP into more complex search strategies like Monte Carlo Tree Search or extending it to multi-step reasoning tasks like Visual Question Answering (VQA).
Summary updated