Consistency Trajectory Models: Learning Probability Flow ODE Trajectory of Diffusion
Dongjun Kim, Chieh-Hsin Lai, Wei-Hsiang Liao, Naoki Murata, Yuhta Takida, Toshimitsu Uesaka, Yutong He, Yuki Mitsufuji, Stefano Ermon
Introduction
Deep generative models encounter distinct training and sampling challenges. Variational Autoencoder (VAE) (Kingma & Welling, 2013) can be trained easily but may suffer from posterior collapse, resulting in blurry samples, while Generative Adversarial Network (GAN) (Goodfellow et al., 2014) generates high-quality samples but faces training instability. Conversely, Diffusion Model (DM) (Sohl-Dickstein et al., 2015; Ho et al., 2020; Song et al., 2020b) addresses these issues by learning the score (i.e., gradient of log-density) (Song & Ermon, 2019), which can generate high quality samples. However, compared to VAE and GAN excelling at fast sampling, DM involves a gradual denoising process that slows down sampling, requiring numerous model evaluations.
Score-based diffusion models synthesize data by solving the reverse-time (stochastic or deterministic) process corresponding to a prescribed forward process that adds noise to the data (Song & Ermon, 2019; Song et al., 2020b). Although advanced numerical solvers (Lu et al., 2022b; Zhang & Chen, 2022) of Stochastic Differential Equations (SDE) or Ordinary Differential Equations (ODE) substantially reduce the required Number of Function Evaluations (NFE), further improvements are challenging due to the intrinsic discretization error present in all solvers (De Bortoli et al., 2021). Recent developments in sample efficiency thus focus on directly estimation of the integral along the sample trajectory, amortizing the computational cost of numerical solvers. Distillation models (Salimans & Ho, 2021) in Figure 1, exemplified by the Consistency Model (CM) (Song et al., 2023), presents a promising approach for estimating the integration with a single NFE (Figure 2). However, their generation quality does not improve as NFE increase, and there is no straightforward mechanism for balancing computational resources (NFE) with quality.
This paper introduces the Consistency Trajectory Model (CTM) as a unified framework simultaneously assessing both the integrand (score function) and the integral (sample) of the Probability Flow (PF) ODE, thus bridging score-based and distillation models (Figure 1). CTM estimates both infinitesimal steps (score function) and long steps (integral over any time horizon) of the PF ODE from any initial condition, providing increased flexibility at inference time. Its score evaluation capability accommodates a range of score-based sampling algorithms based on solving differential equations (Song et al., 2020b), expanding its applicability across various domains (Saharia et al., 2022a). In particular, CTM enables exact likelihood computation, setting it apart from previous distillation models. Additionally, its integral approximation capability facilitates the incorporation of distillation sampling methods (Salimans & Ho, 2021; Song et al., 2023) that involve long “jumps” along the solution trajectory. This unique feature enables a novel sampling method called -sampling, which alternates forward and backward jumps along the solution trajectory, with governing the level of stochasticity.
CTM’s dual modeling capability for both infinitesimal and long steps of the PF ODE greatly enhances its training flexibility as well. It allows concurrent training with reconstruction loss, denoising diffusion loss, and adversarial loss within a unified framework. Notably, by incorporating CTM’s training approach with -sampling, we achieve the new State-Of-The-Art (SOTA) performance in both density estimation and image generation for CIFAR-10 (Krizhevsky et al., 2009) (Figure 3) and ImageNet (Russakovsky et al., 2015) at a resolution of (Table 5).
Preliminary
In DM (Sohl-Dickstein et al., 2015; Song et al., 2020b), the encoder structure is formulated using a set of continuous-time random variables defined by a fixed forward diffusion processThis paper can be extended to VPSDE encoding (Song et al., 2020b) with re-scaling (Kim et al., 2022a).,
Sampling from DM involves solving the PF ODE, equivalent to computing the integral
where is sampled from a prior distribution approximating . Decoding strategies of DM primarily fall into two categories: score-based sampling with time-discretized numerical integral solvers, and distillation sampling where a neural network directly estimates the integral.
Any off-the-shelf ODE solver, denoted as (with an initial value of at time and ending at time ), can be directly applied to solve Eq. (1) (Song et al., 2020b). For instance, DDIM (Song et al., 2020a) corresponds to a 1st-order Euler solver, while EDM (Karras et al., 2022) introduces a 2nd-order Heun solver. Despite recent advancements in numerical solvers (Lu et al., 2022b; Zhang & Chen, 2022), further improvements may be challenging due to the inherent discretization error present in all solvers (De Bortoli et al., 2021), ultimately limiting the sample quality obtained with few NFEs.
Distillation Sampling
Distillation models (Salimans & Ho, 2021; Meng et al., 2023) successfully amortize the sampling cost by directly estimating the integral of Eq. (1) with a single neural network evaluation. However, their multistep sampling approach (Song et al., 2023) exhibits degrading sample quality with increasing NFE, lacking a clear trade-off between computational budget (NFE) and sample fidelity. Furthermore, multistep sampling is not deterministic, leading to uncontrollable sample variance. We refer to Appendix A for a thorough literature review.
CTM: An Unification of Score-based and Distillation Models
To address the challenges in both score-based and distillation samplings, we introduce the Consistency Trajectory Model (CTM), which seamlessly integrates both decoding strategies. Consequently, our model is versatile and can perform sampling through either SDE/ODE solving or direct prediction of intermediate points along the PF ODE trajectory.
CTM predicts both infinitesimal changes and intermediate points of the PF ODE trajectory. Specifically, we define as the solution of the PF ODE from initial time with an initial condition to final time :
can access any intermediate point along the trajectory by varying final time . However, with the current expression of , the infinitesimal change needed to recover the denoiser information (the integrand) can only be obtained by evaluating the -derivative at time , . Therefore, we introduce a dedicated expression for using an auxiliary function to enable easy access to both the integral via and the integrand via with Lemma 1.
When , is the solution of PF ODE at , initialized at .
Indeed, the ’s expression in Lemma 1 is naturally linked to the Taylor approximation to the integral:
for any . Here, it is evident that includes all residual terms in Taylor expansion, which turns to be the discretization error in sampling. The goal of CTM is to approximate this -function using a neural network and estimate the solution trajectory with the parametrization inspired by Lemma 1 as follows:
We remark that this parametrization satisfies the initial condition for free, leading to improved training stabilityEnsuring the initial condition’s satisfaction is crucial for stable training. Directly estimating with a network leads to rapid divergence, causing instability as the network output may deviate arbitrarily from the initial condition.. Appendix C.1 offers further insights into this parametrization.
2 CTM Training
To achieve trajectory learning, CTM should match the model prediction to the ground truth by
for any . We opt to approximate by solving the empirical PF ODE with a pre-trained score model . Our neural network is then trained to align with the reconstruction:
In a scenario with no ODE discretization and no score approximation errors, Solver perfectly reconstructs the PF ODE trajectory, and comparing the prediction and reconstruction in Eq. (3) leads at optimal , given sufficient network flexibility. The same conclusion holds by matching the local consistency:
where is stop-gradient. With the initial condition () satisfied, matching Eq. (4) avoids collapsing to the trivial solution (Proposition 4 in Appendix B.1).
To estimate the entire solution trajectory with higher precision, we introduce soft matching, illustrated in Figure 5, ensuring consistency between prediction from and the prediction from for any :
As , Eq. (3) enforces global consistency matching, i.e., a reconstruction loss.
As , Eq. (4) is local consistency matching. Additionally, if , it recovers CM’s distillation loss.
To quantify the dissimilarity between and and enforce Eq. (5), we could use either distance in pixel space or in feature space. However, the pixel distance may overemphasize the distance at large due to the diffusion scale, requiring time-weighting adjustments. Furthermore, feature distance requires a time-conditional feature extractor, which can be expensive to train. Hence, we propose to use a feature distance in clean data space by comparing
which leads the model’s prediction, at optimum, to match with the empirical PF ODE’s solution trajectory, defined by the pre-trained DM (teacher), see Appendix B (Propositions 3 and 5) for details.
3 Training Consistency Trajectory Models
Empirically, regularizing with improves score accuracy, which is especially important in large NFE sampling regimes.
On the other hand, CTM, distilling from the teacher model, is constrained by the teacher’s performance. This challenge can be mitigated with adversarial training to improve trajectory estimation. The one-step generation of CTM enables us to calculate the adversarial loss efficiently, in the similar way of conventional GAN training:
where is a discriminator. This adversarial training allows the student model (CTM) to beat the teacher model (DM). To summarize, CTM allows the integration of reconstruction-based CTM loss, diffusion loss, and adversarial loss
in a single training framework, by optimizing . Here, and are the weighting functions, see Algorithm 1.
Sampling with CTM
CTM enables score evaluation through , supporting standard score-based sampling with ODE/SDE solvers. In high-dimensional image synthesis, as shown in Figure 6’s left two columns, CTM performs comparably to EDM using Heun’s method as a PF ODE solver.
CTM additionally enables time traversal along the solution trajectory, allowing for the newly introduced -sampling method, refer to Algorithm 3 and Figure 7. Suppose the sampling timesteps are . With , where is the prior distribution, -sampling denoises to time with , and perturb this denoised sample with forward diffusion to the noise level at time . It iterates this back-and-forth traversal until reaching to time .
Our -sampling is a new distillation sampler that unifies previously proposed sampling techniques, including distillation sampling and score-based sampling.
Figure 7-(c): When , it becomes the deterministic distillation sampling that estimates the solution of the PF ODE. A key distinction between the -sampling and score-based sampling is that CTM avoids sampling errors by directly estimating Eq. (2). However, score-based samplers like DDIM (1st-order Euler solver) or EDM (2nd-order Heun solver) are susceptible to discretization errors from Taylor approximation, especially with small NFE. (the leftmost column of Figure 6). Deterministic nature as ensures the sample semantic preserved across NFE changes, visualized in the rightmost column of Figure 6.
Figure 7-(b): When , it generalizes the EDM’s stochastic sampler (Algorithm 2). Appendix B.3 shows that -sampling’s sample variances scale proportionally with .
The optimal choice of depends on practical usage and empirical configuration (Karras et al., 2022; Xu et al., 2023). Figure 8 demonstrates -sampling in stroke-based generation (Meng et al., 2021), revealing that the sampler with leads to significant semantic deviations from the reference stroke, while smaller values yield closer semantic alignment and maintain high fidelity. In contrast, Figure 9 showcases ’s impact on generation performance. In Figure 9-(a), has less influence with small NFE, but the setup with is the only one that resembles the performance of the Heun’s solver as NFE increases. Additionally, CM’s multistep sampler () significantly degrades sample quality as NFE increases. This quality deterioration concerning becomes more pronounced with higher NFEs, shown in Figure 9-(b), potentially attributed to error accumulation during the iterative long “jumps” for denoising. We explain this phenomenon using a 2-step -sampling example in the following theorem, see Theorem 8 for a generalized result for -steps.
Let and . Denote as the density obtained from the -sampler with the optimal CTM, following the transition sequence , starting from . Then D_{TV}\left(p_{\text{data}},p_{\bm{\theta}^{*},2}\right)=\mathcal{O}\big{(}\sqrt{T-\sqrt{1-\gamma^{2}}t+t}\big{)}.
When it becomes -steps, -sampling iteratively conducts long jumps from to for each step , which aggregates the error to be . In contrast, such time overlap between jumps does not occur in -sampling, eliminating the error accumulation, resulting in error, see Appendix C.2. In summary, CTM addresses challenges associated with large NFE in distillation models with and removes the discretization error in score-based models.
Experiments
We evaluate CTM on CIFAR-10 and ImageNet , using the pre-trained diffusion checkpoints from EDM for CIFAR-10 and CM for ImageNet as the teacher models. We adopt EDM’s training configuration for and employ StyleGAN-XL’s (Sauer et al., 2022) discriminator for . During training, we employ adaptive weights and , inspired by VQGAN (Esser et al., 2021) to balance DSM and GAN losses with the CTM loss. For both datasets, we utilize the DDPM architecture. For CIFAR-10, we take EDM’s implementation; and for ImageNet, CM’s implementation is used. On top of these architectures, we incorporate -information via auxiliary temporal embedding with positional embedding (Vaswani et al., 2017), and add this embedding to the -embedding. This training setup (Appendix D), along with the deterministic sampling (), allows CTM’s generation to outperform teacher models with NFE and achieve SOTA FIDs with NFE .
CIFAR-10 CTM’s NFE generation excels both EDM and StyleGAN-XL with FID of on conditional CIFAR-10, and CTM achieves the SOTA FID of with NFEs, surpassing all generative models. These results are obtained with the implementation based on the official PyTorch code of CM. However, retraining CM with this official PyTorch code yields FID of (unconditional), higher than the reported FID of . Additionally, CTM’s ability to approximate scores using enables evaluating Negative Log-Likelihood (NLL) (Song et al., 2021; Kim et al., 2022b), establishing a new SOTA NLL. This improvement can be attributed, in part, to CTM’s reconstruction loss when , and improved alignment with the oracle process (Lai et al., 2023a).
ImageNet CTM’s generation surpasses both teacher EDM and StyleGAN-XL with NFE 1, outperforming previous models with no guidance (Dhariwal & Nichol, 2021), see Figure 11 for the comparison of CTM with the teacher model. Notably, all results in Tables 5 and 5 are achieved within K-K training iterations, requiring only of the iterations compared to CM and EDM.
Classifier-Rejection Sampling CTM’s fast sampling enables classifier-rejection sampling. In the evaluation, for each class, we select the top 50 samples out of samples based on predicted class probability, where is the rejection ratio. This sampler, combined with NFE sampling, consumes an average of NFE . In Figure 10, CTM, employing cost-effective classifier-rejection sampling, shows a FID-IS trade-off comparable to classifier-guided results (Ho & Salimans, 2021) achieved with high NFEs of 250. Additionally, Figure 12 confirms that samples rejected by the classifier exhibit superior quality and maintain class consistency, in agreement with the findings of Ho & Salimans (2021). We employ the classifier at resolution of provided by Dhariwal & Nichol (2021).
2 Qualitative Analysis
CTM Loss Figure 13 highlights the advantages of employing the proposed soft consistency matching in Eq. (5) during CTM training. It outperforms the local consistency matching (Eq. (4)). Additionally, it demonstrates comparable performance to the global consistency matching (Eq. 3) with NFE , superior performance with large NFE. Furthermore, soft matching is computationally efficient, enhancing the scalability of CTM.
DSM Loss Figure 14 illustrates two benefits of incorporating with . It preserves sample quality for small NFE unless DSM scale outweighs CTM. For large NFE sampling, it significantly improves sample quality due to accurate score estimation. Throughout the paper, we maintain based on insights from Figure 14, unless otherwise specified.
GAN Loss Analogous to the DSM loss, Figure 15 illustrates the advantages of incorporating the GAN loss for both small and large NFE sample quality. Figure 11 demonstrates that CTM can produce samples resembling those of EDM (teacher), with GAN refining local details. Throughout the paper, we adopt the warm-up strategy for GAN training: deactivate GAN training with for warm-up iterations and then activate GAN training with , in line with the recommendation from VQGAN (Esser et al., 2021). This warm-up strategy is applied by default unless otherwise specified.
Conclusion
CTM, a novel generative model, addresses issues in established models. With a unique training approach accessing intermediate PF ODE solutions, it enables unrestricted time traversal and seamless integration with prior models’ training advantages. A universal framework for Consistency and Diffusion Models, CTM excels in both training and sampling. Remarkably, it surpasses its teacher model, achieving SOTA results in FID and likelihood for few-steps diffusion model sampling on CIFAR-10 and ImageNet , highlighting its versatility and process.
Acknowledgement
We sincerely acknowledge the support of everyone who made this research possible. Our heartfelt thanks go to Koichi Saito, Woosung Choi, Kin Wai Cheuk, and Yukara Ikemiya for their assistance.
References
Appendix A Related Works
DMs excel in high-fidelity synthetic image and audio generation (Dhariwal & Nichol, 2021; Saharia et al., 2022b; Rombach et al., 2022), as well as in applications like media editing, restoration (Meng et al., 2021; Cheuk et al., 2023; Kawar et al., 2022; Saito et al., 2023; Hernandez-Olivan et al., 2023; Murata et al., 2023). Recent research aims to enhance DMs in sample quality (Kim et al., 2022b; a), density estimation (Song et al., 2021; Lu et al., 2022a), and especially, sampling speed (Song et al., 2020a).
Fast Sampling of DMs
The SDE framework underlying DMs (Song et al., 2020b) has driven research into various numerical methods for accelerating DM sampling, exemplified by works such as (Song et al., 2020a; Zhang & Chen, 2022; Lu et al., 2022b). Notably, (Lu et al., 2022b) reduced the ODE solver steps to as few as -. Other approaches involve learning the solution operator of ODEs (Zheng et al., 2023), discovering optimal transport paths for sampling (Liu et al., 2022), or employing distillation techniques (Luhman & Luhman, 2021; Salimans & Ho, 2021; Berthelot et al., 2023; Shao et al., 2023). However, previous distillation models may experience slow convergence or extended runtime. Gu et al. (2023) introduced a bootstrapping approach for data-free distillation. Furthermore, Song et al. (2023) introduced CM which extracts DMs’ PF ODE to establish a direct mapping from noise to clean predictions, achieving one-step sampling while maintaining good sample quality. CM has been adapted to enhance the training stability of GANs, as (Lu et al., 2023). However, it’s important to note that their focus does not revolve around achieving sampling acceleration for DMs, nor are the results restricted to simple datasets.
Consistency of DMs
Score-based generative models rely on a differential equation framework, employing neural networks trained on data to model the conversion between data and noise. These networks must satisfy specific consistency requirements due to the mathematical nature of the underlying equation. Early investigations, such as (Kim et al., 2022c), identified discrepancies between learned scores and ground truth scores. Recent developments have introduced various consistency concepts, showing their ability to enhance sample quality (Daras et al., 2023; Li et al., 2023), accelerate sampling speed (Song et al., 2023), and improve density estimation in diffusion modeling (Lai et al., 2023a). Notably, Lai et al. (2023b) established the theoretical equivalence of these consistency concepts, suggesting the potential for a unified framework that can empirically leverage their advantages. CTM can be viewed as the first framework which achieves all the desired properties.
Appendix B Theoretical Insights on CTM
In this section, we explore several theoretical aspects of CTM, encompassing convergence analysis (Section B.1), properties of well-trained CTM, variance bounds for -sampling, and a more general form of accumulated errors induced by -sampling (cf. Theorem 2).
We first introduce and review some notions. Starting at time with an initial value of and ending at time , recall that represents the true solution of the PF ODE, and is the solution function of the following empirical PF ODE.
Here denotes the teacher model’s weights learned from DSM. Thus, can be expressed as
CTM’s practical implementation follows CM’s one, utilizing discrete timesteps for training. Initially, we assume local consistency matching for simplicity, but this can be extended to soft matching. This transforms the CTM loss in Eq. (7) to the discrete time counterpart:
In the following theorem, we demonstrate that irrespective of the initial time and end time , CTM , will eventually converge to its teacher model, .
Define . Assume that is uniform Lipschitz in and that the ODE solver admits local truncation error bounded uniformly by with . If there is a so that , then for any and
Similar argument applies, confirming convergence along the PF ODE trajectory, ensuring Eq. (4) with replacing :
Convergence of Densities.
In Proposition 3, we demonstrated point-wise trajectory convergence, from which we infer that CTM may converge to its training target in terms of density. More precisely, in Proposition 5, we establish that if CTM’s target is derived from the teacher model (as defined above), then the data density induced by CTM will converge to that of the teacher model. Specifically, if the target perfectly approximates the true -function:
Then the data density generated by CTM will ultimately learn the data distribution .
The uniform Lipschitzness of (and ),
The uniform boundedness in of : there is a so that
If for any , there is a such that . Let denote the pushforward distribution of induced by . Then, as , . Particularly, if the condition in Eq. (10) is satisfied, then as .
B.2 Non-Intersecting Trajectory of the Optimal CTM
CTM learns distinct trajectories originating from various initial points and times . In the following proposition, we demonstrate that the distinct trajectories derived by the optimal CTM, which effectively distills information from its teacher model ( for any ), do not intersect.
This implies that , for all .
Specifically, the mapping from an initial value to its corresponding solution trajectory, denoted as , is injective. Conceptually, this ensures that if we use guidance at intermediate times to shift a point to another guided-target trajectory, the guidance will continue to affect the outcome at .
B.3 Variance Bounds of γ𝛾\gamma-sampling
Suppose the sampling timesteps are . In Proposition 7, we analyze the variance of
resulting from -step -sampling, initiated at
Here, we assume an optimal CTM which precisely distills information from the teacher model for all , for simplicity.
where and is a Lipschitz constant of .
In line with our intuition, CM’s multistep sampling () yields a broader range of compared to , resulting in diverging semantic meaning with increasing sampling NFE.
B.4 Accumulated Errors in the General Form of γ𝛾\gamma-sampling.
We can extend Theorem 2 for two steps -sampling for the case of multisteps.
We begin by clarifying the concept of “density transition by a function”. For a measurable mapping and a measure on the measurable space , the notation denotes the pushforward measure, indicating that if a random vector follows the distribution , then follows the distribution .
Given a sampling timestep . Let represent the density resulting from N-steps of -sampling initiated at . That is,
B.5 Transition Densities with the Optimal CTM
In this section, for simplicity, we assume the optimal CTM, with a well-learned , which recovers the true -function. We establish that the density propagated by this optimal CTM from any time to a subsequent time aligns with the predefined density determined by the fixed forward process.
We now present the proposition ensuring alignment of the transited density.
Then for any and , .
This theorem guarantees that by learning the optimal CTM, which possesses complete trajectory information, we can retrieve all true densities at any time using CTM.
Appendix C Algorithmic Details
Our parametrization of is affected from the discretized ODE solvers. For instance, the one-step Euler solver has the solution of
Again, the solver scales with and multiply to the second term. Therefore, our is a natural way to represent the ODE solution.
For future research, we establish conditions enabling access to both integral and integrand expressions. Consider a continuous real-valued function . We aim to identify necessary conditions on for the expression of as:
for a vector-value function and that satisfies:
exists;
Starting with the definition of , we can obtain
Suppose that there is a continuous function so that
The second equality follows from the mean value theorem (We omit the continuity argument details for Markov filtrations). Therefore, we obtain the desired property 2). We summarize the necessary conditions on as:
We now explain the above observation with an example by considering EDM-type parametrization. Consider and c_{\text{out}}=c_{\text{out}}(t,s):=\Big{(}1-\frac{s}{t}\Big{)}. Then can be expressed as
Then, we can verify that satisfies the condition in Eq. (12) and that
The DSM loss with this becomes
However, empirically, we find that the parametrization of and other than the ODE solver-oriented one, i.e., and , faces training instability. Therefore, we set as our default design and estimate -function with the neural network.
C.2 Characteristics of γ𝛾\gamma-sampling
Connection with SDE When , a single step of -sampling is expressed as:
where . This formulation cannot be interpreted as a differential form (Øksendal, 2003) because it look-ahead future information (from to ) to generate the sample at time . This suggests that there is no Itô’s SDE that corresponds to our -sampler pathwisely, opening up new possibilities for the development of a new family of diffusion samplers.
Connection with EDM’s stochastic sampler We conduct a direct comparison between EDM’s stochastic sampler and CTM’s -sampling. We denote as Heun’s solver initiated at time and point and ending at time . It’s worth noting that EDM’s sampler inherently experiences discretization errors stemming from the use of Heun’s solver, while CTM is immune to such errors.
C.3 Trajectory Control with Guidance
We could apply -sampling for application tasks, such as image inpainting or colorization, using the (straightforwardly) generalized algorithm suggested in CM. In this section, however, we propose a loss-based trajectory optimization algorithm in Algorithm 4 for potential application downstream tasks.
Appendix D Implementation Details
Following Karras et al. (2022), we utilize the EDM’s skip scale and output scale for modeling as
where refers to a neural network that takes the same input arguments as . The advantage of this EDM-style skip and output scaling is that if we copy the teacher model’s parameters to the student model’s parameters, except student model’s -embedding structure, initialized with would be close to the teacher denoiser . This good initialization partially explains the fast convergence speed.
We use 4V100 (16G) GPUs for CIFAR-10 experiments and 8A100 (40G) GPUs for ImageNet experiments. We use the warm-up for hyperparameter. On CIFAR-10, we deactivate GAN training with until 50k training iterations and activate the generator training with the adversarial loss (added to CTM and DSM losses) by increasing to one. The minibatch per GPU is 16 in the CTM+DSM training phase, and 11 in the CTM+DSM+GAN training phase. On ImageNet, due to the excessive training budget, we deactivate GAN only for 10k iterations and activate GAN training afterwards. We fix the minibatch to be 11 throughout the CTM+DSM or the CTM+DSM+GAN training in ImageNet.
We follow the training configuration mainly from CM, but for the discriminator training, we follow that of StyleGAN-XL (Sauer et al., 2022). For calculation, we use LPIPS (Zhang et al., 2018) as a feature extractor. We choose and from the -discretized timesteps to calculate , following CM. Across the training, we choose the maximum number of ODE steps to prevent a single iteration takes too long time. For CIFAR-10, we choose and the maximum number of ODE steps to be 17. For ImageNet, we choose and the maximum number of ODE steps to be 20. We find the tendency that the training performance is improved by the number of ODE steps, so one could possibly improve our ImageNet result by choosing larger maximum ODE steps.
For calculation, we select of time sampling from EDM’s original scheme of . For the other half time, we first draw sample from and transform it using . This specific time sampling blocks the neural network to forget the denoiser information for large time. For calculation, we use two feature extractors to transform GAN input to the feature space: the EfficientNet (Tan & Le, 2019) and DeiT-base (Touvron et al., 2021). Before obtaining an input’s feature, we upscale the image to 224x224 resolution with bilinear interpolation. After transforming to the feature space, we apply the cross-channel mixing and cross-scale mixing to represent the input with abundant and non-overlapping features. The output of the cross-scale mixing is a feature pyramid consisting of four feature maps at different resolutions (Sauer et al., 2022). In total, we use eight discriminators (four for EfficientNet features and the other four for DeiT-base features) for GAN training.
Following CM, we apply Exponential Moving Average (EMA) to update by
However, unlike CM, we find that our model bestly works with or , which largely remedy the subtle instability arise from GAN training. Except for the unconditional CIFAR-10 training with , we set to be 0.999 as default. Throughout the experiments, we use , , , and .
D.2 Evaluation Details
For likelihood evaluation, we solve the PF ODE, following the practice suggested in Kim et al. (2022b) with the RK45 (Dormand & Prince, 1980) ODE solver of and .
Throughout the paper, we choose otherwise stated. In particular, for Tables 5 and 5, we report the sample quality metrics based on either the one-step sampling of CM or the sampling for NFE 2 case. For CIFAR-10, we calculate the FID score based on Karras et al. (2022) statistics. For ImageNet, we compute the metrics following Dhariwal & Nichol (2021) and their pre-calculated statistics. For the StyleGAN-XL ImageNet result, we recalculated the metrics based on the statistics released by Dhariwal & Nichol (2021), using StyleGAN-XL’s official checkpoint.
For large-NFE sampling, we follow the EDM’s time discretization. Namely, if we draw -NFE samples, we equi-divide $n\xi(\sigma_{\text{max}}^{1/\rho}+(\sigma_{\text{min}}^{1/\rho}-\sigma_{\text{max}}^{1/\rho})\xi)^{\rho}$. However, we emphasize the time discretization for both training and sampling is a modeler’s choice.
Appendix E Additional Generated Samples
As the score, , is integrable, the Fundamental Theorem of Calculus applies, leading to
F.2 Proof of Theorem 2
Define as the oracle transition mapping from to via the diffusion process Eq. (2). Let represent the transition mapping from the optimal CTM, and represent the transition mapping from the empirical probability flow ODE. Since all processes start at point with initial probability distribution and , Theorem 2 in (Chen et al., 2022) and from Proposition 9 tell us that for
Here (a) is obtained from the triangular inequality, (b) and (c) are due to and from Proposition 9, and (d) comes from Eq. (13).
F.3 Proof of Proposition 3
Consider a LPIPS-like metric, denoted as , determined by a feature extractor of . That is, for . For simplicity of notation, we denote as . Since , it implies that for any , , and
Then due to Eq. (14) and is an ODE-trajectory function that , we have
Notice that since , .
Indeed, an analogue of Proposition 3 holds for time-conditional feature extractors.
Let be a LPIPS-like metric determined by a time-conditional feature extractor . That is, for . We can similarly derive
F.4 Proof of Proposition 5
We first prove that for any and , as ,
We may assume so that , , and , as .
In particular, Eq. (15) implies that when
This implies that , the pushforward distribution of induced by , converges in distribution to . Note that since is uniform Lipschitz
is asymptotically uniformly equicontinuous. Moreover, is uniform bounded in . Therefore, the converse of Scheffé’s theorem (Boos, 1985; Sweeting, 1986) implies that as . Similar argument can be adapted to prove as if the regression target is replaced with .
F.5 Proof of Proposition 6
Fix a , the solution operator of Eq. (16) with an initial condition is defined as
Here . In particular, if , for all .
Assumptions (a) and (b) ensure the solution operator in Eq. (17) is well-defined by applying Carathéodory-type global existence theorem (Reid, 1971). We denote as . We need to prove that for any distinct initial values and starting from , . Suppose on the contrary that there is an so that . For , consider and . Then both and satisfy the following ODE
Thus, the uniqueness theorem of solution to Eq. (19) leads to , which means . This contradicts to the assumption. Hence, is injective.
On the other hand, consider the reverse time ODE of Eq. (16) by setting , , and , then satisfies the following equation
Similarly, we define the solution operator to Eq. (21) as
Here denotes the initial value of Eq. (21) and is the solution starting from . Due to the Carathéodory-type global existence theorem, the operator is well-defined and
For simplicity, let and . Also, denote the solutions starting from initial values and as and , respectively. Therefore, using a similar argument, we obtain
Proof of Proposition 6.
With the definition of , we obtain
F.6 Proof of Proposition 7
Let be an i.i.d. copy of . Then and are also independent. Thus, and .
The final equality follows the same reasoning as in Eq. (F.6). Likewise, we can apply the argument from Eq. (24) to show that
Therefore, .
Proof of Proposition 7.
Proposition 6 implies that is bi-Lipschitz and that for any
where . Proposition 7 follows immediately from the inequalities (F.6) and (F.6).
F.7 Proof of Proposition 9
is known to satisfy the Fokker-Planck equation (Øksendal, 2003) (under some technical regularity conditions). In addition, we can rewrite the Fokker-Planck equation of as the following equation (see Eq. (37) in (Song et al., 2020b))
where .
Now consider the continuity equation for defined by
Thus, Proposition 8.1.8 of (Ambrosio et al., 2005) implies that for -a.e. , the following reverse time ODE (which is the Eq. (2)) admits a unique solution on
Moreover, , for . By applying the uniqueness for the continuity equation (Proposition 8.1.7 of (Ambrosio et al., 2005)) and the uniqueness of Eq. (29), we have for . Again, since the uniqueness theorem with the given , we obtain for any and .