atlas

Research map / Image generation / Text-to-image diffusion

Prompting4Debugging: Red-Teaming Text-to-Image Diffusion Models by Finding Problematic Prompts

ICML 2024 · Image generation › Text-to-image diffusion · approach: Concept erasure in diffusion models · 8 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Prompting4Debugging (P4D), a white-box red-teaming tool that optimizes discrete prompts so safety-equipped Stable Diffusion variants (ESD, SLD, SD-NEGP) generate the same unsafe content as an unconstrained SD model, finding that about half of "safe" I2P prompts can bypass them.

Problem

Safety mechanisms for text-to-image diffusion models (concept removal, negative prompts, safety guidance) are tested only on limited safe-prompt benchmarks, and their reliability against diverse problematic prompts is largely unexplored; manual red-teaming does not scale.

Approach

Starting from a prompt that yields unsafe images on an unconstrained model, optimize a discrete prompt (PEZ-style soft-to-hard projection) so that the safe model's noise prediction matches the unconstrained model's noise prediction in latent space, with P4D-N (fixed-length) and P4D-K (learnable tokens inserted every K tokens) variants.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Combine problematic prompts found by P4D-N and P4D-KP4D · I2P nudity across ESD, SLD-MAX, SLD-STRONG, and SD-NEGPfailure rate: 50.65% -> 66.58%; 25.67% -> 52.66%; 34.03% -> 55.29%; 25.44% -> 40.98%Helped
Use optimized discrete prompts instead of continuous soft promptsP4D versus Soft Prompting · I2P nudity (ESD)failure rate: 27.68% -> 50.65%Helped
Disable the text filter during prompt optimization, then restore it for evaluation (ablation)P4D-N and P4D-K · I2P nudity (SLD-MAX, SLD-STRONG, SD-NEGP)failure rate: 25.67% -> 40.98%; 34.03% -> 50.25%; 25.44% -> 27.93% (P4D-N); 38.69% -> 39.11%; 37.84% -> 42.79%; 20.36% -> 32.46% (P4D-Helped
Vary P4D-N prompt length from 16 tokens to 8 or 32 (ablation)P4D-N · I2P nudity across safe modelsfailure rate: ESD: 50.65% -> 54.85% (N=8), 59.00% (N=32); SLD-MAX: 40.98% -> 35.29% (N=8), 38.24% (N=32); SLD-STRONG: 50.25% -> 47.32%Mixed
Vary P4D-K insertion interval from every 3 tokens to every 1 or 5 tokens (ablation)P4D-K · I2P nudity across safe modelsfailure rate: ESD: 47.19% -> 52.63% (K=1), 49.31% (K=5); SLD-MAX: 39.11% -> 38.73% (K=1), 40.69% (K=5); SLD-STRONG: 42.79% -> 40.18% (Mixed
Set P4D-N length to match the input prompt length instead of 16 (ablation)P4D-N · I2P nudity across safe modelsfailure rate: ESD: 50.65% -> 50.97%; SLD-MAX: 40.98% -> 38.73%; SLD-STRONG: 50.25% -> 40.18%; SD-NEGP: 27.93% -> 23.44%Mixed
Use P4D-N rather than P4D-KP4D · Car and French-horn (ESD)failure rate: Car: 34.87% -> 40.42%; French-horn: 29.50% -> 62.62%Mixed
Add P4D-optimized prompts to the SD-NEGP negative promptSD-NEGP · I2P nudity, P4D-N and P4D-K settingsfailure rate: 25.44% -> 19.62%; 20.36% -> 10.05%Helped
Use P4D instead of AdvpromptP4D-N · I2P nudity, all I2P, car, and French-hornfailure rate: ESD 10% -> 90%; SLD-MAX 10% -> 80%; SLD-STRONG 20% -> 100%; SD-NEGP 40% -> 30%; All in I2P 20% -> 90%; Car 50% -> 100%; Mixed

Surprising findings

Limitations

Experimental setup

Datasets: I2P ESD car and French-horn prompts Imagenette COCO

Benchmarks: I2P nudity I2P all categories ESD car ESD French-horn

Metrics: failure rate false positive rate image cosine similarity transfer failure rate seed sensitivity

Baselines: Random-N Random-K Shuffling Soft Prompting Text-Inv PEZ-Orig PEZ-PInv Advprompt

Builds on: PEZ Textual Inversion ESD SLD Latent Diffusion Models

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy