Learning from the Scene and Borrowing from the Rich: Tackling the Long Tail in Scene Graph Generation

Tao He, Lianli Gao, Jingkuan Song, Jianfei Cai, Yuan-Fang Li

Abstract

Scene Graph Generation (SGG) aims to identify objects and their relationships within images. However, real-world datasets like Visual Genome exhibit a severe "long-tail" distribution, where a few common predicates (e.g., "on", "has") appear frequently, while rare but informative relations (e.g., "flying in", "parked on") are underrepresented. This imbalance leads models to favor frequent relations, sacrificing accuracy on the tail. We present a framework that addresses this by integrating global scene context and a feature "hallucination" mechanism. Our Scene-Object Interaction module uses global cues to refine local predictions, while the Knowledge Transfer module supplements rare relation features by borrowing from well-learned common ones. Evaluation on the Visual Genome benchmark shows our method achieves state-of-the-art performance, particularly in mean Recall for tail classes.

Introduction

Scene Graph Generation involves parsing an image into a structured representation of (subject, predicate, object) triples. Despite progress in object detection, predicting predicates remains challenging due to the extreme class imbalance in datasets. Standard models often default to "head" relations because they lack sufficient training examples for "tail" relations.

Examples of scene graphs generated from images, showing objects and their relational predicates.

Proposed Methodology

The proposed framework consists of three primary components designed to mitigate the long-tail effect.

The overall architecture of the proposed SGG framework, highlighting the Scene-object Interaction and Knowledge Transfer modules.

1. Scene-Object Interaction Module

Global context provides critical priors for relationship disambiguation. For instance, the presence of a "bedroom" scene significantly increases the likelihood of "lying on" compared to "riding." This module employs an additive attention mechanism to fuse local object features with a global scene feature. By learning a "coefficient of interaction," the model dynamically weights the influence of the global scene on specific object pairs.

2. Long-tail Knowledge Transfer Module

To improve the representation of rare relations, we introduce a feature hallucination strategy:

  • Knowledge Codewords: The model learns idealized representations (codewords) for all relation types.
  • Hallucination: For any object pair, a "hallucinated" feature is generated as a weighted sum of these codewords, guided by an initial coarse classification.
  • Feature Fusion: This synthetic feature is combined with the original visual feature, allowing rare relations to "borrow" robust characteristics from more frequent, visually similar relations.

3. Long-tail Feature Calibration

To prevent tail relations from being overwhelmed by head relations during inference, we apply a calibration step. Final features are scaled based on prediction confidence, enhancing the model's discriminative power between common and rare classes.

Experimental Results

We evaluated our framework on the Visual Genome (VG) dataset across three standard tasks: Predicate Classification (PredCls), Scene Graph Classification (SGCls), and Scene Graph Detection (SGDet).

Our method consistently outperformed state-of-the-art models. Notably, in the SGDet task, we achieved a Mean Recall of 43.1, a significant improvement over previous benchmarks. The most substantial gains were observed in tail relations; for example, the recall for "mounted on" increased from 0.04 to 3.04. Ablation studies confirmed that both the Scene-Object (SO) and Knowledge Transfer (KT) modules are essential, with their removal resulting in a 2-3% performance drop.

Conclusion

By leveraging global scene context and a novel knowledge transfer mechanism, our framework effectively addresses the long-tail challenge in Scene Graph Generation. While the model still faces difficulties with extremely sparse relations (fewer than 5 samples), it represents a significant step toward more balanced and context-aware scene understanding. Future work will explore refining object label identification to further boost scene graph accuracy.

Summary updated

BibTeX
@inproceedings{he2020learning,
  author = {Tao He and Lianli Gao and Jingkuan Song and Jianfei Cai and Yuan-Fang Li},
  title = {{Learning from the Scene and Borrowing from the Rich: Tackling the Long Tail in Scene Graph Generation}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.24963/ijcai.2020/82},
}
Figure