[Paper Review] What the DAAM: Interpreting Stable Diffusion Using Cross Attention
This paper introduces DAAM (Diffusion Attentive Attribution Maps), a method to generate pixel-level attribution maps for text-to-image diffusion models by aggregating cross-attention scores from the denoising U-Net. It demonstrates that DAAM enables interpretable analysis of how words influence image regions, revealing syntactic mapping patterns and feature entanglement in Stable Diffusion, with quantitative validation via semantic segmentation and human evaluation.
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.
Motivation & Objective
- To interpret how individual words in a text prompt influence specific regions in generated images from diffusion models.
- To develop a method for producing high-resolution, pixel-level attribution maps from cross-attention features in Stable Diffusion.
- To evaluate the correctness and interpretability of word-to-pixel attribution using semantic segmentation and human annotation.
- To investigate how syntactic relationships (e.g., head-dependent relations) map to visual attention patterns in the generated image space.
- To analyze failure modes in diffusion models, particularly feature entanglement caused by cohyponyms and descriptive adjectives.
Proposed method
- DAAM computes word-level attribution maps by upscaling and aggregating cross-attention scores from the denoising U-Net in Stable Diffusion.
- The method uses multi-head cross-attention features between text tokens and latent image tokens to produce per-word heatmaps.
- DAAM maps are evaluated via mean intersection over union (mIoU) on noun-based semantic segmentation tasks, achieving 58.9–64.8 mIoU.
- Human evaluation is conducted on all parts of speech using mean opinion scores (MOS), which range from 3.4 to 4.2, indicating fair to good interpretability.
- Syntactic mapping is analyzed by studying head–dependent attention map interactions across ten dependency relations, revealing directional imbalances.
- Feature entanglement is studied by fixing scene layout and varying adjectives, observing how changes propagate across the entire image.
Experimental results
Research questions
- RQ1How do individual words in a text prompt influence specific regions of the generated image?
- RQ2To what extent do cross-attention maps in Stable Diffusion produce accurate and interpretable pixel-level attribution?
- RQ3How do syntactic relationships (e.g., subject-verb, modifier-head) map to visual attention patterns in the generated image?
- RQ4What role do cohyponyms and descriptive adjectives play in causing feature entanglement in diffusion model generations?
- RQ5Can DAAM reveal systematic biases or failure modes in text-to-image generation, such as over-attention to unrelated image regions?
Key findings
- DAAM achieves a mean intersection over union (mIoU) of 58.9–64.8 on semantic segmentation of generated images, demonstrating strong alignment between word attention and ground-truth object regions.
- Human evaluation shows mean opinion scores (MOS) of 3.4–4.2 across all parts of speech, indicating that DAAM maps are perceived as interpretable and semantically meaningful.
- For certain syntactic relations, such as subject-verb, the verb’s attention map subsumes the subject’s, suggesting that verbs contextualize both the subject and its environment.
- Cohyponym pairs (e.g., 'giraffe and zebra') show increased overlap in DAAM maps and worse image quality, indicating that cohyponymy leads to entanglement and generation failure.
- Descriptive adjectives such as 'rusty' or 'bumpy' cause attention to spread across the entire image, including background regions, even when the scene layout is fixed, demonstrating broad, non-localized attention.
- In controlled experiments, changing adjectives like 'blue', 'green', or 'red' alters the background color and texture, confirming that adjectival modifiers induce scene-wide entanglement.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.