Source-linked AI summary

Convolutional Image Captioning

Jyoti Aneja, Aditya Deshpande, Alexander Schwing

arXiv:1711.09151v1cs.CV

TL;DR

Image captioning is valuable but difficult because descriptions vary and are ambiguous, while LSTM-based methods are sequential and complex. The paper develops a convolutional captioning technique, evaluates it on MSCOCO, and finds performance on par with LSTM methods, including .952 CIDEr and .316 BLEU-4. Its analysis identifies properties favoring convolutional language generation, although recurrent methods retain reported training and optimization concerns.

  • Problem

    LSTM-based captioning methods memorize dependencies but remain complex and inherently sequential, motivating alternatives for image captioning.

  • Method

    The paper develops a feed-forward convolutional image-captioning model with masked convolutions and also evaluates an attention mechanism over spatial image features.

  • Results

    .952 CIDEr matches LSTM performance on MSCOCO, while .316 BLEU-4 is better than the LSTM baseline; CNN attention outperforms the LSTM+Attention baseline.

  • Takeaways & Limitations

    Convolutional captioning can perform on par with LSTM-based approaches while offering analyzed properties such as higher output entropy and no vanishing gradients.

  • Takeaways & Limitations

    RNN-based captioning remains inherently sequential during training because each output depends on the preceding output.

Abstract

from arXiv · show

Image captioning is an important but challenging task, applicable to virtual assistants, editing tools, image indexing, and support of the disabled. Its challenges are due to the variability and ambiguity of possible image descriptions. In recent years significant progress has been made in image captioning, using Recurrent Neural Networks powered by long-short-term-memory (LSTM) units. Despite mitigating the vanishing gradient problem, and despite their compelling ability to memorize dependencies, LSTM units are complex and inherently sequential across time. To address this issue, recent work has shown benefits of convolutional networks for machine translation and conditional image generation. Inspired by their success, in this paper, we develop a convolutional image captioning technique. We demonstrate its efficacy on the challenging MSCOCO dataset and demonstrate performance on par with the baseline, while having a faster training time per number of parameters. We also perform a detailed analysis, providing compelling reasons in favor of convolutional language generation approaches.

1. Introduction

Image captioning is useful across assistive, indexing, editing, and virtual-assistant applications, but LSTM-based approaches remain sequential and complex to train. The paper introduces a convolutional alternative that matches LSTM performance on MSCOCO and improves BLEU-4.

  • Image captioning describes image content for applications including editing recommendations, virtual assistants, image indexing, and disability support.
  • LSTMs memorize long-term dependencies and mitigate vanishing or exploding gradients, but their recurrent processing, memory mechanisms, and BPTT storage complicate training.
  • The paper studies convolutional architectures for image captioning, inspired by their success in conditional image generation and machine translation.
  • .952 CIDEr matches LSTM performance on MSCOCO, while .316 BLEU-4 is better than the LSTM baseline.
  • The paper contributes a CNN captioning method, an attention variant, and an analysis of CNN and LSTM characteristics.

2. Problem Setup and Notation

The task takes an image and generates a word sequence from a discrete vocabulary. Training uses paired images and ground-truth captions to maximize a conditional probabilistic model.

  • Image captioning maps an input image I to a sequence of words y = (y1, . . . , yN).
  • The vocabulary Y contains thousands of possible words and may include start, end-of-sentence, and unknown tokens.
  • The training set contains image-caption pairs (I, y∗), with each ground-truth caption represented as a sequence of vocabulary words.
  • Training maximizes, with respect to parameters w, the conditional probability model pw(y1, . . . , yN|I).
  • The paper reviews probabilistic models from hidden Markov models to recurrent networks before presenting its convolutional approach.

3. RNN Approach

The RNN image-captioning approach models each word sequentially through recurrent hidden states, typically using LSTM units, embeddings, and BPTT. This sequential design supports dependencies but creates training and gradient-related drawbacks.

  • Architecture: RNN captioning predicts one word at a time, with each output distribution depending on the image and prior hidden state.The hidden state is updated recurrently from the previous hidden state and word representation.
  • Architecture: The architecture combines input word embeddings, sequential LSTM units with memory cells, and output word embeddings.LSTM, GRU, and bidirectional LSTM variants can serve as the recurrent function.
  • Learning: Training uses shared recurrent functions across time and back-propagation through time to optimize word-embedding and recurrent parameters.BPTT is required because the recurrence is unrolled and gradients depend on successive time steps.
  • Learning: Teacher forcing supplies the ground-truth previous word during training instead of the model prediction.This simplifies gradient flow but creates different input statistics between training and testing.
  • Limitations: RNN training is inherently sequential, and RNNs can have lower classification accuracy and residual vanishing-gradient problems despite LSTM units.The paper presents the convolutional approach as an alternative intended to overcome some of these challenges.

4. Convolutional Approach

