Language Models can do Zero-Shot Visual Referring Expression Comprehension

Xiuchao Sui, Shaohua Li, Hong Yang, Hongyuan Zhu, Yan WuOpenReview 2023 · Submission to Tiny Papers @ ICLR

Visual Referring Expression Comprehension (ReC) is a critical capability for human-robot interaction. It involves localizing a specific object in an image based on a natural language description, such as "the brown cookie near the cup." To successfully execute this, a system must master two distinct skills: self-referential grounding (identifying "the brown cookie" based on its appearance) and relational reasoning (understanding "near the cup" to distinguish the target from other similar cookies).

While large vision-language models like CLIP excel at identifying objects by their appearance, they notoriously struggle with spatial relationships. Previous attempts to bridge this gap, such as ReCLIP, have relied on hand-coded, often brittle spatial heuristics.

In a novel approach, researchers have introduced ChatRef, a modular framework that reframes ReC as a pure language reasoning task. The core question: Can we treat ReC like a game of "blindfold chess," where a Large Language Model (LLM) reasons about a visual scene using only a textual description of the objects and their coordinates?

The ChatRef Pipeline

To translate visual scenes into text that an LLM can process, the authors propose a three-step pipeline that separates "vision" from "reasoning":

  1. Object Extraction: An open-set detector (GroundingDINO) scans the image to identify candidate objects, extracting their category, bounding box location, and size.
  2. Attribute Estimation: For each detected object, CLIP is utilized alongside a prompt-based classifier to estimate additional visual attributes, such as color.
  3. LLM Reasoning: The extracted data—object categories, colors, center locations, and sizes—are formatted into a structured text prompt. This prompt is fed to an LLM (GPT-3.5 or GPT-4), which is tasked with reasoning through the referring expression to identify the correct object ID.

Datasets and Real-World Application

Due to the high cost of the GPT-4 API during the study, the authors evaluated ChatRef on a small but representative sample of 80 images and 160 queries. This included subsets from standard benchmarks (RefCOCO and RefCOCOg) as well as the INGRESS dataset.

Robot grasping scenario from the INGRESS dataset

The INGRESS dataset features real-world scenes of cluttered objects on a table, specifically designed to test interactive robot grasping. In these scenarios, relational reasoning is paramount—for instance, distinguishing between multiple identical soda cans based solely on their spatial relationship to other objects.

Key Insights: GPT-4's Spatial Logic

The evaluation revealed a massive performance gap between LLM generations. While GPT-3.5 performed poorly (23% accuracy) and remained unstable even with heavy prompt engineering, GPT-4 demonstrated robust, zero-shot spatial reasoning.

GPT-4 achieved 75% accuracy on the sampled RefCOCO/g datasets, significantly outperforming specialized vision-language baselines like ReCLIP, which typically score between 50% and 60% on similar tasks.

Example of bounding boxes used for spatial reasoning, such as identifying the smallest train

More impressively, GPT-4 utilized Chain-of-Thought (CoT) Spatial Logic. It didn't just guess an object; it explained its reasoning mathematically. For example, when asked to find the "smallest train," GPT-4 explicitly calculated the area (width × height) of candidate bounding boxes in pixels to compare them. It also successfully inferred depth cues, deducing that larger bounding boxes for the same object category imply proximity to the camera (e.g., "closest to the viewer").

Furthermore, the LLM exhibited an implicit concept hierarchy. Because models like GPT-4 are trained on vast amounts of text, they naturally understand semantic relationships. They can match a general query for a "tool" to a specific detected "pair of scissors" without needing explicit training on that mapping.

Limitations and Future Directions

While promising, the ChatRef framework has limitations. The evaluation was restricted to a small sample size, which may not fully capture the statistical variance of the models.

Crucially, the system suffers from upstream dependencies. ChatRef is only as good as its "eyes." If GroundingDINO fails to detect an object, or if CLIP misidentifies a color, the LLM's reasoning will inevitably lead to an incorrect answer, regardless of its logical soundness. Additionally, getting LLMs to follow strict reasoning subroutines requires extensive prompt engineering.

Despite these challenges, ChatRef demonstrates human-like generalization on novel scenes without task-specific fine-tuning. Delegating spatial and relational reasoning to LLMs presents a powerful new template for tackling complex vision-language tasks in the future.

Summary updated

BibTeX
@misc{sui2023language,
  author = {Xiuchao Sui and Shaohua Li and Hong Yang and Hongyuan Zhu and Yan Wu},
  title = {{Language Models can do Zero-Shot Visual Referring Expression Comprehension}},
  year = {2023},
  url = {https://openreview.net/forum?id=F7mdgA7c2zD},
  howpublished = {OpenReview},
  note = {Submitted to Tiny Papers @ ICLR},
}
Figure