Context-Aware Visual Policy Network for Fine-Grained Image Captioning

Zheng-Jun Zha, Daqing Liu, Hanwang Zhang, Yongdong Zhang, Feng Wu · DOI

Introduction

Modern image captioning has evolved significantly, yet generating fine-grained, descriptive text remains a challenge. Traditional models often excel at object identification but struggle with compositional reasoning—the ability to describe complex relationships between objects. This paper, published in IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), proposes a novel Context-Aware Visual Policy (CAVP) network. Unlike standard models that treat visual attention as a static, step-by-step process, CAVP introduces an explicit visual memory to enable more sophisticated decision-making.

Example of fine-grained image sentence and paragraph captioning tasks.

The Problem: Visual Forgetting in Compositional Reasoning

Standard encoder-decoder architectures typically rely on a language policy to predict the next word based on linguistic context. However, their visual policy—deciding where to look—often lacks historical context. Standard attention mechanisms "forget" previous glimpses, making it difficult to model relationships like "man riding horse" or to maintain consistency in long-form paragraph generation. The authors argue that the visual policy should be as dynamic and context-aware as the language policy.

Methodology: Context-Aware Visual Policy (CAVP)

The core of the proposed approach is the CAVP framework, which explicitly incorporates previous visual attentions as context for current decision-making. By creating an explicit visual context buffer, the model can "connect the dots" between different parts of the image more effectively than models that rely solely on an overloaded RNN hidden state.

Comparison of (a) traditional supervised frameworks, (b) standard RL-based frameworks, and (c) the proposed CAVP framework which utilizes historical visual context.

Sub-Policy Networks

To manage visual reasoning complexity, CAVP decomposes the visual policy into four specialized sub-networks:

  1. Single SP: Identifies the primary region for the current step.
  2. Context SP: Retrieves relevant historical glimpses from the visual memory.
  3. Composition SP: Models the relationship between the current region and the retrieved context.
  4. Output SP: Weights the current glimpse against the historical context to produce the final visual representation.

Hierarchical Architecture and Training

For paragraph captioning, a hierarchical CAVP is employed. A sentence-level policy sets the topic and visual focus, guiding a word-level policy to generate text. The model is trained using Reinforcement Learning (RL), specifically an actor-critic policy gradient method. To ensure stability, the authors use Behavioral Cloning to pre-train the model on expert policies before fine-tuning with sequence-level rewards like CIDEr.

Key Insights and Results

The authors evaluated CAVP on the MS-COCO and Stanford Image-Paragraph datasets. Key findings include:

  • State-of-the-Art Performance: CAVP achieved a CIDEr score of 126.3 on MS-COCO, outperforming previous RL-based models like SCST and Up-Down.
  • Improved Reasoning: The model showed significant gains in SPICE sub-metrics, particularly in "Relations" (improving from 5.90 to 6.24), indicating better compositional reasoning.
  • Paragraph Coherence: On the Stanford dataset, the hierarchical CAVP produced more coherent and descriptive paragraphs by effectively tracking the "storyline" of an image through its visual memory.

Conclusion

The CAVP framework demonstrates that an explicit visual memory is crucial for fine-grained image captioning. By decomposing the visual policy and maintaining historical context, the model can perform complex reasoning tasks that were previously difficult for standard attention mechanisms. Future work may explore integrating Monte Carlo Tree Search (MCTS) for better planning and extending the framework to tasks like Visual Question Answering (VQA).

Summary updated

BibTeX
@article{zha2019context,
  author = {Zheng-Jun Zha and Daqing Liu and Hanwang Zhang and Yongdong Zhang and Feng Wu},
  title = {{Context-Aware Visual Policy Network for Fine-Grained Image Captioning}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2019},
  doi = {10.1109/tpami.2019.2909864},
}
Figure