Skip to main content
QUICK REVIEW

[Paper Review] Stable Diffusion is Unstable

Chengbin Du, Yanxi Li|arXiv (Cornell University)|Jun 5, 2023
Generative Adversarial Networks and Image SynthesisComputer Science6 citations
TL;DR

This paper proposes Auto-attack on Text-to-image Models (ATM), a gradient-based, differentiable method that generates adversarial text prompts by learning a Gumbel Softmax distribution over word replacements or extensions, enabling efficient, white-box attacks on Stable Diffusion. ATM achieves 91.1% success on short-text attacks and 81.2% on long-text attacks while maintaining high semantic similarity to clean prompts, revealing four key vulnerability patterns in text-to-image models.

ABSTRACT

Recently, text-to-image models have been thriving. Despite their powerful generative capacity, our research has uncovered a lack of robustness in this generation process. Specifically, the introduction of small perturbations to the text prompts can result in the blending of primary subjects with other categories or their complete disappearance in the generated images. In this paper, we propose Auto-attack on Text-to-image Models (ATM), a gradient-based approach, to effectively and efficiently generate such perturbations. By learning a Gumbel Softmax distribution, we can make the discrete process of word replacement or extension continuous, thus ensuring the differentiability of the perturbation generation. Once the distribution is learned, ATM can sample multiple attack samples simultaneously. These attack samples can prevent the generative model from generating the desired subjects without compromising image quality. ATM has achieved a 91.1% success rate in short-text attacks and an 81.2% success rate in long-text attacks. Further empirical analysis revealed four attack patterns based on: 1) the variability in generation speed, 2) the similarity of coarse-grained characteristics, 3) the polysemy of words, and 4) the positioning of words.

Motivation & Objective

  • To address the lack of robustness in text-to-image generation, where small prompt perturbations cause subject disappearance or misgeneration.
  • To overcome the limitations of manual, qualitative prompt crafting for vulnerability discovery by enabling automated, data-driven attack generation.
  • To develop a learnable, differentiable method that generates high-similarity, effective adversarial prompts for probing model instability.
  • To identify and characterize systematic failure patterns in text-to-image models through empirical analysis of attack behavior.

Proposed method

  • ATM uses a Gumbel Softmax with temperature decay to differentially relax discrete word replacements or extensions, enabling gradient-based optimization of prompt perturbations.
  • A binary mask preserves the target noun while allowing modifications to other words, ensuring the desired subject remains semantically anchored.
  • The method optimizes prompt embeddings using a CLIP classifier and margin loss to maximize misclassification of generated images.
  • Fluency and semantic similarity constraints are applied via autoregressive language modeling and BERTScore-based regularization to maintain prompt quality and coherence.
  • The attack is trained in a white-box setting on Stable Diffusion, enabling transferability to other models like DALL·E 2 and Midjourney.
  • Multiple attack prompts are sampled simultaneously after training, enabling efficient exploration of adversarial perturbation space.

Experimental results

Research questions

  • RQ1What are the key failure patterns in text-to-image models when subjected to small, targeted prompt perturbations?
  • RQ2How can adversarial prompt generation be made differentiable and efficient for white-box attack on text-to-image models?
  • RQ3To what extent can attack prompts generated for one model (e.g., Stable Diffusion) transfer to other models like DALL·E 2 or Midjourney?
  • RQ4How do fluency and semantic similarity constraints affect the success rate and quality of adversarial prompts?
  • RQ5What underlying vulnerabilities in attention mechanisms or prompt processing lead to subject neglect or misgeneration?

Key findings

  • ATM achieved a 91.1% success rate in attacking short-text prompts and 81.2% in long-text prompts, demonstrating high effectiveness.
  • The inclusion of fluency and semantic similarity constraints increased text similarity (TS) to 0.84 while maintaining a high attack success rate of 81.2%.
  • The method successfully transferred to black-box settings, generating effective attacks on DALL·E 2 and Midjourney with high-quality, semantically coherent prompts.
  • The ablation study showed that combining fluency and semantic constraints yielded the best trade-off between similarity and success rate, outperforming individual constraints.
  • Four distinct attack patterns were identified: variability in generation speed, similarity of coarse-grained characteristics, polysemy of words, and positional sensitivity of words.
  • The method demonstrated transferability across different samplers, achieving 81.2% success on DDIM and 76.5% on the stronger DPM-Solver sampler.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.