Classification Diffusion Models: Revitalizing Density Ratio Estimation

Authors: shahar  yadin
noam  elata
tomer  michaeli
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-12 16:45:27

Abstract: A prominent family of methods for learning data distributions relies on density ratio estimation (DRE), where a model is trained to *classify* between data samples and samples from some reference distribution. DRE-based models can directly output the likelihood for any given input, a highly desired property that is lacking in most generative techniques. Nevertheless, to date, DRE methods have failed in accurately capturing the distributions of complex high-dimensional data, like images, and have thus been drawing reduced research attention in recent years.  
In this work we present *classification diffusion models* (CDMs), a DRE-based generative method that adopts the formalism of denoising diffusion models (DDMs) while making use of a classifier that predicts the level of noise added to a clean signal. Our method is based on an analytical connection that we derive between the MSE-optimal denoiser for removing white Gaussian noise and the cross-entropy-optimal classifier for predicting the noise level. Our method is the first DRE-based technique that can successfully generate images beyond the MNIST dataset. Furthermore, it can output the likelihood of any input in a single forward pass, achieving state-of-the-art negative log likelihood (NLL) among methods with this property.

Main paper: 
 introduction: 
 A classical family of methods for learning data distributions relies on the concept of density-ratio estimation (DRE) [46] . DRE techniques transform the unsupervised task of learning the distribution of data into the supervised task of learning to classify between data samples and samples from some reference distribution [15, 4, 35, 7] . These methods have attracted significant research efforts over the years [27, 14, 35, 47] , particularly for their inherent capability to directly output the likelihood for any given input. However, to date, they have not succeeded in capturing the distribution of complex high-dimensional data, like natural images. Instead, their generative performance was demonstrated only on low-dimensional toy examples and on the simple MNIST handwritten digits dataset [28, 35, 7] . As illustrated in Fig. 1 , while the state-of-the-art DRE method, telescoping density-ratio estimation (TRE) [35] , succeeds in capturing the distribution of the MNIST dataset [28] , it fails on the slightly more complex CIFAR-10 dataset [26] .As opposed to DRE methods, denoising diffusion models (DDMs) [38, 19] have had unprecedented success in generative modeling of complex high-dimensional data, including images [9, 36] , audio [25, 5] , and video [12, 1] . This has made them perhaps the most prominent technique for learning data distributions in recent years, with applications in solving inverse problems [21, 37] , image editing [33, 16, 3, 20] and medical data enhancement [44, 8] , to name just a few. However, assessing the likelihood of data samples is a challenging task with DDMs; it requires many neural function 38th Conference on Neural Information Processing Systems (NeurIPS 2024). [35] (right) trained on MNIST and CIFAR-10. To date, DRE methods have failed to capture the distributions of complex, high-dimensional data, and have been demonstrated only on toy examples or on the simple MNIST dataset. The right pane shows results from TRE, the state-of-the-art DRE method, which fails to capture the distribution of CIFAR-10. CDM is the first DRE-based method that can successfully learn the distribution of images. evaluations (NFEs) to calculate the likelihood-ELBO [19] , or to approximate the exact likelihood using an ODE solver [43] .TREDDMs are based on minimum-MSE (MMSE) denoising, while DRE methods hinge on optimal classification. In this work, we develop a connection between the optimal classifier for predicting the level of white Gaussian noise added to a data sample, and the MMSE denoiser for cleaning such noise. Specifically, we show that the latter can be obtained from the gradient of the former. Utilizing this connection, we propose classification diffusion model (CDM), a generative method that combines the formalism of DDMs, but instead of a denoiser, employs a noise-level classifier. CDM is the first instance of a DRE-based method that can successfully generate images beyond MNIST (Fig. 1 ). In addition, as a DRE method, CDM is inherently capable of outputting the exact log-likelihood in a single NFE. In fact, it achieves state-of-the-art negative-log-likelihood (NLL) results among methods that use a single NFE, and comparable results to computationally-expensive ODE-based methods.Our experiments shed light on the reasons why DRE methods have failed on complex highdimensional data to date, and why CDM inherently avoids these challenges. Furthermore, we show that CDM can serve as a more accurate denoiser, in terms of MSE, than a DDM with a similar architecture. This typically translates into better FID scores. Representative generated samples are shown in Fig. 1 . We hope that our approach will spark new interest in DRE methods and ultimately unlock their full potential. 
density ratio estimation: 
 Learning data distributions via DRE was first proposed by Gutmann and Hyvärinen [15] . Their noise contrastive estimation (NCE) method uses the fact that the ratio between an unknown distribution p d (x) and a known reference distribution p n (x) can be extracted from the optimal binary classifier for discriminating samples from p d (x) and p n (x). Once this ratio is extracted from the classifier, it can be multiplied by the known p n (x) to obtain p d (x). Specifically, let C denote the class of a sample x, with C = 1, 0 corresponding to the event that x is a sample from p d (x), p n (x), respectively. The optimal classifier for predicting C from x outputs both P(C = 1|x) and P(C = 0|x). Using Bayes' rule, we can use these values to compute the density ratioEQUATIONwhere we assumed that the classes are balanced, so that P(C = 1) = P(C = 0) = 1 2 .Unfortunately, this method fails in practice when p d (x) and p n (x) differ significantly from one another, as is the case when p d (x) is the distribution of images and p n (x) corresponds to white Gaussian noise. This is because when training a classifier to discriminate between images and noise, the classifier can achieve very high accuracy even without learning meaningful information about images. When this point is reached, the weights of the classifier practically stop updating. Rhodes et al. [35] referred to this issue as the density-chasm problem, and suggested to overcome it by making the classification problem more difficult. To do so, their TRE method uses a sequence of distributions p x0 (x), p x1 (x), . . . , p xm (x), which are closer to one another, such that p xm (x) is the reference distribution and p x0 (x) is the target distribution. The intermediate distributions {p xi (x)} m-1 i=1 do not have to be known; the only requirement is that it would be possible to sample from them. For example, x i can be defined asx i = √ ᾱi x 0 + √ 1 -ᾱi x m, where x 0 ∼ p x0 , x m ∼ p xm , and ᾱi is a sequence that decreases from 1 to 0. Then, using (1), each ratio p xi (x)/p xi+1 (x) can be extracted by training a binary classifier to distinguish between samples from p xi (x) and p xi+1 (x), and the ratio between the target and the reference distributions can be calculated asEQUATIONWhile this method overcomes the density-chasm-problem for each pair of consecutive distributions, it still fails in learning the distribution of datasets that are more complicated than MNIST, as illustrated in Fig. 1 . This is because each ratio p xi (x)/p xi+1 (x) is extracted from a binary classifier trained only on inputs x from the distributions p xi and p xi+1 . For instance, the classifier producing the ratio p x0 (x)/p x1 (x) is trained on inputs close to the real data, while the one producing p xm-1 (x)/p xm (x) is trained on inputs close to the reference distribution. This can lead to a mismatch between training and test time, since at inference, all the ratios are evaluated at the same input x. Moreover, even if each individual ratio is nearly accurate, the accumulation of small errors can result in a significant overall error. Our method is also based on a classification objective, however it avoids these problems by employing an additional loss, which is based on our main result (Theorem 3.1).DDMs [38, 19] , are a class of generative models that sample from a learned target distribution by gradually denoising white Gaussian noise. More formally, DDMs generate samples by attempting to reverse a forward diffusion process with T steps that starts from a data point x 0 and evolves asx t = √ α t x t-1 + √ 1 -α t εt , t = 1, . . . , T, where {ε t } are iid standard Gaussian vectors. Samples along this forward diffusion process can be equivalently expressed asEQUATIONwhere ᾱt = t s=1 α s . The coefficients {α t } are taken to be such that {ᾱ t } is a monotonic sequence with ᾱT ≈ 1. This enforces the density p x T to be close to the normal distribution N (0, I).The reverse diffusion process is learned by modeling the distributions of x t-1 given x t as a Gaussian with meanEQUATIONand covariance σ t I, where ε θ (•, •) is a neural network and {σ t } are fixed hyperparameters. Training is done by minimizing the ELBO loss, which reduces to a series of MSE terms,EQUATION)At convergence to the optimal solution, the neural network approximates the timestep-dependent posterior meanEQUATIONTo generate samples, DDMs sample x T ∼ N (0, I) and then iteratively follow the learned reverse probabilities, terminating with a sample of x 0 . In more detail, at each timestep t, the model accepts x t and outputs a prediction of the noise ε t (equivalently, a prediction of the clean signal x 0 ), from which x t-1 is obtained by sampling from the reverse distribution. The process described above is that underlying the DDPM method [19] . Here we also experiment with DDIM [39] and DPM-Solver [32] , which follow a similar structure. A DDM functions as an MMSE denoiser conditioned on the noise level, whereas a CDM operates as a classifier. Given a noisy image, a CDM outputs a probability vector predicting the noise level, such that the t-th element in this vector is the probability that the noise level of the input image corresponds to timestep t in the diffusion process. A CDM can be used to output the MMSE denoised image by computing the gradient of its output probability vector w.r.t the input image, as we show in Theorem 3.1. 
