Abstract
The goal of scene graph generation is to predict a graph from an input image, where nodes correspond to identified and localized objects and edges to their corresponding interaction predicates. Existing methods are trained in a fully supervised manner and focus on message passing mechanisms, loss functions, and/or bias mitigation. In this work we introduce a simple-yet-effective self-supervised relational alignment regularization designed to improve the scene graph generation performance. The proposed alignment is general and can be combined with any existing scene graph generation framework, where it is trained alongside the original model’s objective. The alignment is achieved through distillation, where an auxiliary relation prediction branch, that mirrors and shares parameters with the supervised counterpart, is designed. In the auxiliary branch, relational input features are partially masked prior to message passing and predicate prediction. The predictions for masked relations are then aligned with the supervised counterparts after the message passing. We illustrate the effectiveness of this self-supervised relational alignment in conjunction with two scene graph generation architectures, SGTR and Neural Motifs, and show that in both cases we achieve significantly improved performance.
Introduction
Scene Graph Generation (SGG) is the task of transforming an image into a structured representation where nodes represent objects (e.g., "lady," "ski") and edges represent their semantic relationships (e.g., "wearing," "has"). While object detection has matured, predicting the relationships between objects remains a significant challenge.
The primary obstacle is data sparsity. Even in large-scale datasets like Visual Genome, the distribution of relationships is heavily long-tailed: a few predicates like "on" or "near" dominate, while thousands of others are rarely seen. Furthermore, the visual diversity of even common relationships makes it difficult for models to generalize. Existing approaches often rely on complex message-passing or loss re-weighting, yet they frequently fail to address the underlying need for robust feature learning.
Methods: Self-Supervised Relation Alignment
The proposed framework introduces a "plug-and-play" self-supervised module that can be integrated into most SGG architectures without altering the inference process. The core idea is to treat relationship prediction as a denoising task, forcing the model to learn more robust relational features.
The architecture consists of several key components:
- The Mirror Branch: During training, a "mirrored" version of the model’s relation predictor is created, sharing weights with the original predictor.
- Random Masking: Input features representing objects and their context are randomly masked (zeroed out) before being processed by the mirrored branch.
- Alignment via Distillation: The original branch processes the full data, while the mirrored branch processes the impoverished, masked data. The model is trained to align the mirrored branch’s predictions with the original branch’s outputs using Kullback-Leibler (KL) divergence.
- The "Untied Head" Strategy: To prevent the self-supervised task from interfering with the primary objective, the final projection layer of the mirrored branch is "untied" (has its own weights). This allows the shared backbone to learn general features while the head adapts to the specific masking task.
Results and Discussion
The models were evaluated on the Visual Genome benchmark, which includes 150 object categories and 50 relation categories. The alignment module was tested with two distinct architectures: SGTR (a one-stage Transformer-based model) and Neural Motifs (a two-stage LSTM-based model).
The "Alignment" versions consistently outperformed baseline models across standard metrics, particularly mean Recall (mR@K), which better reflects performance on long-tailed data. For instance, on Neural Motifs in the "Predicate Classification" (PredCls) setting, mR@100 improved from 21.9 to 24.2.
Qualitative analysis (as seen in the figure above) demonstrates that the aligned models are more likely to predict specific, descriptive relations (e.g., "covering," "behind," "in front of") rather than falling back on generic predicates like "on" or "near." This suggests that the denoising regularization effectively helps the model capture more nuanced visual cues.
Conclusion and Future Work
Self-Supervised Relation Alignment provides a robust regularization mechanism for SGG by framing relationship prediction as a denoising task. While the method significantly improves performance on rare relationships, it remains partially dependent on the accuracy of the underlying object detector. Future research may explore more sophisticated masking strategies—such as targeting specific spatial or visual attributes—and scaling the approach to larger, unlabelled datasets to further enhance scene understanding.
Summary updated