Introduction
Standard dual-encoder Vision-Language Models (VLMs), such as CLIP and SigLIP, have fundamentally changed the landscape of image-text retrieval. However, these models frequently exhibit a "bag-of-words" behavior, where they fail to distinguish between sentences containing the same words in different configurations. For instance, a model might struggle to differentiate between a "black cat and a white dog" and a "white cat and a black dog."
This phenomenon, known as a failure in compositional reasoning, occurs because VLMs typically compress an entire image and its corresponding caption into single global vectors. In this compression process, the specific bindings between objects, their attributes (like color or size), and their spatial relations are often lost. This research investigates whether these models already possess the necessary compositional knowledge but simply lack an inference mechanism capable of extracting it.
The Inference-Time Approach (ITA)
To address the compositionality gap without the need for expensive end-to-end retraining, this paper introduces a structured Inference-Time Approach (ITA). Instead of calculating a single global cosine similarity score, ITA decomposes the matching process into local components.
Methodology Overview
The ITA pipeline consists of four primary stages:
- Image Crop Generation: The model generates a comprehensive set of overlapping image crops at various scales and aspect ratios (up to 270 crops per image) to capture local details.
- Text Segmentation: A Large Language Model (LLM) is utilized to break down a complex caption into a hierarchy of segments (e.g., "fluffy white cat" becomes "fluffy white cat," "white cat," and "cat").
- Local Matching: For each text segment, the VLM identifies the single image crop that produces the highest similarity score.
- Score Aggregation: The final alignment score for the image-text pair is calculated as the average of the similarity scores from these optimal local matches.
Experimental Framework and Datasets
The effectiveness of ITA was evaluated across several rigorous benchmarks designed to test compositional reasoning:
- BIVLC & Winoground-171: Established datasets that use "swapped" captions to test if models can distinguish between subtle relational changes.
- BiSCoR (Bidirectional Swaps for Compositional Reasoning): A new dataset introduced in this study. It includes BiSCoR-NAT, featuring 427 high-quality swap cases from natural COCO images, and BiSCoR-CTRL, a controlled environment using synthetic CLEVR shapes to isolate specific reasoning types like quantity, material, and size.
Key Insights
The Power of Localized Vision
Ablation studies demonstrated that text segmentation alone provides minimal benefit. The significant performance gains are primarily driven by forcing the model to attend to local image regions (crops). This suggests that while global embeddings are too "blurry" to maintain precise attribute-object bindings, the model's internal features for local regions remain highly descriptive.
Latent Compositional Knowledge
The dramatic improvements achieved without any additional training prove that models like CLIP already "know" the components of a scene. The failure of standard VLMs is not a lack of knowledge, but rather a failure of the standard global similarity metric to extract that knowledge.
Mitigating Synthetic Bias
The researchers observed a "synthetic bias" in standard VLMs, where models often preferred synthetic "negative" images over natural "positive" ones in the BIVLC dataset. ITA was found to significantly mitigate this bias, leading to more robust and accurate natural image retrieval.
Results and Performance
The ITA method yielded consistent improvements across various architectures, including CLIP and SigLIP 2:
- BIVLC: SigLIP 2-Giant’s "Group Score" (requiring correct retrieval in both directions) improved from 7.8 to 29.8.
- BiSCoR-CTRL: On attribute-binding tasks, CLIP’s Group Score rose from 1.4 (near random) to 24.8.
- Winoground: On a curated subset of 102 instances, SigLIP 2 saw an absolute improvement of +13.7 points.
While highly effective for color and material binding, the method showed less improvement for Size, likely because cropping an object in isolation removes the relative context necessary to judge scale.
Conclusion and Future Work
ITA provides a simple yet powerful way to unlock the compositional reasoning capabilities already latent within off-the-shelf VLMs. While the current implementation faces computational overhead due to the high number of image crops (86 to 270 per image), future optimizations—such as using ROI Align or more sophisticated score aggregation functions—could make this structured inference approach a standard component of vision-language pipelines.
Summary updated