arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.11477cs.CV
收藏

学习采样有效且多样的提示词以用于文本到图像生成

Learning to Sample Effective and Diverse Prompts for Text-to-Image Generation

Korea Advanced Institute of Science and Technology(韩国科学技术院);Microsoft Research(微软研究院);Hong Kong University of Science and Technology(香港科技大学)

Taeyoung Yun, Dinghuai Zhang, Jinkyoo Park, Ling Pan

AI总结:

针对RL优化提示词易产生相似后缀的问题,本文提出PAG,将提示词适配视为概率推断并用GFlowNets采样多样高质量提示词,同时通过流重激活等机制解决可塑性丧失。

摘要:

近期文本到图像扩散模型的进展已取得令人瞩目的图像生成能力。然而,利用期望属性(例如美学质量、用户意图)控制生成过程仍然具有挑战性,而这些属性可以表示为黑盒奖励函数。本文聚焦于提示词适配,即将原始提示词精炼为模型偏好的提示词,以生成期望图像。尽管先前工作使用强化学习(RL)优化提示词,但我们观察到,应用RL往往会导致生成相似的后缀和确定性的行为。为此,我们提出Prompt Adaptation with GFlowNets(PAG),这是一种将提示词适配构建为概率推断问题的新颖方法。我们的关键洞见是,利用Generative Flow Networks(GFlowNets,生成流网络)能够使我们从奖励最大化转向从未归一化密度函数中采样,从而实现高质量且多样的提示词生成。然而,我们发现朴素应用GFlowNets会遭遇模式崩溃,并揭示了一个此前被忽视的现象:模型中神经可塑性的渐进丧失,而序列提示词生成中低效的信用分配又使这一问题加剧。为应对这一关键挑战,我们在PAG中开发了一种系统化方法,包含流重激活、奖励优先采样以及用于提示词适配的奖励分解。大量实验验证,PAG成功学会了为文本到图像生成采样有效且多样的提示词。我们还表明,PAG在各种奖励函数上表现出强鲁棒性,并且具备向不同文本到图像模型迁移的能力。

英文摘要:

Recent advances in text-to-image diffusion models have achieved impressive image generation capabilities. However, it remains challenging to control the generation process with desired properties (e.g., aesthetic quality, user intention), which can be expressed as black-box reward functions. In this paper, we focus on prompt adaptation, which refines the original prompt into model-preferred prompts to generate desired images. While prior work uses reinforcement learning (RL) to optimize prompts, we observe that applying RL often results in generating similar postfixes and deterministic behaviors. To this end, we introduce \textbf{P}rompt \textbf{A}daptation with \textbf{G}FlowNets (\textbf{PAG}), a novel approach that frames prompt adaptation as a probabilistic inference problem. Our key insight is that leveraging Generative Flow Networks (GFlowNets) allows us to shift from reward maximization to sampling from an unnormalized density function, enabling both high-quality and diverse prompt generation. However, we identify that a naive application of GFlowNets suffers from mode collapse and uncovers a previously overlooked phenomenon: the progressive loss of neural plasticity in the model, which is compounded by inefficient credit assignment in sequential prompt generation. To address this critical challenge, we develop a systematic approach in PAG with flow reactivation, reward-prioritized sampling, and reward decomposition for prompt adaptation. Extensive experiments validate that PAG successfully learns to sample effective and diverse prompts for text-to-image generation. We also show that PAG exhibits strong robustness across various reward functions and transferability to different text-to-image models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