Introduction
Image captioning has traditionally focused on enhancing visual encoders to extract richer features from images. However, the decoder—the component responsible for translating these features into natural language—remains a significant bottleneck. Standard decoders, often built on Long Short-Term Memory (LSTM) networks, struggle to maintain long-term dependencies and lack a robust sense of syntactic structure. This often leads to captions that "forget" early context or fail to follow the natural rhythm of human language, especially in complex scenes.
The Reflective Decoding Network (RDN)
To address these limitations, we propose the Reflective Decoding Network (RDN). The RDN enhances the traditional encoder-decoder framework by teaching the decoder to "look back" at its own generation history through two novel components:
- Reflective Attention Module (RAM): Unlike standard LSTMs that pass only the most recent hidden state forward, the RAM allows the model to attend to all previously generated hidden states. By calculating "reflective" weights, the model identifies which past words are most relevant to the current prediction. This explicitly models coherence across long distances, such as correctly linking the word "bridge" to the later prediction of "river."
- Reflective Position Module (RPM): This module injects a sense of structural progress into the generation process. Trained in a supervised manner to predict the relative position of the current word (e.g., 10% vs. 90% through the caption), the RPM helps the model learn syntactic paradigms, such as knowing that subjects typically appear at the start and objects at the end.
The system utilizes an object-level encoder powered by Faster R-CNN with a ResNet-101 backbone. This provides the decoder with high-quality, "bottom-up" visual features derived from 1,600 object classes and 400 attributes defined in the Visual Genome dataset.
Experimental Results
The RDN was evaluated on the MS COCO benchmark using the popular "Karpathy" split. The model achieved state-of-the-art performance, reaching a CIDEr score of 115.3 for a single model and 117.3 for an ensemble, outperforming established baselines like Up-Down and RFNet.
One of the most significant insights from the evaluation is the RDN's superiority in handling complexity. As shown in the performance analysis, the relative performance gain of RDN over the Up-Down baseline increases as the task becomes more challenging (represented by subsets of the most frequent captions).
Ablation studies confirmed that both the RAM and RPM are essential for high-quality generation. Removing either component led to a measurable drop in performance, proving that long-term memory and position perception are critical for generating coherent, detailed descriptions.
Conclusion
The Reflective Decoding Network demonstrates that "textual attention" is as vital as visual attention in image captioning. By incorporating reflective mechanisms, the model maintains logical flow and syntactic integrity even in long, descriptive sentences. While the model still faces challenges like exposure bias—the discrepancy between training on ground-truth words and inference on its own predictions—the reflective architecture offers a promising path forward for other sequential tasks such as text summarization and source code captioning.
Summary updated