Attention, May I Have Your Decision? Localizing Generative Choices in Diffusion Models
Organizations: Warsaw University of Technology · IDEAS Research Institute
Abstract
Text-to-image diffusion models exhibit remarkable generative capabilities, yet their internal operations remain opaque, particularly when handling prompts that are not fully descriptive. In such scenarios, models must make implicit decisions to generate details not explicitly specified in the text. This work investigates the hypothesis that this decision-making process is not diffuse but is computationally localized within the model's architecture. While existing localization techniques focus on prompt-related interventions, we notice that such explicit conditioning may differ from implicit decisions. Therefore, we introduce a probing-based localization technique to identify the layers with the highest attribute separability for concepts. Our findings indicate that the resolution of ambiguous concepts is governed principally by self-attention layers, identifying them as the most effective point for intervention. Based on this discovery, we propose ICM (Implicit Choice-Modification) - a precise steering method that applies targeted interventions to a small subset of layers. Extensive experiments confirm that intervening on these specific self-attention layers yields superior debiasing performance compared to existing state-of-the-art methods, minimizing artifacts common to less precise approaches. The code is available at https://github.com/kzaleskaa/icm.
Figures & tables
| Method | Gender (2) | Age (3) | Race (4) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FD | FID | CLIP-I | CLIP-T | FD | FID | CLIP-I | CLIP-T | FD | FID | CLIP-I | CLIP-T | |
| Original | 0.564 | 120.06 | - | 0.6155 | 0.752 | 120.06 | - | 0.6155 | 0.558 | 120.06 | - | 0.6155 |
| Finetuning [ 34 ] | 0.050 | 161.47 | 0.8779 | 0.6095 | 0.746 | 161.47 | 0.8779 | 0.6095 | 0.198 | 161.47 | 0.8779 | 0.6095 |
| ICM (Finetuning) | 0.535 | 143.98 | 0.9187 | 0.6189 | 0.681 | 122.56 | 0.9075 | 0.6198 | 0.449 | 123.47 | 0.9020 | 0.6188 |
| Latent Editing [ 17 ] | 0.408 | 166.11 | 0.8253 | 0.6005 | 0.682 | 200.90 | 0.8527 | 0.6122 | 0.524 | 153.05 | 0.8804 | 0.6086 |
| H-Distribution [ 26 ] | 0.222 | 151.68 | 0.8475 | 0.6087 | 0.506 | 147.71 | 0.8345 | 0.6098 | 0.544 | 126.90 | 0.8255 | 0.6100 |
| Gender (2) | Age (3) | Race (4) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | FD ↓ | FID ↓ | CLIP-I ↑ | CLIP-T ↑ | FD ↓ | FID ↓ | CLIP-I ↑ | CLIP-T ↑ | FD ↓ | FID ↓ | CLIP-I ↑ | CLIP-T ↑ |
| Steer cross-attn | 0.365 | 118.39 | 0.8631 | 0.6171 | 0.612 | 114.26 | 0.8991 | 0.6167 | 0.428 | 120.28 | 0.8561 | 0.6179 |
| Steer self-attn | 0.085 | 118.31 | 0.8556 | 0.6136 | 0.273 | 112.57 | 0.8954 | 0.6153 | 0.298 | 129.51 | 0.8403 | 0.6172 |
| Finetuning cross-attn | 0.535 | 143.98 | 0.9187 | 0.6189 | 0.681 | 122.56 | 0.9075 | 0.6198 | 0.449 | 123.47 | 0.9020 | 0.6188 |
| Finetuning self-attn | 0.463 | 139.04 | 0.9408 | 0.6175 | 0.770 | 131.25 | 0.9280 | 0.6186 | 0.524 | 124.36 | 0.9148 | 0.6186 |
| Specific Prompt | Train Acc. | Test Acc. |
|---|---|---|
| “a photo of a man” | 70.37 | 62.08 |
| “a photo of a woman” | 73.37 | 70.54 |
| “a photo of an older person” | 84.24 | 68.63 |
| “a photo of a younger person” | 82.85 | 88.86 |
| “a photo of a dark hair person” | 92.84 | 88.63 |
| “a photo of a light hair person” | 88.79 | 80.40 |
| FD | FID | CLIP-I | CLIP-T | |
|---|---|---|---|---|
| General | 0.089 | 119.45 | 0.883 | 0.613 |
| Specific | 0.087 | 122.08 | 0.850 | 0.614 |
| Layer Selection | Steering Success (%) | Avg. Confidence | CLIP-I |
|---|---|---|---|
| Top 20 (Ours) | 83.0% | 0.917 | 0.893 |
| Random 20 | 51.0% | 0.838 | 0.932 |
| All Layers | 91.0% | 0.879 | 0.779 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Direction | Layers | |
| woman | up_blocks.1.attn.2.t_blocks.0.attn1 | -10 |
| up_blocks.1.attn.1.t_blocks.0.attn1 | ||
| up_blocks.1.attn.0.t_blocks.0.attn1 | ||
| mid_block.attn.0.t_blocks.0.attn1 | ||
| man | up_blocks.1.attn.2.t_blocks.0.attn1 | 10 |
| up_blocks.1.attn.1.t_blocks.0.attn1 |
| Method | Gender (2) | Age (3) | Race (4) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FD | FID | CLIP-I | CLIP-T | FD | FID | CLIP-I | CLIP-T | FD | FID | CLIP-I | CLIP-T | |
| Original | 0.564 | 120.06 | - | 0.6155 | 0.752 | 120.06 | - | 0.6155 | 0.558 | 120.06 | - | 0.6155 |
| Finetuning (rank=32, selected) | 0.515 | 128.27 | 0.9028 | 0.6172 | 0.699 | 114.34 | 0.8943 | 0.6173 | 0.485 | 127.90 | 0.9062 | 0.6190 |
| Finetuning (rank=32, random) | 0.542 | 133.62 | 0.9230 | 0.6177 | 0.733 | 117.61 | 0.8916 | 0.6191 | 0.537 | 123.64 | 0.9412 | 0.6159 |
T2I Diffusion Models
Text-to-image (T2I) diffusion models generate images from prompts by learning to reverse noise under text conditioning.
See all 402 papers