arXiv:2610.27754cs.LGOct 2026

Manuscript Offprint

arXiv:2610.27754

Detection of Memorization in Diffusion Models Through Thermodynamic Singularity

Iljung Kim, Kangwoo Park, Yung-Kyun Noh, Daniel D. Lee

Abstract

In diffusion models, proper distributional learning entails reversing a diffusion process over underlying density functions, whereas a key failure is memorization, in which the reverse process instead learns diffusion from individual training samples. We provide an analytical characterization of such memorized reverse processes, along with a criterion that detects the associated thermodynamic singularity. The proposed criterion reliably distinguishes between properly learned and memorizing networks across a range of neural network models designed to promote or mitigate memorization.

1 Introduction

High-fidelity generation with diffusion models has led to their widespread use, while also raising concerns about memorization. Memorization can be understood as overfitting to the forward diffusion dynamics, where the learned reverse process becomes tied to sample-specific trajectories originating from individual training samples. In the extreme, exact time-reversal of forward diffusion trajectories can reproduce training samples, resulting in limited diversity and generalization and introducing privacy risks [3, 15].

Detecting such behavior is not straightforward. Direct comparison between generated samples and training data has been widely used to assess memorization [16], but it requires access to the full training dataset and a suitable similarity metric. Several proxy measures of these overfitting have also been proposed, including those based on the training loss, the Hessian spectrum of the log density [7], and the difference between conditional and unconditional scores [19]. However, the measures based on these proxies are largely empirically motivated and rely on high-dimensional estimation, making them difficult to interpret in a principled manner and sensitive to noise.

In principle, these trajectories should reveal clear and observable differences between overfitted and properly learned networks. However, such differences diminish as the number of training samples grows, since the trajectory structure induced by individual samples becomes progressively smeared. Nonetheless, retrieval of training samples and the generation of new samples remain fundamentally different, and detecting the difference is important even in large datasets, as the possibility of reproducing training samples—even if small—can severely limit the applicability of the model.

In this paper, we provide a simple derivation using the equation of continuity, showing that the velocity field diverges in the diffusion of Dirac delta functions. This singularity, which can serve as a necessary condition for memorization, arises in all forward processes constructed from finite samples, regardless of sample size. Memorization in the reverse process cannot occur without learning this singularity, and this singularity provides a direct analytical characterization of the presence of memorization.

∗^{*}Corresponding authors

Preprint.

The mathematical analogy of the velocity field and its corresponding flux naturally leads to a thermodynamic quantity—the Helmholtz free energy of the diffusive process. The memorization characteristic can be interpreted using the instantaneous rate of change of the Helmholtz free energy over time, providing a principled and interpretable scalar measure that does not require access to training data. Using this rate of change as a criterion, the detection of memorization was effective across both overfitting and non-overfitting neural networks, outperforming conventional methods on synthetic and real-world datasets. In addition, we further propose a simple modification of the training loss function that suppresses excessive growth of the diffusive velocity above a predefined threshold based on the free energy rate, significantly reducing memorization without degrading the fidelity of generated samples.

The remainder of the paper is organized as follows. Section 2 derives the low-noise behavior of velocity fields associated with diffused delta functions. Section 3 introduces the thermodynamic criterion and its interpretation. Section 4 presents experiments on synthetic and real-world datasets, including memorization mitigation. Section 5 concludes.