Uncovering Vision Modality Threats in Image-to-Image Tasks

Hao Cheng, Erjia Xiao, Jiayan Yang, Jiahang Cao, Qiang Zhang, Jize Zhang, Kaidi Xu, Jindong Gu, Renjing Xu · DOI

TL;DR

This paper reveals a significant security vulnerability in image generation models: attackers can manipulate outputs by adding text directly to input images (vision modality threats), bypassing existing defenses that focus solely on text prompts. To address this, they introduce the VMT-IGMs dataset and demonstrate the ineffectiveness of current defense strategies against these vision-based attacks.

What Problem Does This Paper Address?

Modern image generation models, especially those leveraging CLIP and diffusion techniques, are incredibly powerful but also susceptible to misuse. While much attention has been paid to "textual jailbreaks" – manipulating text prompts to generate harmful content – this paper highlights a less-explored threat: vision modality attacks. Specifically, attackers can inject typographic text directly into an input image for image-to-image (I2I) tasks. This can subtly or drastically alter the generated image's semantic meaning, leading to inappropriate or harmful outputs. Existing defenses are primarily designed to guard against text-based prompt manipulation and are shown to be ineffective against these vision-based typographic attacks, leaving a critical gap in the security of image generation systems, particularly for I2I applications that directly modify real-world images.

Methods

The core of the paper's methodology revolves around typographic attacks and a comprehensive evaluation framework.

  • Typographic Attack: This involves directly embedding text into an input image. The authors explore various "factors" of this attack, including:
  • Typo Word Type: Using nouns, adjectives, or verbs with potentially harmful, biased, or neutral semantics.
  • Typo Size, Quantity, Opacity, and Position: Systematically varying these parameters to understand their impact.
  • Visible vs. Invisible Typography: Investigating attacks where text is clearly visible versus subtly hidden (e.g., within black borders).
  • Evaluation Pipeline: They use a standard CLIP-guided diffusion model pipeline. Input images are modified with typography, then processed through CLIP's vision and text encoders. The resulting embeddings are fed into a diffusion model (like DDPM) to generate the output image.
  • Defense Evaluation: The authors test existing defense mechanisms, including prompt-based methods (text blacklists, Detoxify, CLIP Score for prompts, LLMs, Latent Guard) and post-generation filtering (safety checkers), against their proposed vision modality attacks.

Datasets

  • VMT-IGMs (Vision Modality Threats in Image Generation Models) Dataset: This is the primary contribution. It's constructed from 1000 high-resolution images from the CelebA-HQ dataset. The dataset is divided into two main forms:
  • Factor Modification (FM): Used to systematically study the impact of different typographic factors (word type, size, quantity, opacity, position).
  • Malicious Threat (MT): Used to evaluate real-world risks with categories like harmful content (e.g., "naked," "bloody"), bias content (e.g., "African," "Asian"), and neutral content (e.g., "hat," "Muslim"). It further includes "Visible" and "Invisible" subtypes.
  • CelebA-HQ: Used as the source for the original images in the VMT-IGMs dataset.

Key Insights and Ideas

  • Vision Modality is a Critical Attack Surface: The most significant insight is that image generation models are not just vulnerable to text prompt manipulation but also to direct visual manipulation via typography. This opens up a new avenue for adversarial attacks.
  • Current Defenses are Insufficient: Existing defenses, heavily focused on text prompt analysis, are largely ineffective against typographic attacks embedded directly into images. This highlights a fundamental flaw in current security frameworks for generative AI.
  • Subtle Typography Can Still Cause Harm: Even "invisible" typography, carefully hidden within image borders, can significantly alter semantic outputs, demonstrating the pervasive nature of this threat.
  • Nouns are the Most Potent Typographic Attack Vector: Among word types, nouns consistently showed the strongest impact on CLIP scores and FID, suggesting they are particularly effective at steering generation towards unintended meanings.
  • VAE-based Models Show Reduced Sensitivity: While CLIP-guided diffusion models are highly susceptible, VAE-based diffusion models (like Stable Diffusion 3) appear to have reduced sensitivity to typographic attacks, suggesting architectural differences might offer some resilience.

Key Results

  • Significant Semantic Shifts: Typographic attacks consistently led to noticeable changes in CLIP scores, indicating a strong semantic influence on generated images. For example, "naked" and "bloody" showed substantial increases in CLIP scores when used typographically.
  • Defense Failure: Prompt detection methods failed to flag benign prompts that contained typographic threats, and post-generation safety checkers were only effective against explicit NSFW content, missing bias and neutral semantic shifts.
  • VMT-IGMs Dataset: The paper introduces a comprehensive dataset that allows for systematic evaluation of vision modality threats across various models and attack parameters.
  • Quantitative Impact: Tables in the paper show concrete CLIP score increases and FID score differences, quantifying the impact of various typographic factors and malicious words. For instance, visible typography generally resulted in higher FID scores compared to clean images.

Limitations and Future Work

  • Limited Model Scope: While experiments were conducted on several prominent models (UnCLIP, SD1.5, SDXL, FLUX, Emu2), the findings might not generalize to all image generation architectures.
  • Focus on I2I: The study primarily focuses on Image-to-Image tasks. The impact on Text-to-Image generation, while mentioned, was not as deeply explored.
  • Defense Development: The paper identifies the ineffectiveness of current defenses but does not propose novel defense mechanisms specifically for vision modality threats.
  • Future Work: The authors suggest further research into developing robust defenses against vision modality attacks and exploring these threats in other generative AI modalities beyond image generation. The VMT-IGMs dataset is intended to serve as a benchmark for this future research.

Summary updated

BibTeX
@inproceedings{cheng2025uncovering,
  author = {Hao Cheng and Erjia Xiao and Jiayan Yang and Jiahang Cao and Qiang Zhang and Jize Zhang and Kaidi Xu and Jindong Gu and Renjing Xu},
  title = {{Uncovering Vision Modality Threats in Image-to-Image Tasks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.00285},
}
Figure