[论文解读] Best Prompts for Text-to-Image Models and How to Find Them
本文提出一种人机协同的遗传算法,用于发现文本到图像模型(如Stable Diffusion)的最优提示关键词,通过成对众包比较对图像质量进行排序。该方法识别出一组自定义关键词,显著优于无关键词及前15个最流行关键词,训练数据上的平均得分为43.60,验证数据上的平均得分为46.00。
Recent progress in generative models, especially in text-guided diffusion models, has enabled the production of aesthetically-pleasing imagery resembling the works of professional human artists. However, one has to carefully compose the textual description, called the prompt, and augment it with a set of clarifying keywords. Since aesthetics are challenging to evaluate computationally, human feedback is needed to determine the optimal prompt formulation and keyword combination. In this paper, we present a human-in-the-loop approach to learning the most useful combination of prompt keywords using a genetic algorithm. We also show how such an approach can improve the aesthetic appeal of images depicting the same descriptions.
研究动机与目标
- 解决文本到图像生成中提示关键词缺乏系统性评估的问题。
- 识别出能超越常规做法、显著提升图像美学质量的关键词最优组合。
- 开发一种可扩展的人机协同方法,用于评估与优化提示模板。
- 发布可复现的数据与代码,以支持社区驱动的提示工程改进。
提出的方法
- 通过选择高分候选集、执行交叉与变异操作,并重新评估,遗传算法迭代演化关键词集合。
- 针对每个图像描述,每组关键词生成四张图像,以确保评估的一致性。
- 通过众包进行成对比较,标注者在不知情的情况下选择更具美学吸引力的图像。
- 应用Bradley-Terry概率排名模型,将成对比较结果聚合为每条描述下关键词集合的全局排名。
- 计算各描述下的平均排名,以量化每组关键词集合的整体美学质量。
- 基于关键词集合及其排名训练随机森林回归模型,识别最具影响力的关键词。
实验结果
研究问题
- RQ1在文本到图像生成中,哪组提示关键词能产生最具美学吸引力的图像?
- RQ2社区流行关键词的表现与系统性优化后的关键词集合相比如何?
- RQ3由人类偏好引导的遗传算法能否有效发现更优的提示模板?
- RQ4哪些关键词对提升图像质量最具影响力?它们与广泛使用的关键词有何不同?
主要发现
- 所提出的方法发现的关键词集合在训练数据上的平均得分为43.60,验证数据上为46.00,显著优于“无关键词”基线。
- 表现最佳的关键词集合包括:cinematic、colorful background、concept art、dramatic lighting、high detail、highly detailed、hyper realistic、intricate、intricate sharp details、octane render、smooth、studio lighting、trending on artstation。
- 随机森林模型识别出的最重要关键词是“colorful background”,该词并非最广泛使用的关键词。
- 遗传算法在性能上优于前15个最流行关键词,后者在训练数据上的平均得分为14.25,验证数据上为12.50。
- 该方法展现出良好的泛化能力,在保留的验证集上表现良好,尽管因样本量较小导致噪声略高。
- 研究证实,流行关键词如“trending on artstation”并不一定最有效,系统性优化可获得更优结果。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。