Next Article in Journal
Analysis of Core–Periphery Structure Based on Clustering Aggregation in the NFT Transfer Network
Next Article in Special Issue
Latent Abstractions in Generative Diffusion Models
Previous Article in Journal
A Gentle Introduction to Lattice Field Theory
Previous Article in Special Issue
The Statistical Thermodynamics of Generative Diffusion Models: Phase Transitions, Symmetry Breaking, and Critical Instability
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

U-Turn Diffusion

by
Hamidreza Behjoo
and
Michael Chertkov
*
Program in Applied Mathematics, Department of Mathematics, University of Arizona, Tucson, AZ 85721, USA
*
Author to whom correspondence should be addressed.
Entropy 2025, 27(4), 343; https://doi.org/10.3390/e27040343
Submission received: 4 March 2025 / Revised: 22 March 2025 / Accepted: 24 March 2025 / Published: 26 March 2025
(This article belongs to the Special Issue The Statistical Physics of Generative Diffusion Models)

Abstract

:
We investigate diffusion models generating synthetic samples from the probability distribution represented by the ground truth (GT) samples. We focus on how GT sample information is encoded in the score function (SF), computed (not simulated) from the Wiener–Ito linear forward process in the artificial time t [ 0 ] , and then used as a nonlinear drift in the simulated Wiener–Ito reverse process with t [ 0 ] . We propose U-Turn diffusion, an augmentation of a pre-trained diffusion model, which shortens the forward and reverse processes to t [ 0 T u ] and t [ T u 0 ] . The U-Turn reverse process is initialized at T u with a sample from the probability distribution of the forward process (initialized at t = 0 with a GT sample) ensuring a detailed balance relation between the shortened forward and reverse processes. Our experiments on the class-conditioned SF of the ImageNet dataset and the multi-class, single SF of the CIFAR-10 dataset reveal a critical Memorization Time T m , beyond which generated samples diverge from the GT sample used to initialize the U-Turn scheme, and a Speciation Time T s , where for T u > T s > T m , samples begin representing different classes. We further examine the role of SF nonlinearity through a Gaussian Test, comparing empirical and Gaussian-approximated U-Turn auto-correlation functions and showing that the SF becomes effectively affine for t > T s and approximately affine for t [ T m , T s ] .

1. Introduction

The fundamental mechanics of Artificial Intelligence (AI) involve a three-step process: acquiring ground truth (GT) data, modeling them, and then predicting or inferring based on the model. The core component of the prediction phase of generative AI is the generation of synthetic data.
The success of a generative AI model depends on how effectively it embeds information about synthetic data. In the emerging landscape of generative AI, this is achieved by leveraging the rich structure within these models. In particular, score-based diffusion (SBD) models [1,2,3] have emerged as a highly successful paradigm, currently representing the state of the art in image generation and competitive in other applications. SBD models excel due to their inherent structure, which consists of forward and reverse stochastic dynamic processes in an auxiliary time, enabling them to extract and redistribute information over time.
Remarkably, the principles underlying SBD models date back to earlier ideas from Stochastic Differential Equations (SDEs) by Anderson [4]. These principles allow for the design of a reverse process where the marginal probability distributions of images in the forward (noise-adding) and reverse (denoising) processes are identical by construction, and moreover preserve a detailed balance (DB) relation between the forward and reverse processes. This theoretical construct serves as a guiding principle for SBD models, enabling the redistribution of information from GT data, which forms the initial condition for the forward SDE. Over time, this information is encoded into the score function (SF) representing the re-scaled drift term in the reverse SDE, facilitating the generation of high-quality SD. Neural Networks (NNs) are employed to fit the exact SF, derived from Anderson’s work, for efficiency, avoiding memorization, and providing smoother representations dependent on the GT data.

1.1. Our Contributions

The concept of the U-Turn diffusion augmentation of a pre-trained SBD model arises from the intuition that the success of the SBD methodology is due to the reverse Stochastic Differential Equation (SDE) containing all necessary information to generate synthetic data. It also stems from addressing key questions essential to refining this approach: How is information about the GT samples distributed over time within the SF, which represents the drift term in the reverse SDE? Can we rigorously shorten the theoretically infinite time interval while preserving Anderson’s relations between statistics of the forward and reverse processes? How does the nonlinearity of the score function evolve over time? In the remainder of this subsection, we detail how this manuscript addresses each of these questions.
We investigate diffusion models of generative AI, focusing on generating new synthetic images from a probability distribution representing GT samples. A typical diffusion model consists of a forward noise-injecting phase, modeled as a linear Wiener–Ito stochastic process, which allows for analytical computation, and a reverse denoising phase, also a Wiener—Ito process but with a nonlinear drift term, requiring simulation to produce synthetic images. Our work centers on understanding how information about the GT samples, used to initiate the forward process, is encoded in the SF, which is approximated by an NN. The SF is crucial because it links the reverse process to the forward process: it is defined as the gradient of the log of the marginal probability distribution in the forward process at each point in time and is subsequently used as the drift term in the reverse process.
The main observation and contribution of this manuscript is that the essential information about the GT samples is primarily encoded in the SF during the initial stages of the forward process. This insight leads us to propose the U-Turn diffusion model (The original version of this manuscript was reported on arXiv in August 2023), which revises the original diffusion model by shortening both the forward process and the subsequent reverse dynamics. In this paper, we introduce a comprehensive theoretical analysis under the Gaussian assumption, which deepens our understanding of the U-Turn diffusion process. Additionally, we expand our experimental evaluation to include a broader range of datasets compared to our previous arXiv submission, thereby demonstrating the robustness and generality of our approach. In the U-Turn model, the reverse process becomes a detailed-balance conjugate of the forward process, requiring it to start from a sample of the marginal probability distribution at the forward process’s final, ‘U-Turn’ time, where the forward process is initialized with a GT sample. Notably, this construction allows for the creation of the U-Turn model directly from the original diffusion model’s score function without the need for retraining. While the U-Turn algorithm itself is described in Section 4, it is also prepared via a preliminary discussion, which can be viewed as a technical introduction to diffusion models, presented in Section 2.
Our second contribution, reported in Section 3, is the development of a toolbox of tests—the Kolmogorov–Smirnov Gaussianity test, SF amplitude test, and U-Turn auto-correlation tests—to determine the appropriate U-Turn time. These tests complement the standard Fréchet Inception Distance (FID) tests used to evaluate the quality of the diffusion models.
Third, and as reported in Section 4, we test the U-Turn scheme, as well as the aforementioned toolbox of tests on ImageNet datasets. Our experiments with the pre-computed/trained SF of the class-conditioned ImageNet dataset [5] led to the discovery of a critical U-Turn time, T m , which we refer to as the Memorization Time. Specifically, if the U-Turn time, T u , is shorter than T m , the new sample generated is close to the original GT sample used to initialize the reverse process at T u ; however, if T u > T m , a truly new sample is produced. We observe that T m varies across different classes within the ImageNet dataset. The schematic illustration of what U-Turn discovers in the case of a single-class score function is illustrated in Figure 1a.
Fourth, we conduct, in Section 5, experiments with the multi-class CIFAR-10 dataset and its pre-trained averaged over the entire dataset (that is not class-specific) SF from [5]. Here, in addition to observing the Memorization Transition, we identify a Speciation Transition [6] at time T s , where T s > T m . When the U-Turn time T u exceeds T s , the resulting image is not only distinct from the initial image but also belongs to a different class than the initial image. A schematic illustration of the U-Turn in the case of a multi-class score function is illustrated in Figure 1b.
The next two contributions, in particular the fifth one also discussed in Section 5, came from the follow-up experiments with the averaged-over-the-multi-class score function of the CIFAR-10 dataset. By inspecting synthetic samples, we observe that both T m and T s fluctuate rather significantly from class to class and even from sample to sample. This motivated us to analyze the U-Turn auto-correlation function, however now conditioned to a single GT sample and to a single class. We observe, now quantitatively, that the GT-sample-constrained U-Turn auto-correlation function fluctuates significantly from sample to sample; that is (using statistical physics terminology), not a self-averaged quantity. This lack of self-averageness persists, even though it became weaker, when we compare U-Turn auto-correlation functions (conditioned to a class of the GT sample) for different classes.
Six, we pose in Section 6 the question of whether the dynamic phase transitions at T m and T s are related to the nonlinearity of the SF. To investigate this, we develop a Gaussian Test and a related G-Turn algorithm, assuming the GT data are Gaussian or can be approximated by a Gaussian distribution, which then allows for an analytical expression of the U-Turn auto-correlation function. We observe that, while the empirical U-Turn auto-correlation functions evaluated on the ImageNet dataset and on the averaged-over-all-the-classes CIFAR-10 dataset are relatively close to the corresponding estimate for the U-Turn auto-correlation function computed within the Gaussian ansatz, there is still a notable divergence between them. A detailed examination of the U-Turn sampling procedure in the CIFAR-10 experiments leads to a key final observation: the score function becomes effectively linear for T u > T s , and it is approximately linear, however still with notable deviations from linearity detected via the FID test.
We also discuss the empirical results of applying the U-Turn diffusion to the case of a deterministic sampler (reversed process) in Section 7.
We conclude this paper in Section 8 by summarizing the results and sharing some path-forward ideas.

