Cross-Attention Head Position Patterns Can Align with Human Visual Concepts in Text-to-Image Generative Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Park, Jungwon, Ko, Jungmin, Byun, Dongnam, Suh, Jangwon, Rhee, Wonjong
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916626814730240
author Park, Jungwon
Ko, Jungmin
Byun, Dongnam
Suh, Jangwon
Rhee, Wonjong
author_facet Park, Jungwon
Ko, Jungmin
Byun, Dongnam
Suh, Jangwon
Rhee, Wonjong
contents Recent text-to-image diffusion models leverage cross-attention layers, which have been effectively utilized to enhance a range of visual generative tasks. However, our understanding of cross-attention layers remains somewhat limited. In this study, we introduce a mechanistic interpretability approach for diffusion models by constructing Head Relevance Vectors (HRVs) that align with human-specified visual concepts. An HRV for a given visual concept has a length equal to the total number of cross-attention heads, with each element representing the importance of the corresponding head for the given visual concept. To validate HRVs as interpretable features, we develop an ordered weakening analysis that demonstrates their effectiveness. Furthermore, we propose concept strengthening and concept adjusting methods and apply them to enhance three visual generative tasks. Our results show that HRVs can reduce misinterpretations of polysemous words in image generation, successfully modify five challenging attributes in image editing, and mitigate catastrophic neglect in multi-concept generation. Overall, our work provides an advancement in understanding cross-attention layers and introduces new approaches for fine-controlling these layers at the head level.
format Preprint
id arxiv_https___arxiv_org_abs_2412_02237
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Cross-Attention Head Position Patterns Can Align with Human Visual Concepts in Text-to-Image Generative Models
Park, Jungwon
Ko, Jungmin
Byun, Dongnam
Suh, Jangwon
Rhee, Wonjong
Computer Vision and Pattern Recognition
Artificial Intelligence
Recent text-to-image diffusion models leverage cross-attention layers, which have been effectively utilized to enhance a range of visual generative tasks. However, our understanding of cross-attention layers remains somewhat limited. In this study, we introduce a mechanistic interpretability approach for diffusion models by constructing Head Relevance Vectors (HRVs) that align with human-specified visual concepts. An HRV for a given visual concept has a length equal to the total number of cross-attention heads, with each element representing the importance of the corresponding head for the given visual concept. To validate HRVs as interpretable features, we develop an ordered weakening analysis that demonstrates their effectiveness. Furthermore, we propose concept strengthening and concept adjusting methods and apply them to enhance three visual generative tasks. Our results show that HRVs can reduce misinterpretations of polysemous words in image generation, successfully modify five challenging attributes in image editing, and mitigate catastrophic neglect in multi-concept generation. Overall, our work provides an advancement in understanding cross-attention layers and introduces new approaches for fine-controlling these layers at the head level.
title Cross-Attention Head Position Patterns Can Align with Human Visual Concepts in Text-to-Image Generative Models
topic Computer Vision and Pattern Recognition
Artificial Intelligence
url https://arxiv.org/abs/2412.02237