AAAI 2026
Jun-Hyun Bae, Wonyong Jo, Jaehyup Lee, Heechul Jung
Kyungpook National University
๐Ÿ“„ Paper ๐Ÿ’ป Code ๐ŸŽฌ Poster & Video

Presentation


Abstract

Text-to-image diffusion models utilize cross-attention to integrate textual information into the visual latent space, yet the transformation from text embeddings to latent features remains largely unexplored. We provide a mechanistic analysis of the output-value (OV) circuits within cross-attention layers through spectral analysis via singular value decomposition. Our analysis demonstrates that semantic concepts are encoded in low-dimensional subspaces spanned by singular vectors in OV circuits across cross-attention heads. To verify this, we intervene on concept-related components in the diffusion process, demonstrating that intervention on identified spectral components affects conceptual changes. We further validate these findings by examining visual outputs of isolated subspaces and their alignment with text embedding space. Through this mechanistic understanding, we demonstrate that simply nullifying these spectral components can achieve targeted concept removal with performance comparable to existing methods while providing interpretability.


Overview

Cross-attention์˜ OV circuit์ด ํ…์ŠคํŠธ๋ฅผ ์–ด๋–ป๊ฒŒ ์‹œ๊ฐ ํŠน์ง•์œผ๋กœ ๋ณ€ํ™˜ํ•˜๋Š”์ง€ ๋ฐํžˆ๊ณ , ์ด๋ฅผ ํ™œ์šฉํ•ด ์žฌํ•™์Šต ์—†์ด ๊ฐœ๋…์„ ์ œ๊ฑฐํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ œ์•ˆํ•œ๋‹ค.

  1. Spectral Decomposition โ€” \(\mathbf{W}_{\text{OV}}\) ๋ฅผ SVD๋กœ ๋ถ„ํ•ดํ•˜์—ฌ ๋…๋ฆฝ์ ์ธ text-to-visual ๋ณ€ํ™˜ ๊ฒฝ๋กœ๋ฅผ ์ถ”์ถœํ•œ๋‹ค.
  2. Concept Localization โ€” “๊ณ ํ ์Šคํƒ€์ผ”, “nudity” ๋“ฑ์˜ ์˜๋ฏธ ๊ฐœ๋…์ด ์ „์ฒด spectrum ์ค‘ ์†Œ์ˆ˜์˜ spectral component์— ์ง‘์ค‘๋˜์–ด ์žˆ์Œ์„ ๋ฐœ๊ฒฌํ•œ๋‹ค.
  3. Spectral Nullification โ€” ํ•ด๋‹น component๋งŒ ์ œ๊ฑฐํ•˜๋ฉด ์žฌํ•™์Šต ์—†์ด๋„ ๊ธฐ์กด ๋ฐฉ๋ฒ•๊ณผ ๋น„์Šทํ•œ ์ˆ˜์ค€์˜ targeted concept removal์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

Spectral Isolation

๊ฐ ๊ฐœ๋…์˜ spectral component๋งŒ ํ™œ์„ฑํ™”ํ•œ ๊ฒฐ๊ณผ. ์Šคํƒ€์ผ์€ ์งˆ๊ฐ๋งŒ, ์กฐ๋ช…์€ ํ˜•๊ด‘๋งŒ, ์ฝ˜ํ…์ธ ๋Š” ์ธ์ฒด ํ˜•ํƒœ๊นŒ์ง€ ๋‚จ๋Š”๋‹ค.


Method

