DiffZOO: A Purely Query-Based Black-Box Attack for Red-teaming Text-to-Image Generative Model via Zeroth Order Optimization

Pucheng Dang, Xing Hu, Dong Li, Rui Zhang, Qi Guo +1 more
8/18/2024
cs.CRcs.AIcs.CV

No official code found. Best implementation: CherryBlueberry/DiffZOO (6 stars, last commit 2025-10-03).

Abstract

Current text-to-image (T2I) synthesis diffusion models raise misuse concerns, particularly in creating prohibited or not-safe-for-work (NSFW) images. To address this, various safety mechanisms and red teaming attack methods are proposed to enhance or expose the T2I model's capability to generate unsuitable content. However, many red teaming attack methods assume knowledge of the text encoders, limiting their practical usage. In this work, we rethink the case of \textit{purely black-box} attacks without prior knowledge of the T2l model. To overcome the unavailability of gradients and the inability to optimize attacks within a discrete prompt space, we propose DiffZOO which applies Zeroth Order Optimization to procure gradient approximations and harnesses both C-PRV and D-PRV to enhance attack prompts within the discrete prompt domain. We evaluated our method across multiple safety mechanisms of the T2I diffusion model and online servers. Experiments on multiple state-of-the-art safety mechanisms show that DiffZOO attains an 8.5% higher average attack success rate than previous works, hence its promise as a practical red teaming tool for T2l models.

View on arXivView PDF

Code Implementations(1)

The implementation of the NAACL 2025 paper "DiffZOO: A Purely Query-Based Black-Box Attack for Red-teaming Text-to-Image Generative Model via Zeroth Order Optimization"

60PythonFeb 6, 20251 years ago

Similar Papers

Cite this paper

@article{dang2024diffzoo,
  title  = {DiffZOO: A Purely Query-Based Black-Box Attack for Red-teaming Text-to-Image Generative Model via Zeroth Order Optimization},
  author = {Pucheng Dang and Xing Hu and Dong Li and Rui Zhang and Qi Guo and Kaidi Xu},
  year   = {2024},
  eprint = {2408.11071},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.11071v2}
}

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

Discussion