Diffusion PID: Interpreting Diffusion via Partial Information Decomposition

Shaurya Rajat Dewan, Rushikesh Zawar, Prakanshul Saxena, Yingshan Chang, Andrew Luo, Yonatan Bisk

Introduction

Text-to-image diffusion models produce stunning visuals, yet they remain largely "black boxes." While we know they work, we lack a complete understanding of how they translate specific words into specific pixels. Existing interpretability tools, such as cross-attention maps, are often noisy and struggle to explain complex interactions between words. For instance, if prompted with "a baseball bat," how much of the resulting image stems from the word "baseball," how much from "bat," and how much from the unique combination of the two?

To address this lack of transparency, researchers have introduced Diffusion Partial Information Decomposition (DiffusionPID). This novel interpretability framework uses information theory to "peek under the hood" of models like Stable Diffusion. By decomposing the relationship between words and pixels, DiffusionPID reveals how models represent concepts, where they hide social biases, and why they sometimes fail to follow complex prompts—specifically targeting issues like homonym ambiguity and the merging of similar concepts.

Methodology: Decomposing Information

The core of DiffusionPID is the application of Partial Information Decomposition (PID) to the diffusion denoising process. Instead of merely measuring the total Mutual Information (MI) between a prompt and an image, DiffusionPID breaks that information down into distinct "atoms":

  1. Uniqueness (U): Information provided by one word that the other does not provide (e.g., the specific features of a "tennis racket" versus a "baseball glove").
  2. Redundancy (R): Information shared by both words (e.g., the concept of royalty shared by "queen" and "crown").
  3. Synergy (S): Information that only emerges when both words are present (e.g., "baseball" + "bat" tells the model to draw a wooden club, not a flying mammal).
DiffusionPID decomposes prompts into Uniqueness, Synergy, and Redundancy to reveal how models interpret complex word interactions.

The researchers implement this by using the diffusion model’s own denoiser to estimate pixel-wise information and BERT to handle the linguistic probabilities of the prompt tokens. They also introduce Conditional PID (CPID), an extension that accounts for the rest of the prompt as context, providing even cleaner visualizations.

Key Insights and Results

The authors evaluated DiffusionPID across several specialized datasets, including newly curated sets for gender/ethnicity bias, homonyms, synonyms, and co-hyponyms.

Synergy Solves Ambiguity

The "Synergy" metric perfectly captures how modifiers work to resolve ambiguity. As seen in the visualizations, for the prompt "he swung the baseball bat," the synergy map highlights the wooden bat. Conversely, for "a bat flew overhead," synergy highlights the animal. This proves the model uses the interaction between context words and the homonym to disambiguate meaning.

Redundancy as a Proxy for Bias

A striking insight from the paper is that high redundancy between a social category (like "Male") and an occupation (like "Doctor") directly quantifies the model's internal bias. If the model treats "Male" and "Doctor" as highly redundant, it has "pre-learned" that doctors are male, requiring less unique information from the prompt to generate that association.

  • Gender Bias: The model showed significant gender bias; for example, "Doctor" had a redundancy value of 0.871 with "Male" but only 0.090 with "Female."
  • Ethnicity Bias: The "Black" ethnic group showed the lowest average redundancy across all occupations, indicating a bias that makes the model less likely to associate that group with various professional roles.

The "Merging" Failure and Prompt Intervention

When a model fails to generate two distinct objects (like "a cat and a dog") and instead generates a hybrid, DiffusionPID shows this is due to extremely high redundancy—the model confuses the two concepts. The authors demonstrated that identifying "redundant" words using PID allows for effective prompt intervention. Removing highly redundant words from a prompt resulted in almost no change to the generated image, proving the metric's accuracy in identifying ignored or conflated terms.

Limitations and Future Work

While DiffusionPID offers superior localization compared to baseline methods like DAAM, it comes with computational costs, taking about 7 seconds per image on an NVIDIA A6000. Furthermore, it requires "white-box" access to the model's internal denoising gradients, meaning it cannot currently interpret closed-source models like DALL-E 3 or Midjourney. Finally, scaling the current pairwise math to handle interactions between three or more words simultaneously remains mathematically complex.

Future directions include applying PID to non-diffusion models and utilizing "uniqueness" maps to improve automated image classification by focusing on the most distinctive features of a class.

Summary updated

BibTeX
@inproceedings{dewan2024diffusion,
  author = {Shaurya Rajat Dewan and Rushikesh Zawar and Prakanshul Saxena and Yingshan Chang and Andrew Luo and Yonatan Bisk},
  title = {{Diffusion PID: Interpreting Diffusion via Partial Information Decomposition}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=aBpxukZS37},
}
Figure