1.2. Related Work

In [7], the authors examined diffusion models from the perspective of symmetry breaking, revealing that the early stages of the reverse dynamics contributed minimally to generating new samples. Based on these observations, they proposed a “late start” strategy for the reverse process, which is similar to the U-Turn discussed in this paper. We consider this work and two other papers discussed next as foundational to our more systematic analysis presented here.
In [6], the authors—motivated by the analysis of a toy example where the GT data are sampled from a bimodal distribution represented by a mixture of two Gaussians reported in [8]—reported the emergence of the dynamic phase transitions of the memorization and speciation type. Even though Memorization Transition was reported earlier in the first version of our manuscript, our Speciation Transition analysis on the multi-class model as well as our analytic analysis of the diffusion in the case of the Gaussian GT data reported in this manuscript were inspired by the respective analyses of [6,8].
The phase transition methodology of statistical physics also became central to the “forward-reversed experiments” of [9], where the authors experimented with a setting similar to the U-Turn. They empirically reported a phase transition in the value of T u and provided some statistical physics estimations based on a mean-field approximation.
Another related method, called “boomerang”, was reported in [10]. This method focuses on generating images that closely resemble the original samples, whereas U-Turn diffusion aims to create distinctly different images that approximate i.i.d. samples from the entire dataset.

2. Technical Introduction: Score-Based Diffusion

We follow the SBD framework, as expounded in [1]. The SBD harmoniously integrates the principles underlying the “Denoising Diffusion Probabilistic Modeling” framework introduced in [11] and subsequently refined in [3], along with the “Score Matching with Langevin Dynamics” approach introduced by [12]. This seamless integration facilitates the reformulation of the problem using the language of Stochastic Differential Equations, paving the way to harness Anderson’s Theorem [4]. As elucidated in the following, this theorem assumes a principal role in constructing a conduit linking the forward and reverse diffusion processes.
Let us follow [1] and introduce the forward-in-time SDE for the vector x t = ( x t ; i | i = 1 , , d ) R d (where d is the embedding space for the data):
Forward : t [ 0 T ] : d x t = f ( x t , t ) d t + g ( x t , t ) d w t ,
and another reverse-in-time SDE:
Reversed : t [ T 0 ] : d y t = f ( y t , t ) · G ( y t , t ) G ( y t , t ) s ( y t , t ) d t + g ( y t , t ) d w ¯ t ,
where the drift/advection f : R d × R R d and diffusion g : R d × R R d × R d are sufficiently smooth (Lipschitz functions) and G ( y t , t ) = g ( y t , t ) g ( y t , t ) . Here, s ( x t , t ) x t log p ( x t , t ) is the so-called score function computed for the marginal probability distribution of the forward process (1) and utilized in Equation (2) to drive the reverse process. Both forward and reversed processes are subject to Ito regularization. w t and w ¯ t represent standard Wiener processes for forward and reverse in time, respectively.
The forward diffusion process transforms the initial distribution p data ( · ) , represented by samples, into a final distribution p T ( · ) at time T. The terms f ( x t , t ) and g ( x t , t ) in the forward SODE (1) are free to choose, but in the SBD approach, they are usually selected in a data-independent manner.
Anderson’s theorem establishes that the forward-in-time process and the reverse-in-time process have the same marginal probability distribution, provided that the reverse process is initiated at t = T with the marginal probability distribution identical to the marginal forward probability distribution evaluated at t = T . Note that Anderson’s theorem [4] actually establishes a stronger equivalence between the forward process (Equation (1)) and the reverse process (Equation (2)): not only do their marginal probability distributions coincide, but their transition probability kernels are identical as well. This result is analogous to the detailed balance (DB) condition in equilibrium statistical mechanics—where, for a system at equilibrium, the rate of transitions from state i to state j (weighted by the equilibrium distribution) equals the reverse rate—but here it is extended to the non-autonomous (time-dependent) setting of our diffusion processes. In contrast, alternative approaches such as the probability flow method of [1] yield a deterministic reverse process. In these cases, although the transition probabilities do not satisfy DB, the marginal distributions of the forward and reverse processes remain equal. The proof of Anderson’s Theorem relies on the equivalence of the Fokker–Planck equations derived for the direct (1) and inverse (2) dynamics:
t p + i f i p = 1 2 i j ( g g T ) i j p ,
t p + i f i p i p j ( g g T ) i j i g g T ) i j s j p = 1 2 i j ( g g T ) i j p ,
where i , j = 1 , , n x and we assume summation over repeated indexes, and we also dropped dependencies on x or y and on t in f , g , and s to make the notations lighter.
Inference, which involves generating new samples from the distribution represented by the data, entails initializing the reverse process (2) at a sufficiently large (but practically finite) t = T with a sample drawn from the normal distribution derived in the limit of T , p and then running the process reversed in time to reach the desired result at t = 0 . This operation requires accessing the SF, as indicated in Equation (2). However, practically obtaining the exact time-dependent SF is challenging. Therefore, we normally resort to approximating it with an NN parameterized by a vector of parameters θ : s θ ( · , t ) s ( · , t ) .
The NN-based approximation of the SF allows us to efficiently compute and utilize gradients with respect to the input data x at different times t, which is essential for guiding the reverse process during inference. By leveraging this NN approximation, we can effectively sample from the desired distribution and generate new images which are approximately i.i.d. from a target probability distribution represented by input data. This approach enables us to achieve reliable and accurate inference in complex high-dimensional spaces, where traditional methods may struggle to capture the underlying data distribution effectively.
Training: The NN s θ ( · , t ) can be trained to approximate s ( x t ) = x t log p t ( x t ) using, for example, the weighted Denoising Score Matching (DSM) objective [1]:
E t U ( 0 , T ) , x 0 p 0 ( · ) , x t p t ( · | x 0 ) λ ( t ) 2 x t log p t ( x t | x 0 ) s θ ( x t , t ) 2 2 .
In the experiments presented in this manuscript, we do not train the models ourselves. Instead, we leverage pre-trained models (score functions) from existing open-source work specifically [5], for class-conditioned ImageNet, which provides a separate score function for each class, and for multi-class CIFAR-10, which uses a single score function for the entire dataset. Our focus is primarily on analyzing and understanding the basic SBD scheme, and subsequently on improving it by proposing the U-Turn scheme and related modifications.

2.1. Choice of SBD—Time-Dependent Brownian Diffusion

In this manuscript, we choose to work with the simplest SBD model—the time-dependent Brownian diffusion: the drift term f ( x t , t ) is zero and the diffusion term g ( x t , t ) is space-independent but time-dependent in— 2 β t . This results, according to Equation (1), in the following explicit expression for the exact SF:
s ( x t , t ) = x log n = 1 N N x t | x ( n ) ; 2 I ^ 0 t d t β t ,
where n = 1 , , N indexes the GT samples; I ^ is the identity matrix; and N x | μ ; Σ ^ is the normal distribution of x with the mean vector μ and covariance matrix Σ ^ .
Two key remarks are warranted regarding the universality of the SBD approach and the selection of the SBD model.
First, we highlight that explicit expressions for the SF, such as the one presented in Equation (5), are a common feature across various SBD models. This explicit form of the SF eliminates the need to simulate the forward process, offering a significant computational advantage.
Second, an important observation in the field is that, while the details of the forward model are critical for practical implementation, the choice of the underlying model is surprisingly flexible. For instance, the basic model in Equation (5), which we employ in our experiments, reliably supports the generation of high-quality images across diverse settings.
We now turn to a discussion of the discretization and the selection of the β -protocol, addressing each in the context of the two pre-trained use cases developed in [5].