method: 
 We start by deriving a relation between classification and denoising, and then use it as the basis for our CDM method. A summary of the notations we use can be found in App. A.Let the random vector x t be defined as in (3) for timesteps t ∈ {1, . . . , T } and set two additional timesteps, 0 and T + 1, corresponding to clean images and pure Gaussian noise, respectively. Namely, we define ᾱ0 = 1 and ᾱT +1 = 0. We denote the density of each x t by p xt (x). Our approach is based on training a classifier that takes as input a noisy sample x t and predicts its timestep t. Formally, let t be a discrete random variable taking values in {0, 1, . . . , T + 1}, with probability mass function p t (t) = P(t = t), and let the random vector x be the diffusion signal at a random timestep t, namely1 x = x t . Note that the density of each x t can be written as p xt (x) = p x|t (x|t) and by the law of total probability, the density of x is equal toEQUATIONWe are interested in a classifier for predicting t from x. It is well known that given any sample x drawn from (7) , the optimal such classifier (in terms of the cross-entropy loss) outputs the probability vector (p t|x (0|x), p t|x (1|x), . . . , p t|x (T + 1|x)), where p t|x (t|x) = P(t = t|x = x). As we now show, the denoiser in (6) corresponds to the gradient of this classifier. Theorem 3.1. Let F (x, t) = log(p t|x (T + 1|x)) -log(p t|x (t|x)) with t, x and x t as defined above.ThenEQUATIONregardless of the choice of the probability mass function p t , provided that p t (t) > 0 for all t.The proof, provided in App. B.1, consists of three key steps:• Using Bayes rule, we write p xt (x) as a function of p x T +1 (x) and the optimal classifier.• Then, we take the derivative of the log of both sides and use the fact that ∇ x log p x T +1 (x) has a closed form solution.• Finally, we use Tweedie's formula [34, 45, 11] to connect between ∇ x log p xt (x) andE[ε t |x t = x].Theorem 3.1 suggests that we may train a classifier and use its gradient as a denoiser according to relation (8) . This paradigm is illustrated in Fig. x 0 ∼ D, t ∼ U {0, . . . , T +1}, ε ∼ N (0, I)3:x t = √ ᾱt x 0 + √ 1 -ᾱt ε 4: F θ (x t , t) = f θ (x t )[T + 1] -f θ (x t )[t] 5: ε θ (x t , t) = √ 1 -ᾱt (∇ xt F θ (x t , t) + x t ) 6:take gradient step on 7: w ce L CE (t, f θ (x t )) + L MSE (ε, ε θ (x t ,F θ (x t , t) = f θ (x t )[T + 1] -f θ (x t )[t] 4: ε θ (x t , t) = √ 1 -ᾱt (∇ xt F θ (x t , t) + x t ) 5:if t > 1 then z ∼ N (0, I), else z = 0 6:x t-1 = 1 √ αt (x t -1-αt √ 1-ᾱt ε θ (x t , t))+σ t z 7: end for 8: return x 0 cross-entropy (CE) loss leads to poor results. This is because a classifier may reach a low CE loss even without learning the correct probability p t|x (t|x) for any t. This phenomenon can be observed in Fig. 3 , which illustrates the reason that existing DRE methods fail to capture the distribution of high-dimensional complex data like images. We discuss this in more detail in Sec. 4.1.To obtain the correct probability p t|x (t|x) for any t, we suggest training the classifier with a combination of a CE loss on its outputs, and an MSE loss on its gradient, according to relation (8) . The network's gradient can be efficiently computed using automatic-differentiation. Following Ho et al. [19] , we use the same weight for all timesteps in the MSE loss. Our full training scheme is described in Algorithm 1. Here, f θ (x)[t] denotes the model's t-th logit, which serves as an approximation for log p t|x (t|x) (up to an additive constant that cancels out in the SoftMax operation), andF θ (x, t) = f θ (x)[T + 1] -f θ (x)[t].The added timesteps, corresponding to entries 0 and T + 1 of the classifier, are trained only using the CE loss. This is because the prediction of the noise is trivial when t = T + 1 and meaningless when t = 0 (since there is no noise). Importantly, this behavior is automatically achieved without any modification to the algorithm. Specifically, in line 4 of the algorithm, F θ (x T +1 , T + 1) = 0, and in line 5, ε θ (x 0 , 0) = 0, preventing the MSE loss from updating the weights for these timesteps.Algorithm 2 shows how to generate samples with CDM using the DDPM sampler (a similar approach can be used with other samplers). Note that each step t in DDPM sampling using CDM is given byEQUATIONwhere z ∼ N (0, I). Therefore, each step steers the process in the direction that maximizes the probability of noise level t, while minimizing the probability of noise level T + 1. This can be thought of as taking a gradient step with size (1 -α t )/ √ α t , followed by a step in a random exploration direction with magnitude σ t , similarly to Langevin dynamics.To compute the likelihood of a given sample, DDMs are required to perform many NFEs in order to compute a lower bound on the log likelihood using the ELBO [19] , or can approximate the exact likelihood [43] using an ODE solver based on repeated evaluations of the network. In contrast, as a DRE-based method, a CDM is able to calculate the exact likelihood in a single NFE. In fact, a CDM can compute the likelihood w.r.t. the distribution p xt of noisy images, for any desired timestep t. Specifically, we have the following (see proof in App. B.3) Theorem 3.2. For any t ∈ {0, 1, . . . , T + 1},EQUATIONwhere N (•; 0, I) is the probability density function of a standard multivariate Gaussian distribution.Note that the first term in (10) only depends on the pre-selected probability mass function p t (which we choose to be uniform in our experiments), and the second term can be obtained from the t-th and (T + 1)-th entries of the vector at the output of the classifier (after applying SoftMax). This implies Since the SoftMax operator is invariant to an additive factor, we subtract the maximal value from the vector (i.e.,f θ (x t ) ← f θ (x t )-max(f θ (x t )))for visualization. We utilize the connection we developed between the optimal classifier and the MMSE denoiser to incorporate the MSE loss in DRE training, as depicted in Algorithm 1. As evident, without considering MSE, the prediction accuracy of the classifier is limited to the vicinity of the correct label, unlike the model trained using both CE and MSE, which yields accurate predictions globally. The essence of an optimal classifier lies in its capability to predict the correct probability vector for all entries, rather than solely for the correct label. As can be seen, this necessitates the incorporation of the MSE loss.that we can calculate the likelihood of any given image x w.r.t. to the density p xt of noisy images for any noise level t. In particular, p x0 is the density of clean images. Thus, by choosing t = 0 we can calculate the likelihood of clean images. In App. D we present a simple validation of our efficient likelihood computation by applying it to toy examples with known densities, allowing us to compute the analytical likelihood and verify that our computations align with theoretical expectations. 
