Skip to main content
QUICK REVIEW

[论文解读] Understanding the Impact of Negative Prompts: When and How Do They Take Effect?

Yuanhao Ban, Ruochen Wang|arXiv (Cornell University)|Jun 5, 2024
Resilience and Mental HealthPsychology被引用 3
一句话总结

本文首次对文生图扩散模型中的负向提示进行了全面分析,揭示其在潜在空间中通过延迟作用和中和机制产生影响。通过在逆向扩散过程的最优中点应用负向提示,作者实现了无需模型微调的有效、高保真度物体修复,将移除成功率和图像相似度分别提高了83%和82.6%。

ABSTRACT

The concept of negative prompts, emerging from conditional generation models like Stable Diffusion, allows users to specify what to exclude from the generated images.%, demonstrating significant practical efficacy. Despite the widespread use of negative prompts, their intrinsic mechanisms remain largely unexplored. This paper presents the first comprehensive study to uncover how and when negative prompts take effect. Our extensive empirical analysis identifies two primary behaviors of negative prompts. Delayed Effect: The impact of negative prompts is observed after positive prompts render corresponding content. Deletion Through Neutralization: Negative prompts delete concepts from the generated image through a mutual cancellation effect in latent space with positive prompts. These insights reveal significant potential real-world applications; for example, we demonstrate that negative prompts can facilitate object inpainting with minimal alterations to the background via a simple adaptive algorithm. We believe our findings will offer valuable insights for the community in capitalizing on the potential of negative prompts.

研究动机与目标

  • 理解负向提示在文生图扩散模型中影响的时机与机制。
  • 解决现有研究中对负向提示如何影响图像生成的系统性分析不足的问题。
  • 开发一种可控的图像修复方法,在移除不需要的物体的同时保持图像完整性。
  • 确定负向提示应用的最佳时机,以避免结构失真。

提出的方法

  • 作者通过分析扩散步骤中的交叉注意力图,识别出负向提示开始影响生成的关键步骤。
  • 通过检查物体删除任务中估计的噪声模式,研究潜在空间的动力学特性。
  • 识别出一种‘延迟效应’,即负向提示仅在正向提示已生成对应内容后才开始起作用,以及一种通过噪声相减实现的‘删除中和’机制。
  • 提出一种新颖的图像修复策略,即在逆向扩散过程的中点应用负向提示,以避免过早干扰。
  • 该方法不依赖模型微调或推理时的修改,仅通过提示调度实现。
  • 评估基于GPT-4V和人工标注员在多个数据集(COCO、CC、MSVD、Places、Vatex、Nocaps)上进行,测量移除成功率、相似度及相对性能。
Figure 1 : Illustration on when the negative prompts attend to the "right" place. For example, we consider the face of the person as the "right place" for the "glasses" token. Every row represents an independent diffusion process where the first and the third rows show the tokens in the positive pro
Figure 1 : Illustration on when the negative prompts attend to the "right" place. For example, we consider the face of the person as the "right place" for the "glasses" token. Every row represents an independent diffusion process where the first and the third rows show the tokens in the positive pro

实验结果

研究问题

  • RQ1负向提示在扩散过程中何时开始产生影响,其时机与正向提示相比如何?
  • RQ2负向提示如何实现物体删除——是通过直接抑制还是潜在空间的中和机制?
  • RQ3为何过早应用负向提示有时会导致悖论性物体生成(反向激活)?
  • RQ4在扩散过程早期应用负向提示存在哪些结构风险?
  • RQ5一种简单且非侵入性的时机策略能否在不修改模型的情况下显著提升图像修复性能?

主要发现

  • 负向提示具有显著的延迟效应,仅在正向提示完成对应内容生成后才开始产生影响。
  • 删除通过潜在空间中的相互抵消(中和)机制实现,即负向提示噪声与正向提示噪声相减。
  • 过早应用负向提示会导致‘反向激活’现象,即模型因噪声动力学中的动量和诱导效应而悖论性地生成被禁止的物体。
  • 负向提示应用的最佳时机为逆向扩散过程的中点,可最大限度减少结构干扰。
  • 所提方法在Places数据集上达到最高87.20%的相对移除成功率(RRSR),在Vatex数据集上达到86.44%,GPT-4V相似度得分平均为82.84%。
  • 人工评估确认图像相似度高,平均比较率(CR)达88.45%,表明感知保真度强。
Figure 2 : Illustration: Reverse activation. Each column shows an image generated by applying negative prompts in some specific steps which is shown at the top of the picture. In these two examples, the diffusion process without applying a negative prompt does not produce the object mentioned in the
Figure 2 : Illustration: Reverse activation. Each column shows an image generated by applying negative prompts in some specific steps which is shown at the top of the picture. In these two examples, the diffusion process without applying a negative prompt does not produce the object mentioned in the

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。