Improving Vision and Language Concepts Understanding with Multimodal Counterfactual Samples

Chengen Lai, Shengli Song, Sitong Yan, Guangneng HuECCV 2024

Abstract

State-of-the-art Vision-Language (VL) models like CLIP demonstrate impressive object recognition capabilities but often fail at compositional reasoning, relying instead on "bag-of-objects" shortcuts. We present COMO, a framework designed to enhance fine-grained understanding through the generation of multimodal counterfactual samples. By creating synthetic image-text pairs that differ by a single semantic concept (e.g., changing a "red bus" to a "blue bus" in both modalities) and employing a weighted contrastive loss, COMO forces models to attend to specific attributes and relationships. Our approach achieves significant improvements on compositional benchmarks like VL-Checklist and Winoground while maintaining robust zero-shot performance.

Introduction: The Compositional Reasoning Gap

Despite the success of large-scale pre-training, VL models frequently struggle to distinguish between semantically distinct but lexically similar scenes. For instance, a model might fail to differentiate "a man biting a dog" from "a dog biting a man," or struggle with specific attributes like color, size, and state. This limitation stems from "spurious correlations" in training data; if "grass" is almost always "green" in the dataset, the model may associate the word "green" with the texture of grass rather than the concept of color itself.

To address this, models require "hard negatives"—examples that are nearly identical to the ground truth but differ in one crucial semantic aspect. Traditional contrastive learning typically relies on random negatives from within a batch, which are often too easy to distinguish.

Comparison of contrastive learning strategies: (a) typical CLIP-style, (b) textual counterfactuals, and (c) the proposed multimodal counterfactual approach.

The COMO Framework

The COMO framework introduces a systematic way to generate and learn from these hard negatives across both text and image modalities.

1. Multimodal Counterfactual Generation (COCO-CF)

The authors developed a pipeline to create the COCO-CF dataset, which augments the original MS-COCO dataset with synthetic counterfactuals.

  • Counterfactual Text Generation: Original captions are parsed to identify key nouns, verbs, and adjectives. A target word is replaced with a [MASK] token, and a pre-trained BERT model suggests plausible but semantically distinct alternatives. This ensures the counterfactual is linguistically sound but factually different.
  • Counterfactual Image Generation: The generated text is then used as a prompt for a Stable Diffusion model. To maintain visual consistency with the original image (changing only the "causal" concept), the system generates multiple candidates and selects the one that best balances text-alignment with visual similarity to the original factual image.

2. Learning with Weighted Contrastive Loss

In the training phase, factual pairs and their corresponding counterfactual "twins" are placed in the same mini-batch. Standard contrastive learning treats all negatives equally, but COMO introduces a dynamic weighting mechanism. This mechanism assigns higher importance to counterfactual hard negatives, pushing the model to differentiate between subtle conceptual changes.

The COMO pipeline: (a) Counterfactual text generation using BERT, (b) Image synthesis via Diffusion models, and (c) Counterfactual-guided hard negative contrastive learning.

Experimental Results

The framework was evaluated against several rigorous benchmarks designed to test compositional understanding:

  • VL-Checklist: This benchmark specifically targets Attributes, Relations, and Objects. COMO improved attribute understanding by 3.17% and relation understanding by 2.12% over strong baselines.
  • Winoground: In this challenging "visio-linguistic" task, COMO achieved a 4.35% improvement in the image score and a 2.63% improvement in the group score.
  • Zero-Shot Classification: Evaluation across 21 standard tasks confirmed that COMO maintains general object recognition performance while gaining compositional depth.

Efficiency in Low-Resource Settings

One of the most striking findings was COMO's performance when training data is limited. When trained on only 10% of the dataset, COMO outperformed standard CLIP by a wider margin than it did at 100% capacity. This suggests that multimodal counterfactuals act as highly efficient "teachers," providing dense semantic signals that are more valuable than large volumes of generic data.

Conclusion and Future Work

COMO demonstrates that multimodal augmentation—changing both the caption and the image—is essential for breaking the "bag-of-objects" habit in VL models. By forcing models to compare a "red bus" directly against a "blue bus," they are discouraged from using shortcuts and forced to learn the underlying concepts of color and object identity.

However, challenges remain. Current generative models still struggle with fine-grained physical states, such as distinguishing between "open" and "closed" cabinets. Future research will explore more complex counterfactuals involving multiple concept changes and techniques to improve the generation of subtle physical states.

Summary updated

BibTeX
@inproceedings{lai2024improving,
  author = {Chengen Lai and Shengli Song and Sitong Yan and Guangneng Hu},
  title = {{Improving Vision and Language Concepts Understanding with Multimodal Counterfactual Samples}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72890-7\_11},
}
Figure