Unveiling Typographic Deceptions: Insights of the Typographic Vulnerability in Large Vision-Language Models

Hao Cheng, Erjia Xiao, Jindong Gu, Le Yang, Jinhao Duan, Jize Zhang, Jiahang Cao, Kaidi Xu, Renjing Xu

Abstract

Large Vision-Language Models (LVLMs) such as LLaVA and GPT-4V exhibit a surprising susceptibility to "typographic attacks"—textual overlays on images that contradict visual content. This research introduces TypoD, a comprehensive dataset designed to evaluate these vulnerabilities. By analyzing the vision encoder's attention, the study reveals that these deceptions occur due to a shift in focus toward the text. However, the authors demonstrate that informative prompting can significantly mitigate these effects, reducing performance degradation from over 42% to 13.9%.

Introduction: The Typographic Vulnerability

Recent advancements in Large Vision-Language Models (LVLMs) have integrated powerful vision encoders like CLIP to interpret visual data. However, these encoders are known to be vulnerable to typographic attacks, where a model might misidentify a pear as an "iPod" simply because the word is written on it. As LVLMs inherit these encoders, they also inherit their weaknesses. This paper investigates the extent of this vulnerability, the factors that influence attack success, and the underlying mechanistic causes.

The TypoD Dataset and Methodology

To systematically study this phenomenon, the researchers introduced the Typographic Dataset (TypoD). Derived from benchmarks like ImageNet, Visual7W, and A-OKVQA, TypoD covers tasks ranging from object recognition to commonsense reasoning.

Examples of typographic attacks across various cognitive tasks in the TypoD dataset.

The study employed a multi-stage approach:

  1. Factor Exploration: Systematically varying font size, opacity, color, and spatial positioning to identify the most potent distractions.
  2. Mechanistic Analysis: Utilizing Grad-CAM and Attention Maps to observe how typographic text "hijacks" the model's attention.
  3. Prompt-based Mitigation: Testing "Informative Prompts" that require models to describe visual attributes before providing a final answer.

Widespread Susceptibility

The vulnerability is not limited to open-source models; commercial giants also struggle. When text overlays contradict the image, models often prioritize the text over the pixels.

Commercial and open-source LVLMs demonstrating vulnerability to text overlays.

Key Insights: The Attention Tug-of-War

The research suggests that the vision encoder is not fundamentally "broken." Instead, it perceives both the object and the text, but the text modality often guides the vision modality to focus on the wrong area. Grad-CAM visualizations show that simple prompts lead the model's attention to be captured entirely by the text. Conversely, descriptive prompts can redirect attention back to the actual visual elements, such as the shape or color of an object.

Results and Mitigation

The impact of typographic attacks is severe. On the TypoD-Base dataset, LLaVA-v1.5 experienced a 42.3% performance drop. However, by employing "Informative Prompts"—which ask the model to detail colors, shapes, and composition—the performance gap was narrowed significantly, reducing the drop to just 13.9%. This highlights that the text prompt acts as a crucial lens through which the vision encoder views the image.

Conclusion and Future Directions

While informative prompting offers a robust defense, it comes with increased computational costs. Future work should focus on developing intrinsic architectural defenses within LVLMs to ensure they are naturally resilient to typographic deception. Furthermore, the potential for these attacks to be used in multi-modal jailbreaking remains a significant security concern.

Summary updated

BibTeX
@inproceedings{cheng2024unveiling,
  author = {Hao Cheng and Erjia Xiao and Jindong Gu and Le Yang and Jinhao Duan and Jize Zhang and Jiahang Cao and Kaidi Xu and Renjing Xu},
  title = {{Unveiling Typographic Deceptions: Insights of the Typographic Vulnerability in Large Vision-Language Models}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73202-7\_11},
}
Figure