experiments: 
 We train several CDMs on two common datasets. For CIFAR-10 [26] we train both a class conditional model and an unconditional model. We also train a similar model for CelebA [31] , using face images of size 64 × 64. In Sec. 4.1, we demonstrate why existing DRE methods fail on complex high-dimensional data like images, and show how the incorporation of the MSE loss in our method, according to Theorem 3.1, overcomes these challenges. In Sec. 4.2, we compare our method with pre-trained DDMs with similar architectures, to disentangle the benefits of our method from other variables. We evaluate the performance of CDM as a denoiser, assess its generation quality using FID [17] , and measure its likelihood modeling capabilities using NLL. Finally, in Sec. 4.3, we demonstrate the use of different noise schedulers, one specifically tuned for likelihood estimation, and one corresponding to the flow matching optimal-transport scheme [29, 30] . We show that incorporating these schedulers into our method leads to state-of-the-art NLL results among methods capable of outputting the likelihood in a single forward pass.In Theorem 3.1, we established that the MMSE denoiser corresponds to the gradient of the optimal noise-level classifier. A natural question is whether we can train our model only with the MSE loss.Unfortunately, the answer is negative. This is because the MSE achieved by the model does not change if we add a function of t to its output, as such an additive term vanishes when taking the gradient with respect to x. The CE loss is important for removing this degree of freedom. Namely, without the CE loss, the model can function as a denoiser but is useless for the purpose of outputing the likelihood in a single step.Can we train the model only with the CE loss, then? In theory, training the model only with the CE loss should be sufficient. However, as we will demonstrate next, incorporating MSE is crucial in practice for achieving an optimal classifier.Table 1 reports the MSE, CE and classification accuracy achieved by models trained with different losses. We emphasize that the model trained using only MSE in this comparison, is a CDM model trained using Algorithm 1, and is not equivalent to a DDM model trained using (5) . As evident from the table, when using only the CE loss, the MSE is high, and when using only the MSE loss the CE and classification accuracy are poor. An important point to notice is that even when training with the CE loss, the classifier's accuracy is rather low (though greater than the 0% achieved when training only with the MSE loss). This is a key prerequisite for making DRE methods work. Specifically, as shown in [35] , the classification problem should be sufficiently hard in order to avoid the densitychasm problem, otherwise the classifier can easily discriminate between the classes even without having learned the correct density ratio. Yet, as we illustrate next, only making the classification problem harder is still insufficient for learning the probability p t|x (t|x) with only the CE loss.Figure 3 shows the logits f θ (x t ) for noisy images with different noise levels, comparing a model trained using CE to a model trained with both CE and MSE. As can be seen, in both scenarios the prediction near the true label is the same, namely the CE works well in the vicinity of the correct noise level. However, the model trained without the MSE loss exhibits significantly higher predicted logits for more distant noise levels compared to the model trained using both CE and MSE. Moreover, the logits of the model trained without MSE do not decrease monotonically as the distance from the actual noise level increases, which is in contrast with the expected behavior. This demonstrates the importance of the MSE loss for obtaining good prediction globally. As can be seen in Theorem 3.1, the denoiser at timestep t depends on the predictions of the classifier in both the t-th and the (T +1)-th entries. Therefore, the addition of the MSE loss enforces the classifier to achieve accurate predictions in both entries, thereby ensuring accurate predictions globally.We compare our method with pre-trained DDMs of similar architectures. Since CDM is a classifier and DDM is a timestep-conditional denoiser, we take the architecture of our CDM to be identical to the DDM, except for altering the last two layers to output a vector of logits, and removing all timestep conditioning layers. These changes have a negligible effect on the number of parameters in the model. For more details please refer to App. C.As shown in Fig. 4 , the denoising performance of our CDM surpasses that of pre-trained DDMs at high noise levels, and is comparable to them at lower noise levels. These quantitative results are corroborated by the qualitative examples in Fig. 5 , which showcase image denoising results across various noise levels.The good denoising performance of CDM translates into high quality image generation. This is illustrated qualitatively in Fig. 1 , which shows samples from models trained on CelebA and on CIFAR-10 (unconditional). To quantitatively compare the generation quality of CDM to that of pre-trained DDMs, we use 50k FID [17] against the train-set. For both CDMs and DDMs, we compare images sampled using the DDPM [19] , DDIM [39] , and DPM-Solver (DPMS) [32] samplers, using 1000, 50, and 25 timesteps, respectively. The results, shown in Table 2 , demonstrate that CDM is at least comparable to pre-trained DDMs in image quality, outperforming them in most cases.Additionally, we evaluate CDM's effectiveness in applying classifier-free guidance (CFG) [18] for conditional sampling tasks. As expected, incorporating CFG improves image quality beyond unconditional generation, as reflected in the conditional CIFAR-10 FID results of Table 2 . More details and qualitative results are provided in Appendix C.5. These results showcase the effectiveness of CDM for image generation, showing it to be equal or better than a similar DDM. Finally, we calculate log-likelihoods and compare our NLL results to recent leading methods in Table 3 . CDM demonstrates comparable performance on NLL estimation for CIFAR-10 compared to DDMs. Notably, CDM stands out as a more efficient method than existing ones, requiring only a single forward pass for NLL computation. Table 3 also includes CDM(unif.), and CDM(OT) on which we elaborate in Sec. 4.3 below. These variants of our model, improve the NLL predictions and achieve state-of-the-art results among methods requiring a single step.To see the effect of using a timestep scheduler tuned for DRE tasks, we repeat the CIFAR-10 unconditional experiment, with a different noise scheduler. Following Rhodes et al. [35] we use the scheduler defined as √ 1 -ᾱt = t T +1 and choose T = 1000 similarly to our previous experiments. Utilizing this scheduler, we achieve a better NLL of 2.98 at the expense of a higher FID of 10.28, when using the DDIM sampler with 50 steps. This trade-off highlights that the scheduler optimal for learning the data distribution may not be ideal for sampling.To further explore the influence of the noise scheduler, we train and evaluate a CDM with the flowmatching optimal-transport (OT) scheduler [29, 30] on unconditional CIFAR-10. In this scheduler,x t = T -t T x 0 + t T ε t, where ε t ∼ N (0, I) and t ∈ {0, . . . , T }. This scheduler leads to a state-of-theart single-step NLL of 2.89 and to an FID of 7.07 with 1000 sampling steps. Please see App. B.4 for more details.Future research could explore schedulers aimed at further enhancing the NLL. Further analysis of the difference between the schedulers from a classification perspective can be found in App. E.2 
