Attentive Relational Networks for Mapping Images to Scene Graphs

Mengshi Qi, Weijian Li, Zhengyuan Yang, Yunhong Wang, Jiebo Luo

Abstract

Scene Graph Generation (SGG) is a critical task in computer vision that involves mapping images to structured representations where nodes represent objects and edges represent their semantic relationships. This paper introduces the Attentive Relational Network (ARN), a framework designed to bridge the gap between raw visual features and linguistic knowledge. By projecting both modalities into a shared semantic space and utilizing a graph self-attention mechanism to capture global context, the ARN achieves state-of-the-art performance on the Visual Genome dataset, particularly in resolving complex relational ambiguities.

Introduction

While modern object detectors like Faster R-CNN excel at identifying individual entities within an image, they often fail to capture the underlying interactions between them. Scene Graph Generation aims to fill this gap by producing a structured graph (e.g., <boy-riding-skateboard>). The primary challenges in this field include the contextual complexity of scenes, the semantic gap between visual data and linguistic labels, and the difficulty of performing global structural inference. Existing methods frequently rely on rigid message-passing or localized analysis, which can lead to errors in complex environments.

Methodology

The ARN framework addresses these challenges through a multi-stage pipeline composed of four specialized modules:

  1. Object Detection Backbone: Utilizing Faster R-CNN, the model extracts object proposals, bounding boxes, and initial class probabilities from the input image.
  2. Semantic Transformation Module (STM): This module maps visual features and word embeddings into a common "relation space." Inspired by knowledge graph embedding techniques like TransE, it enforces a geometric constraint where the sum of the subject and predicate embeddings should approximate the object embedding ($Subject + Predicate \approx Object$).
  3. Graph Self-Attention Module (GSAM): Moving beyond standard graph convolutions, this module employs a self-attention mechanism. Each object node dynamically "attends" to its neighbors, assigning weights based on their relevance to the specific relationship being analyzed. This allows the model to incorporate global scene context.
  4. Relation Inference Module: Final Multi-Layer Perceptrons (MLPs) combine refined entity and relation features to output the final scene graph.
Overview of the Attentive Relational Network (ARN) architecture, illustrating the flow from object detection to final relation inference through semantic transformation and graph self-attention.

Semantic Grounding and Contextual Attention

A core innovation of the ARN is the Semantic Transformation Module. By forcing visual features to align with word embeddings in a shared space, the model gains a form of "common sense." It learns to recognize semantically plausible triplets even when visual data is noisy or occluded. For instance, the model learns the inherent logic that a "man" is likely to "wear" a "hat."

The Semantic Transformation Module maps visual and linguistic features into a shared relation space, enforcing a geometric constraint to ensure semantic consistency in relationship predictions.

To ensure efficiency in the Graph Self-Attention Module, the authors implement spatial pruning. Neighbors are defined based on four spatial clues: Inside, Cover, Overlap, and Relative Neighbor. This prevents the attention mechanism from being overwhelmed by irrelevant, distant objects. Furthermore, the use of multi-head attention allows the model to capture diverse relationship types—such as spatial positions and actions—simultaneously.

Experimental Results

The ARN was evaluated on the Visual Genome (VG) dataset, which contains over 108,000 images. Following standard protocols to mitigate the "long-tail" distribution of relationships, the evaluation focused on the 150 most frequent object categories and 50 predicates.

Quantitative Performance

On the Scene Graph Classification (SGCls) task, the ARN outperformed previous state-of-the-art methods like Neural Motif and GPI. The model achieved 38.2% Recall@50 and 40.4% Recall@100, representing a significant improvement over existing baselines. Ablation studies confirmed that both the Semantic Transformation and Graph Self-Attention modules are vital; removing either led to a substantial drop in performance.

Qualitative Analysis

Qualitatively, the model demonstrated a superior ability to resolve ambiguity in complex scenes. It correctly identified intricate relationships such as <man-wearing-tie> and <ear-of-man>. Interestingly, the model occasionally predicted relationships more accurately than the ground truth (e.g., predicting "has leg" when the ground truth was the less specific "on leg"), highlighting the limitations of current evaluation metrics.

Conclusion and Future Work

The Attentive Relational Network represents a significant step forward in SGG by integrating linguistic regularization with global contextual attention. However, challenges remain, particularly the "detector bottleneck," where the quality of the scene graph is limited by the initial object detection. Future research will explore more advanced backbones and unsupervised methods for relationship discovery to further enhance the robustness of scene understanding.

Summary updated

BibTeX
@inproceedings{qi2019attentive,
  author = {Mengshi Qi and Weijian Li and Zhengyuan Yang and Yunhong Wang and Jiebo Luo},
  title = {{Attentive Relational Networks for Mapping Images to Scene Graphs}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.00408},
}
Figure