Pre-Trained ImageNet-64 and CIFAR-10

For the ImageNet-64 dataset, https://www.image-net.org/ (accessed on 1 August 2023), the total duration of the SBD process was set to T = 80 , with the time-dependent diffusion coefficient defined as β ( t ) = 2 t . The interval [ 0 , T ] was discretized into 255 non-uniform time steps, denoted as { t i } . Larger time steps were allocated during the early stages of the reversed SDE and progressively smaller steps in the later stages. Further details on this discretization can be found in Appendix D.1 of [5]. In this setup, the time dependence t = t i is indexed as i = 0 , , 255 .
We utilized the open-source data and code from [5], which eliminated the need to retrain the model to generate s θ ( x t ; t ) , an NN approximation of Equation (5). This significantly reduced computational overhead. The pre-trained model achieved an FID score of 1.36 using 511 Neural Function Evaluations (NFEs), corresponding to evaluating the NN version of Equation (5) twice per discretization step. In our implementation, we observed a slightly higher FID score of 1.42 for 50,000 generated images. Although this represents a marginal difference, it highlights the robustness of the original method and the reproducibility of the results reported in [5].
For the CIFAR-10 dataset, https://www.cs.toronto.edu/kriz/cifar.html (accessed on 10 August 2023), a similar SBD process was applied with T = 80 and β ( t ) = 2 t . The time interval [ 0 , T ] was discretized into 512 non-uniform steps { t i } , i = 1 , , 512 , with larger steps in the early stages of the reversed SDE and smaller steps in the later stages, following the approach of [5]. The pre-trained model achieved an FID score of 3.5 with 1024 NFE, where each discretization step involved evaluating the NN version of Equation (5) twice. In our implementation, the FID score was slightly higher at 3.65 for 50,000 generated images. This small deviation again underscores the robustness of the original approach and the reproducibility of the results.

3. Analysis of Basic SBD Model

In the following, and as custom in the field, we will extensively use the FID metric to evaluate the quality of images generated by basic diffusion models and their U-Turn counterparts. The FID measures the similarity between the distributions of GT and generated images by approximating them as normal distributions (see Appendix A.1 for details). Although the FID score does not assess whether the generated images are correlated with specific GT images, this approach is justified in the context of standard SBD modeling. In such models, the reverse process is initialized independently and identically distributed (i.i.d.) from a normal distribution, preventing the memorization of GT samples.
However, this logic does not apply to our task of analyzing how the ensemble of initial GT images, or a particular initial GT image, becomes forgotten over time as we advance with the forward SDE. To address this limitation in the analysis of SBD models, we introduce additional tests alongside the FID test: the Kolmogorov–Smirnov (KS) and norm of SF test. These tests are discussed and then applied in the following subsections to analyze the SBD models over 1000 generated samples of ImageNet, which serves as our first and class-specific/fixed working example. Later in the manuscript, we will also discuss applications of the tests to the multi-class CIFAR-10 data.

3.1. Kolmogorov–Smirnov Test

We employ the Kolmogorov–Smirnov (KS) Gaussianity test to evaluate the null hypothesis: “Is a single-variable marginal of the resulting multivariate distribution of x ( t ) at a given time t Gaussian?” To address this hypothesis, the KS test is applied to each single-variable marginal, defined as p t ( x k ) = d ( x x k ) p t ( x ) . For implementation details, refer to Appendix A.2.
The results of the KS analysis for the reverse process in the ImageNet experiment are shown in Figure 2.
We observe a smooth yet significant transition in the KS factor over time, starting around i 50 , where p t ( x t ) is far from Gaussian, and progressing to i 100 , where the distribution becomes much closer to Gaussian. This transition suggests that the process of encoding information from the GT samples into the time- and GT-sample-dependent score function is largely completed by i ≈ 100–200.
Interestingly, the initial level of non-Gaussianity differs across labels at i = 0 . However, as time progresses, the KS curves for different labels converge, becoming nearly identical. This indicates a uniform Gaussianization process across labels as the reverse process evolves.
Additionally, further “Gaussianization” is observed at i 225 , as evidenced by a decrease in the KS factor. It is important to note that the KS test evaluates only the Gaussianity of spatial marginals—associated with a single component of x . This restricted Gaussianity does not necessarily imply that the entire vector x follows a Gaussian distribution.
We also explored various bivariate KS tests, but these exhibited significant variability across tests. This variability motivates the exploration of additional quantitative methods, which are discussed in subsequent sections. The effective Gaussianity of the forward process at later times and the reversed process at early times will be revisited in Section 6 and Appendix B.

3.2. Average of the Normalized Score Function 2-Norm

The time dependence of the normalized 2-norm of the score function, averaged over multiple paths or instances of the reversed process, is presented in Figure 3. Details of this computation can be found in Appendix A.3.
Consistent with the dynamics observed in the Kolmogorov–Smirnov (KS) analysis (Figure 2), significant changes in the normalized score function 2-norm begin at approximately i ≈ 50 and are largely completed by i ≈ 100–150. This behavior suggests that, if the score function norm is used as a criterion, no substantial additional information about the GT samples is being encoded into the score function at later times.
These observations align with the trends and discussions presented in subsequent sections, further supporting the interpretation of different stages in the reverse process dynamics.

3.3. Insensitivity to Reverse Process Initialization

In standard SBD modeling, the reverse process is typically initialized with an i.i.d. sample drawn from the probability distribution of the forward process at time T, or at T if such a limit exists. This distribution is often a simple Gaussian. However, as demonstrated in Figure 4, the specifics of the reverse process initialization appear to have minimal impact on the generated output samples. The figure shows results obtained from the same model but initialized with different distributions.
This insensitivity to the specifics of reverse process initialization, combined with the early temporal saturation observed in both the KS and score function norm tests discussed in previous subsections, suggests the potential to shorten the durations of both the forward and reverse processes. Motivated by this observation, we shift our focus to exploring this approach in the next section.
Bridging Theory and Empirical Analysis: The theoretical framework developed in this and preceding sections rigorously characterizes the dynamics of the forward and reverse diffusion processes, highlighting key properties such as detailed balance and the evolution of the score function. To connect these theoretical insights with practical applications, the subsequent sections focus on empirical validation through image synthesis. In the next section, we introduce the U-Turn diffusion algorithm, which operationalizes the theoretical principles to improve computational efficiency and image quality. This transition not only demonstrates how abstract diffusion dynamics inform the design of our algorithm but also provides a clear pathway from mathematical analysis to tangible image analysis outcomes.

4. U-Turn

Motivated by the analysis in the preceding section, we introduce a modification of the basic SBD process, which we call U-Turn. Our analysis of the dynamics of the basic SBD process, particularly when run for a sufficiently long time ( i = 255 time steps in the ImageNet experiments), suggests that such an extended duration may not be necessary to generate high-quality images. Instead, we propose making a U-Turn: identifying an appropriate time T u (and equivalently discrete index i u < 255 ) and then initializing the reverse process using the SF as in Equation (2), or its NN approximation, at this shorter time. The initialization involves a sample generated from the explicitly known distribution p t ( · | x 0 ) = N ( · | 0 ; β ( t ) I ^ ) that is conditioned to a particular choice of a GT sample for x 0 . See Algorithm 1.
Algorithm 1: U-Turn
Require:  s θ ( x t , t ) – NN approximation of s θ ( x t , t ) defined by Equation (5); x 0 p GT , T u .
  •  Initialize the reversed process: y T u N ( · | x 0 ; β ( T u ) I ^ ) .
  •  Run the reversed process according to Equation (2).
  •  Output the newly generated/synthetic image y 0 .
The algorithm depends on T u , raising the significant question: how do we identify an optimal, or simply appropriate T u ? One option, suggested by the analysis in Section 3, is to introduce criteria based on one of the tests—a KS test or SF-norm test. For example, we can choose T u by setting the SF-norm such that its derivative reaches a predefined small value, indicating that the SF-norm stops changing.
Alternatively, we can experiment by scanning different values of T u . We can start by relying on both our visual perception and FID tests of the U-Turn.

4.1. Visual Examination on the ImageNet Model

