Abstract
Text-to-Image (T2I) models demonstrate significant vulnerability to adversarial attacks, where optimized text suffixes can drastically alter generated visual content. This study investigates the "linguistic hierarchy" of these vulnerabilities, revealing that while nouns and adjectives are easily manipulated, verbs, numerals, and adverbs exhibit surprising resilience. We analyze the underlying semantic space of text encoders to explain these disparities and demonstrate the transferability of adversarial suffixes across different prompts.
Introduction
Recent advancements in Text-to-Image (T2I) generation, particularly with diffusion models like Stable Diffusion, have raised concerns regarding their robustness. Adversarial attacks—small, often nonsensical perturbations in input prompts—can hijack a model's output, steering it toward unintended target concepts. While previous research has largely focused on object-level (noun) perturbations, this paper explores how different Parts of Speech (POS) contribute to a model's vulnerability. Understanding which linguistic categories are "weak links" is crucial for developing more robust and secure generative AI.
Methodology
The researchers employed a gradient-based adversarial attack framework designed to find an "adversarial suffix." This suffix is a string of tokens appended to a prompt to steer the model's latent representation toward a target concept.
The study utilized two primary attack settings:
- Unrestricted Attacks: The adversarial suffix is allowed to contain the target word itself.
- Restricted Attacks: The target word is forbidden from the suffix, forcing the optimization process to rely on "gibberish" tokens that implicitly encode the target's semantics.
Success was measured using the Attack Success Rate (ASR) and the Semantic Shift Rate (SemSR), the latter quantifying the movement of the generated image's embedding toward the target in CLIP space.
The POS Vulnerability Hierarchy
The core finding of this research is a distinct hierarchy of vulnerability across different linguistic categories. Nouns, proper nouns, and adjectives are the most susceptible to adversarial manipulation. In contrast, verbs and numerals are significantly harder to influence, and adverbs remain largely "untouchable" by current gradient-based methods.
This disparity is attributed to the structure of the text encoder's embedding space. Using t-SNE visualizations, the authors observed that nouns and adjectives form well-separated, distinct clusters, providing a clear gradient for optimization. Verbs and adverbs, however, tend to be more densely packed and overlapping, making it difficult for an attack to find a specific "steering" direction.
Empirical Results and Transferability
The quantitative results highlight the stark differences in POS vulnerability. In unrestricted attacks, Nouns achieved a 65% ASR, whereas Adverbs reached only 3%. Even in restricted settings, Nouns maintained a 51% ASR, demonstrating that adversarial suffixes can effectively "sneak in" complex semantics without using literal target words.
Furthermore, the study discovered that adversarial suffixes are often universally transferable within the same POS category. For example, a suffix optimized to change a "white swan" into a "black swan" can be successfully applied to change a "white car" into a "black car." This suggests that the attacks exploit fundamental categorical representations within the text encoder.
Discussion and Future Work
The vulnerability of T2I models appears heavily tied to the specific architecture of the text encoder. While attacks transferred well between Stable Diffusion v1.4 and v1.5 (both using OpenAI CLIP), they failed against Stable Diffusion v2.1, which utilizes OpenCLIP. This indicates that newer, more robust text encoders may naturally mitigate some of these vulnerabilities.
Future research should investigate attacks on more complex linguistic structures and the development of encoders that do not cluster POS tags in ways that facilitate steering. Additionally, testing these vulnerabilities in closed-source models like DALL-E 3 remains a priority for the community, despite the lack of direct gradient access.
Summary updated