related work: 
 Using the concept of DRE for learning data distributions was initially studied by Gutmann and Hyvärinen [15] . Their noise contrastive estimation (NCE) method approximates the ratio between the density of the data distribution and that of white Gaussian noise. However, it struggles in practical scenarios where the gap between these distributions is large, as is the case for natural images [35] . Conditional noise contrastive estimation (CNCE) [4] is a slightly improved version of NCE, in which Table 2 : Image generation quality. We compare the FID (lower is better) achieved by a DDM and a CDM using three sampling schemes for CelebA and CIFAR-10. For conditional CIFAR-10 we train a DDM ourselves, as no model in the original implementation [19] [2] 3.45 100 FFJORD [13] 3.40 ∼3K MINTNET [41] 3.32 120 FLOWMATCHING [29] 2.99 142 VDM [22] 2.65 10K DDPM (L) [19] ≤3.70 1K DDPM (L simple ) [19] ≤3.75 1K DDPM (SDE) [43] 3.28 ∼200 DDPM++ CONT. [43] 2.99 ∼200 REALNVP [10] 3.49 1 GLOW [24] 3.35 1 RESIDUAL FLOW [6] 3 Telescoping density-ratio estimation (TRE), proposed by Rhodes et al. [35] , avoids direct classification between data and noise. Instead, it uses a gradual transition between those two distributions, and trains a classifier to distinguish between samples from every pair of adjacent densities. Such a classifier learns the ratio between adjacent distributions, and the overall ratio between the data and noise distributions is computed by multiplying all intermediate ratios.Choi et al. [7] extended this idea from a finite set of intermediate densities to an infinite continuum. This was accomplished by deriving a link between the density ratios for infinitesimally close distributions and the principles of score matching [23, 40, 42] , motivating the training of a model to predict the time score ∂ ∂t log p xt . In contrast, we draw a different connection which shows that an MMSE denoiser can be obtained as the gradient of an optimal noise level classifier. Also, to obtain the log ratio between the target and reference distributions, Choi et al. [7] need to solve an integral over the time-score using an ODE solver, while in our method this ratio can be calculated in a single NFE.Yair and Michaeli [47] extended the concept of TRE, proposing the training of a single noise level classifier instead of training a binary classifier for each pair of neighboring densities. While this method is conceptually similar to ours, our approach distinguishes itself by incorporating the MSE loss as outlined in Theorem 3.1. As demonstrated in our experiments, this proves to be crucial for achieving an optimal classifier and high-quality image generation. 
discussion and conclusion: 
 We developed an analytical connection between an MSE-optimal denoiser for removing white Gaussian noise and a cross-entropy-optimal classifier for predicting the noise level. We used this connection to propose CDM -a DRE based generative technique that is based on a noise-level classifier. Importantly, our classifier is trained using both a classification loss (CE) and a regression loss (MSE). We showed that this key component is what sets CDM apart from existing DRE based methods, and makes it the first instance of a DRE-based technique that can successfully generate images beyond MNIST.Our approach is not free of limitations. A key challenge is that CDMs can be more computationally expensive than DDMs. Indeed, while DDMs require a single forward pass for each denoising step, CDMs require both a forward pass and a backward pass. Nevertheless, the computational cost of performing a forward and a backward pass through a network depends on its architecture. In this work, we chose to use the same architecture as that used by DDPM [19] , in order to isolate the impact of our algorithmic approach from the choice of the model architecture when comparing to DDMs. However, an important future direction would be to explore architectures that are particularly optimized for CDMs and that alleviate the gap in computational complexity. Such architectures should have the property that performing a forward pass and a backward pass through them is computationally similar to performing only a forward pass in a regular DDM. This could potentially be achieved e.g., by relying only on the encoder part of the U-Net. However, we leave this exploration for future work.Broader Impact CDM is a generative model and thus may potentially suffer from the same limitations as other generative techniques. These include biases in the generated images, as well as malicious and offensive use, such as creating Deepfakes for disinformation. However, CDMs may also impact domains that rely on generative models in a positive way. This is because, different from most generative models, CDMs are able to compute the likelihood for any input in a single step. This may be used e.g., for out-of-distribution detection or for ranking the likelihoods of different restored images in image restoration tasks. Such capabilities may be crucial in fields like medical imaging.  
safeguards: 
 Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?Answer: [NA] Justification: The paper poses no such risks.Guidelines:• The answer NA means that the paper poses no such risks.• Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters. • Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images. • We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.12. Licenses for existing assets Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?Answer: [Yes] Justification: We used academic resources for data and models and cited accordingly.Guidelines:• The answer NA means that the paper does not use existing assets.• The authors should cite the original paper that produced the code package or dataset.• The authors should state which version of the asset is used and, if possible, include a URL. • The name of the license (e.g., CC-BY 4.0) should be included for each asset.• For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.• If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset. • For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided. • If this information is not available online, the authors are encouraged to reach out to the asset's creators. 
