Geometry-Entangled Visual Semantic Transformer for Image Captioning

Ling Cheng, Wei Wei, Feida Zhu, Yong Liu, Chunyan MiaoarXiv 2021

Abstract

Image captioning requires bridging the gap between visual perception and linguistic description. We present the Geometry-Entangled Visual Semantic Transformer (GEVST), an architecture that explicitly incorporates spatial geometry into the feature fusion and attention mechanisms. By utilizing a four-branch parallel encoder to process varying visual-semantic ratios and a geometry-entangled self-attention operator, GEVST achieves state-of-the-art results on the MS-COCO benchmark, producing highly descriptive and contextually accurate captions.

Introduction

The primary challenge in image captioning lies in the "modality gap"—the fundamental difference between visual pixels and semantic tokens. Traditional models often rely on shallow fusion techniques, such as simple concatenation, which fail to capture the intricate relationships between objects. Furthermore, standard attention mechanisms frequently overlook the spatial geometry (location and size) of image regions, leading to noise and misalignment. GEVST addresses these issues by treating geometry as a primary guide for both multi-modal fusion and self-attention.

Proposed Architecture

The GEVST framework introduces a multi-faceted approach to integrate visual and semantic information.

Overview of the GEVST architecture featuring the Dense-Captioning input and four-branch parallel encoder.

Multi-Modal Input and Parallel Encoding

Instead of relying solely on object labels, GEVST utilizes a Dense-Captioning model to extract detailed phrases (e.g., "man riding horse") alongside their bounding boxes. This provides a richer semantic context. To effectively manage the modality gap, the architecture employs four parallel encoder branches:

  • VV (Visual-Visual): Processes pure image region features.
  • VS (Visual-Semantic): Injects semantic information into visual features.
  • SV (Semantic-Visual): Injects visual information into semantic features.
  • SS (Semantic-Semantic): Focuses exclusively on dense captions.

Geometry-Entangled Self-Attention

A core innovation of GEVST is the Geometry-Entangled Self-Attention operator. Unlike standard self-attention that only considers content, this operator integrates spatial coordinates to refine attention maps.

Detailed view of the Geometry-Entangled Self-Attention mechanism.

As shown in the figure, the model calculates three distinct attention maps: Intra-geometry, Inter-geometry, and Content. These maps are dynamically weighted to produce a refined representation that accounts for both "what" an object is and "where" it is located relative to others.

Multi-Input Decoder

The decoder adaptively aggregates information from all four encoder branches at each time step. This allows the model to prioritize raw visual data or semantic phrases depending on the linguistic requirements of the current word generation.

Experimental Results

GEVST was evaluated on the MS-COCO dataset using the Karpathy split and official online leaderboard.

  • Quantitative Performance: GEVST achieved a CIDEr score of 131.6 on the offline test set, surpassing previous state-of-the-art models like $M^2$ and AoA. On the official MS-COCO online server, it reached a CIDEr score of 127.8.
  • Qualitative Analysis: The model demonstrates superior descriptive capabilities. For instance, while baseline models might generate a simple caption like "a cat," GEVST accurately identifies complex scenes such as "a cat sitting on a chair next to a table," effectively capturing spatial relationships.

Conclusion

By weaving spatial geometry into the Transformer's core, GEVST provides a robust solution to the modality gap in image captioning. The use of parallel encoding branches and geometry-aware attention allows for a more nuanced understanding of visual scenes, leading to significant improvements in caption quality and detail. Future work will explore the application of these concepts to related tasks such as Visual Question Answering (VQA).

Summary updated

BibTeX
@misc{cheng2021geometry,
  author = {Ling Cheng and Wei Wei and Feida Zhu and Yong Liu and Chunyan Miao},
  title = {{Geometry-Entangled Visual Semantic Transformer for Image Captioning}},
  year = {2021},
  eprint = {2109.14137},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.14137},
}
Figure