Manuscript Offprint

arXiv:2610.34617

Valid Early Detection of Memorization in Diffusion Models

Yixiao Jing, Chia-Yu Hsu, Milad Hoseinpour, Zekai Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Diffusion models can sometimes reproduce examples from their training data, a phenomenon known as memorization. Existing memorization detection methods for unconditional diffusion models typically operate at a pre-selected timestep and therefore cannot adapt the detection time to the evolving denoising trajectory. Sequential monitoring enables adaptive detection but repeated testing across timesteps complicates trajectory-level false-alarm control. We study two ways of combining split conformal calibration with sequential monitoring for prompt-free memorization detection: per-step Bonferroni calibration and direct trajectory-level calibration of the maximum memorization score. The former controls repeated testing by splitting the false-alarm budget across timesteps, whereas the latter calibrates the event of ever crossing a threshold directly through the trajectory-level maximum. We evaluate this formulation on an unconditional CIFAR-10 EDM using two complementary per-step statistics based on geometry and representation spikiness. Experiments show that sequential monitoring improves the power–timing tradeoff over fixed-time detection. Compared with Bonferroni calibration, trajectory-level calibration achieves comparable detection power while using the false-alarm budget less conservatively and enabling earlier detection at higher noise levels.

Figure

Figure 1: Early warning before generation finishes. Top shows schematic comparison of fixed-time checks at a preselected step and adaptive alarms at trajectory-dependent steps. Intermediate panels show the model's denoised predictions at selected sampling steps. The memorized trajectory triggers its first alarm at step 8 of 18, while the generalized trajectory triggers no alarm. Final outputs are shown beside their nearest training images, with SSCD similarity scores.

1 Introduction

Diffusion models have demonstrated remarkable generalization capabilities, enabling the generation of diverse and novel images [Kadkhodaie et al., 2024, Zhang et al., 2024]. However, a growing body of research has shown that these models may also reproduce samples from their training data, a phenomenon known as memorization [Carlini et al., 2023, Somepalli et al., 2023a,b], which substantially reduces the novelty and privacy of the generated content.

Motivated by this concern, recent work has investigated the mechanisms and detection of memorization in diffusion models. One line of work focuses on understanding when and how memorization emerges during the denoising process. Research suggests that memorization is most pronounced during an intermediate stage of denoising [Dodson et al., 2026, Kaiser and Kollmann, 2026], while its effects become apparent near the end of the generation process [Biroli et al., 2024]. Although this line of work does not provide an explicit detection procedure, it offers important insights into when memorization-related signals emerge during denoising and suggests that informative statistics may emerge before its effects become apparent.

The second line of work focuses on distinguishing trajectories that ultimately lead to memorization. Existing detection methods fall into two groups. The first group is prompt-based, which exploits text-conditioning statistics and can enable early detection [Wen et al., 2024, Ren et al., 2024]. However, these methods are not applicable to unconditional diffusion. The second group is prompt-free, relying on geometric or representation-based statistics to detect memorization [Ross et al., 2025, Zhang et al., 2026]. Nevertheless, these approaches require the selection of a fixed noise level or timestep and are typically applicable only relatively late in the denoising process, while early detection can further enable inference-time mitigation before generation is completed [Wen et al., 2024]. Chen et al. [2024] instead monitor memorization similarity throughout denoising with time-dependent thresholds, but do not provide statistical control of trajectory-level false alarms.

This leaves a gap for prompt-free detection: fixed-time procedures cannot adapt the detection time to individual trajectories, whereas sequential monitoring enables such adaptivity but introduces repeated-testing effects. Figure 1 illustrates our goal of detecting memorizing trajectories during sampling without falsely alarming generalized trajectories. We study how split conformal calibration [Vovk et al., 2005, Angelopoulos and Bates, 2021] can be combined with sequential monitoring in this setting. We compare three strategies: fixed-time calibration, per-step Bonferroni calibration for sequential monitoring, and direct trajectory-level calibration of the maximum memorization score. The trajectory-level strategy calibrates the maximum score over the trajectory, treating the entire monitoring event as a single scalar statistic. We establish finite-sample false-alarm control for all three strategies and show empirically that sequential monitoring improves the power-timing tradeoff over fixed-time detection, while trajectory-level calibration is less conservative and enables earlier detection than per-step Bonferroni calibration.

References (35)

  • Angelopoulos and Stephen Bates (opens arXiv in a new tab)
  • Dynamical regimes of diffusion models
  • Extracting training data from diffusion models
  • Towards memorization-free diffusion models
  • Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation
  • Two calm ends and the wild middle: A geometric picture of memorization in diffusion models (opens arXiv in a new tab)
  • Generalization in diffusion models arises from geometry-adaptive harmonic representations
  • Diffusion models memorize in training — and generalize in inference (opens arXiv in a new tab)
  • Elucidating the design space of diffusion-based generative models
  • A self-supervised descriptor for image copy detection
  • Unveiling and mitigating memorization in text-to-image diffusion models through cross attention
  • A geometric framework for understanding memorization in generative models
  • Diffusion art or digital forgery? investigating data replication in diffusion models
  • Understanding and mitigating copying in diffusion models
  • Conformal prediction under covariate shift
  • Algorithmic Learning in a Random World
  • Detecting, explaining, and mitigating memorization in diffusion models
  • The emergence of reproducibility and consistency in diffusion models
  • Generalization of diffusion models arises with a balanced representation space
  • For trF (Eq
  • The scoring model uses a one-layer GRU with hidden dimension 64, followed by a linear head with sigmoid activation
  • a clean sample is perturbed by Gaussian noise with standard deviation $\sigma$, and larger $\sigma$ therefore corresponds to a noisier, less-denoised state
  • The resulting noise levels satisfy
  • We generate $N_{total} = 25000$ trajectories from independent random seeds
  • We split them at the trajectory level into $D_{fit}$, $D_{val}$, and $D_{test}$ with a 70%/15%/15% ratio, yielding 5572, 1198, and 1215 trajectories, respectively
  • After training, the scoring model is frozen
  • The EDM code and pretrained models are released under CC BY-NC-SA 4.0, and the SSCD codebase under the MIT License
  • The trajectories are therefore i.i.d
  • Conditioning on L = 0 is a selection operator applied identically to all trajectories, so the null pool remains exchangeable; calibration and evaluation trajectories are drawn from this common pool
  • Conditional on $\mathcal{D}_{\mathrm{fit}}$ and $\mathcal{D}_{\mathrm{val}}$, $Z = \max_t g(M_{1:t})$ is a fixed measurable map applied identically to every trajectory, and exchangeability is preserved under a common measurable transformation
  • The same qualitative behavior is observed: per-step Bonferroni calibration yields lower empirical FPRs, whereas trajectory-level max calibration uses more of the available false-alarm budget while maintaining high detection power
  • FPR, TPR, and mean decision noise level with standard deviation over five random splits are reported
  • ><tr><td>$\alpha$</td><td>Statistic</td><td>Calibration</td><td>FPR</td><td>TPR</td><td>$\bar{\sigma}_{\mathrm{dec}}\left(\uparrow\right)$</td></tr><tr><td rowspan=
  • For the per-step threshold $c_{t,\alpha/T}$ to be finite, the order statistic index must satisfy $k_{\alpha}^{\mathrm{Bon}} \leq n_{\mathrm{cal}}$, which requires
  • At $\alpha = 0.05$ and $T = 18$, these bounds are 359 and 19 respectively