atlas

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

GuardT2I: Defending Text-to-Image Models from Adversarial Prompts

NeurIPS 2024 · Image generation › Text-to-image diffusion · approach: T2I evaluation and controllable adapters · 6 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 GuardT2I, a generative moderator that fine-tunes a conditional LLM to translate Stable Diffusion text-guidance embeddings back into text and flags prompts whose interpretation diverges from the input or contains NSFW words.

Problem

Text-to-image models can be misused via adversarial prompts that look benign to humans but elicit NSFW images, and existing post-hoc classifier moderators (OpenAI, Azure, AWS) and concept-erasing methods handle these poorly.

Approach

Instead of classifying prompts, a conditional LLM (c·LLM, with cross-attention fed by the T2I text-encoder guidance embedding) reconstructs the prompt text from the embedding; a verbalizer keyword check plus a sentence-similarity check between input and reconstruction flags adversarial prompts.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use GuardT2I instead of OpenAI-ModerationStable Diffusion v1.5 adversarial-prompt moderation · Adversarial prompts (average)AUROC (%): 91.51 -> 96.77Helped
use GuardT2I instead of AWS ComprehendStable Diffusion v1.5 adversarial-prompt moderation · Adversarial prompts (average)AUPRC (%): 89.30 -> 96.16Helped
use GuardT2I instead of OpenAI-ModerationStable Diffusion v1.5 adversarial-prompt moderation · Adversarial prompts (average)FPR@TPR95: 27.55 -> 19.26Helped
use GuardT2I instead of SLD-mediumStable Diffusion v1.5 adversarial-prompt defense · Adversarial prompts (average)ASR (%): 72.36 -> 11.68Helped
use GuardT2I instead of ESDu1Stable Diffusion v1.5 normal use · Normal use caseFID: 49.24 -> 52.10Hurt
use GuardT2I instead of ESDu1Stable Diffusion v1.5 normal use · Normal use caseCLIP-Score: 0.1501 -> 0.1502Helped
add the Verbalizer to the Sentence-Similarity Checker (ablation)GuardT2I · SneakyPromptAUROC (%): 97.39 -> 97.86Helped
add the Verbalizer to the Sentence-Similarity Checker (ablation)GuardT2I · MMA-DiffusionAUROC (%): 97.17 -> 98.86Helped
add the Verbalizer to the Sentence-Similarity Checker (ablation)GuardT2I · I2P-SexualAUROC (%): 91.42 -> 93.05Helped
add the Verbalizer to the Sentence-Similarity Checker (ablation)GuardT2I · I2PAUROC (%): 92.41 -> 92.56Helped
add the Sentence-Similarity Checker to the Verbalizer (ablation)GuardT2I · Adversarial prompts (average, ablation)AUROC (%): 59.65 -> 95.58Helped
increase adaptive attack weight α from 0.2 to 0.5 (ablation)Adaptive attack on GuardT2I · MMA-Diffusion adaptive attackAdaptive Attack Success Rate (%): 12.00 -> 16.00Mixed

Surprising findings

Limitations

Experimental setup

Datasets: LAION-COCO I2P SneakyPrompt MMA-Diffusion Ring-A-Bell P4D

Benchmarks: SneakyPrompt MMA-Diffusion I2P-Sexual I2P Ring-A-Bell P4D

Metrics: AUROC AUPRC FPR@TPR95 ASR FID CLIP-Score

Baselines: OpenAI-Moderation Microsoft Azure AWS Comprehend NSFW-text-classifier Detoxify ESD SLD SafetyChecker

Builds on: Stable Diffusion MMA-Diffusion teacher forcing

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