Prompt Stealing Attacks Against Text-to-Image Generation Models

Xinyue Shen, Yiting Qu, Michael Backes, Yang Zhang
2/20/2023
cs.CRcs.LG

No official code found. Best implementation: verazuo/prompt-stealing-attack (53 stars, MIT, last commit 2025-01-11). 1 more below.

Abstract

Text-to-Image generation models have revolutionized the artwork design process and enabled anyone to create high-quality images by entering text descriptions called prompts. Creating a high-quality prompt that consists of a subject and several modifiers can be time-consuming and costly. In consequence, a trend of trading high-quality prompts on specialized marketplaces has emerged. In this paper, we perform the first study on understanding the threat of a novel attack, namely prompt stealing attack, which aims to steal prompts from generated images by text-to-image generation models. Successful prompt stealing attacks directly violate the intellectual property of prompt engineers and jeopardize the business model of prompt marketplaces. We first perform a systematic analysis on a dataset collected by ourselves and show that a successful prompt stealing attack should consider a prompt's subject as well as its modifiers. Based on this observation, we propose a simple yet effective prompt stealing attack, PromptStealer. It consists of two modules: a subject generator trained to infer the subject and a modifier detector for identifying the modifiers within the generated image. Experimental results demonstrate that PromptStealer is superior over three baseline methods, both quantitatively and qualitatively. We also make some initial attempts to defend PromptStealer. In general, our study uncovers a new attack vector within the ecosystem established by the popular text-to-image generation models. We hope our results can contribute to understanding and mitigating this emerging threat.

View on arXivView PDF

Code Implementations(2)

MIT

[USENIX'24] Prompt Stealing Attacks Against Text-to-Image Generation Models

538PythonFeb 27, 20241 years agoMIT

Paper Reproduction Project on [USENIX'24] Prompt Stealing Attacks Against Text-to-Image Generation Models

10Jan 29, 20251 years ago
prompt-stealingreproductionstable-diffusion

Similar Papers

Cite this paper

@article{shen2023prompt,
  title  = {Prompt Stealing Attacks Against Text-to-Image Generation Models},
  author = {Xinyue Shen and Yiting Qu and Michael Backes and Yang Zhang},
  year   = {2023},
  eprint = {2302.09923},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2302.09923v2}
}

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

Discussion