Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

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

About

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 .

Jie Ren, Yaxin Li, Shenglai Zeng, Han Xu, Lingjuan Lyu, Yue Xing, Jiliang Tang• 2024

Related benchmarks

TaskDatasetResultRank
Memorization DetectionStable Diffusion V1.4
AUC0.966
28
Memorization DetectionSD 2.1
AUC0.9477
24
Memorization DetectionSD LAION Lexica COCO-2017 GPT-4 1000 prompts 1.4 (Evaluation)
AUC0.9444
16
Text-to-Image GenerationWebster 500 Memorized Prompts 2023 v1.4 (430 with available target images)
SSCD (Target)0.4318
13
Memorization mitigationStable Diffusion 1.4
Memorization Rate29.2
13
Memorization DetectionStable Diffusion 1.5
AUC (All Steps)96.09
9
Mitigating memorization in conditional diffusion modelsScenario 3 duplicated prompts Stable Diffusion v1.4
Similarity (95pc)0.6881
8
Memorization DetectionStable Diffusion v2.0
AUC0.853
8
Text-to-Image GenerationScenario 4
Similarity (95th Percentile)0.6718
8
Text-to-Image GenerationLAION-10k Scenario 1 (test)
Similarity (95pc)0.6028
7
Showing 10 of 22 rows

Other info

Follow for update