Exploring Local Memorization in Diffusion Models via Bright Ending Attention
Chen Chen, Daochang Liu, Mubarak Shah, Chang Xu
TL;DR
The paper reframes memorization in diffusion models by introducing a localized memorization perspective and identifying a new phenomenon, bright ending (BE), which reveals how end-token cross-attention concentrates on memorized regions during the final denoising step. BE enables efficient, training-data-free localization of memorized regions, producing automatic local memorization masks that can be integrated into existing evaluation, detection, and mitigation pipelines. By coupling BE with a localized detection metric (LD) and a localized similarity metric (LS), the authors demonstrate improved performance for local memorization tasks while preserving global performance, achieving new state-of-the-art results. Extensive experiments on Stable Diffusion show BE-based localization reduces the gap caused by local memorization and provides a practical tool for policy-relevant privacy and copyright risk assessment in diffusion-model outputs.
Abstract
Text-to-image diffusion models have achieved unprecedented proficiency in generating realistic images. However, their inherent tendency to memorize and replicate training data during inference raises significant concerns, including potential copyright infringement. In response, various methods have been proposed to evaluate, detect, and mitigate memorization. Our analysis reveals that existing approaches significantly underperform in handling local memorization, where only specific image regions are memorized, compared to global memorization, where the entire image is replicated. Also, they cannot locate the local memorization regions, making it hard to investigate locally. To address these, we identify a novel "bright ending" (BE) anomaly in diffusion models prone to memorizing training images. BE refers to a distinct cross-attention pattern observed in text-to-image diffusion models, where memorized image patches exhibit significantly greater attention to the final text token during the last inference step than non-memorized patches. This pattern highlights regions where the generated image replicates training data and enables efficient localization of memorized regions. Equipped with this, we propose a simple yet effective method to integrate BE into existing frameworks, significantly improving their performance by narrowing the performance gap caused by local memorization. Our results not only validate the successful execution of the new localization task but also establish new state-of-the-art performance across all existing tasks, underscoring the significance of the BE phenomenon.
