Image Captioning based on Deep Reinforcement Learning

Haichao Shi, Peng Li, Bo Wang, Zhenyu Wang · DOI

Abstract

Recent advancements in natural language processing have demonstrated the utility of policy-gradient methods for training deep end-to-end systems. However, image captioning remains a significant challenge due to the complexity of visual understanding and the diverse linguistic ways to describe content. While most state-of-the-art methods rely on sequential models like Recurrent Neural Networks (RNNs), this paper proposes a novel architecture using Deep Reinforcement Learning (DRL) to optimize caption generation. By utilizing a collaborative framework of "policy" and "value" networks, our method generates more coherent and globally optimized descriptions. Experimental results on the Microsoft COCO dataset verify the effectiveness of this approach.

Introduction: Beyond Local Confidence

Traditional image captioning models typically employ an encoder-decoder architecture, using a Convolutional Neural Network (CNN) to extract visual features and an RNN to generate text. These models are generally trained to maximize the likelihood of the next word in a sequence.

This standard approach suffers from a reliance on local confidence. A model may select a word with high immediate probability that ultimately leads to a generic, repetitive, or logically inconsistent sentence. We argue that image captioning is better framed as a sequential decision-making process. The objective should not be to simply predict the next likely token, but to maximize the overall quality and semantic accuracy of the entire resulting sentence.

Proposed Method: Actor-Critic Framework

We propose a novel architecture based on Actor-Critic reinforcement learning principles, consisting of two primary components that work in tandem to generate captions.

The proposed Deep Reinforcement Learning framework for image captioning, featuring collaborative policy and value networks.

1. The Policy Network ($q_\pi$)

Acting as the "agent," the policy network predicts the probability of choosing a specific word (an "action") at each time step. It utilizes a VGG-16 CNN for image feature extraction and a Long Short-Term Memory (LSTM) network to maintain the state of the evolving sentence.

2. The Value Network ($v_\pi$)

Acting as the "judge," the value network evaluates the current state—comprising both the image and the words generated so far—to predict the expected long-term reward. This allows the model to "look ahead" and determine if a specific word choice will lead to a high-quality final caption.

Architecture of the Value Network, which evaluates the state to predict expected rewards.

Training Strategy

The training process involves two distinct phases:

  • Pre-training: The policy network is initialized using standard supervised learning (cross-entropy loss), while the value network is pre-trained using mean squared error.
  • Joint Reinforcement Learning: Both networks are then trained together using the Temporal Difference (TD) method.
  • Reward Mechanism: To provide a nuanced signal, we map images and captions into a shared "semantic embedding space." The reward is calculated based on the mathematical similarity between the image's visual features and the caption's semantic features.

Experimental Results

The model was evaluated on the Microsoft COCO (MS COCO) dataset, utilizing over 80,000 images for training and 5,000 each for validation and testing. Our DRL-based approach demonstrated significant improvements over classic baselines:

  • CIDEr Score: Our model achieved a score of 90.7, notably outperforming the Google NIC model (85.5) and gLSTM (81.3). This metric is particularly relevant as it is designed to capture human consensus.
  • METEOR: The model tied with the high-performing "Semantic ATT" model at 24.3, indicating strong performance in grammatical correctness and semantic meaning.
  • Qualitative Performance: Visual analysis confirms the model's ability to recognize complex relationships, correctly generating descriptive phrases such as "a man is surfing in the sea."

Conclusion and Future Work

By shifting from local word prediction to global reward optimization, our DRL framework produces captions that are more natural and contextually aware. The collaborative nature of the policy and value networks provides a robust mechanism for sequential decision-making in linguistic tasks. Future research will focus on designing more sophisticated, non-linear reward mechanisms and integrating advanced attention modules to further refine the model's descriptive capabilities.

Summary updated

BibTeX
@misc{shi2018image,
  author = {Haichao Shi and Peng Li and Bo Wang and Zhenyu Wang},
  title = {{Image Captioning based on Deep Reinforcement Learning}},
  year = {2018},
  eprint = {1809.04835},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1809.04835},
}
Figure