new assets: 
 Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?Answer: [NA]Justification: The paper does not release new assests.Guidelines:• The answer NA means that the paper does not release new assets.• Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc. • The paper should discuss whether and how consent was obtained from people whose asset is used. • At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file. 
crowdsourcing and research with human subjects: 
 Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?Answer: [NA]Justification: The paper does not involve crowdsourcing nor research with human subjects.Guidelines:• The answer NA means that the paper does not involve crowdsourcing nor research with human subjects. • Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper. • According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector. 
institutional review board (irb) approvals or equivalent for research with human subjects: 
 Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?Answer: [NA]Justification: The paper does not involve crowdsourcing nor research with human subjects.Guidelines:• The answer NA means that the paper does not involve crowdsourcing nor research with human subjects. • Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.• We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution. • For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review. 
 
 Appendix: F θ (x t , t) Model approximation of F (x, t) f θ (x t )[T + 1] -f θ (x t )[t] B Proofs B.1 Theorem 3.1 ProofUsing Bayes rule,EQUATIONIn particular, for t = T + 1, this relation readsEQUATIONCombining ( 11) and ( 12) yieldsEQUATIONTaking the logarithm of both sides, we haveEQUATIONTaking the gradient of both sides w.r.t x, and noting that the first term on the right hand side does not depend on x, we get thatEQUATIONSince p x T +1 (x) = N (x; 0, I), we have that ∇ x log(p x T +1 (x)) = -x. Therefore, overall we haveEQUATIONAs for the left hand side of (15), since x t = √ ᾱt x 0 + √ 1 -ᾱt ε t and ε t ∼ N (0, I), using Tweedie's formula [34, 45, 11] it can be shown thatEQUATIONFor completeness we provide the full proof for (17) in App. B.2. Substituting ( 16) into ( 17) and multiplying both sides by √ 1 -ᾱt givesEQUATIONwhich completes the proof.Note that the proof is correct for any choice of p t (provided that p t (t) > 0 for all t ∈ {1, .., T + 1}), since the term that depends on p t does not depend on x and thus drops when taking the gradient. In practice, as mentioned in the main text, we chose to use t ∼ U ({0, 1, ..., T + 1}).Let us show that if y = µx + σz with z ∼ N (0, I) statistically independent of x, then ∇ y log(p y (y)) = -1 σ E[z|y = y]. From the law of total probability,EQUATION)Taking the gradient w.r.t. y givesEQUATIONDividing both sides by p y (y), we getEQUATIONNow, substituting µ = √ ᾱt , σ = √ 1 -ᾱt , y = x t , y = x t , and z = ε t , leads toEQUATIONdemonstrating (17) .Substituting p x T +1 (x) = N (x; 0, I) into (13) leads toEQUATIONwhich proves Theorem 3.2.In the case of the flow matching optimal-transport scheduler [29, 30] , x t is defined asEQUATIONwhere ε t ∼ N (0, I) and t ∈ {0, . . . , T }. In this case, the objective of conditional flow matching is [29, 30 ]EQUATIONand the global minimum of this objective is achieved byEQUATIONWe will start by expressing this solution in terms of the optimal denoiser E[ε t |x t ]. Substituting ( 24) into ( 26) and using the fact thatEQUATIONNext, following exactly the same logic as in App. B.1, we can writeEQUATIONFinally, by substituting ( 28) into ( 27) we getEQUATIONFor a fair comparison, for each dataset we used the same architecture for our method and for DDMs.As baslines we took the pre-trained model for CelebA 64 × 64 from the DDIM Official Github [39] and the EMA pre-trained model for CIFAR-10 from the pytorch diffusion repository, who converted the pre-trained model from the Official DDPM implementation from tensorflow to pytorch.For conditional CIFAR-10 we trained the DDM model by ourselves because there exist no pre-trained models for CIFAR-10 capable of handling CFG. We used the same architecture from [19] for both models and trained them for the same number of iterations (more details are in App. C.2.2). To condition the model on class labels, we learned an embedding for each class using nn.Embedding and injected it at all points where the time embedding was originally applied. In the case of DDM, we added the class embedding to the time embedding, while for CDM, we replaced the time embedding with the class embedding.In contrast to DDM architectures, our model does not need the layers that process the timestep input so we removed them. In addition, our model outputs a probability vector in contrast to DDMs which output an image, therefore, we replaced the last convolution layer that reduces the number of channels to 3 in the original architecture by a convolution layers outputs 1024 and 512 channels for CelebA 64 × 64 and CIFAR-10, respectively. Following this layer, we performed global average pooling and added a linear layer with an output dimension of T + 2. The resulting change in the number of parameters is negligible.Inspired by Yair and Michaeli [47] , we added a non-learned linear transformation at the output of the network, which performs cumulative-summation (cumsum). This enforces (for the optimal classifier) the t-th output of the model before this layer to be log r t (x) = logp t|x (t|x)p t|x (t-1|x) = log p t|x (t|x)log p t|x (t -1|x) for t ̸ = 0 and r 0 (x) = log p t|x (0|x), so that after the cumsum layer, the t-th output is t i=0 log r i (x) = log p t|x (t|x).We trained the model for 500k iterations with a learning rate of 1 • 10 -4 . We started with a linear warmup of 5k iterations and reduced the learning rate by a factor of 10 after every 200k iterations. The typical value of the CE loss after convergence was ∼ 3.8 while the MSE loss was ∼ 0.0134 so we chose to give the CE loss a weight of 0.001 to ensure the values of both losses have the same order of magnitude. In addition We used EMA with a factor of 0.9999, as done in the baseline model. We trained the model for 500k iterations with a learning rate of 2 • 10 -4 . We started with a linear warmup of 5k iterations and reduced the learning rate by a factor of 10 after every 200k iterations. The typical value of the CE loss after convergence was ∼ 4.4 while the MSE loss was ∼ 0.03 so we chose to give the CE loss a weight of 0.001 to maintain values at the same order of magnitude. In addition, we used EMA with a factor of 0.9999, as done in the baseline model.For the CDM(unif.) model we used the same hyperparametes except for learning rate, which we set to 1 • 10 -4 .The CDM(OT) model was trained with the same hyperparameters, except for the learning rate, which was set to 1 • 10 -4 . Additionally, we trained the model without a learning rate schedule for 1M iterations, as the NLL continued to decrease beyond 500k iterations.Training the model on CelebA 64 × 64 takes 108 hours on a server of 4 NVIDIA RTX A6000 48GB GPUs. Sampling 50k images for FID calculation takes 16 hours on the same hardware.Training the model on CIFAR-10 takes 35 hours on a server of 4 NVIDIA RTX A6000 48GB GPUs. Sampling 50k images for FID calculation takes 9 hours with classifier free guidance and 5 hours without classifier free guidance on the same hardware.Following the models to which we compared, for all the datasets we normalized the images to the range [-1, 1] and applied random horizontal flip at training.We used CFG to sample conditioned examples in Sec. 4.2 following [18] . We trained our own conditional models on the CIFAR-10 dataset, both for DDM and for CDM, and used label dropout of 0.1. We selected the best parameter w for each method using a grid search over w = 0.25, 0.5, 0.75, 1. In Fig. 6 we show samples from the conditional model. Each row corresponds to a different class.As outlined in Sec. 3, we introduce additional timesteps, corresponding to x 0 , x T +1 , which are not present in DDMs. This inclusion is fundamental to our method formulation. Importantly, this addition does not alter the number of sampling steps, as we continue initiating the reverse process from t = T and finish it with the denoised result of t = 1, following the approach in DDM.We validate our efficient likelihood computation by applying it to toy examples with known densities, allowing us to compute the analytical likelihood and verify that our computations align with theoretical expectations.We start by experimenting with the uniform distributionsEQUATION3×32×32 with γ ∈ {0.25, 0.5, 1, 2, 3}. We trained a CDM separately for each of these densities following the procedure outlined in Algorithm 1. These distributions correspond to 32 × 32 color images of iid uniform noise. The probability density function (pdf) of the uniform distribution U -γ 2 , γ 2 is given byEQUATION)The pdf p γ (x) in the d-dimensional space is the product of the individual pdfs for each dimension. Since the dimensions are independent, the joint pdf is given byEQUATIONThe logarithm of the pdf p γ (x) is given by -d ln(γ). The log-likelihood is the expectation of ln p γ (x). Since ln p γ (x) is constant, its expectation is that constant. Therefore, the log-likelihood normalized by d is -ln(γ). In the left subplot of Fig. 7 we compare the analytical log likelihood computed using (32) with the estimated log likelihood by our model. Figure 8 : Comparison of denoising between a model trained using only CE and one trained using both CE and MSE. We note that the denoising results for the model trained using CE alone are poor, but are better for high noise levels than for lower ones. This resonates with our conclusion that models trained only with CE are only accurate near the real noise level: As denoising with CDM relies on Theorem 3.1, we would expect deteriorating denoising quality the further the real noise level is from T + 1, as f θ (x)[T + 1] is always used for denoising.To further validate our likelihood calculation, we tested it on toy examples of images with correlated pixels. Specifically, we used images of size 3 × 32 × 32 sampled from multivariate Gaussian distributions with µ = 0 and Σ ̸ = I. The normalized log likelihood per dimension for a multivariate Gaussian is given byEQUATION)We defined a sequence of distributions with Σ = √ 1 -γ Σ CIFAR-10 + √ γ I, where Σ CIFAR-10 is the empirical covariance matrix of the CIFAR-10 dataset, and γ ∈ {0, 10 -5 , 10 -3 , 10 -1 }. In the right subplot of Fig. 7 , we compare the analytical log likelihood computed using (32) with the estimated log likelihood by our model. First, to assess the classifier's performance, we present the confusion matrices of models trained with and without MSE loss in Fig. 9a . Notably, at lower noise levels, the classifier exhibits high confidence, while at higher noise levels, confidence diminishes. This finding corresponds to the DDPM scheduler [19] , which partitions the noise levels to be more concentrated for high timesteps and less concentrated for low timesteps. The similarity between the confusion matrices underlines that CE loss alone is adequate for accurate predictions around the real noise level. However, as demonstrated in the main text, this does not imply that the classifier is optimal in terms of learning the correct logits for any given t. In Fig. 9b , we illustrate that the uniform scheduler from [35] induces a uniform difficulty in classification across various noise levels. This is in contrast to the DDM scheduler, depicted in Fig. 9a , in which the classification difficulty increases with the noise level. Guidelines:• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact. • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster. • The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology. • If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).Note the distinction between the notations xt and xt. The former has a random noise level t, while the latter has a fixed noise level t. 


