Skip to main content
QUICK REVIEW

[Paper Review] On the Robustness of Latent Diffusion Models

Jianping Zhang, Zhuoer Xu|arXiv (Cornell University)|Jun 14, 2023
Adversarial Robustness in Machine LearningComputer Science6 citations
TL;DR

This paper investigates the robustness of latent diffusion models (LDMs) through white-box and black-box adversarial attacks, identifying the denoising process—particularly the ResNet module—as the most vulnerable component. It introduces two automated dataset construction pipelines for image variation and inpainting LDMs, releases a benchmark of 1,000 test cases, and finds that newer models like SD-v2 are more vulnerable than older ones, with transfer attacks successfully misdirecting models across versions.

ABSTRACT

Latent diffusion models achieve state-of-the-art performance on a variety of generative tasks, such as image synthesis and image editing. However, the robustness of latent diffusion models is not well studied. Previous works only focus on the adversarial attacks against the encoder or the output image under white-box settings, regardless of the denoising process. Therefore, in this paper, we aim to analyze the robustness of latent diffusion models more thoroughly. We first study the influence of the components inside latent diffusion models on their white-box robustness. In addition to white-box scenarios, we evaluate the black-box robustness of latent diffusion models via transfer attacks, where we consider both prompt-transfer and model-transfer settings and possible defense mechanisms. However, all these explorations need a comprehensive benchmark dataset, which is missing in the literature. Therefore, to facilitate the research of the robustness of latent diffusion models, we propose two automatic dataset construction pipelines for two kinds of image editing models and release the whole dataset. Our code and dataset are available at \url{https://github.com/jpzhang1810/LDM-Robustness}.

Motivation & Objective

  • To systematically evaluate the robustness of latent diffusion models (LDMs) beyond prior work that focused only on encoder or output attacks.
  • To investigate both white-box and black-box robustness, including prompt-transfer and model-transfer attack scenarios, to reflect real-world threat models.
  • To address the lack of a public, high-quality benchmark for LDM robustness by proposing automated dataset construction pipelines for two image editing LDM categories.
  • To assess the effectiveness of defense mechanisms such as geometry transformation, compression, and noise in mitigating adversarial impacts.
  • To provide open-source code and a dataset to accelerate future research on LDM robustness.

Proposed method

  • Proposes two automated dataset construction pipelines: one for image variation models (image + prompt pairs), and another for image inpainting models (image + prompt + mask triplets), each generating 500 test cases.
  • Applies white-box adversarial attacks on key components of LDMs—specifically the encoder, U-Net (denoising network), and decoder—to measure vulnerability.
  • Conducts transfer-based black-box attacks in two settings: prompt-transfer (attacking different models with same prompt) and model-transfer (attacking different models with same adversarial example).
  • Evaluates defense mechanisms including Random Resizing and Padding (R&P), JPEG compression, and Gaussian noise to test adversarial example robustness.
  • Uses CLIP score, PSNR, SSIM, MSSSIM, FID, and IS as metrics to quantitatively assess attack success and defense effectiveness.
  • Releases code and dataset at https://github.com/jpzhang1810/LDM-Robustness to enable reproducibility and future benchmarking.

Experimental results

Research questions

  • RQ1Which components within the latent diffusion model architecture are most vulnerable to adversarial attacks?
  • RQ2How does the robustness of image variation models compare to image inpainting models under white-box and black-box attack settings?
  • RQ3To what extent can adversarial examples transfer across different LDMs, particularly across versions of Stable Diffusion?
  • RQ4How effective are common defense mechanisms such as R&P, JPEG compression, and Gaussian noise in mitigating adversarial attacks on LDMs?
  • RQ5What are the implications of model evolution (e.g., SD-v1 to SD-v2) on adversarial robustness and inherited vulnerabilities?

Key findings

  • The denoising process, particularly the ResNet-based U-Net module, is the most vulnerable component in latent diffusion models under white-box attacks.
  • Instruct-pix2pix exhibits higher white-box robustness than standard Stable Diffusion models, as evidenced by higher CLIP scores under attack.
  • Adversarial examples crafted on SD-v1 models (e.g., SD-v1-4, SD-v1-5) transfer effectively to SD-v2-1, but the reverse transfer is limited, indicating SD-v2-1 is more vulnerable.
  • The transfer attack performance shows that defects in SD-v1 models are inherited by SD-v2, and SD-v2 models are more susceptible to adversarial perturbations than their SD-v1 predecessors.
  • Geometry transformation (Random Resizing and Padding) significantly improves adversarial example robustness, increasing the CLIP score by 3.95 on the U-Net module, though functionality remains compromised.
  • Even after applying defenses like JPEG compression and Gaussian noise, adversarial examples still mislead the expected image editing function, indicating limited resilience under real-world conditions.

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.