TL;DR
This paper exposes a significant security vulnerability in Large Vision-Language Models (LVLMs) called "typographic attacks," where simple text overlays on images can completely mislead model reasoning. By introducing the massive TypoD dataset and analyzing cross-modal attention, the authors demonstrate that these failures stem from attention hijacking, which can be mitigated by using more "informative prompts" to reduce performance degradation from 42.07% to 13.90%.
What Problem Does This Paper Address?
We’ve known for a while that CLIP-based models are susceptible to typographic attacks—for instance, putting a label that says "iPod" on a Granny Smith apple can trick the model into classifying it as a music player. However, as we move toward more complex Large Vision-Language Models (LVLMs) like GPT-4V and LLaVA, the community assumed these models might be more robust due to their advanced reasoning capabilities.
This paper proves that assumption wrong. The authors show that even the most advanced commercial and open-source LVLMs are easily "distracted" by text printed on images. This isn't just a classification quirk; it affects object recognition, counting (enumeration), visual attribute detection, and even commonsense reasoning. The core challenge is understanding why this happens and whether it's a fundamental flaw in the vision encoder or a failure in how the model integrates text and image data.
Methods
The researchers took a systematic approach to deconstructing this vulnerability:
- Verification: They first confirmed the threat across a suite of models including GPT-4V, Google Bard, LLaVA, and MiniGPT-4.
- Dataset Creation (TypoD): They built a comprehensive benchmark to test various typographic factors like font size, opacity, color, and spatial positioning.
- Attention Analysis: Using Grad-CAM (Gradient-weighted Class Activation Mapping), they visualized where the vision encoder was "looking." They discovered that the presence of typographic text causes a massive shift in attention away from the actual visual subject.
- Mitigation via Prompting: They tested a hypothesis that the "simple" prompts usually used in VQA (e.g., "What is in this image?") are part of the problem. They introduced "informative prompts" that require the model to first provide a detailed visual description, effectively forcing the model to re-focus its attention on the actual image content rather than just the text overlay.
Datasets
The authors introduced the Typographic Dataset (TypoD), the largest and most comprehensive of its kind. It is derived from several established benchmarks:
- ImageNet: For object recognition tasks.
- DAQUAR & Visual7W: For visual attribute detection (e.g., color).
- CountBench & TallyQA: For enumeration (counting) tasks.
- A-OKVQA: For commonsense reasoning.
TypoD is split into two scales: TypoD-Base (1,570 images) and TypoD-Large (20,000 images). The dataset creation involved a "Factor Exploring Stage" to find the most effective attack parameters (e.g., 15px font, 100% opacity) before fixing those factors for the final benchmark.
Key Insights and Ideas
- Attention Hijacking: The primary cause of failure is that the vision encoder's attention is "grabbed" by the inserted text. Brighter regions in Grad-CAM visualizations clearly show the model fixating on the typo rather than the object.
- Text Modality Guidance: Interestingly, the vision encoder's attention isn't just a result of the image itself; it is guided by the text prompt. A simple prompt doesn't provide enough "querying capability" to overcome the visual distraction of the typo.
- The Power of Description: By asking the model to "Provide a detailed visual description" before answering a question, the researchers found they could trigger an "attention transfer" back to the visual contents of the image. This suggests the vision encoder can see the correct object, but the LLM component needs to be told to prioritize it.
Key Results
- Widespread Vulnerability: On the TypoD-Base dataset, LLaVA-v1.5 experienced a massive 42.3% performance drop when typos were introduced.
- Model Comparison: While all models were vulnerable, some were more resilient than others. For example, InstructBLIP outperformed LLaVA-v1.5 in robustness, though it still suffered significant accuracy losses.
- Successful Mitigation: By switching from simple prompts to "informative prompts" (Prompt 3 in the paper), the performance gap (the difference in accuracy between clean and attacked images) for LLaVA-v1.5 was slashed from 42.07% down to 13.90%.
- Visibility Correlation: There is a clear positive correlation between the visibility of the typo (size/opacity) and the success of the attack. However, even small, low-opacity typos (6px, 20% opacity) could still cause an 11-16% drop in accuracy.
Limitations and Future Work
The authors note that while informative prompting is highly effective, there appears to be a "threshold" or inherent gap in multi-modal querying that prevents the performance gap from closing entirely.
Future work could explore:
- Developing vision encoders that are inherently more robust to text-in-image distractions.
- Automating the generation of optimal "defense prompts" for different types of multi-modal tasks.
- Investigating if these typographic deceptions can be used for more malicious "jailbreaking" attacks beyond simple misinformation.
Summary updated