Images generated using Algorithm 1 applied to the ImageNet dataset are displayed in Figure 5. These figures illustrate the evolution of output images in the U-Turn scheme as a function of T u , conditioned on the class (note that the class remains unchanged from the GT sample through to the initialization of the reverse process after the U-Turn).
A visual inspection reveals a transition around i u [ 150 , 200 ] , where the model shifts from reproducing the initial images observed at earlier times to generating new images from the same class at later times. We term this dynamic (phase) transition the Memorization Transition and denote the corresponding transition time as T m . Furthermore, within experiments displayed in the same column of Figure 5—each using a different T u but initialized with the same image and random seed for the reverse process—the transition appears relatively sharp. In other words, we consistently observe clear images rather than artifacts (e.g., noisy images or mixed representations). Notably, for T u > T m , the generated images vary with different values of T u within the same column.
Moreover, moving from one column to the next—which corresponds to different initial images and labels—reveals some significant variation in the specific time at which the transition T m occurs; that is, dependence on the GT sample and its class—see Section 5.2 for further discussion of the strong sensitivity to the GT sample.
In summary, based on our visual analysis of Figure 5, we conclude that to generate new images, a U-Turn at T u > T m is required. The value of T m appears to depend on both the class and the underlying SBD model.

4.2. FID Test: U-Turn vs. Artificial Initialization

Let us analyze the U-Turn quantitatively using the FID score. However, in addition to running the U-Turn algorithm in its basic form, as shown in Algorithm 1, we will experiment with replacing the U-Turn-specific initialization of the reverse process with y T u generated artificially—independently of the GT sample used in Algorithm 1. The results of these experiments are shown in Figure 6. Several useful observations can be deduced from these results.
First, we observe that a low FID score for the U-Turn alone is not indicative of the diversity of the generated images. When the U-Turn is made at a sufficiently small T u , a low FID simply corresponds to the memorization of the initial GT image. Conversely, when we test the FID of the U-Turn jointly with the initialization of the reverse process at the same T u , but with a sample independent of the GT image, these combined results indicate whether the respective T m has been reached. Specifically, if the two processes show comparable FID scores, then T u is optimal or close to optimal. We also see that if T u T m , a number of alternative initializations become comparable to the U-Turn in terms of their FID performance. Finally, all artificial initializations result in ridiculously large FID scores if T u is too short.
We conclude that the “U-Turn vs. artificial initialization” comparison provides an explicit method for finding the optimal U-Turn time, T m . For the ImageNet case, this suggests that i m 200 (the index of T m ).

4.3. Auto-Correlation Function of U-Turn

The approach described in the previous subsection, Section 4.2, is strong as it allows for a direct test of the U-Turn performance. This contrasts with the implicit suggestions for selecting T u based on KS and SF-norm tests, which track the temporal evolution within the basic SBD algorithm. However, one limitation of the “U-Turn vs Artificial Initialization” test in Section 4.2 is its empirical nature. We aim to design a test that explicitly refers to the U-Turn and relies on a measure of correlation loss within the U-Turn process between the GT sample and the resulting image. The following construction meets this requirement.
Here, we test the “independence” of the newly generated synthetic samples from their respective GT samples for U-Turns at different T u . Specifically, we compute the U-Turn auto-correlation (AC) function:
C U T ( T u ) = 1 N n = 1 N ( x ( n ) ( 0 ) ) T y ( n ) ( 0 ) x ( n ) ( 0 ) 2 ,
where x ( n ) ( 0 ) is the n-th sample from the GT, resulting in x ( n ) ( T u ) P forw . proc . ( · | T u ; x ( n ) ( 0 ) ) generated at t = T u and then used to initialize the reversed process at the same time, producing a sample path y ( n ) ( T u 0 ) that arrives at t = 0 as y ( n ) ( 0 ) . This type of AC function will decay with T u , allowing us to directly quantify when to stop based on a sufficiently small value, which may be dependent on the class.
The results for C U T ( T u ) are presented in Figure 7, which shows a monotonic decrease in C U T ( T u ) with increasing T u ( i u ) across all classes. We observe that the curves eventually saturate, though at values that vary considerably across classes. We attribute this phenomenon to certain distinctive features that may be relatively uniform within a given class—for example, the predominance of orange hues within the “oranges (fruits)” class—which can sustain higher U-Turn auto-correlations within the class even at a large  T u .
This observation suggests that the most reliable approach for determining T m might involve setting a threshold based on visual perceptions of image quality. However, this threshold should be adjusted according to the cross-correlation values within the class, specifically the value of the U-Turn auto-correlation function at the maximum time, C U T ( T = 255 ) . Based on this, as well as our visual assessment (see Figure 5), we propose a practical criterion by setting 1.2 × C U T ( T = 255 ) as the threshold, i.e., C U T ( T m ) = C U T ( T = 255 ) . For our test case with ImageNet, this threshold corresponds to approximately T m = i m 200 , though variations are observed across different classes.

4.3.1. Gaussian Approximation for the U-Turn Auto-Correlation Function

If the entire GT dataset were Gaussian, the U-Turn auto-correlation (AC) function could be computed analytically, as both the forward and reverse processes would also be Gaussian in this case. The respective computations are detailed in Appendix B. Using this Gaussian theory, we approximate the AC function for the GT dataset by computing its covariance while ignoring non-Gaussian contributions.
A comparison between Gaussian theory and the empirical evaluation of the U-Turn AC function for the entire ImageNet dataset (averaged across all classes) is shown in Figure 8. Notably, we observe a reasonably good fit between Gaussian theory and the empirically averaged curve. The close agreement between the two suggests that a global “annealed” characterization of the U-Turn behavior is Gaussian, effectively smoothing out sample-specific and class-specific variations which we saw above (in the main part of this subsection) analyzing the U-Turn AC function conditioned to classes.

5. Multi-Class—The Case of CIFAR-10

We now turn to discussing how the U-Turn approach, along with the performance tests introduced and analyzed thus far, performs in the case of an unsupervised multi-class setting; that is, when a single score function is used to train on datasets containing samples from multiple classes without accounting for the class label of each sample. We begin with a visual inspection of the U-Turn tested on the pre-trained multi-class but single SF CIFAR-10 model.

5.1. Visual Inspection and FID

Since our primary motivation for experimenting with CIFAR-10 is to gain a better understanding of the multi-class nature of the dataset and its representation within a single (cumulative) SF, we begin our visual analysis of Figure 9 by noting that, at sufficiently large values of T u , the U-Turn process starts generating images from different classes. This observation aligns with the predictions of [6] regarding the emergence of the Speciation Transition, it is worth noting, however, that the findings of [6] pertain to the standard SBD setting, not specifically our U-Turn modification. Therefore, a more accurate statement would be that we observe a generalization of the Speciation Transition predicted in [6] to the U-Turn setting. We estimate that, depending on the column (each representing experiments with the same initial image and progressively increasing values of T u from top to bottom), the transition occurs in the range T s [ 250 , 400 ] .
Interestingly, in some cases, images from new classes appear early on, but at larger values of T u , the original class can re-emerge. We attribute this to the fact that the probability of the initial state of the reverse process falling within the domain associated with the same label as the GT sample remains non-zero.
Next, we observe that memorization of the initial image ceases to be an issue at somewhat earlier times, which we naturally identify as the Memorization Transition, T m , noting that T m < T s . As in the previously discussed case with a single-class SF, the values of T m vary from column to column (from one initial GT sample to another) and are observed within the range T m [ 150 , 250 ] .
Turning our attention to image quality (which, as seen in Figure 5, remained consistently high across different T u values in our fixed-class ImageNet experiments), we find that in the multi-class case, image quality varies. In the memorization phase, when T u is relatively small, image quality is high—we consistently obtain outputs that are clear and legitimate images. However, as we progress to larger T u values, beyond the Memorization Transition but still before the Speciation Transition T s , we start to observe images within individual sequences (columns in Figure 9) that are less clear. Eventually, for sufficiently large values of T u > T s , the quality of the output images improves again.
The non-monotonic dependence on T u of the image quality is also seen quantitatively in Figure 10, where we show the FID score computed for CIFAR-10 as a function of T u in the U-Turn process.
In summary, our visual examination of Figure 9, complemented by the quantitative analysis of the FID in Figure 10, suggests a dynamic phase transition structure within the U-Turn scheme that generally aligns with the observations of [6] regarding dynamic phase transitions in the standard SBD model: we identify a Memorization Transition at T m and a Speciation Transition at T s , with T m < T s . However, we also report new findings specific to the U-Turn approach:
  • Both T m and T s vary depending on the initial GT sample.
  • The region between T m and T s appears somewhat blurry, with the potential for some newly generated samples to be noisy or ambiguous (a mix of images).
  • There may be more than one Speciation Transition—possibly a hierarchy of transitions, each corresponding to diffusion from the domain of the initial GT sample to a domain associated with a different class.

