Fast, Diverse and Accurate Image Captioning Guided By Part-of-Speech

Aditya Deshpande, Jyoti Aneja, Alex Schwing, David ForsythOpenReview 2021 · OpenReview

TL;DR

This paper introduces a novel approach to image captioning that uses part-of-speech (POS) tag sequences as "summaries" to guide caption generation. This method achieves a desirable trifecta of high accuracy, faster computation, and increased diversity in generated captions compared to existing methods like beam search, VAEs, and GANs.

What Problem Does This Paper Address?

Generating descriptive captions for images is challenging because a single image can have many valid interpretations, leading to a wide range of suitable captions. Traditional methods like beam search, while accurate, are computationally expensive and tend to produce generic captions. More recent approaches using Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs) offer more diversity but often sacrifice accuracy. The core problem is how to generate captions that are not only accurate and diverse but also computationally efficient.

Methods

The authors propose a two-stage approach:

  1. Predicting a Summary: Instead of directly generating captions, they first predict a "summary" of the image. They found that quantized part-of-speech (POS) tag sequences serve as effective summaries. These sequences guide the subsequent caption generation process.
  2. Generating Captions: The captioning model is then conditioned on these predicted POS tag sequences. This conditioning steers the generation towards captions that are more structured and less generic.

For POS tag sequence prediction, they use a classification model trained on image features. To handle the vast number of possible POS tag sequences, they quantize them into 1024 exemplars using k-medoids clustering. They also explore two training strategies:

  • Separate Training (POS): The POS tag classifier and the captioning model are trained independently.
  • Joint Training (POS+Joint): Both models are trained together, using a Gumbel-softmax to sample POS tag sequences during training. This approach aims to improve consistency between the predicted POS tags and the generated captions.

Datasets

The primary dataset used for training and evaluation is MS COCO. They mention using both the standard MS COCO splits and the train/val/test splits from Karpathy et al. [12].

Key Insights and Ideas

  • POS tags as effective image summaries: The surprising insight is that simple POS tag sequences can act as powerful "summaries" that effectively guide image caption generation, leading to better results than abstract latent variables used in VAEs.
  • Structured generation leads to diversity and accuracy: By conditioning on POS tags, the model is forced to produce captions with specific linguistic structures (e.g., more adjectives), which naturally increases diversity and avoids generic outputs.
  • The "trifecta" is achievable: The paper demonstrates that it's possible to achieve high accuracy, fast computation, and high diversity simultaneously, a goal that has been elusive for previous methods.
  • Joint training benefits accuracy: While separate training is effective, joint training of the POS classifier and captioning model further improves accuracy, suggesting that aligning these two components is beneficial.

Key Results

  • Accuracy: The POS-based methods achieve comparable or better best-1 accuracy than beam search and diverse beam search, and significantly outperform VAE-based methods like AG-CVAE. For example, in Table 3, POS+Joint achieves a CIDEr score of 0.739 with 100 samples, compared to AG-CVAE's 0.732.
  • Speed: The POS methods are significantly faster than beam search and diverse beam search. For instance, they are about 5x faster than beam search methods (e.g., 1.13s/img for POS+Joint vs. 7.41s/img for Div-BS with 20 samples).
  • Diversity: The POS methods generate more novel sentences and exhibit lower n-gram overlap (lower mBleu-4 scores) compared to beam search and diverse beam search, indicating higher diversity. Table 5 shows POS generating 96.3% unique sentences out of 20 samples.
  • User Study: A user study indicated that POS captions were preferred over those from AG-CVAE and Beam Search.

Limitations and Future Work

  • Quantization: While quantization of POS tag sequences is necessary for efficiency, it might lead to some loss of information. The paper notes that POS+Joint (with joint training) performs better than POS (separate training), suggesting that better alignment between POS prediction and caption generation is still an area for improvement.
  • Computational Cost of POS Tagging: While the captioning inference is faster, the initial step of predicting POS tags adds some computational overhead.
  • Future Work: The authors suggest exploring reinforcement learning for training their POS captioning network and incorporating more sophisticated attention mechanisms for further performance gains. They also mention that using features from models like ResNet-152 could potentially improve accuracy.

Summary updated

Abstract

Image captioning is an ambiguous problem, with many suitable captions for an image. To address ambiguity, beam search is the de facto method for sampling multiple captions. However, beam search is computationally expensive and known to produce generic captions. To address this concern, some variational auto-encoder (VAE) and generative adversarial net (GAN) based methods have been proposed. Though diverse, GAN and VAE are less accurate. In this paper, we first predict a meaningful summary of the image, then generate the caption based on that summary. We use part-of-speech as summaries, since our summary should drive caption generation. We achieve the trifecta:(1) High accuracy for the diverse captions as evaluated by standard captioning metrics and user studies;(2) Faster computation of diverse captions compared to beam search and diverse beam search; and (3) High diversity as evaluated by counting novel sentences, distinct n-grams and mutual overlap (ie, mBleu-4) scores.
BibTeX
@misc{deshpande2021fast,
  author = {Aditya Deshpande and Jyoti Aneja and Alex Schwing and David Forsyth},
  title = {{Fast, Diverse and Accurate Image Captioning Guided By Part-of-Speech}},
  year = {2021},
  url = {https://openreview.net/forum?id=rEAtnjaFyAV},
  howpublished = {OpenReview},
}
Figure