Modularized Zero-shot VQA with Pre-trained Models

Rui Cao, Jing Jiang

Abstract

Visual Question Answering (VQA) traditionally relies on massive human-labeled datasets, which are expensive to produce and often lead to poor generalization. This paper introduces Mod-Zero-VQA, a framework that tackles VQA through a modular, zero-shot approach. By decomposing complex questions into logical steps and utilizing specialized, off-the-shelf pre-trained models (PTMs) like CLIP and MDETR, the system achieves a 13% relative improvement on the GQA benchmark without any task-specific training. Our findings suggest that modularity and spatial heuristics are key to overcoming the reasoning limitations of monolithic foundation models.

1. Introduction

Visual Question Answering (VQA) requires a model to simultaneously process visual information, parse linguistic structure, and perform multi-step reasoning. For instance, answering "Is the person to the left of the man holding the red cup wearing a hat?" necessitates object detection, relational understanding, and attribute verification.

Conventional VQA systems are often "black boxes" trained on specific (image, question, answer) triplets. While effective within their training distribution, these models struggle with out-of-domain generalization. Conversely, large-scale PTMs like GPT-3 or CLIP possess broad knowledge but often fail at the intricate spatial and compositional logic required for VQA. Mod-Zero-VQA bridges this gap by treating VQA as a modular assembly task.

2. Methodology

The Mod-Zero-VQA pipeline operates in three distinct stages, requiring no fine-tuning of the underlying models.

The Mod-Zero-VQA pipeline: from question parsing to modular execution using pre-trained models.

2.1 Question Decomposition

A symbolic parser first translates the natural language question into a functional "layout." For example, a question about a person holding a cup is decomposed into a sequence of operations such as Find, Relocate, and Filter to isolate the specific subjects of interest.

2.2 Model Mapping

Each functional module is mapped to a specialized, frozen PTM:

  • OWL-ViT: Employed for open-vocabulary object detection (the Find module).
  • MDETR: Used for "modulated detection," which excels at identifying objects based on complex textual descriptions, facilitating relational reasoning.
  • CLIP: Utilized for final multimodal matching to verify specific attributes or generate the final answer.

2.3 Spatial Heuristics

Recognizing that current PTMs often struggle with basic spatial relations (e.g., "left" vs. "right"), the framework incorporates human-defined geometric rules. These heuristics calculate relative positions based on the bounding boxes provided by the detection models, significantly improving accuracy over pure neural approaches.

3. Experimental Setup and Results

The framework was evaluated on two major benchmarks: GQA, which focuses on compositional reasoning, and VQAv2, the standard diverse VQA dataset.

3.1 Performance Metrics

On the GQA dataset, Mod-Zero-VQA achieved an accuracy of 47.3%, representing a significant jump from the previous state-of-the-art zero-shot baseline of 41.9%. This 13% relative improvement underscores the power of modularity.

3.2 Robustness and Interpretability

A key advantage of this approach is its robustness to out-of-domain data. In tests involving specific scenes (e.g., "Street" or "Food") not seen during any training phase, Mod-Zero-VQA maintained consistent performance, whereas supervised models exhibited high variance. Furthermore, the modular nature provides inherent interpretability; failures can be traced back to specific steps in the reasoning chain.

Visualizing the modular reasoning process for spatial relations and object existence.

4. Discussion and Limitations

While Mod-Zero-VQA demonstrates the potential of modular zero-shot learning, it faces certain challenges. The primary issue is error propagation: if an early module (e.g., initial object detection) fails, the subsequent reasoning chain is compromised. Additionally, the system's reliance on a symbolic parser means that highly unusual phrasing can lead to invalid logical layouts.

5. Conclusion

Mod-Zero-VQA shifts the paradigm from monolithic "black box" training to a "team-based" approach using specialized pre-trained models. By leveraging the strengths of individual models and supplementing them with simple spatial heuristics, the framework achieves state-of-the-art zero-shot performance and offers a more interpretable path forward for complex visual reasoning tasks.

Summary updated

BibTeX
@inproceedings{cao2023modularized,
  author = {Rui Cao and Jing Jiang},
  title = {{Modularized Zero-shot VQA with Pre-trained Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.5},
}
Figure