VGDIFFZERO: Text-To-Image Diffusion Models Can Be Zero-Shot Visual Grounders

Xuyang Liu, Siteng Huang, Yachen Kang, Honggang Chen, Donglin Wang

TL;DR

VGDiffZero is a novel framework that repurposes pre-trained text-to-image diffusion models (like Stable Diffusion) for zero-shot visual grounding without any additional fine-tuning. By treating grounding as a proposal selection task and using noise prediction error as an alignment metric, it achieves state-of-the-art zero-shot performance on standard benchmarks like RefCOCO.

What Problem Does This Paper Address?

Visual grounding—the task of localizing a specific object in an image based on a natural language description—is a cornerstone of vision-language reasoning. Traditionally, solving this requires discriminative models fine-tuned on massive, laboriously annotated datasets containing precise bounding boxes paired with text. This process is both computationally expensive and difficult to scale due to the scarcity of high-quality grounding data.

Meanwhile, generative diffusion models have demonstrated an incredible "understanding" of visual concepts and spatial relationships through large-scale pre-training (e.g., on LAION-5B). The authors of this paper ask a compelling question: Can we leverage the latent knowledge inside these generative models to perform discriminative grounding tasks without any further training?

Methods

The authors introduce VGDiffZero, which approaches visual grounding as an isolated proposal selection process. The pipeline consists of three main components:

  1. Proposal Generation: A pre-trained object detector (like Faster R-CNN) generates a set of candidate bounding boxes for the image.
  2. Comprehensive Region-Scoring: This is the core innovation. For each proposal, the system creates two views:
  3. Global Context: The image is masked so only the proposal region is visible, preserving its original spatial position.
  4. Local Context: The proposal region is cropped and resized, focusing on internal visual details.
  5. Noise Injection & Prediction:
    • Both the masked and cropped versions are encoded into a latent space using a VAE.
  6. Gaussian noise is added to these latents.
  7. The noised latents, along with the textual query (encoded via CLIP), are fed into the Stable Diffusion UNet.
  8. The model predicts the added noise. The "score" for a proposal is the noise prediction error: the difference between the actual added noise and the model's prediction.
The VGDiffZero pipeline showing how proposals are processed through noise injection and prediction to find the best match.

The intuition is that if the text description accurately describes the image region, the diffusion model (which was trained to denoise images based on text) will be much better at predicting the noise, resulting in a lower error. The proposal with the minimum total error ($e_{mask} + e_{crop}$) is selected as the final prediction.

Datasets

The model was evaluated on three widely-used visual grounding benchmarks:

  • RefCOCO: Contains short, simple referring expressions.
  • RefCOCO+: Similar to RefCOCO but avoids purely spatial descriptions (e.g., "the one on the left"), forcing the model to rely more on visual attributes.
  • RefCOCOg: Features longer, more complex, and descriptive expressions.

Key Insights and Ideas

  • Generative Models as Zero-Shot Evaluators: The paper demonstrates that the training objective of diffusion models (denoising) is a powerful proxy for semantic alignment. We don't need a separate "matching" head; the reconstruction capability itself tells us how well the text fits the image.
  • Dual-Context Importance: A key finding was that neither cropping nor masking is sufficient on its own. Masking (Global) helps the model understand where the object is, while cropping (Local) helps it see what the object is. Combining them significantly boosts accuracy.
  • Scaling Pre-training Matters: The researchers found that moving from Stable Diffusion v1.2 to v2.1 consistently improved grounding performance, suggesting that as generative models get better at following prompts, their "zero-shot" discriminative abilities improve as well.
Comparison between standard text-to-image generation and the proposed visual grounding task.

Key Results

VGDiffZero outperformed existing zero-shot baselines across all datasets:

  • Superiority over CPT-Blk: On the RefCOCO+ "Test A" set, VGDiffZero achieved a 5.79% higher accuracy than the previous strong baseline, CPT-Blk.
  • Robustness: It showed consistent gains across RefCOCO, RefCOCO+, and RefCOCOg, proving it can handle both simple and complex linguistic queries.
  • Ablation Success: Using both masking and cropping (VGDiffZero) outperformed versions using only one method (e.g., "Masking" or "Cropping" alone), validating the comprehensive region-scoring approach.

Limitations and Future Work

  • Detector Dependency: The framework relies on an external object detector to provide proposals. If the detector misses the target object entirely, VGDiffZero cannot ground it.
  • Inference Speed: Because the UNet must process every proposal (often 20-100 per image), the computational cost at inference time is higher than traditional single-pass discriminative models.
  • Complex Sentence Parsing: While full expressions generally worked best, the authors noted that for extremely complex sentences, extracting core noun phrases (using tools like spaCy) might be a promising direction to avoid confusing the model with auxiliary details.

Summary updated

BibTeX
@inproceedings{liu2024vgdiffzero,
  author = {Xuyang Liu and Siteng Huang and Yachen Kang and Honggang Chen and Donglin Wang},
  title = {{VGDIFFZERO: Text-To-Image Diffusion Models Can Be Zero-Shot Visual Grounders}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  doi = {10.1109/icassp48485.2024.10445945},
}
Figure