Rickrolling the Artist: Injecting Backdoors into Text Encoders for Text-to-Image Synthesis

Lukas Struppek, Dominik Hintersdorf, Kristian Kersting
11/4/2022
cs.LGcs.AIcs.CR

Official code: LukasStruppek/Rickrolling-the-Artist (63 stars, MIT, last commit 2023-11-20).

Abstract

While text-to-image synthesis currently enjoys great popularity among researchers and the general public, the security of these models has been neglected so far. Many text-guided image generation models rely on pre-trained text encoders from external sources, and their users trust that the retrieved models will behave as promised. Unfortunately, this might not be the case. We introduce backdoor attacks against text-guided generative models and demonstrate that their text encoders pose a major tampering risk. Our attacks only slightly alter an encoder so that no suspicious model behavior is apparent for image generations with clean prompts. By then inserting a single character trigger into the prompt, e.g., a non-Latin character or emoji, the adversary can trigger the model to either generate images with pre-defined attributes or images following a hidden, potentially malicious description. We empirically demonstrate the high effectiveness of our attacks on Stable Diffusion and highlight that the injection process of a single backdoor takes less than two minutes. Besides phrasing our approach solely as an attack, it can also force an encoder to forget phrases related to certain concepts, such as nudity or violence, and help to make image generation safer.

View on arXivView PDF

Code Implementations(1)

MIT

[ICCV 2023] Source code for our paper "Rickrolling the Artist: Injecting Invisible Backdoors into Text-Guided Image Generation Models".

639Python, DockerfileNov 4, 20222 years agoMIT
backdoor-attacksdeep-learninggenerative-modelsecuritystable-diffusion+1 more

Similar Papers

Cite this paper

@article{struppek2022rickrolling,
  title  = {Rickrolling the Artist: Injecting Backdoors into Text Encoders for Text-to-Image Synthesis},
  author = {Lukas Struppek and Dominik Hintersdorf and Kristian Kersting},
  year   = {2022},
  eprint = {2211.02408},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.02408}
}

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/2211.02408.svg)](https://codeofpaper.com/paper/2211.02408)

Discussion