5.2. Conditional U-Turn: Quantitative Analysis

The concluding remark of the preceding subsection, based on the visual inspection of the newly generated images, should be treated as a hypothesis. Here, we aim to validate this hypothesis through a quantitative analysis, which involves evaluating the results using the U-Turn auto-correlation function introduced in Section 4.3.
Specifically, we select a particular GT image and initialize the U-Turn process using the same image. The resulting trajectories are recorded, and the conditional U-Turn auto-correlation function is computed using Equation (6) with N = 1 , corresponding to the selected GT sample. This procedure is repeated for a set of GT samples drawn from various classes, with representative results presented in Figure 11.
Our analysis of the conditional U-Turn auto-correlations reveals strong dependencies, not only on the class of the initial GT image but also on the specific GT image itself. For example, Figure 11 demonstrates that U-Turn auto-correlations conditioned on different samples—two GT samples from the “plane” class (left panel) and two GT samples from the “trucks” class (right panel)—exhibit noticeable differences both across classes and within samples of the same class.
In addition, Figure 11 compares these conditional U-Turn auto-correlations with their empirical class-averaged counterparts. The class-averaged curves are obtained by averaging the U-Turn auto-correlation functions over a large number of initial GT samples (1000 samples per class). This comparison highlights the variability induced by individual samples when compared to the smoother, class-averaged behavior.
Furthermore, we compute the U-Turn correlations under the assumption that the process is Gaussian, utilizing the formulas derived in Appendix B. This Gaussian approximation relies primarily on the covariance structure of the GT samples within each class. However, as shown in Figure 11, the Gaussian approximation fails to closely match the empirical class-averaged results, indicating that the reverse process introduces significant non-Gaussianity. This discrepancy underscores the complexity of the reverse dynamics, which cannot be captured through simple Gaussian assumptions.
In summary, the conditional U-Turn analysis underscores the dual influences of individual GT samples and class-level features on the resulting correlations. Moreover, it reveals the substantial nonlinearity (and thus non-Gaussianity) of the reverse processes.

5.3. From Sample-Conditional to Averaged U-Turn

We now extend the analysis of the U-Turn auto-correlation function, transitioning from the sample-conditional and class-conditional results to a fully averaged perspective over the CIFAR-10 dataset. In this case, we compute the U-Turn auto-correlation function empirically by averaging over all GT samples and across all classes within CIFAR-10. The corresponding results are shown in Figure 12.
In this figure, we compare the fully averaged empirical U-Turn auto-correlation function with its Gaussian counterpart derived under the assumptions outlined in Appendix B. Unlike the results observed for sample-specific and class-specific conditioning, where significant deviations and non-Gaussian effects were evident, the fully averaged U-Turn auto-correlation function exhibits a good agreement with the Gaussian approximation.
Recall that we previously reported the results of the U-Turn AC function analysis, averaged over classes, for the ImageNet dataset in Section 4.3.1. We now demonstrate that the effective Gaussianity of the class-averaged U-Turn AC function is not specific to the ImageNet dataset but is, in fact, a universal phenomenon, also observed in CIFAR-10.
This observation reveals that while the U-Turn auto-correlation function remains a highly informative object for characterizing the forward and reverse processes, it is not a self-averaged quantity in the statistical physics sense. Specifically, our earlier analysis demonstrated considerable variability, nonlinearity, and non-Gaussianity in the conditional U-Turn correlations. However, once averaged across all samples and classes (annealed averaging), these complexities are effectively smoothed out (lost), and the U-Turn behavior becomes almost indistinguishable from that predicted by a Gaussian approximation.

6. Gaussian Analysis and Gaussian- (G-) Turn

Appendix B introduces a Gaussian analysis that models GT data as Gaussian, extracting the covariance matrix Σ ^ 0 and computing U-Turn correlations under this assumption. This section extends the analysis to explore the nonlinearity and non-Gaussianity in empirical processes.
As discussed in Section 5.2, an analysis of the conditional U-Turn on CIFAR-10 data reveals that the reversed process is empirically nonlinear and non-Gaussian. Despite this, it is also natural to conjecture that linearity and Gaussianity emerge in the reverse process at least at sufficiently large times t ( T u > t > T s ) but may also be approximately correct at the moderate values of t [ T m , T s ] starting from the Memorization Time T m . This means that the U-Turn performed at T u > T s and event at T u [ T m , T s ] would therefore render the early stages of the reversed process approximately linear and Gaussian.
Motivated by these insights, we propose the G-Turn procedure, described in Algorithm 2.
Algorithm 2: G-Turn
Require:  s θ ( x t , t ) : NN approximation of s ( x t , t ) from Equation (5); Σ ^ 0 .
  • Initialize a hypothetical reversed process at T > T g (ideally T = ) with y T N ( · | 0 , I ) .
  • Compute (not simulate) y T g using the fully Gaussian procedure described in Appendix B, treating the forward process as Gaussian at t = T g with respective mean and variance. Use the time-shifted version of Equation (A6) for this computation.
  • Simulate y ( t [ T g 0 ] ) according to Equation (2), initializing at t = T g with the result from the previous step. This simulation follows the empirical (nonlinear) score function.
  • Output the generated synthetic image y 0 .
We applied Algorithm 2 to the unlabeled CIFAR-10 data, and the results are shown in Figure 13 and Figure 14. A visual examination of Figure 13 reveals that the conjecture described above indeed holds true—the G-Turn becomes successful only at sufficiently large values of T g , which we estimate to be compatible with the Memorization Time, T s . However, the quantitative analysis depicted in Figure 14 also suggests that the FID score of the G-Turn algorithm reaches the lowest value (correspondent to the performance of the original SBD algorithm) only when T g T s . The FID performance is worse (degrades) while still remaining to be reasonably satisfactory when T g [ T m , T s ] .
Note that Algorithm 2 may be compared to the approach described in [7], which initializes the reversed process at T g with a Gaussian sample where the mean and variance are computed empirically. In light of our discussion of DB in Section 2 (see the footnote), this approach is effectively equivalent to the G-Turn procedure described here.
Also, a related discussion in [13] addresses the linearization (or Gaussianization) of diffusion samplers. The authors analyze a deterministic reversed process (lacking stochastic components) and develop an analytical model assuming a Gaussian distribution with an arbitrary covariance matrix, represented via singular value decomposition to allow rank deficiency. They provide analytical expressions for the score function and propose approximations based on applying this model to singular value decompositions of actual GT data. A key empirical finding, consistent with ours, is that the linear score function model (the Gaussian approximation of the marginal distribution) holds at large times in the forward process (and early times in the reversed process) but fails during the earliest stages of forward evolution.

7. U-Turn for Deterministic Samplers

Although the U-Turn is most naturally applied when the diffusion in the reverse process matches that of the forward process—thus ensuring detailed balance, as extensively discussed above—it can also be utilized in scenarios where DB is broken. Specifically, the U-Turn can be applied to deterministic samplers. In this case, the right-hand side in Equation (4) is replaced by zero, the score function-dependent term on the left-hand side of the equation is multiplied by 1 / 2 , and respective corrections are made in Equation (2).
We illustrate the performance of the U-Turn for deterministic samplers in Figure 15 and Figure 16, applied, respectively, to models trained unconditionally (across multiple classes) on CIFAR-10 data and Flickr-Faces-HQ (FFHQ) data, https://github.com/NVlabs/ffhq-dataset (accessed on 10 August 2023).
Several observations can be made based on these results:
  • Lack of randomness in the output images: Examining the deterministic sampler for CIFAR-10 (Figure 15) and FFHQ (Figure 16), we observe that when the U-Turn occurs at T u > T m , there is no randomness (uncertainty) in the output image. For deterministic reverse processes, the resulting image remains unchanged with further increases in T u (at least for a sufficiently large T u ). This is in sharp contrast to stochastic reverse processes, which are the primary focus of this paper, where images generated for different values of T u exhibit noticeable variation.
  • Absence of Speciation Transitions in some cases: In some instances, no Speciation Transition is observed (e.g., in the case of a car, as shown in the third column of Figure 15). This suggests that Speciation Transitions may not always manifest in individual dynamics but could emerge in some form of averaged behavior.
  • Intermediate changes: in several cases (though not all), there is a range of U-Turn times during which changes in the output image are observed, despite the reverse dynamics being deterministic.
  • Class changes with increasing U-Turn time: in some instances, we observe that classes change multiple times as T u increases, potentially due to spontaneous and dynamic symmetry breaking.
