On Discrete Prompt Optimization for Diffusion Models
Ruochen Wang, Ting Liu, Cho-Jui Hsieh, Boqing Gong
摘要
This paper introduces the first gradient-based framework for prompt optimization in text-to-image diffusion models. We formulate prompt engineering as a discrete optimization problem over the language space. Two major challenges arise in efficiently finding a solution to this problem: (1) Enormous Domain Space: Setting the domain to the entire language space poses significant difficulty to the optimization process. (2) Text Gradient: Efficiently computing the text gradient is challenging, as it requires backpropagating through the inference steps of the diffusion model and a non-differentiable embedding lookup table. Beyond the problem formulation, our main technical contributions lie in solving the above challenges. First, we design a family of dynamically generated compact subspaces comprised of only the most relevant words to user input, substantially restricting the domain space. Second, we introduce"Shortcut Text Gradient"-- an effective replacement for the text gradient that can be obtained with constant memory and runtime. Empirical evaluation on prompts collected from diverse sources (DiffusionDB, ChatGPT, COCO) suggests that our method can discover prompts that substantially improve (prompt enhancement) or destroy (adversarial attack) the faithfulness of images generated by the text-to-image diffusion model.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 13 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- High-Resolution Image Synthesis with Latent Diffusion Models 引用了 Diffusion Models Beat GANs on Image Synthesis
- High-Resolution Image Synthesis with Latent Diffusion Models 引用了 Denoising Diffusion Probabilistic Models
- Prompt-A-Video: Prompt your Video Diffusion Model via Preference-Aligned LLM 引用了 High-Resolution Image Synthesis with Latent Diffusion Models
- Prompt-A-Video: Prompt your Video Diffusion Model via Preference-Aligned LLM 引用了 Learning Transferable Visual Models From Natural Language Supervision
- SketchFlex: Facilitating Spatial-Semantic Coherence in Text-to-Image Generation with Region-Based Sketches 引用了 High-Resolution Image Synthesis with Latent Diffusion Models
- SUB: Benchmarking CBM Generalization via Synthetic Attribute Substitutions 引用了 High-Resolution Image Synthesis with Latent Diffusion Models
- SUB: Benchmarking CBM Generalization via Synthetic Attribute Substitutions 引用了 Learning Transferable Visual Models From Natural Language Supervision
- Diffusion Models Beat GANs on Image Synthesis 引用了 Learning Transferable Visual Models From Natural Language Supervision
- Diffusion Models Beat GANs on Image Synthesis 引用了 Denoising Diffusion Probabilistic Models
- Preference-Guided Prompt Optimization for Text-to-Image Generation 引用了 High-Resolution Image Synthesis with Latent Diffusion Models
- Preference-Guided Prompt Optimization for Text-to-Image Generation 引用了 Diffusion Models Beat GANs on Image Synthesis
- Preference-Guided Prompt Optimization for Text-to-Image Generation 引用了 Learning Transferable Visual Models From Natural Language Supervision
- Attention to Neural Plagiarism: Diffusion Models Can Plagiarize Your Copyrighted Images! 引用了 High-Resolution Image Synthesis with Latent Diffusion Models
- Attention to Neural Plagiarism: Diffusion Models Can Plagiarize Your Copyrighted Images! 引用了 Learning Transferable Visual Models From Natural Language Supervision
- Attention to Neural Plagiarism: Diffusion Models Can Plagiarize Your Copyrighted Images! 引用了 Denoising Diffusion Probabilistic Models
引用它的顶会 Paper13
- SketchFlex: Facilitating Spatial-Semantic Coherence in Text-to-Image Generation with Region-Based SketchesHaichuan Lin, Yilin Ye, Jiazhi Xia, Wei ZengCHI 2025 · 25 次引用
- SUB: Benchmarking CBM Generalization via Synthetic Attribute SubstitutionsJessica Bader, Leander Girrbach, Stephan Alaniz, Zeynep AkataICCV 2025 · 8 次引用
- Prompt-A-Video: Prompt your Video Diffusion Model via Preference-Aligned LLMYatai Ji, Jiacheng Zhang, Jie Wu, Shilong Zhang 等ICCV 2025 · 3 次引用
- Attention to Neural Plagiarism: Diffusion Models Can Plagiarize Your Copyrighted Images!Zihang Zou, Boqing Gong, Liqiang WangICCV 2025 · 2 次引用
- Preference-Guided Prompt Optimization for Text-to-Image GenerationZhipeng Li, Yi-Chi Liao, Christian HolzCHI 2026 · 1 次引用
它引用的 Paper22
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh 等ICML 2021 · 47,906 次引用
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 次引用
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 次引用
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser 等CVPR 2022 · 13,123 次引用
相关 Paper
- Prompting Hard or Hardly Prompting: Prompt Inversion for Text-to-Image Diffusion ModelsShweta Mahajan, Tanzila Rahman, Kwang Moo Yi, Leonid SigalCVPR 2024 · 12 次引用
- Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and DiscoveryYuxin Wen, Neel Jain, John Kirchenbauer, Micah Goldblum 等NeurIPS 2023 · 454 次引用
- Prompt-Free Diffusion: Taking "Text" Out of Text-to-Image Diffusion ModelsXingqian Xu, Jiayi Guo, Zhangyang Wang, Gao Huang 等CVPR 2024 · 45 次引用
- Interpretable Prompts made Edit-Friendly: Token-to-Token Similarity Reduction in dLLMs for Edit-Friendly Hard Prompt InversionNaresh Kumar Devulapally, Shruti Agarwal, Vishal Asnani, Vishnu Suresh LokhandeCVPR 2026
- DiffusionDB: A Large-scale Prompt Gallery Dataset for Text-to-Image Generative ModelsZijie J. Wang, Evan Montoya, David Munechika, Haoyang Yang 等ACL 2023 · 149 次引用
