Abstract: Scene Graph Generation (SGG) aims to represent images as structured graphs where objects are nodes and their interactions are edges. The Relation Transformer Network (RTN) introduces a novel Transformer-based approach to SGG, utilizing an encoder-decoder architecture to model complex object-to-object and relationship-to-object interactions. By capturing global scene context more effectively than traditional message-passing methods, RTN achieves state-of-the-art performance on major benchmarks like Visual Genome and GQA.
Introduction
A "scene graph" is a structured representation of an image where objects are nodes and their interactions are edges (e.g., [Man] -wearing-> [Shirt]). While modern AI is excellent at identifying objects, predicting the relationships between them remains a significant challenge. Existing methods often rely on local message passing, which can fail to capture the full global context of a scene. For instance, identifying a "nose" is significantly easier if the model understands the broader context of a "face." The Relation Transformer Network (RTN) addresses this by treating SGG as a feature-learning problem on a graph, exploring mutual interactions between all objects and their potential relationships.
The RTN Framework
The authors propose a three-part architecture designed to contextualize nodes and edges within the global image space.
- Encoder (Node-to-Node / N2N Attention): A standard Transformer encoder where every detected object (node) attends to every other object. This creates context-aware node features that understand their spatial and semantic surroundings.
- Decoder (Edge-to-Node / E2N Attention): This core novelty uses cross-attention. Each candidate relationship (edge) "queries" the context-rich nodes from the encoder. This allows the edge to accumulate global scene information while focusing specifically on the objects it connects.
- Directed Relation Prediction Module (RPM): This final module combines learned node features, edge features, and global image context to classify specific predicates (e.g., "sitting on" vs. "near").
To support the Transformer architecture, RTN introduces a dual-node positional encoding for the decoder. This represents the spatial positions of both the subject and object nodes, helping the model distinguish the directionality of relationships.
Experimental Evaluation
RTN was evaluated on three major benchmarks: Visual Genome (VG), GQA, and VRD (Visual Relationship Detection). Visual Genome is the standard but imbalanced benchmark, while GQA offers cleaner, more diverse data with accurate spatial locations.
Key Results
RTN demonstrated state-of-the-art performance across all evaluated datasets:
- Visual Genome: The model achieved an overall mean improvement of 4.85% over previous state-of-the-art models. Notably, in the "No Graph Constraint" setting, it reached a near-perfect 99.1% Recall@100 for predicate classification (PRDCLS).
- GQA: RTN achieved a 3.1% point improvement, proving its efficacy on denser, more complex scene graphs.
- Generalization: The model performed robustly even on the smaller VRD dataset, showing that the Transformer architecture can learn relational context effectively even without massive datasets.
Insights and Discussion
Ablation studies revealed several critical insights into the nature of relational learning:
- Contextualization Order: Nodes must be well-contextualized before they can effectively propagate information to edges. Adding edge-context layers without sufficient object-context layers degrades performance.
- Edge-to-Edge Redundancy: The researchers found that letting edges attend to other edges (self-attention in the decoder) did not provide additional benefits. The critical information for a relationship is derived from the objects (nodes) themselves.
- Semantic Priors: Including "word embeddings" (GloVe) for object labels significantly boosted performance, confirming that linguistic common sense (e.g., "men" usually "wear" "shirts") serves as a powerful prior for SGG.
Conclusion
While RTN sets a new standard for Scene Graph Generation, the authors acknowledge that class imbalance remains a hurdle. Common predicates like "on" or "has" still dominate datasets like Visual Genome. Future work will focus on strategies to handle the "long-tail" distribution of relationships and exploring end-to-end self-supervised relational feature learning to reduce reliance on expensive human annotations.
Summary updated