Abstract
Image captioning has traditionally been dominated by "CNN+RNN" architectures, where a convolutional network extracts visual features and a recurrent network generates text. However, RNNs suffer from sequential bottlenecks and long-range forgetting. This paper introduces a "CNN+CNN" framework that replaces the RNN decoder with a parallelizable convolutional neural network. By leveraging causal convolutions and a novel hierarchical attention mechanism, the proposed model trains three times faster than standard LSTM-based approaches while achieving superior performance on metrics such as CIDEr.
Introduction
The task of image captioning—generating natural language descriptions for visual content—requires a bridge between computer vision and natural language processing. The standard approach involves a CNN encoder and an RNN (typically an LSTM) decoder. While effective, RNNs are inherently sequential, preventing full utilization of GPU parallelism during training. Furthermore, the linear structure of RNNs makes it difficult to maintain long-range dependencies in extended captions.
To address these limitations, this research proposes using CNNs as decoders. Unlike RNNs, CNNs can process all words in a training sequence simultaneously and provide a hierarchical structure that shortens the path between distant words.
Architecture and Methodology
The CNN+CNN framework consists of four primary components:
- Vision Module: A VGG-16 network (excluding fully connected layers) extracts a grid of feature vectors from the input image.
- Language Module: A stack of convolutional layers replaces the traditional RNN. To maintain the autoregressive property, the authors use causal convolutions, achieved by padding the input sequence. Gated Linear Units (GLUs) are used as activation functions to regulate information flow.
- Attention Module: A dot-product mechanism calculates the relevance of specific image regions for each word.
- Hierarchical Attention: Instead of applying attention only at the final layer, this model applies it at every layer of the language CNN. This allows the network to associate low-level visual features with simple concepts and high-level features with complex phrases.
Key Insights: CNNs as Tree Learners
A core argument of this work is that stacked convolutional layers naturally learn a hierarchical "tree" structure of a sentence. This provides a significantly shorter information path compared to the linear chain of an RNN, mitigating the "forgetting" problem for long-range dependencies.
Furthermore, the parallel nature of CNNs leads to substantial efficiency gains. The authors report a 3x training speedup over the popular LSTM-based NIC model, reducing batch processing time from 0.64s to 0.24s on a GTX1080 GPU.
Experimental Results
The model was evaluated on MSCOCO, Flickr30k, and the Paragraph Annotation Dataset (PAD).
- Performance: On MSCOCO, the model achieved a CIDEr score of 0.844, outperforming the LRCN (0.837) while maintaining competitive BLEU and METEOR scores.
- Long-form Text: On the PAD dataset, which features captions averaging 67.5 words, the CNN+CNN model with a larger kernel width significantly outperformed hierarchical LSTMs (CIDEr 0.152 vs 0.135).
- Qualitative Analysis: Visualization of attention maps confirmed that the model accurately focuses on relevant objects during word generation.
Conclusion and Future Work
The CNN+CNN framework demonstrates that convolutional decoders are a viable and more efficient alternative to RNNs for image captioning. While training is significantly faster, inference remains sequential as words must be generated one by one. Future research may explore more sophisticated attention mechanisms or optimized inference techniques to further enhance performance in complex scenes.
Summary updated