The convolutional approach replaces recurrent units with masked convolutions in a feed-forward network while preserving autoregressive dependence on past words. Training can proceed in parallel across word positions, although inference remains sequential.

  • Architecture: The CNN architecture retains word embeddings but replaces the RNN’s LSTM or GRU center with feed-forward masked convolutions.The convolutional component contains no recurrent function.
  • Autoregressive conditioning: Masked convolutional layers restrict each prediction to past words or their representations, preventing access to future tokens.This preserves the autoregressive structure while using convolutional computation.
  • Inference: During inference, generation starts with <S>, samples or selects a word, feeds it back into the network, and continues until <E> or a length bound.The model can sample, retrieve the maximizing argument, or use beam search.
  • Training: For training, the network predicts word probabilities from ground-truth past-word representations and optimizes parameters with a likelihood objective.The feed-forward function is applied using y*<i as the past-word input.
  • Training: At training time, all ground-truth words are available, so the CNN model can be trained in parallel for all word positions.This parallelism follows from the absence of recurrent connections.

5. Architecture

The model processes embedded words and image features through masked convolutions, then predicts output word probabilities, with an optional spatial attention mechanism.

  • Architecture: Ground-truth words pass through input embeddings, combine with image embeddings, and are processed by the CNN module before classification.The architecture adds start and end sentence tokens during training.
  • Convolutional module: The CNN module uses a receptive field of five past words and produces a 512-dimensional vector for each word after three layers.The same maximum sentence length, N = 15, is used for CNN and RNN models.
  • Training: Training uses cross-entropy on conditional word probabilities, fine-tunes VGG16 after eight epochs, and optimizes with RMSProp from an initial learning rate of 5e−5.All methods are trained for 30 epochs, with validation metrics used to select the best model.
  • Attention: The attention variant adds a 512-dimensional attended image vector to word embeddings at every convolutional layer using separate attention parameters for each word.Attention is computed over VGG16 conv-5 features arranged as a 7 × 7 × 512 spatial map.

6. Results and Analysis

The CNN approach performs comparably to LSTM-based captioning and improves with attention and beam search. Analyses indicate higher-entropy, more diverse predictions, stronger word accuracy, reduced gradient decay, and comparable training time despite more parameters.

  • Metric comparison: CNN captioning performs on par with LSTM approaches on image-captioning metrics, while beam search improves its performance.With beam size 3, CNN achieves better BLEU, ROUGE, and CIDEr scores than LSTM, with equal METEOR and SPICE.
  • Attention: Adding attention improves CNN metrics, outperforms the LSTM+Attn baseline, and focuses on salient image objects during word prediction.Attention is spatially represented on a 7 × 7 grid and becomes uniform for function words unrelated to image content.
  • CNN–RNN analysis: CNN produces higher-entropy output distributions and more unique words across positions, supporting more diverse caption predictions.Although CNN has higher cross-entropy loss, its maximum-probability word is more accurate on training data and within approximately 1% of RNN validation accuracy.
  • Metric comparison: On the hidden MSCOCO evaluation split, CNN outperforms LSTM on BLEU metrics and achieves comparable scores on other reported metrics.The evaluation uses 40,775 images, with comparisons at beam sizes 1 and 3 and scores computed using either 5 or 40 references.
  • Training efficiency: A CNN with 1.5× more parameters can be trained in comparable time to LSTM because convolutional processing is non-sequential.Training-time comparisons use PyTorch implementations on an Nvidia Titan X GPU.

7. Related Work

Prior image-captioning methods include retrieval, probabilistic models, and recurrent neural networks. LSTMs became widely used for their long-term memory, but their sequential computation and training requirements limit parallelization and complicate training.

  • Earlier approaches: Retrieval-based captioning selects descriptions from a caption pool but makes image–caption matching computationally expensive and requires a sufficiently comprehensive database.These methods can be trained end-to-end, but their coverage depends on the available caption collection.
  • Recurrent approaches: RNNs and probabilistic models decompose captions into individual-word predictions, while LSTM and GRU components capture long-term dependencies through memory mechanisms.These models address vanishing or exploding gradients compared with simpler recurrent formulations.
  • Recurrent approaches: LSTM-based systems are widely used across vision-language tasks because they memorize long-term dependencies, but their addressing, overwriting, and sequential processing mechanisms complicate training.Back-propagation through time also requires substantial storage.
  • Convolutional motivation: CNNs and other convolutional architectures had already shown benefits for conditional image generation and machine translation, motivating their study for image captioning.These prior sequence-to-sequence applications provided the paper’s immediate architectural inspiration.

8. Conclusion

The paper concludes that convolutional image captioning performs on par with existing LSTM techniques while exhibiting lower gradient magnitudes and less overconfident predictions. Its gradient analysis identifies concerns associated with LSTM-based learning.

  • Conclusion: The convolutional approach performs on par with existing LSTM techniques for image captioning.The conclusion frames CNN captioning as a competitive alternative to recurrent methods.
  • Conclusion: LSTM networks show lower-magnitude gradients and overly confident predictions compared with the convolutional method.The gradient comparison reports approximately 100-fold decay for LSTM versus approximately 10-fold decay for CNN.
Loading 1711.09151v1…