Skip to main content
QUICK REVIEW

[论文解读] Attend-and-Excite: Attention-Based Semantic Guidance for Text-to-Image Diffusion Models

Hila Chefer, Yuval Alaluf|arXiv (Cornell University)|Jan 31, 2023
Aesthetic Perception and Analysis被引用 7
一句话总结

本文提出 Attend-and-Excite,一种推理时方法,通过引导交叉注意力机制关注输入提示中的所有主体标记,从而增强文生图扩散模型的性能,减少灾难性忽略并改善属性绑定。通过在去噪过程中基于激励机制优化注意力图,该方法在无需微调的情况下提升了语义忠实度,显著优于基线模型,在生成完整反映复杂提示的图像方面表现突出。

ABSTRACT

Recent text-to-image generative models have demonstrated an unparalleled ability to generate diverse and creative imagery guided by a target text prompt. While revolutionary, current state-of-the-art diffusion models may still fail in generating images that fully convey the semantics in the given text prompt. We analyze the publicly available Stable Diffusion model and assess the existence of catastrophic neglect, where the model fails to generate one or more of the subjects from the input prompt. Moreover, we find that in some cases the model also fails to correctly bind attributes (e.g., colors) to their corresponding subjects. To help mitigate these failure cases, we introduce the concept of Generative Semantic Nursing (GSN), where we seek to intervene in the generative process on the fly during inference time to improve the faithfulness of the generated images. Using an attention-based formulation of GSN, dubbed Attend-and-Excite, we guide the model to refine the cross-attention units to attend to all subject tokens in the text prompt and strengthen - or excite - their activations, encouraging the model to generate all subjects described in the text prompt. We compare our approach to alternative approaches and demonstrate that it conveys the desired concepts more faithfully across a range of text prompts.

研究动机与目标

  • 解决文生图扩散模型中的语义忠实度问题,特别是灾难性忽略和错误的属性绑定问题。
  • 识别当前最先进模型(如 Stable Diffusion)在生成过程中遗漏或错误分配主体或属性的失败模式。
  • 开发一种无需训练、可在生成过程中实时干预的方法,以增强图像生成期间对所有主体标记的关注。
  • 在不微调预训练模型的前提下,提升生成图像对复杂多主体提示的忠实度。
  • 证明通过缓解灾难性忽略,可隐式地改善属性绑定,其机制依赖于主体与属性之间的共享语义表征。

提出的方法

  • 提出生成式语义护理(Generative Semantic Nursing, GSN),一种在图像生成过程中实现动态语义干预的框架。
  • 设计 Attend-and-Excite 作为基于注意力的 GSN 方法,用于识别并增强对主体标记的交叉注意力激活。
  • 在每个去噪步骤中,修改潜在特征,以促使图像块关注文本提示中的所有主体标记。
  • 为每个主体标记引入可学习的激励向量,以放大交叉注意力层中的注意力权重。
  • 仅在推理阶段应用该方法,保留预训练模型的权重和语义不变。
  • 利用预训练文本编码器中主体与属性之间的语义关联,隐式提升属性绑定效果。

实验结果

研究问题

  • RQ1我们能否通过在推理阶段增强对所有主体标记的关注,来减少文生图扩散模型中的灾难性忽略?
  • RQ2即使没有显式监督,提升对主体标记的关注是否也能带来更好的属性绑定效果?
  • RQ3我们能否在不微调或重训练生成模型的前提下,实现更高的语义忠实度?
  • RQ4Attend-and-Excite 与 Composable Diffusion 或 StructureDiffusion 等替代方法相比,在生成复杂多对象场景时表现如何?
  • RQ5激励机制在多类提示中,对主体存在一致性和属性分配一致性的提升程度如何?

主要发现

  • Attend-and-Excite 显著减少了灾难性忽略,确保提示中的所有主体标记在生成图像中均被视觉化呈现。
  • 该方法隐式改善了属性绑定,如正确地将颜色和描述性词语分配给其目标主体。
  • 在定性比较中,Attend-and-Excite 在生成语义忠实图像方面优于 Stable Diffusion 和 Composable Diffusion,尤其在包含多个主体的复杂提示中表现更优。
  • 该方法在保持高图像质量的同时,实现了与输入提示更佳的对齐,经多种提示的视觉检查验证。
  • 该方法在各类提示类型中均有效,包括多对象、多属性及空间关系提示。
  • Attend-and-Excite 实现了上述效果而无需任何模型微调,完全依赖推理时的注意力调制。

更好的研究,从现在开始

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

无需绑定信用卡

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