Scene Graph Generation by Iterative Message Passing

Danfei Xu, Yuke Zhu, Christopher B. Choy, Li Fei-Fei

Understanding a visual scene goes beyond recognizing individual objects in isolation. Relationships between objects also constitute rich semantic information about the scene. In this work, we explicitly model the objects and their relationships using scene graphs, a visually-grounded graphical structure of an image. We propose a novel end-to-end model that generates such structured scene representation from an input image. Our key insight is that the graph generation problem can be formulated as message passing between the primal node graph and its dual edge graph. Our joint inference model can take advantage of contextual cues to make better predictions on objects and their relationships. The experiments show that our model significantly outperforms previous methods on the Visual Genome dataset as well as support relation inference in NYU Depth V2 dataset.

TL;DR

This paper moves beyond simple object detection to "scene graph" generation—a structured representation that captures both objects and their semantic relationships (e.g., "man riding horse"). By using a novel architecture based on Gated Recurrent Units (GRUs), the model performs iterative message passing between objects and relationships, allowing contextual cues to refine predictions and significantly outperforming models that treat relationships in isolation.

What Problem Does This Paper Address?

Traditional computer vision models are excellent at identifying individual objects in boxes, but they often fail to "understand" the scene. For example, an object detector might identify a "man" and a "horse," but it struggles to distinguish between a man feeding a horse, standing by a horse, or riding a horse.

Comparison between standard object detection and the proposed scene graph generation.

The challenge lies in the fact that relationships are inherently contextual. Predicting a relationship between two objects depends heavily on what those objects are, and conversely, knowing the relationship can help clarify the identity of the objects. Previous methods often made "local" predictions, looking at pairs of objects in a vacuum. This paper seeks to solve the "scene graph inference" problem by allowing information to flow across the entire graph, using the global context of the image to resolve local ambiguities.

Methods

The authors propose an end-to-end model that treats scene graph generation as an iterative inference problem. The pipeline consists of three main stages:

  1. Proposal Generation: A standard Region Proposal Network (RPN) identifies potential object bounding boxes.
  2. Feature Extraction: The model extracts visual features for each object (nodes) and the union of bounding boxes for every pair of objects (potential edges).
  3. Iterative Message Passing: This is the core innovation. The model uses two sets of GRUs: one for nodes (objects) and one for edges (relationships).
The model maps image regions to a structured scene graph through iterative inference.
  • Primal-Dual Structure: Information flows in two directions. In the "primal" phase, messages from relationship GRUs are aggregated to update object GRUs. In the "dual" phase, messages from object GRUs (subject and object) are used to update the relationship GRUs.
  • Adaptive Message Pooling: Instead of simple average or max-pooling, the model learns a weighted sum to aggregate incoming messages. This allows the network to "decide" which neighboring nodes or edges provide the most relevant context.
  • Refinement: The model repeats this process for several iterations, allowing the hidden states of the GRUs to evolve and converge on a more coherent global scene representation.

Datasets

The model was evaluated on two primary benchmarks:

  • Visual Genome (VG): The authors used a cleaned-up version of this massive dataset, which contains over 100,000 images. They filtered it to the most frequent 150 object categories and 50 relationship predicates to create a more reliable benchmark.
  • NYU Depth v2: This dataset was used to test the model's ability to infer "support relations" (e.g., "supported from below" or "supported from behind") in indoor scenes, demonstrating the model's versatility beyond just semantic labels.

Key Insights and Ideas

  • Context is a Two-Way Street: The "Primal-Dual" approach acknowledges that objects help identify relationships and relationships help identify objects. Iterative passing allows this mutual information to settle into a consistent state.
  • The Power of Iteration: The authors found that the model's performance peaks at two iterations. While the first iteration provides the biggest jump in accuracy, the second helps resolve complex cyclic relationships (like "vase-in-flower-in-vase").
  • Learned Attention Matters: The "adaptive message pooling" (using a sigmoid-weighted sum) was significantly more effective than standard pooling. It acts as a form of attention, filtering out "noisy" or irrelevant context from the hundreds of potential relationships in a dense graph.

Key Results

The model demonstrated substantial improvements over the state-of-the-art baseline (Lu et al., 2016):

  • Predicate Classification: On the Visual Genome dataset, the model achieved a 44.75% R@50 (Recall at 50), compared to the baseline's 27.88%—a massive relative improvement.
  • Scene Graph Generation: In the most difficult task (detecting objects and relationships simultaneously), the model outperformed the baseline by a factor of nearly 10x (3.44% vs 0.32% R@50), highlighting the necessity of joint inference.
  • Qualitative Success: The model was able to correct errors where the baseline confused subjects and objects (e.g., correctly identifying "man holding umbrella" instead of "umbrella holding man").

Limitations and Future Work

  • Diminishing Returns of Iteration: The authors noted that performance degrades after two iterations. They hypothesize that as messages pass further through the graph, "noise" begins to permeate, suggesting a need for better gating or regularization in deeper iterations.
  • Sparsity: Scene graph annotations are notoriously sparse (only ~1.6% of possible pairs are labeled in VG). The model still struggles with the "long tail" of rare relationships.

Summary updated

BibTeX
@inproceedings{xu2017scene,
  author = {Danfei Xu and Yuke Zhu and Christopher B. Choy and Li Fei-Fei},
  title = {{Scene Graph Generation by Iterative Message Passing}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  url = {https://openreview.net/forum?id=SJV4SRWOZS},
}
Figure