Learning to Generate Scene Graph from Head to Tail

Chaofan Zheng, Xinyu Lyu, Yuyu Guo, Pengpeng Zeng, Jingkuan Song, Lianli Gao

Introduction

Scene Graph Generation (SGG) is a foundational task in computer vision that involves transforming an image into a structured representation. In this graph, nodes represent detected objects, and edges represent the semantic relationships (predicates) between them. While SGG is critical for downstream tasks like image captioning and visual question answering, it faces a significant hurdle: the "long-tail" distribution of relationships. In datasets like Visual Genome, common "head" predicates such as on or has appear with overwhelming frequency, while descriptive "tail" predicates like parked on or sitting on are extremely rare.

Researchers have introduced SGG-HT (Head-to-Tail), a framework designed to navigate this imbalance by treating common relationships as the foundational building blocks for rare ones, rather than noise to be suppressed.

The Challenge: Feature Wrecking and Semantic Deviation

Traditional methods for addressing long-tailed distributions often rely on aggressive debiasing, such as down-weighting head predicates or over-sampling tail classes. However, the authors of SGG-HT argue that these approaches suffer from two primary flaws:

  1. Feature Wrecking: Head predicates often represent the basic spatial or structural foundations of more complex relationships. For example, the visual features required to identify "sitting on" are largely a subset of the features for the general predicate "on." By ignoring head predicates early in training, models fail to learn the robust base features necessary to eventually master the tail.
  2. Semantic Deviation: Over-correcting for rare predicates can cause a model to lose its grasp on semantic logic, leading it to "hallucinate" rare relationships in contexts where they are physically or logically impossible.

The SGG-HT Framework

To solve these issues, SGG-HT introduces two innovative components: the Curriculum Re-weight Mechanism and the Semantic Context Module.

Curriculum Re-weight Mechanism (CRM)

Instead of applying a static loss weight throughout the training process, CRM employs a curriculum learning strategy. The model begins by focusing on "head" or "easy" samples to establish a solid foundation of general feature representations. As training progresses, a Curriculum Decay Factor ($\lambda$) gradually shifts the optimization focus toward the "tail" or "hard" samples. This ensures the model masters the basic visual vocabulary before attempting to learn the nuances of fine-grained, rare interactions.

Semantic Context Module (SCM)

To maintain logical consistency and prevent semantic deviation, the SCM refines the generated graph at both global and local levels:

  • Global Consistency: The module calculates a global semantic representation for the entire scene. It uses a Mean-Squared Error (MSE) loss to minimize the distance between the predicted graph's global context and the ground truth, ensuring the overall scene remains coherent.
  • Local Refinement: Using a Transformer encoder, the SCM refines the features of individual triplets (subject-predicate-object). This ensures that the specific relationship predicted fits the immediate context of the involved objects.

Experimental Results

The framework was evaluated on the Visual Genome (VG150) benchmark, using Mean Recall@K (mR@K) as the primary metric. Unlike standard Recall, mR@K treats every predicate class equally, providing a more accurate measure of performance on long-tailed data.

SGG-HT demonstrated substantial improvements across various base architectures:

  • Motif: Improved mR@100 on the Predicate Classification (PredCls) task from 16.08 to 39.43.
  • Transformer: Improved mR@100 on PredCls from 17.63 to 42.60.

The framework consistently outperformed previous state-of-the-art debiasing methods like TDE and PCPL across all three standard SGG sub-tasks: Predicate Classification (PredCls), Scene Graph Classification (SGCls), and Scene Graph Detection (SGDet).

Insights and Future Directions

The success of SGG-HT highlights a critical insight: head predicates are not merely distractions; they are the scaffolding for the tail. By respecting the natural hierarchy of visual relationships and employing a staged learning approach, models can achieve a much richer understanding of visual scenes. Qualitatively, this results in more descriptive graphs—moving from generic labels like "man on skateboard" to more precise ones like "man playing skateboard."

Future work may address the current limitations of the framework, such as its dependence on pre-trained object detectors (where errors can propagate) and the potential computational overhead introduced by the Transformer-based semantic refinement. Additionally, exploring more adaptive curriculum strategies beyond linear decay could further optimize how models transition from head to tail learning.

Summary updated

BibTeX
@inproceedings{zheng2022learning,
  author = {Chaofan Zheng and Xinyu Lyu and Yuyu Guo and Pengpeng Zeng and Jingkuan Song and Lianli Gao},
  title = {{Learning to Generate Scene Graph from Head to Tail}},
  booktitle = {ICME},
  year = {2022},
  doi = {10.1109/icme52920.2022.9859711},
}
Figure