Papers
Topics
Authors
Recent
Search
2000 character limit reached

Localizing Memorized Regions in Diffusion Models via Coordinate-Wise Curvature Differences

Published 26 May 2026 in cs.LG | (2605.26756v2)

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 https://github.com/Gwangho99/mem-curv-diff.

Authors (2)

Summary

  • The paper introduces a novel coordinate-wise curvature-difference framework that spatially localizes memorized regions in diffusion models.
  • It establishes a direct link between the Hessian of the log-likelihood and conditional covariance, using efficient score-difference surrogates to isolate overfitting signals.
  • Empirical results on Stable Diffusion and Realistic Vision validate the method with high IoU and near-perfect AUC, offering robust diagnostic tools for copyright and privacy analysis.

Precision Localization of Memorization in Diffusion Models via Coordinate-Wise Curvature Differences

Problem Overview and Motivation

Diffusion models, notably in the context of text-to-image synthesis, have demonstrated strong generative capabilities but are susceptible to memorizing and partially replicating training data, invoking profound privacy and copyright concerns. The prevailing methodologies for memorization detection are largely global, assigning scalar scores per sample and failing to discern precisely where memorization manifests within a synthesized image. The work "Localizing Memorized Regions in Diffusion Models via Coordinate-Wise Curvature Differences" (2605.26756) fills this gap by advancing a geometric, model-agnostic framework that enables spatial localization of memorized content, fundamentally shifting memorization analysis from global to local metrics.

Geometric Foundation and Coordinate-Wise Variance Collapse

Prior geometric frameworks such as the Manifold Memorization Hypothesis (MMH) contextualize memorization in terms of reduced local intrinsic dimensionality (LID), but their global aggregation obscures spatial specificity. This paper proceeds to formalize memorization not merely as a reduction in degrees of freedom, but as a coordinate-wise variance collapse: certain image regions (patches, pixels) become nearly deterministic due to overfitting, while others remain unconstrained.

This critical distinction is demonstrated via synthetic examples, where two distributions sharing LID yield differing memorization signals depending on variance concentration. Figure 1

Figure 1

Figure 1: Illustration of concept memorization versus verbatim memorization, showing how coordinate-wise variance collapse localizes memorization unlike global dimensionality measures.

Curvature as a Direct Signal of Local Memorization

The paper tightly connects variance collapse to the curvature of the log-density in diffusion models. For Gaussian distributions, the diagonal of the negative Hessian of the log-density (โˆ’diag(โˆ‡x2logโกp(x))-\mathrm{diag}(\nabla_x^2 \log p(x))) reflects the inverse conditional variance. High values on specific coordinates are indicative of local variance collapse and, thus, local memorization.

A significant theoretical result provides an explicit link between the conditional covariance of the reverse diffusion process and the Hessian of the log-likelihood, justifying the use of coordinate-wise curvature as a signal for memorization. Figure 2

Figure 2: Curvature-difference method isolates overfitting-driven memorization; rightmost panel demonstrates how subtracting an unconditional baseline removes data-driven curvature, revealing overfit-induced memorization localization.

Isolating Overfitting-Driven Memorization: Curvature-Difference Framework

Curvature-based metrics alone are insufficient in distinguishing memorization due to overfitting from intrinsic structural constraints of the data manifold. High curvature may arise from semantic prompts or naturally low-variance regions. The framework thus proposes subtracting curvature estimated from an underfitted baseline (either unconditional model or less-trained checkpoint) from that of the conditional model. This removes data-driven curvature and retains only the excess induced by overfitting.

Formally, for a sample at time tt, the key metric is:

ฮ”hโˆ…t=diag(โˆ’Hฮธ(xt,c))โˆ’diag(โˆ’Hฮธ(xt))\Delta h_{\emptyset}^t = \mathrm{diag}(-H_\theta(x_t, c)) - \mathrm{diag}(-H_\theta(x_t))

or, with a less-trained model ฮธ~\tilde{\theta},

ฮ”hฮธ~t=diag(โˆ’Hฮธ(xt,c))โˆ’diag(โˆ’Hฮธ~(xt,c))\Delta h_{\tilde{\theta}}^t = \mathrm{diag}(-H_\theta(x_t, c)) - \mathrm{diag}(-H_{\tilde{\theta}}(x_t, c))