Decision: This paper focuses on diffusion-based generative models using density ratio estimation along with a classifier that predicts the level of noise that has been added to a data point in a TRE-like manner (transporting ratio estimation). By deriving analytical connections, the paper shows how to train noise-predicting classifiers using denoising score matching with the cross-entropy loss. The benefit is that log-likelihood of data can be estimated in one function evaluation.

The reviewers found the approach original and interesting enough to warrant publication at NeurIPS. The major contribution is a novel way to think about both density ratio estimation and diffusion models which the reviewers found to have a lot of potential. 

While these analytical connections were satisfying to reviewers, the generative performance of the method lags behind regular diffusion model approaches. Hence, the main benefit is to advance density-ratio methods, but this is not the most performant or promising class of methods, and is not the highest bar to compare against. Hence I find acceptance as a poster to be most appropriate.

Reviews: review: paper_summary: paper_summary: This work develops a new generative framework called the classification diffusion models (CDMs) based on the density ratio estimation (DRE), by establishing an interesting connection between the DDPM's denoiser and noise-predictive classifier, which also helps the exact likelihood computation in a single pass. As is claimed by authors, the proposed method is the first DRE-based technique to successfully generate images of the CIFAR-10 dataset.
strength_weakness: strength_weakness: 1. The main concern is the capability or potential of DRE-based methods to successfully learn data distributions, particularly when applied to datasets with large scales in practice. As is claimed by authors, the current development of DRE-based modeling is up to the CIFAR-10 dataset (MNIST before), which is too small to indicate the validity compared to more standard methods (e.g. DDPM). 
2. Another major concern is that CDMs can be more computationally challenging than DDPMs in sampling. According to Algorithm 2, CDMs require an extra backward propagation (BP) than DDPMs for each time step when denoising, which is quite expensive.
questions: questions: 1. Please provide more details of questions raised in the weaknesses section above.
2. Check minor grammar typos, e.g. in Line 258, " trains a classifiers...".
limitations: limitations: As is stated by authors, it is worthy to explore BP-friendly architectures to alleviate the computation inefficiency of CDMs.
paper_summary: paper_summary: This paper introduces a clever connection between Density Ratio Estimation (DRE) and Diffusion Models (DM), showing that optimal denoisers are also optimal noise classifiers. Doing so allows them to construct a new type of loss based on noise classification. This allows DRE methods to inherit the benefits of diffusion models, like strong sampling, while adding new capabilities like single step likelihood estimation.
strength_weakness: strength_weakness: The proposed approach is functionally equivalent to a diffusion model (using Eq. 8 and with necessary incorporation of MSE loss that matches typical diffusion models), so you might hope to see that you can substantially improve on diffusion models by adding the CE loss as a kind of regularizer. But there are several reasons why it isn't clear that this gives a susbtantial improvement. 
- The architecture has to be changed. There's no obvious way to get around that, but it does marginally affect the ease of use for these ideas, and the directness of comparisons (though on this point I agree with the authors' statement that they chose a minimal intervention).  
- MSE improvements (Fig. 4) are only marginally different in absolute terms, which is what matters for log likelihood. See some questions about this result. 
- The authors only used / compared with relatively old diffusion models, so it's not clear if modest benefits to MSE or FID in some cases would still be seen in more SOTA models. I would expect much more comprehensive experiments to support the idea that using CE loss can improve sampling (Table 2). 


