RoCOCO: Robustness Benchmark of MS-COCO to Stress-test Image-Text Matching Models

Seulki Park, Daeho Um, Hajung Yoon, Sanghyuk Chun, Sangdoo Yun, Jin Young Choi

TL;DR

Current state-of-the-art vision-language models are surprisingly brittle, often failing to distinguish between a correct caption and one where a single critical word has been changed. This paper introduces RoCOCO, a new robustness benchmark that stress-tests models with semantically and visually altered samples, and proposes new contrastive losses to help models move beyond "bag-of-words" matching toward true contextual understanding.

What Problem Does This Paper Address?

Vision-Language (VL) models like CLIP and BLIP have become the backbone of modern AI, powering everything from image generation to robotic manipulation. These models are typically evaluated on their ability to match images with text (retrieval). While they achieve impressive scores on standard datasets like MS-COCO, the authors argue these numbers are deceptive.

The core issue is a lack of robustness. Current models often behave like "bags-of-words," focusing on specific keywords or image patches rather than the overall context. If a model can't tell the difference between "a woman holding an umbrella" and "a woman holding a gun" simply because the word "gun" doesn't drastically shift the text embedding, it poses significant safety and reliability risks in real-world applications.

Fig. 1: Motivating Example. (a) When we add a new caption with only one word changed from “umbrella” to “gun”, this new caption is preferred by the model (Image- to-text). Likewise, when we add a new image created by inserting an unrelated image to the original one, this new image is ranked as top 1 (Text-to-image). (b) Recall@1 scores of existing SOTAs decrease when tested with our RoCOCO benchmark.

Methods

The authors developed two primary ways to "stress-test" these models:

  1. Semantically Altered Captions: Instead of random word replacement, they use a novel Embedding-Influence (EI) score. This score identifies nouns that have the least impact on the final text embedding. By replacing these "low-influence" words with different nouns (e.g., from the same category, different categories, or dangerous words), they create captions that are semantically very different to a human but look very similar to a model's encoder.
  2. Visually Altered Images: They use image-mixing techniques (Mixup and CutMix) to blend a ground-truth image with an unrelated one. This creates a "confusing" image that retains some original context but introduces significant visual noise.

To fix these vulnerabilities, the authors propose two new training objectives:

  • Semantic Contrastive (SC) Loss: Forces the model to increase the embedding distance between an image and its corrupted caption.
  • Visual Contrastive (VC) Loss: Forces the model to distinguish between a clean image and its visually corrupted version when matching against a caption.
The RoCOCO benchmark pipeline: adding confusing texts and images to the test gallery to see if the model gets distracted.

Datasets

The study centers on MS-COCO, the gold standard for image-text retrieval. The authors introduce RoCOCO (Robustness benchmark of MS-COCO), which expands the standard 5K test set:

  • Image-to-Text: The gallery is expanded from 25,000 to 50,000 captions by adding semantically altered versions.
  • Text-to-Image: The gallery is expanded from 5,000 to 10,000 images by adding visually altered versions.

Key Insights and Ideas

  • The "Low-Influence" Trap: Words that contribute little to the overall embedding vector are the easiest to manipulate. Models often overlook these words, even when they completely change the sentence's meaning (see Figure 7).
  • Universal Vulnerability: The drop in performance was consistent across 14 different SOTA models, regardless of whether they were trained on 14 million or 400 million image-text pairs. Large-scale pre-training alone does not guarantee robustness.
  • Spatial Neglect: By masking different parts of an image and measuring embedding changes, the authors found that models often fixate on specific regions (like a face) while ignoring significant changes elsewhere (like an unrelated object being pasted into the background).
Heatmap showing that certain spatial regions have much higher influence on the embedding than others, allowing models to be easily deceived if changes occur in "low-influence" areas.

Key Results

The quantitative degradation on RoCOCO is startling:

  • BLIP (ViT-B): Image-to-Text Recall@1 dropped from 81.9% to 48.4% when tested against the "Rand-voca" (random vocabulary) set.
  • VSE∞: Dropped from 66.1% to 37.6%.
  • RSMS Metric: The authors introduced the "Recall Score of Manipulated Samples" (RSMS), which measures how often the model prefers the corrupted sample over the original. In some settings, models chose the wrong caption over 55% of the time.

However, applying the proposed SC and VC losses to BLIP significantly improved its robustness, boosting Recall@1 in the Rand-voca setting from 48.4% back up to 68.2%.

Limitations and Future Work

The authors acknowledge a few key limitations:

  • Unnatural Sentences: Randomly replacing words can sometimes result in nonsensical grammar (e.g., "A war on bicycle..."). Future work could use LLMs like GPT-4 to generate more fluent, "hard" negatives.
  • Synthetic Images: The mixed images are clearly artificial. Testing with more realistic "out-of-distribution" or edited images (e.g., via Stable Diffusion) would be a natural next step.
  • Model Bias: The benchmark was created using four specific models to calculate EI scores. While it generalized well to other models, there might be a slight bias toward the architectures used during dataset creation.

Summary updated

Abstract

With the extensive use of vision-language models in various downstream tasks, evaluating their robustness is crucial. In this paper, we propose a benchmark for assessing the robustness of vision-language models. We believe that a robust model should properly understand both linguistic and visual semantics and be resilient to explicit variations. In pursuit of this goal, we create new variants of texts and images in the MS-COCO test set and re-evaluate the state-of-the-art (SOTA) models with the new data. Specifically, we alter the meaning of text by replacing a word, and generate visually altered images that maintain some visual context while introducing noticeable pixel changes through image mixing techniques.Our evaluations on the proposed benchmark reveal substantial performance degradation in many SOTA models (e.g., Image-to-Text Recall@1: 81.9\% $\rightarrow$ 48.4\% in BLIP, 66.1\% $\rightarrow$ 37.6\% in VSE$\infty$), with the models often favoring the altered texts/images over the original ones. This indicates the current vision-language models struggle with subtle changes and often fail to understand the overall context of texts and images. Based on these findings, we propose semantic contrastive loss and visual contrastive loss to learn more robust embedding. Datasets and code are available at {\url{https://github.com/pseulki/rococo}}.
BibTeX
@inproceedings{park2024rococo,
  author = {Seulki Park and Daeho Um and Hajung Yoon and Sanghyuk Chun and Sangdoo Yun and Jin Young Choi},
  title = {{RoCOCO: Robustness Benchmark of MS-COCO to Stress-test Image-Text Matching Models}},
  booktitle = {Workshops @ ECCV},
  year = {2024},
  doi = {10.1007/978-3-031-91907-7\_5},
}
Figure