ColorSwap: A Color and Word Order Dataset for Multimodal Evaluation

Jirayu Burapacheep, Ishan Gaur, Agam Bhatia, Tristan Thrush

TL;DR

ColorSwap is a new benchmark of 2,000 image-caption pairs designed to test whether multimodal AI models can correctly link colors to specific objects when word order is swapped (e.g., "white cat, black vase" vs. "black cat, white vase"). The study reveals that while state-of-the-art models like GPT-4V perform reasonably well, popular contrastive models like CLIP operate at near-random chance, highlighting a persistent "bag-of-words" behavior in vision-language architectures.

What Problem Does This Paper Address?

Despite the meteoric rise of vision-language models (VLMs), they often struggle with fine-grained compositional understanding. A famous example is the "bag-of-words" problem: a model might correctly identify a "cat," a "vase," "black," and "white" in an image, but fail to understand which color belongs to which object based on the sentence structure.

Existing benchmarks like Winoground have shown that models often fail to distinguish between captions containing the same words in different orders. However, Winoground is small and covers many types of linguistic swaps. The authors of ColorSwap narrow the focus to a conceptually simple but practically vital task: color-object association. This is a critical skill for everything from reliable image retrieval to controllable AI art generation.

Methods

The authors developed a "human-in-the-loop" pipeline to create a high-quality, balanced dataset that follows the Winoground schema. The process involves three main stages:

  1. Caption Generation: Initial captions were created using three methods: manual brainstorming (Handmade), template-based swapping (Rule-based), and LLM-assisted generation using GPT-4 and Claude-2.
  2. Image Generation: The authors used powerful diffusion models—Midjourney, DALL·E 3, and Stable Diffusion XL—to generate images for these captions.
  3. Post-Processing: This is the most critical step. Because even the best image generators often mix up colors (see Figure 2), human annotators filtered the results to ensure the images perfectly matched the captions. They also performed "re-captioning" to make rule-based captions sound more natural and diverse.
An overview of the ColorSwap dataset creation methodology.

Datasets

  • ColorSwap (New): The primary contribution, consisting of 1,000 examples (each containing two image-caption pairs where colors are swapped). It is split into 700 training examples and 300 for evaluation.
  • Winoground: Used as a secondary evaluation set to see if models fine-tuned on ColorSwap could generalize their word-order understanding to more complex linguistic tasks.

Key Insights and Ideas

  • Contrastive Models are "Color-Blind" to Syntax: Models like CLIP and SigLIP, which are trained to match images and text in a shared embedding space, performed abysmally. Their scores were close to random chance, suggesting they treat captions more like a list of keywords than a structured sentence.
  • Architecture Matters: The non-contrastive BLIP model, which uses a specialized Image-Text Matching (ITM) head with cross-modal attention, performed significantly better (87% group score) than its contrastive counterparts. This suggests that deep interaction between visual and textual features is necessary for compositional understanding.
  • Fine-tuning is a Quick Fix, but Not a Cure: The authors found that fine-tuning CLIP on just 1,400 ColorSwap pairs dramatically improved its performance on the ColorSwap test set (jumping from ~12% to 63% group score).
  • The Generalization Gap: Interestingly, while fine-tuning helped models master color-swapping, it did not improve their performance on the broader Winoground dataset. This indicates that "word-order understanding" isn't a single monolithic skill; learning to associate colors doesn't automatically teach a model how to handle swapped verbs or spatial relations.

Key Results

The authors evaluated models using three metrics: Text score (selecting the right caption for an image), Image score (selecting the right image for a caption), and the Group score (correctly doing both for a pair).

Model Type Group Score (%)
Random Chance - 16.67 (ITM) / 6.25 (VLM)
CLIP Contrastive 11.67
SigLIP Contrastive 30.33
BLIP (ITM head) Non-contrastive 87.33
LLaVA-1.5 VLM 42.00
GPT-4V VLM 72.00

The failure of DALL·E 3 to follow its own prompts during the dataset creation process (Figure 2) further underscores the difficulty of this task even for industry-leading generative models.

Figure 2: An image from DALL·E 3 (Betker et al., 2023) when given the caption “The key to the shed is blue” (we ensured that the caption was not rewritten by ChatGPT (OpenAI, 2022)). DALL·E 3 does not always make this mistake, but it is unreliable. Even though “the shed is blue” is a substring, the full sentence is saying that the key is blue. Our dataset does not target difficult cases where colors modify far objects in the string.

Limitations and Future Work

The authors acknowledge several limitations:

  • Synthetic Data Bias: All images in ColorSwap are AI-generated. While the authors ran experiments suggesting this isn't the sole cause of model failure, the "out-of-distribution" nature of synthetic images remains a factor.
  • Static Benchmark: As with all public datasets, there is a risk of "data contamination" where future models might inadvertently see ColorSwap during their pre-training phase.
  • Narrow Scope: The dataset focuses exclusively on color. Future work could expand this methodology to other attributes like size, shape, or texture to build a more comprehensive suite for compositional evaluation.

Summary updated

BibTeX
@inproceedings{burapacheep2024colorswap,
  author = {Jirayu Burapacheep and Ishan Gaur and Agam Bhatia and Tristan Thrush},
  title = {{ColorSwap: A Color and Word Order Dataset for Multimodal Evaluation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=hmiS6X7atA},
}
Figure