The paper demonstrates that this difference-based method sharply localizes memorization in generated images, outperforming prior attention-based techniques such as Bright Ending.

Score-Difference Surrogates and Unified Geometric Interpretation

It is computationally burdensome to obtain Hessians in high-dimensional image space. The paper showsโ€”by leveraging Fisher information identitiesโ€”that coordinate-wise squared score differences approximate curvature differences:

ฮ”sโˆ…t=(sฮธ(xt,c)โˆ’sฮธ(xt))โŠ™2\Delta s_{\emptyset}^t = (s_\theta(x_t, c) - s_\theta(x_t))^{\odot 2}

ฮ”sฮธ~t=(sฮธ(xt,c)โˆ’sฮธ~(xt,c))โŠ™2\Delta s_{\tilde{\theta}}^t = (s_\theta(x_t, c) - s_{\tilde{\theta}}(x_t, c))^{\odot 2}

This not only provides efficient surrogates, but also brings a geometric justification to widely used score-difference-based memorization detection heuristics. The subtraction operation serves to suppress intrinsic data complexity and filter out purely overfitting-induced curvature.

Empirical Evaluation: Localization and Detection

Experiments on Stable Diffusion v1.4 and v2.1, as well as Realistic Vision v5.1, validate both qualitative and quantitative superiority of curvature-difference and score-difference metrics against established baselines. Evaluation uses ground-truth memorization masks that precisely delineate template-verbatim regions. Figure 3

Figure 3: Qualitative comparison of methodsโ€”curvature-difference approaches demonstrate superior spatial alignment with ground-truth memorization masks versus prior attention-based localization (Bright Ending).

Figure 4

Figure 4: Qualitative results for SD v1.4, showing strong spatial correspondence between curvature-difference activation maps and memorized template regions.

Figure 5

Figure 5: Qualitative results for SD v2.1, highlighting consistent efficacy of the curvature-difference method amid complex image structures.

Numerical results (IoU, pixel accuracy) reveal that ฮ”hโˆ…\Delta h_{\emptyset} and ฮ”hฮธ~\Delta h_{\tilde{\theta}}โ€”and their respective score-difference surrogatesโ€”yield high localization performance, with IoU sometimes exceeding 0.95 in template-verbatim detection settings. Moreover, aggregate scores from these maps provide robust memorization detection, with area-under-curve (AUC) values approaching 0.99.

Theoretical and Practical Implications

This geometric framework and associated metrics present a scalable, model-agnostic approach for spatially localizing memorization in diffusion models. By principled subtraction of underfitted baseline curvature, the approach isolates true overfit-driven memorization rather than structural regularity, deepening our understanding of memorization mechanics.

Practically, this allows for more accurate risk analysis with respect to privacy and copyright, identifying not just if but where memorized regions appear in generated images. The framework also offers a geometric foundation for future mitigation techniques, such as pruning local weights or adjusting guidance/noise to counteract overfit-driven variance collapse.

Future Directions

While the proposed method excels in template-verbatim (local) memorization, concept-level (global) memorization where degrees of freedom are distributed across the entire image, remains less tractable. Extension to capture or distinguish such cases is a compelling avenue. Efficient large-scale application of curvature estimation techniques, as well as further theoretical study into curvature dynamics under progressive overfitting, remain open research frontiers. Figure 6

Figure 6: Synthetic experiment on curvature dynamics under progressive overfitting, showing that curvature continues to sharpen even after outlier modes are established.

Figure 7

Figure 7: Analysis of curvature at different diffusion timesteps, proving late-stage curvature is most discriminative for memorization.

Conclusion

The coordinate-wise curvature-difference framework delivers principled, fine-grained spatial localization of memorized regions in diffusion models. By subtracting intrinsic curvature of an underfitted baseline, the method distinguishes overfitting-driven memorization from mere data regularity. This advances both theoretical understanding and practical diagnostic tools for memorization in generative AI, and promises significant impact in privacy-preserving generation, model auditing, and mitigation strategies.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 9 likes about this paper.