Meta Learning for Image Captioning.

Nannan Li, Zhenzhong Chen, Shan LiuAAAI 2019

Abstract

Reinforcement learning (RL) has shown its advantages in image captioning by optimizing non-differentiable metrics directly. However, due to the reward hacking problem in RL, maximizing rewards may not lead to better caption quality, particularly regarding propositional content and distinctiveness. In this work, we propose a meta-learning framework to utilize supervision from ground truth while simultaneously optimizing the reward function. By taking distinct gradient steps toward the supervision and reinforcement tasks, our model provides a global optimal solution. Experimental results on MS COCO validate the effectiveness of our approach compared to state-of-the-art methods.

The Problem: Reward Hacking in Image Captioning

In image captioning, Reinforcement Learning (RL) is typically used to optimize metrics like CIDEr. While this improves scores, it often leads to "reward hacking." Because metrics like CIDEr rely on n-gram overlap, RL-trained models can "game the system" by producing generic or grammatically repetitive phrases that hit more n-gram matches but lack descriptive substance.

Figure 5: Frequency of generic phrase endings (e.g., "of a", "on a") in RL-trained models, illustrating the reward hacking problem.

As shown in the analysis of model outputs, pure RL models frequently append repetitive endings like "with a" or "and a" to pad sentences. This results in a loss of "propositional correctness" (accurately describing the scene) and "distinctiveness" (creating a unique caption for a specific image). Simply combining Supervised Learning (MLE) with RL via a weighted loss sum often fails because the two tasks have conflicting gradient directions, leading to a sub-optimal compromise.

Methodology: A Meta-Learning Approach

To resolve these conflicting objectives, we treat image captioning as a multi-task learning challenge using a Model-Agnostic Meta-Learning (MAML) framework. Our architecture utilizes a CNN-LSTM structure with dual attention mechanisms.

The Gradient Optimization Strategy

Instead of a simple weighted sum of losses, the model performs a "look-ahead" gradient step for the supervision task (MLE) and the reinforcement task (RL) independently. It then calculates a meta-update that moves parameters toward a point beneficial to both tasks. This ensures that reward optimization is consistently guided by ground-truth supervision, preventing the model from drifting into nonsensical "hacked" solutions.

Figure 6: Comparison of gradient directions in standard multi-task learning versus the proposed meta-learning update to find a global optimal.

Key Results and Insights

We evaluated our approach on the MS COCO dataset using the Karpathy split. The meta-learning model consistently outperformed standard RL and MLE+RL baselines:

  • Metric Performance: The model achieved a CIDEr score of 121.0 and a SPICE score of 21.7, surpassing the RL-only baseline.
  • Distinctiveness: A key metric for quality is "self-retrieval" (the ability of a caption to identify its own image). Our model achieved a 56.9% recall rate (R@1), a significant improvement over the 38.9% achieved by standard RL models.
  • Propositional Content: Breakdown of SPICE scores indicated that our approach is significantly better at identifying specific objects and their relations within a scene.

By forcing the model to remain sensitive to ground-truth probability, the meta-learning approach effectively eliminates the epidemic of generic sentence endings that plague pure RL models.

Conclusion

This work demonstrates that meta-learning provides a robust framework for balancing the strengths of supervised and reinforcement learning in image captioning. By navigating the conflicting gradients of these tasks, we can produce captions that are both high-scoring and semantically meaningful. Future work will explore evaluation metrics that prioritize semantic overlap over simple n-gram matching to further reduce the impact of reward hacking.

Summary updated

BibTeX
@inproceedings{li2019meta,
  author = {Nannan Li and Zhenzhong Chen and Shan Liu},
  title = {{Meta Learning for Image Captioning.}},
  booktitle = {AAAI},
  year = {2019},
  url = {https://openreview.net/forum?id=SXANRlGg_TB},
}
Figure