The strongest claim of improvement is the single step likelihood calculation. However, there are three weaknesses associated with this result. 
Table 3 is a bit of a dubious comparison for two reasons. 
- Unlike the ELBO, it's not clear if the proposed estimator gives an upper bound on NLL. I suspect it doesn't. If there are errors in p(t|x), then because it shows up with both signs in Eq. 10, it could contribute to the error in either direction. So we are comparing bounds on NLL to an estimate of NLL which could look lower due only to error.  
- The NFE comparisons are also a bit dubious. Function evaluation complexity varies wildly between methods. We should have a fair comparison to the associated diffusion model with the same architecture, but it wasn't clear which one that is in the table. Though it's a bit moot as I wouldn't trust the result anyway, as we don't have a bound here. 
- A compelling application of the single step log likelihood evaluation was not discussed. If the log likelihood had been used and evaluated for some downstream application, it might have assuaged worries about the accuracy of the estimate. 


Minor comments:
- I didn't like the abstract sentence "directly output likelihood...lacking in most generative techniques", since most common generative techniques today do output likelihood. You clarify later what you mean by "directly" so it is Ok. I just wanted to say that it was off-putting on first read.
questions: questions: I was really surprised by the fact that your architecture has no timestep conditioning, but matches or outperforms DDMs that do have timestep conditioning in denoising MSE. Have I understood that correctly (i.e. that the DDM in Fig. 4 does have timestep conditioning?) If so, that seems like a really interesting conclusion for diffusion research, as the final appearance of the timestep only shows up in a simple way in Eq. 8, potentially leading to a simplification of other architectures. It would be interesting to see if this effect persists for stronger architectures. On the other hand, maybe the right way to interpret this result is that your architecture essentially outputs the result for all time-steps at once. Eq. 8 selects the correct one gets a score through backprop. Still, that may be an interesting possibility to try to explore for standard diffusion models. 

In Fig. 3, I can understand why the classifier is limited, but it wasn't totally clear to me why MSE helps. But there may not be an easy answer to that (besides the superficial one that it is a regularizer of some sort).
limitations: limitations: Limitations were well addressed.
paper_summary: paper_summary: A common approach for likelihood estimation is the density ratio estimation (DRE). DRE is a method of modeling the density of a target distribution (or data distribution) in the form of a density ratio with a known reference distribution. The standard normal distribution is often chosen as the reference. To train the density ratio models, a classification-based method called noise contrastive estimation (NCE) is generally used.

However, in high dimensions, the difference between the reference and the data distribution is large, making the classification problem very easy. Consequently, the model does not learn accurate density ratios. To overcome this saturation problem, some have proposed to create intermediate distributions between the target and reference, similar to diffusion models. For example, the transporting ratio estimation (TRE) first creates a bridge between the target and the reference distribution through their linear combinations. The density ratio between two adjacent timesteps—$t$ and $t+1$-th timestep—is trained using the NCE method. However, despite the diffusion-like modifications, TRE has failed to resolve the saturation problem in high-dimensional data.

Therefore, to overcome the limitation of the previous approaches and estimate the log-likelihood efficiently for the high-dimensional datasets, the paper proposes a novel DRE-based diffusion-based generative model. Most importantly, the paper proposes to predict the timestep $t$ for a given observation $x$—$p(t | x)$—when $x$ is sampled uniformly from all intermediate distributions in the bridge. It means that the model predicts how noisy the given input is, unlike the classification problems proposed in TRE. The paper highlights two important benefits of the proposed method.

First, the authors draw the analytical connection between the noise-predicting classifiers and the Bayes-optimal denoisers at each time step. This connection means conventional parameterizations in diffusion models, such as epsilon/score/denoiser, can also be written by the noise-predicting classifiers. Thus, the noise-predicting classifiers can be trained via denoising score matching (DSM) as well as the cross-entropy loss. This training overcomes the saturation problems that originated from classification-based training.

Second, even compared to the TRE, regardless of its scalability issue, the noise-predicting classifiers provide efficiency at the log-likelihood evaluation. The proposed method can estimate the log-likelihood of the (clean) data in one-g, while the TRE requires $T$-number of model evaluations.

In addition, the paper mentions a concurrent work that proposes a similar noise-predicting classifier, but the authors emphasize that the concurrent work didn't incorporate the DSM loss, which is the key ingredient of the proposed approach's scalability. 

Finally, the authors demonstrate the proposed method's effectiveness via various experiments, including generative modeling of image generation benchmark datasets.


------------------------
Update the rating from 7 to 8 after the authors' rebuttal
strength_weakness: strength_weakness: While the proposed method's originality and novelty are clear, its significance is still doubtful. While achieving efficient likelihood estimation is the primary motivation, the paper doesn’t provide sufficient discussion about it—instead, it focuses on demonstrating the improved generation performance of the proposed DRE-based method. Thus, the proposed method would be much more impactful if the authors could demonstrate what becomes available when the likelihood estimation for high-dimensional data works.

Additional discussion about the importance of the classification loss may seem required. It is clear that the time-prediction classifier links to the conventional denoiser parameterization, and thus, this connection equips the use of DSM to train the classifiers, which enables the proposed model's applicability to high-dimensional data. However, this also implies the possibility of training the proposed models without any classification objective.
questions: questions: N/A
limitations: limitations: N/A
paper_summary: paper_summary: This paper introduces a class of generative models based on neural networks which learn the conditional probability distribution of the noise level given a noisy image. It is trained by combining a maximum-likelihood (cross-entropy) objective with a denoising score matching objective. The resulting generative model can be sampled from by iterative denoising like in diffusion models, and also allows for direct likelihood evaluation (in principle).
strength_weakness: strength_weakness: The biggest weakness of the paper to me is the method used for likelihood evaluation, which has several issues:
- An implicit assumption in the paper is that the marginal distribution of the noise level learned by the model matches the correct one used during training, that is, $p_\theta(t) = p(t)$. Although reasonable, it is very difficult to verify, as it requires marginalizing over the high-dimensional variable $x$.
- There is no guarantee that the resulting density function (eq. (10)) is normalized (i.e., integrates to 1). This can lead to arbitrarily small _reported_ NLLs (potentially even smaller than the entropy of the data). Although the soundness of the approach is verified in a synthetic but high-dimensional example, I think it would be necessary to verify at least this property on a natural image dataset, though this is also very hard to do (but see below).
- There is also no guarantee that the density function in eq. (10) is the density of samples generated by the reverse diffusion (Algorithm 2). CDMs thus contain a priori two models of $p(x)$, one for sampling and one for likelihood evaluation, which could be different. I would also like to see in the final version of the paper (not for the rebuttal) a comparison between the NLLs of these two models on natural images (the latter can be evaluated with an integral along the sampling trajectory using the change of variable formula, as pointed out in the text). If they match, this also verifies that the reported densities are correctly normalized (see previous point).
- Finally, restricting NLL comparisons to "models where likelihood can be evaluated in single shot" seems slightly arbitrary, especially since here sampling is not in a single shot. It would make sense to allow a similar computational complexity for sampling from the model and evaluating the log-density at a data point.

