Learning Visual Relation Priors for Image-Text Matching and Image Captioning with Neural Scene Graph Generators

Kuang-Huei Lee, Hamid Palangi, Xi Chen, Houdong Hu, Jianfeng GaoarXiv 2019

Abstract

Grounding language to visual relations is critical to various language-and-vision applications. In this work, we tackle two fundamental language-and-vision tasks: image-text matching and image captioning, and demonstrate that neural scene graph generators can learn effective visual relation features to facilitate grounding language to visual relations and subsequently improve the two end applications. By combining relation features with the state-of-the-art models, our experiments show significant improvement on the standard Flickr30K and MSCOCO benchmarks. Our experimental results and analysis show that relation features improve downstream models' capability of capturing visual relations in end vision-and-language applications. We also demonstrate the importance of learning scene graph generators with visually relevant relations to the effectiveness of relation features.

Introduction

Most current vision-and-language models rely on "bottom-up attention," which identifies salient objects (e.g., "player," "bat") but often ignores the relationships between them. This creates a "semantic gap": a model might correctly identify a player and a bat in two different images but fail to distinguish between "a player swinging a bat" and "a player holding a bat." Grounding language in visual relations is critical for truly understanding a scene. This paper addresses the challenge of extracting these relations effectively and integrating them into downstream tasks without the computational complexity of previous graph-based approaches.

Methodology

The researchers propose two main architectural extensions to leverage visual relation features:

R-SCAN (Relation-based Stacked Cross Attention Network)

Building on the popular SCAN model, R-SCAN adds a visual encoder specifically for relations. It uses a visual feature fusion gate that adaptively decides, for every word in a sentence, whether to focus on an object (region feature) or a relationship (relation feature).

The R-SCAN architecture featuring the visual feature fusion gate for adaptive attention to regions and relations.

Relation-based Top-Down Captioner

This extends the standard bottom-up/top-down captioning architecture by adding an attention component that looks at relation features extracted from a scene graph generator.

Scene Graph Generation

Crucially, the authors use a Stacked Motif Network as their scene graph generator. They emphasize training this generator on "visually relevant" relations (VrR)—those that cannot be easily predicted from object context alone (e.g., avoiding "man wearing shirt" in favor of more descriptive interactions like "man swinging bat").

Experiments and Results

The models were evaluated on the Flickr30K and MSCOCO datasets. The scene graph generators were pre-trained on Visual Genome (VG150) and the VrR-VG (Visually-Relevant Relationship) dataset.

Quantitative Performance

The inclusion of relation features led to significant gains:

  • Image-Text Matching: On Flickr30K, R-SCAN achieved a Recall@1 of 51.4% for image retrieval, a 12.2% relative improvement over the SCAN baseline.
  • Image Captioning: On MSCOCO, the relation-based model improved the CIDEr score from 113.5 to 114.9 (cross-entropy training) and reached 126.1 after CIDEr optimization.

Qualitative Analysis

Qualitative comparisons demonstrate that R-SCAN correctly distinguishes between complex relations that baseline models miss. For example, it can identify a bike "attached to" a bus versus just having both objects present in the scene.

Qualitative comparison between R-SCAN and the baseline SCAN model on image-text matching.

Discussion

A key insight is the "Easy Way Out" problem: many scene graph datasets are dominated by common, predictable relations. Training on the VrR-VG dataset, which filters out these "easy" relations, is essential for learning features that actually help downstream tasks. Furthermore, the paper demonstrates that directly transferring embedding features from a pre-trained scene graph generator into a simple gating mechanism is as effective as complex Graph Convolutional Networks (GCNs).

Conclusion

This work demonstrates that neural scene graph generators can learn effective visual relation features that significantly improve image-text matching and image captioning. By focusing on visually relevant relations and using an adaptive gating mechanism, the proposed models bridge the semantic gap in vision-and-language tasks. Future work includes addressing limitations in object counting and abstract reasoning.

Summary updated

BibTeX
@misc{lee2019learning,
  author = {Kuang-Huei Lee and Hamid Palangi and Xi Chen and Houdong Hu and Jianfeng Gao},
  title = {{Learning Visual Relation Priors for Image-Text Matching and Image Captioning with Neural Scene Graph Generators}},
  year = {2019},
  eprint = {1909.09953},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.09953},
}
Figure