Introduction
While OpenAI’s CLIP model is renowned for its impressive zero-shot capabilities, it suffers from a well-documented vulnerability to "typographic attacks." In these scenarios, a superimposed word—such as "dog" written over an image of a cat—can completely trick the model into misclassifying the image. In human psychology, a similar phenomenon known as the "picture-word interference" effect occurs when people are slower to name an image if a distracting, unrelated word is written over it. For humans, this happens because our brains process the semantics (meaning) of both the word and the image in a shared conceptual space, causing a cognitive "traffic jam."
Recent large-scale vision-language models like CLIP exhibit a similar, albeit more extreme, bias. This paper investigates whether CLIP’s bias stems from the same root cause as human interference. Specifically, the authors explore whether CLIP has learned a shared hierarchical semantic representation where the concept of an object is identical whether presented as a visual feature or written text. Understanding this distinction is crucial for determining if joint language-vision training produces models with true conceptual understanding or merely sophisticated pattern matchers.
Methodology and Benchmark Dataset
To interrogate the CLIP model, the researchers adapted methodological tools from cognitive science and neuroscience. They constructed a novel benchmark dataset comprising 41,100 word-superimposed images. This dataset combined natural images (from Cichy et al., 2016 and Mohsenzadeh et al., 2019) with hierarchical labels extracted from MS-COCO and CIFAR-100.
The core of their methodology involved a Hierarchical Benchmark. Images were overlaid with words at different levels of abstraction: Superordinate (e.g., "electronic") and Basic (e.g., "laptop"). The researchers tested four distinct conditions (S/S, S/B, B/S, B/B) to observe how the abstraction level of the superimposed word affected the model's image classification.
Additionally, the team employed Representational Similarity Analysis (RSA), a technique borrowed from neuroscience, to compare the internal feature maps of the model for different inputs. If CLIP possessed a shared semantic representation, the internal state for an image of a dog should closely resemble the internal state for the written word "dog." Finally, they used Word2Vec and Jaro-Winkler metrics to measure whether the model's tendency to switch its label depended on the semantic or spelling similarity between the written word and the actual image.
Key Findings
The evaluation revealed several critical insights into how CLIP processes text and images:
- The "Word Wins" Phenomenon: CLIP does not merely experience interference; it undergoes a total visual override. When the classification task matched the word level (e.g., asking for a superordinate label when a superordinate word was present), CLIP switched its prediction to the written word 92.77% of the time.
- Semantic Independence: Unlike human cognitive interference, CLIP’s bias does not depend on semantic similarity. A human is more distracted by the word "apple" on a picture of a "pear" than the word "bicycle" on a "pear." In contrast, CLIP is equally likely to be fooled regardless of whether the superimposed word is conceptually related to the image.
- Separate Representations: The RSA results provided a crucial breakthrough. They demonstrated that while the image encoder recognizes the written word, it does not map it to the same internal representation as the physical object. To CLIP's image encoder, the written word "dog" and a photo of a dog are two entirely different visual patterns that only converge at the final text-label classification step.
- Prompt Dependency and Architecture Consistency: Attempts to mitigate the bias using prompts like "a photo of the image content, ignoring the word" reduced the effect, but the label switching rate remained high (over 30%). Furthermore, these findings held true across various CLIP backbones (ResNet-50, ResNet-101, ViT-B/32), indicating that the vulnerability is inherent to the CLIP training objective rather than a specific architecture.
Conclusion and Future Directions
The authors conclude that CLIP's typographic bias is not caused by a human-like shared semantic understanding of words and images. Instead, the image encoder treats written text as a dominant visual feature that lacks a shared conceptual representation with actual objects. This bias likely stems from the model's training data—web-scraped image-text pairs that frequently feature memes, advertisements, and infographics where text is the primary informational component.
Future work should investigate whether training on cleaner datasets devoid of embedded text can force models to learn more robust visual-semantic representations. Additionally, exploring how to move beyond simple word detection toward models that exhibit true semantic interference could pave the way for more human-like artificial intelligence. Finally, leveraging these insights to develop defenses against typographic attacks will be vital for deploying these models safely in real-world applications like autonomous driving and content moderation.
Summary updated