Localizing Memorized Regions in Diffusion Models via Coordinate-Wise Curvature Differences
Abstract
Diffusion models can unintentionally memorize training samples, raising concerns about privacy and copyright. While recent methods can detect memorization, they often rely on global or model-specific signals and provide limited insight into where memorization appears within a generated image. We provide a geometric characterization of local memorization as a coordinate-wise variance collapse. However, such collapse can also arise from intrinsic data constraints rather than overfitting. To isolate overfitting-driven memorization, we propose curvature-difference methods that subtract the curvature of an underfitted baseline, either the unconditional model or a less-trained version of itself. We further derive a score-difference proxy that provides a geometric explanation for the widely used score-difference-based detection metric. Experiments on Stable Diffusion, evaluated against ground-truth memorization masks, show that our method outperforms the prior attention-based localization method. Code is available at \url{https://github.com/Gwangho99/mem-curv-diff}.
Lay Summary
AI systems that generate images can sometimes reproduce parts of images they saw during training. This is a concern because even copying a small region of an image may reveal private or copyrighted content. Existing methods can often tell whether a generated image is memorized, but they usually give only one score for the whole image and do not clearly show which part was copied. We propose a method for locating memorized regions inside generated images. Our key idea is to find image regions where the model has become unusually “rigid,” meaning that those pixels have lost the freedom to vary. However, some regions are naturally rigid, such as a plain background or an object strongly specified by the text prompt. To separate true memorization from such normal image structure, we compare the model with a weaker baseline model and highlight only the extra rigidity caused by overfitting. Experiments on Stable Diffusion show that our method finds memorized regions more accurately than prior attention-based approaches. This can help researchers better diagnose privacy and copyright risks in image generation models.