$\text{I}^2\text{AM}$: Interpreting Image-to-Image Latent Diffusion Models via Bi-Attribution Maps

Junseo Park, Hyeryung JangICLR 2025

Introduction

While large-scale latent diffusion models (LDMs) have made remarkable strides in image generation, their internal decision-making processes often remain a "black box." We have developed robust tools for interpreting Text-to-Image (T2I) models—such as DAAM, which can trace how the word "cat" influences specific pixel clusters. However, Image-to-Image (I2I) models have remained largely opaque.

The challenge lies in the input format: T2I models use discrete text tokens, whereas I2I models rely on continuous spatial maps (reference images). This continuity makes traditional token-based interpretability methods ineffective. When an I2I model fails, it is difficult to determine whether it simply missed a detail in the reference image or failed to place it correctly in the generated output. To bridge this gap, researchers have introduced $\text{I}^2\text{AM}$ (Image-to-Image Attribution Maps), a novel framework designed to visualize and interpret the bidirectional flow of information in I2I diffusion models.

Methodology: The $\text{I}^2\text{AM}$ Framework

$\text{I}^2\text{AM}$ leverages the cross-attention mechanisms inherent in LDMs. In I2I tasks, the reference image and the generated image act as queries and keys within the attention layers. By aggregating these cross-attention scores, $\text{I}^2\text{AM}$ provides a clear picture of which parts of a reference image influence specific regions of the generated output.

Visualizing the I2AM framework and attention heatmaps over time.

The core of the method involves aggregating attention scores across three dimensions:

  1. Time ($t$): Tracking how attention shifts from coarse structures to fine details as the diffusion process progresses.
  2. Heads ($n$): Visualizing how different attention heads specialize in distinct features (e.g., texture vs. shape).
  3. Layers ($l$): Observing how information is processed from the initial encoder layers to the final decoder stages.

To provide granular insights, the paper defines specific map types, including the Unified-level Attribution Map (ULAM) for a holistic view of total influence, and the Specific-Reference Attribution Map (SRAM), a surgical tool that identifies which specific patches of the reference image contributed to a single chosen patch in the generated image. Furthermore, the authors introduce the Inpainting Mask Attention Consistency Score (IMACS), a novel metric that calculates the alignment between the model's attribution maps and actual ground-truth masks.

Experimental Setup

The researchers validated $\text{I}^2\text{AM}$ across three distinct I2I tasks using established benchmarks:

  • Object Detection: Evaluated using the COCO dataset via the Paint-by-Example (PBE) model.
  • Image Inpainting / Virtual Try-on: Evaluated using the VITON-HD dataset, featuring high-resolution images of models and clothing.
  • Super-Resolution: Tested on models like PASD and SeeSR.

Key Insights & Results

Coarse-to-Fine Progression

Layer-level maps reveal a distinct progression in how the model processes information. Early layers focus on basic color and global structure, while deeper layers capture intricate details like buttons, logos, and textures.

Layer-wise attribution maps demonstrating coarse-to-fine progression in virtual try-on and super-resolution tasks.

Bidirectional Debugging and Model Refinement

The "bi-attribution" aspect of $\text{I}^2\text{AM}$ is crucial for debugging. By examining the Generated-to-Reference (G2R) maps, researchers can identify exactly why a model failed—for instance, revealing if a model ignored a specific patch of a reference image during a virtual try-on.

By using $\text{I}^2\text{AM}$ to identify "attention dispersion" (where the model looks at random background pixels instead of the reference object), the authors introduced a refinement loss. This "Refined Custom" model improved the SSIM from 0.8396 to 0.8644 and significantly boosted the IMACS score from 0.0833 to 0.2215.

Zero-Shot Object Detection and Metric Correlation

Surprisingly, the attribution maps generated by $\text{I}^2\text{AM}$ are accurate enough to be used for zero-shot object detection. In unsupervised scenarios on the COCO dataset, $\text{I}^2\text{AM}$ achieved an mIoU of 0.2416, outperforming the T2I interpretability baseline DAAM (0.1807) and even the supervised YOLOv3 model (0.1978) in certain unseen categories.

Additionally, the newly proposed IMACS score correlates strongly with traditional quality metrics like FID and SSIM, suggesting that "good" attention—looking at the right places—is a fundamental prerequisite for high-quality image generation.

Limitations and Future Work

While $\text{I}^2\text{AM}$ represents a significant step forward in LDM interpretability, the authors acknowledge areas for future growth. Most rigorous testing was conducted in paired settings (where a ground truth exists); further validation is needed for unpaired settings like general style transfer. The authors also aim to extend $\text{I}^2\text{AM}$ to broader I2I tasks, such as colorization and depth estimation. Finally, aggregating scores across all layers and timesteps can be computationally intensive, presenting an opportunity for future optimization.

Summary updated

BibTeX
@inproceedings{park2025text,
  author = {Junseo Park and Hyeryung Jang},
  title = {{$\textbackslash\{\}text\{I\}^2\textbackslash\{\}text\{AM\}$: Interpreting Image-to-Image Latent Diffusion Models via Bi-Attribution Maps}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=bBNUiErs26},
}
Figure