Prompting Large Vision-Language Models for Compositional Reasoning

Timothy Ossowski, Ming Jiang, Junjie HuarXiv 2024 · DOI

Introduction

Embedding-based vision-language models (VLMs) like CLIP have revolutionized multimodal retrieval but often struggle with fine-grained compositional tasks. For instance, they frequently fail to distinguish between "a bird eating a snake" and "a snake eating a bird." This "compositional blind spot" arises because traditional models compress complex images and text into single vector representations, losing nuanced relationships like spatial orientation or action direction.

This paper addresses two primary issues:

  1. Lossy Compression: Single-vector embeddings emphasize object presence but struggle with visio-linguistic compositionality.
  2. Lack of Reasoning: Current models lack a step-by-step mechanism to "think through" the relationships between visual elements and text.

The authors evaluate their approach on Winoground, a challenging benchmark where image-caption pairs use the same words in different orders (e.g., "The person in the middle is floating" vs. "The person in the middle is standing").

Methodology: The KEYCOMP Pipeline

The authors introduce KEYCOMP (Keyword-guided Compositional reasoning), a tuning-free, modular pipeline designed to enhance compositional reasoning without expensive retraining.

The KEYCOMP pipeline uses keyword detection and VLM descriptions to inform LLM-based reasoning.

The pipeline consists of three distinct stages:

  1. Keyword Detection: Using the SpaCy library, the system extracts nouns, verbs, prepositions, and adjectives from query captions to serve as "anchors" for visual search.
  2. Keyword-guided Description: A pretrained VLM (e.g., MiniGPT4 or BLIP-2) is prompted to describe the image, specifically focusing on the detected keywords. This ensures the model captures subtle details necessary for the task.
  3. LLM Reasoning & Explanation: The generated descriptions and original captions are fed into a Large Language Model (LLM) like GPT-4. The LLM performs "Chain-of-Thought" reasoning to determine the best match.

Evaluation and Results

The primary evaluation is conducted on the Winoground dataset, which requires a model to correctly match both captions to their respective images to achieve a "Group Score."

Performance comparison of KEYCOMP against baseline models on the Winoground benchmark.

KEYCOMP achieved a new state-of-the-art (SOTA) Image Score of 28.7% using GPT-4, surpassing previous embedding-based models by 5.1%. The method showed particularly strong improvements in categories involving "Unusual Images" and "Complex Reasoning." Ablation studies confirmed that keyword guidance provided the most significant boost, resulting in a ~9% jump in text scores compared to unguided descriptions.

Key Insights

  • Keywords as Anchors: Forcing the VLM to focus on specific keywords prevents generic descriptions and ensures "winoground-critical" details are captured.
  • LLMs as Reasoning Engines: While VLMs are proficient at visual recognition, their internal logic is often weaker than dedicated LLMs. Offloading the final decision to a pure text-based LLM using the VLM's output as "eyes" yields superior results.
  • The Description Bottleneck: The study reveals that the primary failure point is often the quality of visual description rather than logic. If a VLM misidentifies a spatial relationship, even the most advanced LLM will reach the wrong conclusion.

Limitations and Future Work

Despite its success, KEYCOMP faces challenges with precise spatial reasoning, particularly when objects share similar colors or textures. As a multi-step pipeline, it is also sensitive to errors in the initial description phase. Future work will focus on improved prompting strategies to help VLMs "zoom in" on key regions and enhancing the inherent understanding of spatial syntax in multimodal models.

Summary updated

BibTeX
@misc{ossowski2024prompting,
  author = {Timothy Ossowski and Ming Jiang and Junjie Hu},
  title = {{Prompting Large Vision-Language Models for Compositional Reasoning}},
  year = {2024},
  eprint = {2401.11337},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.11337},
}
Figure