Cross-attention์—์„œ ํ…์ŠคํŠธ๋ฅผ ์‹œ๊ฐ ํŠน์ง•์œผ๋กœ ๋ณ€ํ™˜ํ•˜๋Š” ํ•ต์‹ฌ์€ \(\mathbf{W}_{\text{OV}}\) ํ–‰๋ ฌ์ด๋‹ค. Text embedding์€ ์˜๋ฏธ ์ •๋ณด๋ฅผ ๊ณ ์œ ํ•œ ์ถ•(semantic axes)์„ ๋”ฐ๋ผ ์กฐ์งํ•˜๋Š”๋ฐ, \(\mathbf{W}_{\text{OV}}\) ๋Š” ์ด ์ถ•์— ์ •๋ ฌ๋œ ์ €์ฐจ์› subspace๋ฅผ ํ†ตํ•ด ๊ฐœ๋…๋ณ„ ๋ณ€ํ™˜์„ ์ˆ˜ํ–‰ํ•œ๋‹ค. ์ด ํ–‰๋ ฌ์„ SVD๋กœ ๋ถ„ํ•ดํ•˜๋ฉด ๊ฐ spectral component๊ฐ€ text-to-visual์˜ ๋…๋ฆฝ๋œ ๋ณ€ํ™˜ ๊ฒฝ๋กœ๊ฐ€ ๋˜๋ฉฐ, “๊ณ ํ ์Šคํƒ€์ผ"์ด๋‚˜ “nudity” ๊ฐ™์€ ์˜๋ฏธ ๊ฐœ๋…์€ ์ „์ฒด spectrum ์ค‘ ์†Œ์ˆ˜์˜ component์— ์ง‘์ค‘๋˜์–ด ์žˆ๋‹ค.

ํŠน์ • ๊ฐœ๋…์— ๋Œ€ํ•ด high-contribution head๋Š” ์ „์ฒด์˜ ์•ฝ 10%์— ๋ถˆ๊ณผํ•˜๋ฉฐ, ํ•ด๋‹น head์˜ ์ถœ๋ ฅ์„ ์Šค์ผ€์ผ๋งํ•˜๋ฉด ๊ฐœ๋…์˜ ๊ฐ•๋„๋ฅผ ์กฐ์ ˆํ•  ์ˆ˜ ์žˆ๋‹ค.

Head Modulation

"Van Gogh" ๊ฐœ๋…์˜ high-contribution head(์ „์ฒด์˜ ~10%) ์ถœ๋ ฅ์„ $\alpha$๋กœ ์Šค์ผ€์ผ๋ง.

Head ์ˆ˜์ค€์ด ์•„๋‹Œ spectral component ๋‹จ์œ„๋กœ ์กฐ์ž‘ํ•˜๋ฉด, ์Šคํƒ€์ผ๊ณผ ์ฝ˜ํ…์ธ  ๊ฐ™์€ ์„œ๋กœ ๋‹ค๋ฅธ ๊ฐœ๋… ์ฐจ์›์„ ๋ถ„๋ฆฌํ•˜์—ฌ ์กฐ์ ˆํ•  ์ˆ˜ ์žˆ๋‹ค.

Spectral vs Head

Spectral modulation (์œ„) vs head-level modulation (์•„๋ž˜). Spectral component ๋‹จ์œ„๋กœ ์กฐ์ž‘ํ•˜๋ฉด ์Šคํƒ€์ผ๋งŒ ๋ถ„๋ฆฌํ•˜์—ฌ ์กฐ์ ˆํ•  ์ˆ˜ ์žˆ๋‹ค.

์•„๋ž˜ ๊ทธ๋ฆผ์€ ์ „์ฒด head์— ๊ฑธ์นœ concept contribution์˜ ๋ถ„ํฌ๋ฅผ ๋ณด์—ฌ์ค€๋‹ค. ๋Œ€๋ถ€๋ถ„์˜ head๋Š” ํŠน์ • ๊ฐœ๋…์— ๊ฑฐ์˜ ๊ธฐ์—ฌํ•˜์ง€ ์•Š์œผ๋ฉฐ, ์†Œ์ˆ˜์˜ head๋งŒ์ด ๋†’์€ ๊ธฐ์—ฌ๋ฅผ ๋ณด์ธ๋‹ค.

Head Distribution

Head๋ณ„ concept contribution ๋ถ„ํฌ. ์†Œ์ˆ˜์˜ high-contribution head์— ๊ฐœ๋… ์ •๋ณด๊ฐ€ ์ง‘์ค‘๋˜์–ด ์žˆ๋‹ค.


Results

Quantitative

