Unveiling and Mitigating Memorization in Text-to-image Diffusion Models through Cross Attention

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Ren, Jie, Li, Yaxin, Zeng, Shenglai, Xu, Han, Lyu, Lingjuan, Xing, Yue, Tang, Jiliang
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866908427810242560
author Ren, Jie
Li, Yaxin
Zeng, Shenglai
Xu, Han
Lyu, Lingjuan
Xing, Yue
Tang, Jiliang
author_facet Ren, Jie
Li, Yaxin
Zeng, Shenglai
Xu, Han
Lyu, Lingjuan
Xing, Yue
Tang, Jiliang
contents Recent advancements in text-to-image diffusion models have demonstrated their remarkable capability to generate high-quality images from textual prompts. However, increasing research indicates that these models memorize and replicate images from their training data, raising tremendous concerns about potential copyright infringement and privacy risks. In our study, we provide a novel perspective to understand this memorization phenomenon by examining its relationship with cross-attention mechanisms. We reveal that during memorization, the cross-attention tends to focus disproportionately on the embeddings of specific tokens. The diffusion model is overfitted to these token embeddings, memorizing corresponding training images. To elucidate this phenomenon, we further identify and discuss various intrinsic findings of cross-attention that contribute to memorization. Building on these insights, we introduce an innovative approach to detect and mitigate memorization in diffusion models. The advantage of our proposed method is that it will not compromise the speed of either the training or the inference processes in these models while preserving the quality of generated images. Our code is available at https://github.com/renjie3/MemAttn .
format Preprint
id arxiv_https___arxiv_org_abs_2403_11052
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Unveiling and Mitigating Memorization in Text-to-image Diffusion Models through Cross Attention
Ren, Jie
Li, Yaxin
Zeng, Shenglai
Xu, Han
Lyu, Lingjuan
Xing, Yue
Tang, Jiliang
Computer Vision and Pattern Recognition
Cryptography and Security
Recent advancements in text-to-image diffusion models have demonstrated their remarkable capability to generate high-quality images from textual prompts. However, increasing research indicates that these models memorize and replicate images from their training data, raising tremendous concerns about potential copyright infringement and privacy risks. In our study, we provide a novel perspective to understand this memorization phenomenon by examining its relationship with cross-attention mechanisms. We reveal that during memorization, the cross-attention tends to focus disproportionately on the embeddings of specific tokens. The diffusion model is overfitted to these token embeddings, memorizing corresponding training images. To elucidate this phenomenon, we further identify and discuss various intrinsic findings of cross-attention that contribute to memorization. Building on these insights, we introduce an innovative approach to detect and mitigate memorization in diffusion models. The advantage of our proposed method is that it will not compromise the speed of either the training or the inference processes in these models while preserving the quality of generated images. Our code is available at https://github.com/renjie3/MemAttn .
title Unveiling and Mitigating Memorization in Text-to-image Diffusion Models through Cross Attention
topic Computer Vision and Pattern Recognition
Cryptography and Security
url https://arxiv.org/abs/2403.11052