Skip to main content
QUICK REVIEW

[论文解读] What the DAAM: Interpreting Stable Diffusion Using Cross Attention

Raphael Tang, Linqing Liu|arXiv (Cornell University)|Oct 10, 2022
Topic Modeling被引用 4
一句话总结

本文提出DAAM(Diffusion Attentive Attribution Maps),一种通过聚合去噪U-Net中的交叉注意力分数,生成文本到图像扩散模型像素级归因图的方法。实验表明,DAAM能够实现对词语如何影响图像区域的可解释性分析,揭示了Stable Diffusion中的句法映射模式与特征纠缠现象,并通过语义分割和人工评估进行了定量验证。

ABSTRACT

Large-scale diffusion neural networks represent a substantial milestone in text-to-image generation, but they remain poorly understood, lacking interpretability analyses. In this paper, we perform a text-image attribution analysis on Stable Diffusion, a recently open-sourced model. To produce pixel-level attribution maps, we upscale and aggregate cross-attention word-pixel scores in the denoising subnetwork, naming our method DAAM. We evaluate its correctness by testing its semantic segmentation ability on nouns, as well as its generalized attribution quality on all parts of speech, rated by humans. We then apply DAAM to study the role of syntax in the pixel space, characterizing head--dependent heat map interaction patterns for ten common dependency relations. Finally, we study several semantic phenomena using DAAM, with a focus on feature entanglement, where we find that cohyponyms worsen generation quality and descriptive adjectives attend too broadly. To our knowledge, we are the first to interpret large diffusion models from a visuolinguistic perspective, which enables future lines of research. Our code is at https://github.com/castorini/daam.

研究动机与目标

  • 解释文本提示中的单个词语如何影响生成图像中的特定区域。
  • 开发一种从Stable Diffusion中交叉注意力特征生成高分辨率像素级归因图的方法。
  • 通过语义分割和人工标注评估词语到像素归因的正确性与可解释性。
  • 研究句法关系(如核心词-修饰词关系)如何映射到生成图像空间中的视觉注意力模式。
  • 分析扩散模型中的失败模式,特别是同位词与描述性形容词引起的特征纠缠。

提出的方法

  • DAAM通过上采样和聚合Stable Diffusion中去噪U-Net的交叉注意力分数,计算词语级归因图。
  • 该方法利用文本标记与潜在图像标记之间的多头交叉注意力特征,生成每个词语的热力图。
  • DAAM图通过名词为基础的语义分割任务上的平均交并比(mIoU)进行评估,mIoU达到58.9–64.8。
  • 人工评估采用平均意见分(MOS),得分范围为3.4至4.2,表明归因图具有良好的可解释性。
  • 通过分析10种依存关系中的核心词-修饰词注意力图交互,研究句法映射,揭示方向性不平衡。
  • 通过固定场景布局并改变形容词,研究特征纠缠,观察变化如何在整个图像中传播。

实验结果

研究问题

  • RQ1文本提示中的单个词语如何影响生成图像的特定区域?
  • RQ2Stable Diffusion中的交叉注意力图在多大程度上能产生准确且可解释的像素级归因?
  • RQ3句法关系(如主语-谓语、修饰词-核心词)如何映射到生成图像中的视觉注意力模式?
  • RQ4同位词与描述性形容词在扩散模型生成中如何导致特征纠缠?
  • RQ5DAAM能否揭示文本到图像生成中的系统性偏差或失败模式,例如对无关图像区域的过度关注?

主要发现

  • DAAM在生成图像的语义分割任务中实现了58.9–64.8的平均交并比(mIoU),表明词语注意力与真实物体区域具有强对齐性。
  • 人工评估显示,所有词类别的平均意见分(MOS)为3.4–4.2,表明DAAM图被感知为具有可解释性和语义意义。
  • 对于某些句法关系(如主语-谓语),谓词的注意力图会包含主语的注意力,表明谓词可同时上下文化主语及其环境。
  • 同位词对(如“giraffe and zebra”)在DAAM图中表现出更高的重叠度,且图像质量更差,表明同位词关系会导致特征纠缠与生成失败。
  • 描述性形容词(如“rusty”或“bumpy”)即使在场景布局固定时,也会导致注意力扩散至整个图像,包括背景区域,表明其具有广泛且非局部化的注意力模式。
  • 在受控实验中,改变形容词(如“blue”、“green”或“red”)会改变背景颜色与纹理,证实形容词修饰语会引起全场景范围的特征纠缠。

更好的研究,从现在开始

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

无需绑定信用卡

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