Spectral Nullification(SN)์€ ์žฌํ•™์Šต ๊ธฐ๋ฐ˜ ๋ฐฉ๋ฒ•๋“ค๊ณผ ๋น„๊ตํ–ˆ์„ ๋•Œ, ์ƒ์„ฑ ํ’ˆ์งˆ(CLIP score)์„ ์œ ์ง€ํ•˜๋ฉด์„œ concept removal ์„ฑ๋Šฅ์—์„œ ๋น„์Šทํ•œ ์ˆ˜์ค€์„ ๋‹ฌ์„ฑํ•œ๋‹ค.

Quality Tradeoff

Concept removal ์„ฑ๋Šฅ vs ์ƒ์„ฑ ํ’ˆ์งˆ(CLIP score). Spectral Nullification(SN)์€ ์žฌํ•™์Šต ์—†์ด ๊ธฐ์กด ๋ฐฉ๋ฒ•๊ณผ ๋น„์Šทํ•œ ์„ฑ๋Šฅ์„ ๋‹ฌ์„ฑํ•œ๋‹ค.

Concept-specific spectral component๊ฐ€ ์‹ค์ œ๋กœ ํ•ด๋‹น ๊ฐœ๋…์˜ ์˜๋ฏธ๋ฅผ ํฌ์ฐฉํ•˜๋Š”์ง€ ๊ฒ€์ฆํ•˜๊ธฐ ์œ„ํ•ด, spectral component๋กœ ํ…์ŠคํŠธ ์ฐจ์ด๋ฅผ reconstructionํ•œ ๋’ค CLIP ์–ดํœ˜์™€์˜ ์ •๋ ฌ์„ ํ™•์ธํ•œ๋‹ค.

Token Alignment

Concept-specific spectral component๋กœ ํ…์ŠคํŠธ ์ฐจ์ด๋ฅผ reconstructionํ•œ ๋’ค CLIP ์–ดํœ˜ 49,408๊ฐœ์™€ ๋น„๊ต. Nudity ๊ด€๋ จ ํ† ํฐ์ด ์ƒ์œ„์— ์ •๋ ฌ๋œ๋‹ค.

์„œ๋กœ ๋‹ค๋ฅธ head์˜ concept subspace๊ฐ€ ์ผ๊ด€๋œ ๊ตฌ์กฐ๋ฅผ ๊ณต์œ ํ•˜๋Š”์ง€ t-SNE์™€ Jaccard similarity๋กœ ๋ถ„์„ํ•œ๋‹ค.

t-SNE Jaccard

Head ๊ฐ„ concept subspace์˜ t-SNE ์‹œ๊ฐํ™” ๋ฐ Jaccard similarity. ๋™์ผ ๊ฐœ๋…์˜ subspace๋“ค์ด head ๊ฐ„์—๋„ ์œ ์‚ฌํ•œ ๊ตฌ์กฐ๋ฅผ ๋ณด์ธ๋‹ค.

Qualitative

I2P benchmark์˜ adversarial prompt์— ๋Œ€ํ•ด SN์„ ์ ์šฉํ•œ ๊ฒฐ๊ณผ, ๋ถ€์ ์ ˆํ•œ ์ฝ˜ํ…์ธ ๊ฐ€ ํšจ๊ณผ์ ์œผ๋กœ ์ œ๊ฑฐ๋œ๋‹ค.

I2P Comparison

I2P benchmark adversarial prompt ๊ฒฐ๊ณผ. ์™ผ์ชฝ: SD v1.4 (SN ์ ์šฉ ์ „), ์˜ค๋ฅธ์ชฝ: SN ์ ์šฉ ํ›„.


BibTeX

@inproceedings{bae2026mechanistic,
  title={Mechanistic Dissection of Cross-Attention Subspaces
         in Text-to-Image Diffusion Models},
  author={Bae, Jun-Hyun and Jo, Wonyong and Lee, Jaehyup
          and Jung, Heechul},
  booktitle={Proceedings of the AAAI Conference
             on Artificial Intelligence},
  year={2026}
}