Gated Hierarchical Attention for Image Captioning

Qingzhong Wang, Antoni B. Chan

Abstract

This paper introduces Gated Hierarchical Attention (GHA), a novel mechanism designed to enhance Convolutional Neural Network (CNN) decoders for image captioning. By mimicking the hierarchical structure of language, GHA integrates visual information across multiple layers of the decoder. The architecture utilizes a Gated Recurrent Unit (GRU) to manage information flow vertically through layers rather than across time steps. This approach allows the model to selectively fuse low-level visual features with high-level semantic concepts. Evaluated on the MSCOCO dataset, GHA achieves state-of-the-art performance, significantly outperforming baseline CNN models and matching the results of more complex reinforcement learning-based systems.

Introduction

Image captioning involves the complex task of translating visual scenes into coherent natural language. Traditionally, Recurrent Neural Networks (RNNs) have dominated this field due to their sequential nature. However, the emergence of Word-CNNs has provided a more parallelizable and efficient alternative. A persistent challenge in CNN-based decoders is the "flat" integration of visual features, where attention is often only applied at the final layer. This ignores the hierarchical nature of language, where words aggregate into phrases and concepts. Furthermore, standard attention mechanisms struggle to differentiate between visual words (e.g., "cat") and non-visual functional words (e.g., "the"), leading to noise in the generation process.

Methods

The proposed GHA model comprises four primary components: a ResNet101 image encoder, a causal Word-CNN decoder using Gated Linear Units (GLU), a multi-layer visual attention module, and a novel fusing block.

The GHA architecture featuring the Fusing Block and vertical recurrence mechanism.

The Fusing Block is the central innovation, employing a GRU to facilitate "vertical recurrence." Unlike standard temporal recurrence, this mechanism operates across the layers of the decoder. It uses channel-wise gating to decide which visual features are relevant at each level of the hierarchy. Lower layers typically focus on fine-grained visual details, while higher layers integrate global context. The authors determined that a 6-layer configuration provides the optimal receptive field for standard caption lengths, as deeper architectures were found to be unstable.

Results

The model was rigorously tested on the MSCOCO dataset using the Karpathy split (113k training images). The GHA mechanism demonstrated a significant performance leap over baseline CNN architectures.

Quantitative comparison of GHA against state-of-the-art LSTM and CNN-based models.

As illustrated in the results table, the GHA-6-3 model reached a CIDEr score of 0.999, a substantial increase from the 0.923 baseline. It also achieved a SPICE score improvement of 8.6%. Notably, GHA performs competitively with models that utilize reinforcement learning or additional object detection branches, despite being trained solely with cross-entropy loss. This efficiency is further bolstered by the parallel nature of the CNN decoder, which allows for faster training compared to traditional LSTM-based architectures.

Conclusion

Gated Hierarchical Attention successfully bridges the gap between hierarchical linguistic structures and visual feature integration. By utilizing vertical recurrence and fine-grained gating, the model produces high-quality captions efficiently. While the model currently faces challenges in complex relationship modeling and word distinctiveness, it represents a significant step forward for CNN-based image captioning architectures.

Summary updated

BibTeX
@inproceedings{wang2018gated,
  author = {Qingzhong Wang and Antoni B. Chan},
  title = {{Gated Hierarchical Attention for Image Captioning}},
  booktitle = {ACCV},
  year = {2018},
  doi = {10.1007/978-3-030-20870-7\_2},
}
Figure