Introduction
While denoising diffusion models like Stable Diffusion produce stunning images and excel at conditional generation, their internal mechanisms remain largely opaque. It is notoriously difficult to understand precisely how these models map specific words in a prompt to specific parts of an image, or to predict the exact effect of an intervention. This paper reveals that diffusion models are secretly powerful tools for information theory. By deriving a precise mathematical link between a model's denoising error and Mutual Information, the authors provide a principled way to "see" exactly which pixels a specific word influences, offering a reliable alternative to standard attention maps.
The Problem with Attention
Currently, researchers rely heavily on attention maps to visualize relationships between text prompts and generated images. However, attention mechanisms suffer from three major flaws:
- Architecture Dependency: They require "white-box" access to the model's specific internal layers.
- Unreliability: A model might "attend" to a word but ultimately ignore it in the final output if the surrounding context already implies the object's presence.
- Lack of Grounding: Attention does not provide a physical unit of measurement to quantify how much actual "information" is being shared.
This paper seeks a model-agnostic way to quantify these relationships using the rigorous language of information theory.
An Information-Theoretic Approach
The authors build on a classic information-theoretic result: the information in a Gaussian noise channel is directly related to the Minimum Mean Square Error (MMSE) of an optimal denoiser. Because diffusion models are trained to be optimal denoisers (which is mathematically equivalent to modeling the data's probability density), the authors can derive exact expressions for:
- Pointwise Mutual Information (PMI): The total amount of information shared between a specific image and its caption.
- Conditional Mutual Information (CMI): The new information a specific word (e.g., "bear") adds to an image, given the rest of the prompt (e.g., "A photo of a...").
- Pixel-wise Decomposition: A demonstration that total mutual information can be broken down into a sum of non-negative contributions from every single pixel.
Crucially, they introduce a lower-variance estimator ($i^o$) based on the orthogonality principle, ensuring these information estimates remain stable and non-negative.
Key Findings and Results
The researchers evaluated their approach across several benchmarks, including ARO (for compositional understanding), MSCOCO, and Visual Genome subsets.
Information vs. Attention: While attention shows where the model is "looking," Information Decomposition shows where a word is actually necessary. For instance, in a prompt about a "woman in a hospital," the word "bed" might have low CMI because the hospital context already makes a bed highly probable. Furthermore, information-theoretic measures are significantly better at localizing abstract concepts like adjectives, adverbs, and verbs than standard attention.
Predicting Interventions: If a word has low CMI for a specific image, removing or changing that word in the prompt usually results in very little change to the generated image. The proposed CMI measure proved to be a much better predictor of how much an image will change after a prompt intervention (Pearson correlation of 0.34) compared to traditional attention (0.24).
State-of-the-Art Performance: * Compositional Understanding: On the ARO benchmark and VG-R (Relations) task, the authors' information-based score significantly outperformed OpenCLIP and other diffusion baselines, achieving 69.1% accuracy compared to OpenCLIP’s 51.4% on VG-R. * Unsupervised Segmentation: By combining attention maps with their information estimates, the method achieved a state-of-the-art 42.84 mIoU for unsupervised object segmentation on the COCO-IT dataset.
Limitations and Future Work
While powerful, estimating information requires integrating over many noise levels, involving multiple forward passes through the model. Even with importance sampling, this is computationally heavier than generating a single attention map. Additionally, while CMI identifies where information is located, the generative process is highly non-linear; a high information value indicates a change will occur, but cannot always predict exactly what that change will look like.
Looking forward, the authors suggest this framework could be instrumental for "mechanistic interpretability"—finding specific circuits within neural networks responsible for distinct concepts. It also holds potential for broader scientific applications, such as identifying which genes carry the most information about specific biomedical outcomes.
Summary updated