Incorporating Structured Representations into Pretrained Vision & Language Models Using Scene Graphs

Roei Herzig, Alon Mendelson, Leonid Karlinsky, Assaf Arbelle, Rogério Feris, Trevor Darrell, Amir Globerson

Abstract

Pretrained Vision and Language Models (VLMs) often struggle with compositional understanding, treating images as a "bag of objects" rather than structured scenes. This paper introduces SGVL (Scene Graphs for Vision-Language Models), a framework that leverages small-scale scene graph datasets to inject structural knowledge into models like CLIP and BLIP. By integrating Adaptive Scene Graph Tokens and generating graph-based hard negatives, SGVL significantly improves performance on structural benchmarks with minimal impact on general zero-shot capabilities.

The Problem: Structural Blindness in VLMs

While large-scale VLMs excel at identifying individual objects, they frequently fail to distinguish between different arrangements of those objects (e.g., "a dog chasing a cat" vs. "a cat chasing a dog"). This lack of compositional understanding stems from training on massive but unstructured image-text pairs. Scene Graphs (SGs)—where nodes represent objects and edges represent relationships—offer a gold standard for structural representation, but high-quality SG datasets like Visual Genome are significantly smaller than the datasets used for VLM pretraining.

The SGVL Framework

The authors propose a two-pronged approach to bridge the gap between large-scale pretraining and structured scene understanding.

Overview of the SGVL framework integrating scene graph data into pretrained VL models.

1. Structural Language Component

To improve the textual understanding of structure, SGVL utilizes:

  • SG-to-Text: Converting scene graphs into detailed captions.
  • Graph-Based Negatives (GN): Generating "hard negatives" by flipping relationships in the graph (e.g., changing "man wearing hat" to "hat wearing man"). This forces the model to move beyond simple keyword matching and attend to relational structure.

2. Structural Visual Component

The visual encoder is enhanced to explicitly represent scene structures without degrading its original features.

Detailed architecture of the Transformer Layer with Adaptive Scene Graph Tokens and parameter decomposition.
  • Adaptive Scene Graph Tokens: Learnable "prompt" tokens are added to the Image Transformer, specifically trained to predict objects, relations, and bounding boxes.
  • Parameter Decomposition: To maintain the integrity of pretrained visual features, the transformer layers are modified to use distinct parameters for standard image patches and the new SG tokens. This decoupling allows the model to learn complex graphs without losing robust visual representations.
  • Efficient Adaptation: The model employs LoRA (Low-Rank Adaptation) to keep the majority of the backbone frozen, ensuring computational efficiency during fine-tuning.

Key Results and Benchmarks

SGVL was evaluated across several compositional benchmarks, including Winoground, ARO (Attribution, Relation, and Order), and VSR (Visual Spatial Reasoning).

  • Compositional Gains: BLIP-SGVL saw a significant jump in the Winoground "Group Score" from 15.0 to 21.5. On the Flickr30K Order task (part of ARO), CLIP-SGVL improved from 59.5 to 82.0.
  • Minimal Trade-offs: These structural improvements resulted in only a minor 1-2% drop in general zero-shot classification accuracy across 21 standard datasets (e.g., ImageNet), demonstrating that the model retains its broad knowledge base.

Conclusion

SGVL demonstrates that even small amounts of structured data (approx. 100k images) can have a profound impact on the compositional abilities of large-scale VLMs. By decoupling general visual features from structured scene tokens and utilizing graph-based hard negatives, the framework provides a scalable path toward more sophisticated visio-linguistic reasoning. Future work may explore extending this approach to other dense annotations like segmentation or depth maps.

Summary updated

BibTeX
@inproceedings{herzig2023incorporating,
  author = {Roei Herzig and Alon Mendelson and Leonid Karlinsky and Assaf Arbelle and Rogério Feris and Trevor Darrell and Amir Globerson},
  title = {{Incorporating Structured Representations into Pretrained Vision \& Language Models Using Scene Graphs}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.870},
}
Figure