These observations highlight unique aspects of applying the U-Turn to deterministic samplers and contrast them with the stochastic processes discussed earlier in this paper.

8. Conclusions and Future Work

In this work, we introduced the U-Turn diffusion model as an efficient augmentation of pre-trained score-based diffusion models. Our analysis revealed that by strategically shortening the forward and reverse processes, the U-Turn method retains essential information from the ground truth samples while generating high-quality synthetic images. In particular, we identified two critical time scales: the Memorization Time ( T m ) and the Speciation Time ( T s ), which mark distinct phases in the reverse process dynamics.
The proposed method offers several concrete benefits:
  • Computational efficiency: by reducing the duration of both the forward and reverse diffusion processes, the U-Turn model significantly lowers computational overhead while maintaining high image quality.
  • Controlled diversity: The U-Turn framework enables a controlled transition from memorization to speciation. This mechanism allows the generation of diverse synthetic images that preserve key features of the ground truth, thereby enhancing the overall utility of the generated data.
  • Integration with feature-based albumentation: Our method can be readily integrated into feature-based albumentation pipelines. By increasing the diversity and quality of augmented datasets, the U-Turn model has the potential to improve downstream tasks such as image classification and object detection.
  • Robustness across settings: extensive experiments on datasets such as ImageNet and CIFAR-10 demonstrate that the U-Turn approach consistently improves performance across different settings and model architectures.
It is important to note that our analytical insights are derived under the Gaussian assumption, which, while illustrative, does not fully capture the complexities of real-world non-Gaussian dynamics; addressing this limitation is a key direction for future research.
Our experimental results indicate that the U-Turn diffusion model not only accelerates the sampling process but also robustly maintains the essential characteristics of the original data, leading to enhanced synthetic data quality. Future work will focus on optimizing the integration of the U-Turn method within advanced image augmentation frameworks and exploring its application to a broader range of generative tasks.
We believe that these findings underscore the practical advantages of the U-Turn diffusion model and provide a more comprehensive understanding of the trade-offs involved in score-based diffusion processes.

Author Contributions

Conceptualization, H.B. and M.C.; investigation, H.B. and M.C.; software, H.B.; writing—review and editing, H.B. and M.C.; visualization, H.B. All authors have read and agreed to the published version of the manuscript.

Funding

All experiments were conducted on an A100 80 GB GPU provided by Jetstream2. We acknowledge the use of ACCESS/NSF cloud computing resources through the Discover grant “Innovation in Generative Diffusion Modeling” (MTH24000). This grant enabled our exploration of cutting-edge techniques in generative diffusion modeling, facilitated by Jetstream2’s high-performance computing capabilities.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

All data used in this paper are freely available on internet with proper citation in the paper.

Acknowledgments

We sincerely thank Giulio Biroli and Marc Mézard for engaging in many stimulating discussions on diffusion models and related approaches, which followed the publication of the first version of this report on arXiv.

Conflicts of Interest

The authors declares no conflict of interest.

Appendix A. Quality Metrics

Appendix A.1. The Fréchet Inception Distance

The FID is a widely used metric for evaluating the performance of generative models, especially in image generation. It measures the similarity between generated images and real images by comparing their feature representations obtained from a pre-trained Inception network [14].
Let x R n be a feature vector obtained from the final pooling layer of the Inception network for a given image. We assume that the feature vectors of real and generated images follow multivariate Gaussian distributions N ( μ r , Σ ^ r ) and N ( μ g , Σ ^ g ) , respectively.
The FID between the GT and generated/synthetic distributions is defined as
FID = μ G T μ g 2 2 + Tr Σ ^ G T + Σ ^ g 2 Σ ^ G T 1 / 2 Σ ^ g Σ ^ r 1 / 2 1 / 2
where μ G T and Σ ^ G T are the mean and covariance of the GT image features, μ g and Σ ^ g are the mean and covariance of the generated/synthetic image features, and Tr ( · ) denotes the trace of a matrix.

Appendix A.2. Kolmogorov–Smirnov Test

The Kolmogorov–Smirnov (KS) test is a non-parametric test used to determine if a sample comes from a specific distribution. We define the KS-ratio as the number of dimensions k for which the Gaussianity of the corresponding x k ( t ) is not confirmed, divided by the total number of dimensions (the cardinality of x ( t ) , which is 64 × 64 × 3 in our numerical experiments):
KS ( t ) = #   of p t ( x k ) failing the Gaussianity test cardinality of x .
We opted for the KS test over the Kullback–Leibler (KL) test for several reasons. Firstly, KL divergence is asymmetric and not a true distance metric, while the KS test is symmetric, assessing the maximum separation between the test and reference distributions. Secondly, the KS test is non-parametric, meaning it does not depend on the parameters of the benchmark distribution, unlike KL divergence. Thirdly, the KS test is computationally simpler and more suited for our analysis, which does not focus on distributions with non-trivial tails.
The one-sample KS test evaluates the hypothesis that a sample X 1 , X 2 , , X n comes from a specified probability distribution F ( x ) . The test statistic is the maximum distance between the empirical distribution function F n ( x ) and the hypothesized cumulative distribution function F ( x ) :
D n = sup x | F n ( x ) F ( x ) | .
The null hypothesis H 0 is that the sample comes from the specified distribution F ( x ) . The null hypothesis is rejected at a given significance level α if D n exceeds the critical value D α .
The critical values D α for the one-sample KS test depend on the sample size n and the chosen significance level α . The significance level α represents the probability of rejecting the null hypothesis when it is true. Common choices for α are as follows:
  • α = 0.01 (1% significance level).
  • α = 0.05 (5% significance level).
  • α = 0.10 (10% significance level).
For a given sample size n and significance level α , the critical value D α can be obtained from statistical tables or calculated using statistical software. Typical critical values for different sample sizes and significance levels are shown in Table A1.
Table A1. Critical values for the one-sample Kolmogorov–Smirnov test.
Table A1. Critical values for the one-sample Kolmogorov–Smirnov test.
Sample Size n α = 0.01 α = 0.05 α = 0.10
100.3680.4100.490
500.2300.1920.172
1000.1220.1360.163
10000.0380.0430.052
If the test statistic D n is greater than the critical value D α for the chosen significance level α , the null hypothesis is rejected, indicating that the sample does not come from the hypothesized distribution F ( x ) . Otherwise, if D n D α , the null hypothesis cannot be rejected at the chosen significance level [15,16,17].

Appendix A.3. Average of the Score Function 2-Norm

The normalized average of the score function 2-norm, denoted by S ( t ) , provides a way to analyze the evolution of the score function’s magnitude over time, relative to its initial state. By taking the expected value of the squared 2-norm of this score function and normalizing it by the expected value of the squared 2-norm at the initial time t = 0 , we obtain a dimensionless quantity S ( t ) . This normalization allows us to track the relative change in the score function’s magnitude as the system evolves, providing insights into the dynamics of the underlying probability distribution:
S ( t ) E x log p t ( x ) 2 E x log p 0 ( x ) 2 ,

Appendix B. Brownian Diffusion

