arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.11052cs.CVcs.CR
收藏

通过交叉注意力揭示并缓解文本到图像扩散模型中的记忆现象

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

Michigan State University(密歇根州立大学);Sony AI(索尼人工智能)

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

AI总结:

本文通过分析交叉注意力机制揭示文本到图像扩散模型对特定 token 嵌入过拟合导致的记忆现象,并提出一种不损失训练推理速度且保持生成质量的检测与缓解方法。

摘要:

文本到图像扩散模型的最新进展展示了其从文本提示生成高质量图像的卓越能力。然而,越来越多的研究表明,这些模型会记忆并复制其训练数据中的图像,引发了对潜在版权侵权和隐私风险的极大担忧。在我们的研究中,我们通过考察记忆现象与交叉注意力机制之间的关系,提供了一种理解该现象的新视角。我们揭示,在记忆过程中,交叉注意力往往不成比例地聚焦于特定 token 的嵌入。扩散模型对这些 token 嵌入过拟合,从而记住了相应的训练图像。为了阐明这一现象,我们进一步识别并讨论了导致记忆现象的交叉注意力的各种内在发现。基于这些见解,我们引入了一种创新方法来检测和缓解扩散模型中的记忆现象。我们提出的方法的优势在于,它不会损害这些模型训练或推理过程的速度,同时能保持生成图像的质量。我们的代码可在 https://github.com/renjie3/MemAttn 获取。

英文摘要:

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 .

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