Abstract
Recently it has been shown that policy-gradient methods for reinforcement learning can be utilized to train deep end-to-end systems directly on non-differentiable metrics for the task at hand. In this paper we consider the problem of optimizing image captioning systems using reinforcement learning, and show that by carefully optimizing our systems using the test metrics of the MSCOCO task, significant gains in performance can be realized. Our systems are built using a new optimization approach that we call self-critical sequence training (SCST). SCST is a form of the popular REINFORCE algorithm that, rather than estimating a baseline to normalize the rewards and reduce variance, utilizes the output of its own test-time inference algorithm to normalize the rewards it experiences. Using this approach, estimating the reward signal (as actor-critic methods must do) and estimating normalization (as REINFORCE algorithms typically do) is avoided, while at the same time harmonizing the model with respect to its test-time inference procedure. Empirically we find that directly optimizing the CIDEr metric with SCST and greedy decoding at test-time is highly effective. Our results on the MSCOCO evaluation server establish a new state-of-the-art on the task, improving the best result in terms of CIDEr from 104.9 to 114.7.
Introduction
Most image captioning systems are traditionally trained using Cross-Entropy (XE) loss, where the model learns to maximize the probability of the next "ground-truth" word given the previous ground-truth words. While effective for learning language patterns, this approach leads to two major issues:
- Exposure Bias: During training, the model always sees perfect ground-truth sequences. At test time, however, it must generate words based on its own previous predictions. Errors can accumulate quickly, leading to nonsensical captions.
- Metric Mismatch: Models are evaluated using discrete metrics like CIDEr, BLEU, or METEOR, but they are trained to maximize word-level log-likelihood. A model might achieve a high likelihood score while producing a caption that humans find repetitive or inaccurate.
While Reinforcement Learning (RL) can theoretically solve these problems by optimizing for sequence-level rewards, standard RL algorithms like REINFORCE are notoriously difficult to train due to high variance in the reward signal, often requiring complex "critic" networks to establish a baseline.
The Self-Critical Sequence Training (SCST) Approach
Researchers at IBM have developed Self-Critical Sequence Training (SCST) to overcome these hurdles. SCST is a variation of the REINFORCE algorithm with a clever twist: the model acts as its own critic.
In this framework, the model generates two captions for an image during training:
- Sampled Caption: A sequence generated by sampling from the model's current probability distribution.
- Greedy Caption: The model's "best guess" (the most likely word at each step), which is exactly what it would do during test-time inference.
The reward (e.g., the CIDEr score) of the greedy prediction serves as the baseline. If the random sample achieves a higher score than the greedy baseline, the model is encouraged to move in that direction. If the sample is worse, it is suppressed. This approach "harmonizes" the model with its own test-time inference procedure without requiring an extra network to estimate rewards, making it computationally efficient and stable.
Experimental Results
The authors evaluated SCST on the MSCOCO benchmark, using the popular "Karpathy splits" for training and validation. They also utilized the Objects Out-of-Context (OOOC) dataset to test how well the model generalizes to unusual visual scenarios.
As shown in the table below, SCST significantly outperforms standard Cross-Entropy training and previous RL-based approaches like MIXER across all major evaluation metrics.
Key Insights
- Direct Metric Optimization: Training specifically on the CIDEr metric not only maximizes CIDEr scores but also tends to lift other metrics like BLEU and ROUGE.
- State-of-the-Art Performance: On the official MSCOCO evaluation server, an SCST-trained ensemble reached a CIDEr score of 114.7, a substantial improvement over the previous best of 104.9.
- Improved Attention: While all models improved, attention-based architectures showed better "common sense" on out-of-context images after SCST training, as the method helped the model focus more sharply on relevant visual entities.
Conclusion
Self-Critical Sequence Training provides a simple and effective way to train sequence generation models directly on the metrics that matter most. By using the model's own inference as a baseline, SCST avoids the complexity of actor-critic methods while delivering state-of-the-art results. Future work may see SCST applied to other domains such as machine translation and text summarization.
Summary updated