In this Appendix, we provide detailed calculations for an SBD model where the forward process is modeled as Brownian diffusion—specifically, a model with zero drift and a time-evolving, space-independent variance.
Consider the case of a time-dependent Brownian motion where the forward dynamics
d x t = 2 β t d w t , x 0 N 0 , Σ ^ 0 ,
has no drift, therefore leading to a stochastic process with increasing variance, t t 0 :
x t | x t N x t , 2 I t t d s β s , x t N 0 , Σ ^ t , Σ ^ t Σ ^ 0 + 2 I 0 t d s β s .
Differentiating the dynamic variance and its inverse, we arrive at the following equations for the differentials:
d Σ ^ t = 2 I β t d t , d Σ ^ t 1 = 2 β t Σ ^ t 2 d t .
The reverse process is governed by
d y t = 2 β t Σ ^ t 1 y t d t + 2 β t d w ¯ t , y T u = x T u ,
where we accounted for the Gaussianity of the marginal probability distribution (of both forward and reverse processes—which are assumed equal by the definition of how we constructed the reverse process), x t log p t ( x t ) = Σ ^ t 1 x t .
Next, let us introduce the auxiliary dynamic variable, z t = Σ ^ t 1 y t [18], and utilizing Equation (A4), we arrive at
d z t = d ( Σ ^ t 1 ) y t + Σ ^ t 1 d y t = 2 β t Σ ^ t 2 y t d t + Σ ^ t 1 ( 2 β t Σ ^ t 1 y t d t + 2 β t d w ¯ t ) = 2 β t Σ ^ t 1 d w ¯ t ,
then resulting in
y t = Σ ^ t Σ ^ T u 1 y T u + Σ ^ t T u t 2 β s Σ ^ s 1 d w ¯ s = Σ ^ t Σ ^ T u 1 x 0 + 0 T u 2 β s d w s + Σ ^ t T u t 2 β s Σ ^ s 1 d w ¯ s ,
where the first and second lines express conditioning to y T u and to x 0 , respectively. Averaging Equation (A5) over the independent forward, w t , and reverse, w ¯ t , Wiener processes, we derive:
y t | y T u N Σ ^ t Σ ^ T u 1 y T u , Ω ^ t ; r , Ω ^ t ; r Var Σ ^ t t T u 2 β s Σ ^ s 1 d w ¯ s = Σ ^ t t T u 2 β s Σ ^ s 2 d s Σ ^ t = Σ ^ t Σ ^ s 1 | t T u Σ ^ t = Σ ^ t Σ ^ t Σ ^ T u 1 Σ ^ t , y t | x 0 N Σ ^ t Σ ^ T u 1 x 0 , Σ ^ t Σ ^ t Σ ^ T u 1 Σ ^ 0 Σ ^ T u 1 Σ ^ t .
The last formula results in the following expression for the U-Turn auto-correlation function:
C U T ( T u ) = E x 0 y 0 T x 0 E x 0 x 0 T x 0 = tr Σ ^ 0 2 Σ ^ T u 1 tr Σ ^ 0 .
Combining Equations (A2) and (A6), we derive the following expression for statistics of y 0 (not conditioned on x 0 ):
y 0 N 0 , Σ ^ 0 ,
which confirms what we expect (according to Anderson theory) that statistics of y 0 is exactly equal to statistics of x 0 at all values of T 0 .
We can also extend Equation (A6) to quantify correlations between y observed at any two different times within the reversed process:
0 t t : y t | y t N Σ ^ t Σ ^ t 1 y t , Σ ^ t Σ ^ t Σ ^ t 1 Σ ^ t .
Note that contrasting Equation (A9) for the transition probability from t to t in the reversed process to Equation (A3) for the transition probability from t to t in the forward process, and taking into account that the marginal probabilities at t and t (conditioned to x 0 ) are N ( x 0 , Σ ^ t ) and N ( x 0 , Σ ^ t ) , respectively, we confirm for our (admittedly very special example) that the detailed balance
p ( f ) x t | x t p ( x t ) = p ( r ) x t | x t p ( x t ) ,
proven in the general case in [4] holds (here in Equation (A10), p ( r ) · | · and p ( f ) · | · are notations for the transition probabilities in the forward and reversed processes described by Equation (A9) and Equation (A3), respectively.)

References

  1. Song, Y.; Sohl-Dickstein, J.; Kingma, D.P.; Kumar, A.; Ermon, S.; Poole, B. Score-Based Generative Modeling through Stochastic Differential Equations. In Proceedings of the International Conference on Learning Representations, Vienna, Austria, 4 May 2021. [Google Scholar]
  2. Rombach, R.; Blattmann, A.; Lorenz, D.; Esser, P.; Ommer, B. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 10684–10695. [Google Scholar]
  3. Ho, J.; Jain, A.; Abbeel, P. Denoising Diffusion Probabilistic Models. In Proceedings of the Advances in Neural Information Processing Systems, Vancouver, BC, Canada, 6–12 December 2020; Volume 33, pp. 6840–6851. [Google Scholar]
  4. Anderson, B.D.O. Reverse-time diffusion equation models. Stoch. Process. Their Appl. 1982, 12, 313–326. [Google Scholar]
  5. Karras, T.; Aittala, M.; Aila, T.; Laine, S. Elucidating the Design Space of Diffusion-Based Generative Models. In Proceedings of the Advances in Neural Information Processing Systems, New Orleans, LA, USA, 28 November–9 December 2022. [Google Scholar]
  6. Biroli, G.; Bonnaire, T.; de Bortoli, V.; Mézard, M. Dynamical regimes of diffusion models. Nat. Commun. 2024, 15, 9957. [Google Scholar] [CrossRef] [PubMed]
  7. Raya, G.; Ambrogioni, L. Spontaneous symmetry breaking in generative diffusion models. In Proceedings of the Thirty-Seventh Conference on Neural Information Processing Systems, Orleans, LA, USA, 10–16 December 2023. [Google Scholar]
  8. Biroli, G.; Mézard, M. Generative diffusion in very large dimensions. J. Stat. Mech. Theory Exp. 2023, 2023, 093402. [Google Scholar] [CrossRef]
  9. Sclocchi, A.; Favero, A.; Wyart, M. A phase transition in diffusion models reveals the hierarchical nature of data. arXiv 2024, arXiv:2402.16991. [Google Scholar] [CrossRef] [PubMed]
  10. Luzi, L.; Mayer, P.M.; Casco-Rodriguez, J.; Siahkoohi, A.; Baraniuk, R. Boomerang: Local sampling on image manifolds using diffusion models. Trans. Mach. Learn. Res. 2024. [Google Scholar] [CrossRef]
  11. Sohl-Dickstein, J.; Weiss, E.; Maheswaranathan, N.; Ganguli, S. Deep Unsupervised Learning using Nonequilibrium Thermodynamics. In Proceedings of the 32nd International Conference on Machine Learning, Lille, France, 7–9 July 2015; pp. 2256–2265. [Google Scholar]
  12. Song, Y.; Ermon, S. Generative Modeling by Estimating Gradients of the Data Distribution. In Proceedings of the Advances in Neural Information Processing Systems, Vancouver, BC, Canada, 8–14 December 2019; Volume 32. [Google Scholar]
  13. Wang, B.; Vastola, J. The unreasonable effectiveness of Gaussian score approximation for diffusion models and its applications. Trans. Mach. Learn. Res. 2024. [Google Scholar] [CrossRef]
  14. Heusel, M.; Ramsauer, H.; Unterthiner, T.; Nessler, B.; Hochreiter, S. GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium. Adv. Neural Inf. Process. Syst. (NeurIPS) 2017, 30, 6626–6637. [Google Scholar]
  15. Massey, F.J., Jr. The Kolmogorov-Smirnov test for goodness of fit. J. Am. Stat. Assoc. 1951, 46, 68–78. [Google Scholar] [CrossRef]
  16. Smirnov, N.V. Table for Estimating the Goodness of Fit of Empirical Distributions. Ann. Math. Stat. 1948, 19, 279–281. [Google Scholar] [CrossRef]
  17. Kolmogorov, A.N. Sulla determinazione empirica di una legge di distribuzione. Giornale Dell’Istituto Ital. Degli Attuari 1933, 4, 83–91. [Google Scholar]
  18. Pierret, E.; Galerne, B. Diffusion models for Gaussian distributions: Exact solutions and Wasserstein errors. arXiv 2024, arXiv:2405.14250. [Google Scholar]
