TL;DR
While large-scale Vision-Language Models (VLMs) like CLIP are masters of zero-shot classification, they often behave like a "bag of objects," failing to understand how those objects relate to one another. This paper introduces SGVL, a method that uses small, structured Scene Graph (SG) datasets to teach VLMs compositional reasoning by generating hard textual negatives and adding specialized "Adaptive SG Tokens" to the visual encoder.
What Problem Does This Paper Address?
Modern VLMs are trained on hundreds of millions of noisy image-text pairs from the web. While this makes them incredibly robust, they often miss the "structure" of a scene. For example, a standard VLM might struggle to distinguish between "a dog chasing a cat" and "a cat chasing a dog" because both images contain the same "bag" of objects (dog, cat, grass).
Structured annotations like Scene Graphs—which explicitly map out objects, their attributes (e.g., "brown," "small"), and their relationships (e.g., "standing on," "holding")—could solve this. However, SG datasets are tiny (around 100k images) compared to pretraining sets like LAION (400M+ images). The challenge is: how do we inject this rich, structured knowledge into a massive pretrained model without ruining its general-purpose capabilities?
Methods
The authors propose a two-pronged approach called SGVL (Scene Graphs for Vision-Language Models) to bake structure into both the text and vision components of the model.
- Structural Language Component:
- SG-to-Text: They convert Scene Graphs into highly detailed captions.
- Graph-Based Negatives (GN): To force the model to pay attention to structure, they use the SG to generate "hard negatives." If the SG says "man wearing gray shirt," they might generate a negative caption like "man wearing red shirt" or "gray shirt wearing man." The model is then trained to distinguish the correct caption from these structural decoys.
- Structural Visual Component:
- Adaptive SG Tokens: The team adds a set of learnable "prompts" or tokens to the Image Transformer. These tokens are specifically tasked with predicting the Scene Graph (objects, bounding boxes, and relations) directly from the image.
- Parameter Decomposition: To prevent the new SG task from interfering with the model's original vision capabilities, they decompose the transformer parameters. One set of weights handles standard image patches, while a separate set handles the SG tokens.
- Parameter Efficiency: They use LoRA (Low-Rank Adaptation) to finetune the model, keeping the vast majority of the original weights frozen.
Datasets
- Training: The Visual Genome (VG) dataset (approx. 108k images with SGs) and a tiny slice (less than 1%) of LAION-400M.
- Evaluation: The models were tested on four major benchmarks for compositional understanding:
- Winoground: Probes if models can distinguish between pairs of images/captions with identical words but different meanings.
- VL-Checklist: Evaluates understanding of objects, attributes, and relations.
- ARO (Attribution, Relation, and Order): Tests sensitivity to word order and object-attribute binding.
- VSR (Visual Spatial Reasoning): Focuses specifically on spatial relationships.
Key Insights and Ideas
- Structure is a Data Efficiency Hack: You don't need billions of images to teach a model structure. A small amount of high-quality, structured data (Visual Genome) can significantly move the needle if the training objective is right.
- Negatives are Necessary: Simply finetuning on SG-derived captions isn't enough. The "hard negatives" generated by flipping graph edges are crucial for forcing the model to move beyond a "bag of words" strategy.
- Visual Grounding Matters: By making the image encoder actually predict the graph (where objects are and how they connect), the model develops a more structured internal representation of the visual scene.
Key Results
The SGVL approach was applied to three popular models: CLIP, BLIP, and BLIP2. Across the board, it yielded impressive gains:
- ARO Benchmark: CLIP-SGVL saw a massive jump in performance, improving by over 22% on Flickr30k Order and 32% on COCO Order compared to the base CLIP model.
- Winoground: BLIP-SGVL improved the "Group Score" (the hardest metric) by 6.5%.
- Zero-Shot Stability: Crucially, these gains in compositional reasoning came with only a mild degradation (~1-2%) in general zero-shot classification performance, proving that the model didn't "forget" its original training.
Limitations and Future Work
The primary limitation is the reliance on high-quality Scene Graph annotations. These are notoriously expensive and time-consuming to produce manually. The authors suggest that future work could explore using other types of dense, structured data—like segmentation maps or depth maps—which might be easier to obtain at scale. Additionally, the quality of the SG data is paramount; poor-quality graphs could lead to lower performance.
Summary updated