Pseudo-Q: Generating Pseudo Language Queries for Visual Grounding

Haojun Jiang, Yuanze Lin, Dongchen Han, Shiji Song, Gao Huang · DOI

Abstract

Visual grounding, i.e., localizing objects in images according to natural language queries, is an important topic in visual language understanding. The most effective approaches for this task are based on deep learning, which generally require expensive manually labeled image-query or patch-query pairs. To eliminate the heavy dependence on human annotations, we present a novel method, named Pseudo-Q, to automatically generate pseudo language queries for supervised training. Our method leverages an off-the-shelf object detector to identify visual objects from unlabeled images, and then language queries for these objects are obtained in an unsupervised fashion with a pseudo-query generation module. Then, we design a task-related query prompt module to specifically tailor generated pseudo language queries for visual grounding tasks. Further, in order to fully capture the contextual relationships between images and language queries, we develop a visual-language model equipped with multi-level cross-modality attention mechanism. Extensive experimental results demonstrate that our method can reduce human annotation costs significantly (e.g., 31% on RefCOCO) and achieves superior or comparable performance compared to state-of-the-art weakly-supervised visual grounding methods.

Introduction

Visual Grounding (VG) is the task of locating a specific object in an image based on a natural language query, such as "the brown horse on the far left." While humans perform this task effortlessly, AI models typically require massive datasets of image-query pairs to learn effectively. The primary bottleneck in advancing VG models is data annotation; manually writing descriptive queries for specific bounding boxes is slow and costly.

Comparison of supervision levels in visual grounding: (a) fully-supervised, (b) weakly-supervised, and the proposed Pseudo-Q pipeline.

Existing "weakly-supervised" methods attempt to mitigate this by using image-level captions, but they still rely on human-generated text. Pseudo-Q asks whether we can train a high-performing visual grounding model using only unlabeled images by automatically generating "pseudo" language queries.

Methodology

The Pseudo-Q framework consists of three main stages designed to move from raw, unlabeled pixels to a trained grounding model.

1. Pseudo-Query Generation

The system utilizes a pre-trained, off-the-shelf object detector and attribute classifier to identify objects (nouns) and their properties (colors, states). To handle spatial relationships—a critical component of visual grounding—the authors developed a heuristic algorithm. By comparing the coordinates and areas of detected bounding boxes, the system assigns spatial labels like "left," "right," "front," or "behind."

2. Query Prompt Module

To ensure these synthetic queries are effective for training, a Query Prompt Module wraps them in templates. Instead of a raw string like "black horse left," it generates a structured prompt: "find the region that corresponds to the description: black horse on the left." This approach helps the model better leverage the internal knowledge of pre-trained language models.

The detailed Pseudo-Q pipeline showing (a) the training stage with pseudo-query generation and (b) the inference stage for test queries.

3. Visual-Language Model (ML-CMA)

The core architecture is a transformer-based model featuring Multi-Level Cross-Modality Attention (ML-CMA). Unlike standard models that fuse visual and text data only at the final layer, ML-CMA integrates features at every level of the transformer hierarchy. This allows the model to capture both coarse global shapes and fine-grained local details simultaneously.

Experimental Results

The researchers evaluated Pseudo-Q on five gold-standard visual grounding benchmarks: RefCOCO, RefCOCO+, RefCOCOg, ReferItGame, and Flickr30K Entities. Despite being trained without human-labeled queries, Pseudo-Q demonstrated remarkable results:

  • Unsupervised Superiority: On the RefCOCO dataset, Pseudo-Q achieved 56.02% accuracy, nearly doubling the performance of the previous state-of-the-art unsupervised method, CPT (32.20%).
  • Outperforming Weak Supervision: Pseudo-Q outperformed many "weakly-supervised" models that had access to human-written image captions, despite using only synthetic data.
  • Cost Reduction: In a hybrid setting, the authors found they could replace 31% of human annotations with synthetic pseudo-queries on RefCOCO without any drop in final model performance, suggesting a massive potential for reducing labeling costs.

Discussion and Future Work

Pseudo-Q demonstrates that simple geometric heuristics and smart prompting can generate surprisingly effective training data for spatial reasoning. However, limitations remain. The current pseudo-queries are limited to a "Noun + Attribute + Relation" formula, whereas human language is far more diverse. Future work could expand the generation module to include complex verbs and action-based relationships (e.g., "the man kicking the ball") to handle more dynamic scenes and reduce the noise inherent in automated label generation.

Summary updated

BibTeX
@misc{jiang2022pseudo,
  author = {Haojun Jiang and Yuanze Lin and Dongchen Han and Shiji Song and Gao Huang},
  title = {{Pseudo-Q: Generating Pseudo Language Queries for Visual Grounding}},
  year = {2022},
  eprint = {2203.08481},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.08481},
}
Figure