Defending Text-to-image Diffusion Models: Surprising Efficacy of Textual Perturbations Against Backdoor Attacks

Oscar Chew, Po-Yi Lu, Jayden Lin, Hsuan-Tien Lin
8/28/2024
cs.CV

Official code: oscarchew/t2i-backdoor-defense (6 stars, last commit 2024-10-06).

Abstract

Text-to-image diffusion models have been widely adopted in real-world applications due to their ability to generate realistic images from textual descriptions. However, recent studies have shown that these methods are vulnerable to backdoor attacks. Despite the significant threat posed by backdoor attacks on text-to-image diffusion models, countermeasures remain under-explored. In this paper, we address this research gap by demonstrating that state-of-the-art backdoor attacks against text-to-image diffusion models can be effectively mitigated by a surprisingly simple defense strategy - textual perturbation. Experiments show that textual perturbations are effective in defending against state-of-the-art backdoor attacks with minimal sacrifice to generation quality. We analyze the efficacy of textual perturbation from two angles: text embedding space and cross-attention maps. They further explain how backdoor attacks have compromised text-to-image diffusion models, providing insights for studying future attack and defense strategies. Our code is available at https://github.com/oscarchew/t2i-backdoor-defense.

View on arXivView PDF

Code Implementations(1)

The official repository of the ECCV 2024 Workshop paper: Defending Text-to-image Diffusion Models: Surprising Efficacy of Textual Perturbations Against Backdoor Attacks

61PythonAug 28, 20242 years ago
ai-safetyimage-generation

Cite this paper

@article{chew2024defending,
  title  = {Defending Text-to-image Diffusion Models: Surprising Efficacy of Textual Perturbations Against Backdoor Attacks},
  author = {Oscar Chew and Po-Yi Lu and Jayden Lin and Hsuan-Tien Lin},
  year   = {2024},
  eprint = {2408.15721},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.15721v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.15721.svg)](https://codeofpaper.com/paper/2408.15721)

Discussion