I might be missing subtle details in my assessment though, and I would be happy to update my score if the authors point out misunderstandings.
questions: questions: - In the proposed approach, $t = T+1$ plays a special role, which seems slightly unsatisfying to me. Having correct log-density estimates using eq. (10) requires an accurate estimation of $\log p(T+1|x)$ for $x$ a clean image, which is very challenging as natural images are very far from typical realizations of Gaussian noise (unless the explicit form of the Gaussian density is enforced here?). However, the MSE loss (which indirectly involves $\nabla_x \log p_\theta(T+1|x)$) seems to fix this problem. Still, is there a way to avoid it altogether with a more symmetric formulation? I liked how the approach of Choi et al. elegantly solved it by considering a path $(x_t)$ of typical realizations of each $p(x|t)$, though I understand that in their setting log-density estimation requires computing a (one-dimensional) integral.

- Out of curiosity, what does Figure 3 look like when the model is trained with MSE loss only? A first observation is that one can add an arbitrary function of $t$ only to the model outputs without changing the MSE loss, so the predicted conditional distributions cannot be right. However, I wonder if this is the only degree of freedom: does the difference between the "true" and predicted $p(t|x)$ depend on $x$? If true, it would show that the CE objective just fixes this constant and is thus not so important.

- I am very puzzled by the DDM denoising result at high noise in Figure 4. Why would they be so bad? Predicting the mean of the dataset is really easy, so this is not a capacity issue but rather a training issue? And why CDM would be specifically better at large noise levels? Is this because $T+1$ plays a special role?

Minor suggestion:
I understand that the "classification" term comes from historical considerations in the density ratio estimation problem. However, it seems ill-adapted here: $t$ is really a continuous variable (which has been discretized, but this does not seem necessary), and therefore $p(t|x)$ is simply a probabilistic model of a conditional distribution that is trained by maximum-likelihood. The title of the paper also sets the incorrect expectation that it is about unifying diffusion models with image classifiers.
limitations: limitations: As mentioned in the discussion, an important aspect that is not studied in this paper is the architecture of the network to approximate $\log p(t|x)$. The community has extensively explored architecture to model scores $\nabla_x \log p(x|t)$, but architectures for energies have been much less studied. As rightfully pointed out, here $f$ is a UNet, so that $\nabla f$ is the gradient of a UNet and thus significantly differs from a UNet (which would be the goal to emulate score-based approaches). Let me suggest a few references that consider this problem:
- Tim Salimans and Jonathan Ho. Should EBMs model the energy or the score? In Energy Based Models Workshop-ICLR, 2021.
- Samuel Hurault, Arthur Leclaire, and Nicolas Papadakis. Gradient Step Denoiser for convergent Plug-and-Play. In International Conference on Learning Representations, 2021.
- Regev Cohen, Yochai Blau, Daniel Freedman, and Ehud Rivlin. It has potential: Gradient-driven denoisers for convergent solutions to inverse problems. In Advances in Neural Information Processing Systems, 2021.

All in all, I very much like this paper, and strongly recommend acceptance. It proposes novel ideas of interest to the generative modeling community, and the strong numerical results demonstrate that this approach has promising potential.

Comments: title: Response to rebuttal
comment: Thanks for the reply! I thinks the connection between the DDPM's denoiser and noise-predictive classifier is interesting, but the large-scale effect and inefficiency concern still holds. I will keep the score.
**Main goal**

Thanks. We want to emphasize that although improving diffusion models wasn't our main motivation, we succeeded in achieving comparable or better results than the base models using the same architectures (which are optimized for denoising and not for our task). As we mentioned, an important direction for future work would be to design architectures that are optimized for CDM and to scale our work to larger datasets. Given our preliminary results, we believe that CDM has the potential to improve upon diffusion models in large scale challenging settings.

**Concurrent work**

Thanks for letting us know. We'll look it up and cite accordingly.
Thank you for the responses. 

I will maintain my score - I think this is nice theoretical foundation work but as "the main goal is not improving [the state of the art models], but rather making DRE-based methods work for the first time on datasets more challenging than MNIST", it somewhat limits the impact. 

FYI, while bidding for papers I noticed a concurrent similar work that you may want to check out/cite as concurrent: "diffusion models as noise classifiers" or something similar.
**$t=T+1$**

Thanks for the clarification. We indeed missed the "pathwise" variant in Choi's paper. This is a clever idea, and we'll definitely mention this in our final version. But, as you note, this method was illustrated only on Gaussian distributions, which suggests that it still fails to solve the problem for complex high-dimensional distributions. This is probably due to the accumulation of many small errors along the path, which our method avoids by the incorporation of the MSE loss.

**MSE**

Thanks again for the clarification. We absolutely agree. In practice, learning the score by itself can lead to errors in the likelihood, which depend on $x$ (especially for multimodal distributions with well separated modes). In those cases, the CE loss may indeed help fix those errors. We'll clarify this in the final version.
I am happy that you find my suggestions helpful, and that they might improve the paper. I reiterate that this paper should be accepted for the reasons outlined above.

**t = T+1**

In Choi et al., I was referring to what the authors of this paper call the "pathwise method" (section 5.2). The resulting integral has the property that the (infinitesimal) density ratios (as well as the scores) need only be accurate on typical samples from $p(x|t)$ for their respective timestep $t$. Although it seems that they evaluate this more sophisticated method only on Gaussian data. 

**Using only the MSE loss**

The reason I asked this question is because this statement is deceptive: "$\nabla \log p$ uniquely defines $\log p$ up to an additive constant". This is true in a strict sense, but not in an approximate sense. In particular, one might have a good _approximation_ of the score _on the support_ of $p$ without having a good approximation of the energy on said support, _when the support is disconnected_. E.g., for a mixture of two well-separated Gaussians, the relative probability of each mode is not captured by the score (it is encoded in the value of the score in-between the two modes, where there is no training data). This is known as the lack of a Poincaré inequality in the maths literature. So this means that in practice, only using the MSE loss might lead to estimated values of $\log p(t|x)$ whose error also depends on $x$.