Zero-Shot Referring Expression Comprehension via Structural Similarity Between Images and Captions

Zeyu Han, Fangrui Zhu, Qianru Lao, Huaizu JiangCVPR 2023

Abstract

Zero-shot referring expression comprehension (REC) aims at localizing bounding boxes in an image corresponding to provided textual prompts. This task requires a fine-grained disentanglement of complex visual scenes and textual contexts, alongside a capacity to understand relationships among disentangled entities. Existing large vision-language alignment (VLA) models, such as CLIP, struggle with these aspects and cannot be directly applied. To mitigate this gap, we leverage large foundation models to disentangle both images and texts into triplets in the format of (subject, predicate, object). Grounding is accomplished by calculating a structural similarity matrix between visual and textual triplets with a VLA model, subsequently propagating it to an instance-level similarity matrix. Furthermore, to equip VLA models with relationship understanding, we design a triplet-matching objective to fine-tune them on curated datasets containing abundant entity relationships. Our approach increases visual grounding performance by up to 19.5% over the state-of-the-art zero-shot model on RefCOCO/+/g and achieves comparable accuracy to fully supervised models on the challenging Who's Waldo dataset.

Introduction

Visual grounding—the task of finding a specific object in an image based on a text prompt—is a cornerstone of vision-language AI. While large-scale models like CLIP are excellent at identifying nouns, they are notoriously poor at understanding relationships and composition. They often behave like "bags-of-words," failing to distinguish between "a man watching a dog" and "a dog watching a man."

Disambiguating entities in complex scenes requires understanding relationships between subjects and objects.

Existing zero-shot methods often rely on fragile, hand-crafted language parsers that fail with complex sentences. Furthermore, these models lack a mechanism to explicitly match the structural composition of a visual scene with the structure of a sentence.

Methodology

To bridge this "relationship gap," we introduce a two-stage pipeline centered on structural triplets.

Structural Triplet Construction

We decompose both the visual and textual inputs into (subject, predicate, object) triplets. On the text side, we utilize ChatGPT as an in-context learner to parse complex captions, providing a more robust solution than traditional dependency parsers. On the image side, we use an object detector to identify entities and generate all possible visual pairs to form potential visual triplets.

Structural Similarity Matching

Instead of matching the entire caption to the whole image, we calculate a Structural Similarity Matrix. We compare the subject, predicate, and object of a textual triplet against the corresponding parts of visual triplets using a Vision-Language Alignment (VLA) model. These triplet-level scores are then propagated back to the instance level to identify the specific bounding box that best fits the description.

The framework matches textual triplets to visual triplets by calculating similarity across subjects, predicates, and objects.

VR-VLA (Visual Relationship VLA)

To improve the model's inherent understanding of predicates (actions and spatial relations), we fine-tuned CLIP and FLAVA using Low-Rank Adaptation (LoRA). We utilized curated datasets rich in interactions, such as HICO-det and Visual Genome, to teach the model the visual characteristics of relationships like "touching," "holding," or "sitting on."

Experimental Results

The model was evaluated on standard benchmarks including RefCOCO, RefCOCO+, and RefCOCOg, as well as the person-centric Who’s Waldo dataset.

Key findings include:

  • State-of-the-Art Performance: On RefCOCO benchmarks, the model outperformed the previous best zero-shot model (ReCLIP) by up to 19.5%.
  • Closing the Gap with Supervision: On the challenging Who’s Waldo dataset, our zero-shot approach achieved 61.3% accuracy, remarkably close to the 63.5% achieved by fully supervised models.
  • Ablation Insights: Removing the predicate component from triplets caused a significant drop in accuracy, confirming that relationship modeling is the primary driver of success.

Conclusion

This work demonstrates that structural similarity is key to solving zero-shot referring expression comprehension. By forcing the model to match triplets rather than global features, we provide the necessary context to distinguish between identical-looking objects in complex scenes. While fine-tuning for relationships creates a more specialized model, the gains in grounding accuracy suggest that structural decomposition is a promising path for future vision-language research.

Summary updated

BibTeX
@inproceedings{han2023zero,
  author = {Zeyu Han and Fangrui Zhu and Qianru Lao and Huaizu Jiang},
  title = {{Zero-Shot Referring Expression Comprehension via Structural Similarity Between Images and Captions}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  url = {https://openreview.net/forum?id=TcXPmic9Ik},
}
Figure