Figure 1. Illustration of the U-Turn concept for (a) ImageNet and (b) CIFAR-10. Our analysis, based on newly introduced tests, reveals that making the U-Turn earlier is beneficial, but not too early. The dark yellow region indicates a small vicinity near the origin where the approximation of the score function by an NN is crucial to avoid memorization (i.e., generation of GT samples). The pink regions mark the range where Memorization Transitions, T m , occur. These transitions are observed in both single-class (ImageNet) and multi-class settings. In the multi-class case (with a single score function for the entire dataset), we also observe the Speciation Transition, T s , previously reported in [6] and depicted in light blue in the right figure. This schematic illustration emphasizes an important observation of this work: both T m and T s are not self-averaged. Instead, they fluctuate across GT samples and even between different realizations of the forward process—thus resulting in ranges (distributions).
Figure 1. Illustration of the U-Turn concept for (a) ImageNet and (b) CIFAR-10. Our analysis, based on newly introduced tests, reveals that making the U-Turn earlier is beneficial, but not too early. The dark yellow region indicates a small vicinity near the origin where the approximation of the score function by an NN is crucial to avoid memorization (i.e., generation of GT samples). The pink regions mark the range where Memorization Transitions, T m , occur. These transitions are observed in both single-class (ImageNet) and multi-class settings. In the multi-class case (with a single score function for the entire dataset), we also observe the Speciation Transition, T s , previously reported in [6] and depicted in light blue in the right figure. This schematic illustration emphasizes an important observation of this work: both T m and T s are not self-averaged. Instead, they fluctuate across GT samples and even between different realizations of the forward process—thus resulting in ranges (distributions).
Entropy 27 00343 g001
Figure 2. Kolmogorov–Smirnov (KS) test applied to the ImageNet dataset. Different colors represent different classes/labels: 008 (hen), 950 (orange), 698 (palace), and 762 (restaurant, eating house, and eatery).
Figure 2. Kolmogorov–Smirnov (KS) test applied to the ImageNet dataset. Different colors represent different classes/labels: 008 (hen), 950 (orange), 698 (palace), and 762 (restaurant, eating house, and eatery).
Entropy 27 00343 g002
Figure 3. Average of the normalized score function 2-norm test for ImageNet. Consistent with Figure 2, different colors represent different classes/labels.
Figure 3. Average of the normalized score function 2-norm test for ImageNet. Consistent with Figure 2, different colors represent different classes/labels.
Entropy 27 00343 g003
Figure 4. Results of running the reverse process with different initializations: Gaussian ( x T N ( 0 , I ) ), uniform ( x T Uniform [ 1 , 1 ] ), zero ( x T = 0 ), GT data ( x T p data ), and Bernoulli ( x T p Bernoulli ).
Figure 4. Results of running the reverse process with different initializations: Gaussian ( x T N ( 0 , I ) ), uniform ( x T Uniform [ 1 , 1 ] ), zero ( x T = 0 ), GT data ( x T p data ), and Bernoulli ( x T p Bernoulli ).
Entropy 27 00343 g004
Figure 5. ImageNet visualization: U-Turn at different times T u with inputs of the forward and reverse processes conditioned to the same class.
Figure 5. ImageNet visualization: U-Turn at different times T u with inputs of the forward and reverse processes conditioned to the same class.
Entropy 27 00343 g005
Figure 6. FID score of U-Turn and its variations with different initializations of the reverse process as a function of i u (the discrete index of T u ). The right sub-figure is a zoomed-in version of the left sub-figure.
Figure 6. FID score of U-Turn and its variations with different initializations of the reverse process as a function of i u (the discrete index of T u ). The right sub-figure is a zoomed-in version of the left sub-figure.
Entropy 27 00343 g006
Figure 7. ImageNet: U-Turn auto-correlation functions for C U T ( T u ) , defined in Equation (6), conditioned to labels and for each label evaluated over 1000 generated samples. See Figure 2 for description of the classes.
Figure 7. ImageNet: U-Turn auto-correlation functions for C U T ( T u ) , defined in Equation (6), conditioned to labels and for each label evaluated over 1000 generated samples. See Figure 2 for description of the classes.
Entropy 27 00343 g007
Figure 8. Fully averaged U-Turn auto-correlation functions for the ImageNet dataset, obtained empirically by averaging over all samples and classes, compared to the corresponding fully averaged Gaussian approximation from Appendix B.
Figure 8. Fully averaged U-Turn auto-correlation functions for the ImageNet dataset, obtained empirically by averaging over all samples and classes, compared to the corresponding fully averaged Gaussian approximation from Appendix B.
Entropy 27 00343 g008
Figure 9. Unconditional CIFAR-10 image generation. Forward dynamics (computations) are variance-exploding (driftless). Reverse dynamics (simulations) are discretized with 512 steps with stochastic samplers.
Figure 9. Unconditional CIFAR-10 image generation. Forward dynamics (computations) are variance-exploding (driftless). Reverse dynamics (simulations) are discretized with 512 steps with stochastic samplers.
Entropy 27 00343 g009
Figure 10. FID score as a function of T u in U-Turn process applied to CIFAR-10 data. Baseline corresponds to the FID score computed over the dataset for the standard SBD.
Figure 10. FID score as a function of T u in U-Turn process applied to CIFAR-10 data. Baseline corresponds to the FID score computed over the dataset for the standard SBD.
Entropy 27 00343 g010
Figure 11. U-Turn auto-correlation functions conditioned on individual GT samples compared to empirical class-averaged results and the Gaussian approximation from Appendix B. (Left panel) results for two distinct GT samples from the “plane” class of CIFAR-10. (Right panel) results for two distinct GT samples from the “truck” class of CIFAR-10. The analysis highlights the variability in U-Turn correlations across individual samples within the same class, as well as deviations from the Gaussian theoretical prediction.
Figure 11. U-Turn auto-correlation functions conditioned on individual GT samples compared to empirical class-averaged results and the Gaussian approximation from Appendix B. (Left panel) results for two distinct GT samples from the “plane” class of CIFAR-10. (Right panel) results for two distinct GT samples from the “truck” class of CIFAR-10. The analysis highlights the variability in U-Turn correlations across individual samples within the same class, as well as deviations from the Gaussian theoretical prediction.
Entropy 27 00343 g011
Figure 12. Fully averaged U-Turn auto-correlation functions for the CIFAR-10 dataset, obtained empirically using 5000 samples by averaging over all samples and across all classes, compared to the corresponding fully averaged Gaussian approximation from Appendix B. The close agreement between the two provides a global “annealed” characterization of the U-Turn behavior, effectively smoothing out sample-specific and class-specific variations.
Figure 12. Fully averaged U-Turn auto-correlation functions for the CIFAR-10 dataset, obtained empirically using 5000 samples by averaging over all samples and across all classes, compared to the corresponding fully averaged Gaussian approximation from Appendix B. The close agreement between the two provides a global “annealed” characterization of the U-Turn behavior, effectively smoothing out sample-specific and class-specific variations.
Entropy 27 00343 g012
Figure 13. Performance of the G-Turn Algorithm 2 on CIFAR-10. The score function is trained without class conditioning. Columns correspond to different trajectory paths while rows represent different values of T g .
Figure 13. Performance of the G-Turn Algorithm 2 on CIFAR-10. The score function is trained without class conditioning. Columns correspond to different trajectory paths while rows represent different values of T g .
Entropy 27 00343 g013
Figure 14. FID scores for the G-Turn Algorithm 2 applied to CIFAR-10, corresponding to the experimental setup visually illustrated in Figure 13.
Figure 14. FID scores for the G-Turn Algorithm 2 applied to CIFAR-10, corresponding to the experimental setup visually illustrated in Figure 13.
Entropy 27 00343 g014
Figure 15. Visual illustration of deterministic sampler for the U-Turn at different times T u over the unconditional (over classes) CIFAR-10 dataset [5].
Figure 15. Visual illustration of deterministic sampler for the U-Turn at different times T u over the unconditional (over classes) CIFAR-10 dataset [5].
Entropy 27 00343 g015
Figure 16. Visual illustration of the U-Turn at different T u in the scheme using the deterministic reverse process (sampler) is presented for the Flickr-Faces-HQ (FFHQ) dataset [5]. This dataset consists of 70,000 high-quality PNG images at 1024 × 1024 resolution and showcases significant variation in terms of age, ethnicity, and image backgrounds. Additionally, the dataset includes a diverse range of accessories such as eyeglasses, sunglasses, hats, and more.
Figure 16. Visual illustration of the U-Turn at different T u in the scheme using the deterministic reverse process (sampler) is presented for the Flickr-Faces-HQ (FFHQ) dataset [5]. This dataset consists of 70,000 high-quality PNG images at 1024 × 1024 resolution and showcases significant variation in terms of age, ethnicity, and image backgrounds. Additionally, the dataset includes a diverse range of accessories such as eyeglasses, sunglasses, hats, and more.
Entropy 27 00343 g016
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Behjoo, H.; Chertkov, M. U-Turn Diffusion. Entropy 2025, 27, 343. https://doi.org/10.3390/e27040343

AMA Style

Behjoo H, Chertkov M. U-Turn Diffusion. Entropy. 2025; 27(4):343. https://doi.org/10.3390/e27040343

Chicago/Turabian Style

Behjoo, Hamidreza, and Michael Chertkov. 2025. "U-Turn Diffusion" Entropy 27, no. 4: 343. https://doi.org/10.3390/e27040343

APA Style

Behjoo, H., & Chertkov, M. (2025). U-Turn Diffusion. Entropy, 27(4), 343. https://doi.org/10.3390/e27040343

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop