CVCRMar 17, 2024

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

arXiv:2403.11052v264 citationsh-index: 16Has CodeECCV
AI Analysis

This addresses copyright and privacy risks in AI-generated images, offering a practical solution for model developers, though it is incremental as it builds on existing cross-attention insights.

The study tackled memorization in text-to-image diffusion models by linking it to cross-attention mechanisms, revealing that overfitting to specific token embeddings causes replication of training images, and introduced a method to detect and mitigate this without compromising speed or image quality.

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 .

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes