atlas

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

On Discrete Prompt Optimization for Diffusion Models

ICML 2024 · Image generation › Text-to-image diffusion · approach: Inference-time T2I improvement · 1 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 DPO-Diff, a gradient-based discrete prompt optimizer for text-to-image diffusion models that uses compact word-substitution spaces, a constant-cost Shortcut Text Gradient, and evolutionary search, for both prompt enhancement and adversarial attack.

Problem

Prompt engineering for text-to-image diffusion models is manual and trial-and-error, and exact text gradients through the diffusion sampling chain and discrete embedding lookup are prohibitively expensive and non-differentiable.

Approach

Formulate prompt optimization as discrete search over compact, dynamically generated synonym/antonym word spaces; approximate the text gradient with a K-step shortcut that estimates x0 from an intermediate latent (constant memory and runtime), relax word choice with Gumbel-Softmax, and refine candidates with evolutionary search. Optimizing negative prompts via antonyms is found more effective than

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Optimize negative prompts with Antonyms Space rather than positive prompts with Synonym Space (ablation)DPO-Diff · DiffusionDBCLIP loss: 0.8747 ± 0.0189 -> 0.8579 ± 0.0242Helped
Optimize negative prompts with Antonyms Space rather than positive prompts with Synonym Space (ablation)DPO-Diff · ChatGPTCLIP loss: 0.8304 ± 0.0284 -> 0.8133 ± 0.0197Helped
Optimize negative prompts with Antonyms Space rather than positive prompts with Synonym Space (ablation)DPO-Diff · COCOCLIP loss: 0.8624 ± 0.0141 -> 0.8403 ± 0.0210Helped
Use DPO-Diff prompt improvement instead of PromptistStable Diffusion v1-4 · DiffusionDBCLIP loss: 0.88 ± 0.02 -> 0.81 ± 0.03Helped
Use DPO-Diff prompt improvement instead of PromptistStable Diffusion v1-4 · COCOHPSv2: 50.08 ± 7.43 -> 61.26 ± 0.77Helped
Use DPO-Diff prompt improvement instead of PromptistStable Diffusion v1-4 · ChatGPTHPSv2: 59.32 ± 6.50 -> 67.71 ± 6.46Helped
Reverse the objective to optimize adversarial promptsDPO-Diff · DiffusionDB adversarial attackCLIP: 0.76 ± 0.03 -> 0.86 ± 0.05Helped
Reverse the objective to optimize adversarial promptsDPO-Diff · COCO adversarial attackCLIP: 0.77 ± 0.03 -> 0.94 ± 0.04Helped
Reverse the objective to optimize adversarial promptsDPO-Diff · ChatGPT adversarial attackCLIP: 0.77 ± 0.02 -> 0.95 ± 0.05Helped
Combine GPO with evolutionary search (EPO) rather than using either search method alone (ablation)DPO-Diff · Prompt optimization search budgetsperformanceHelped
Use Synonym Space for positive prompt optimization instead of Antonyms Space for negative prompt optimization (ablation)DPO-Diff · Prompt improvement across DiffusionDB, ChatGPT, and COCOCLIP loss: 0.8579 ± 0.0242 vs 0.8747 ± 0.0189; 0.8133 ± 0.0197 vs 0.8304 ± 0.0284; 0.8403 ± 0.0210 vs 0.8624 ± 0.0141Hurt
Use human-engineered prompts instead of the original user promptStable Diffusion v1-4 · DiffusionDB prompt improvementCLIP loss: 0.87 ± 0.02 -> 0.89 ± 0.04Hurt

Surprising findings

Limitations

Experimental setup

Datasets: DiffusionDB COCO 2014 validation captions ChatGPT-generated prompts

Benchmarks: DiffusionDB prompts COCO prompts ChatGPT prompts

Metrics: spherical CLIP loss HPSv2 human win rate attack success rate

Baselines: Promptist Manual (human-engineered prompts) Random Search Evolution Prompt Optimization

Builds on: classifier-free guidance ReFL Gumbel-Softmax Promptist CLIP

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