Diffusion Contrastive Divergence is defined as the contraction of the KL divergence via a predefined, parameter-free diffusion process applied to both data and model distributions.
It generalizes classical Contrastive Divergence by substituting the model-dependent Langevin dynamics with a fixed diffusion, thereby avoiding complex MCMC sampling during training.
Empirical evaluations show DCD's improved performance in synthetic density modeling, image denoising, and generation, despite requiring higher-order differentiability and memory-intensive computations.
Diffusion Contrastive Divergence (DCD) is a family of training objectives for energy-based models (EBMs) in which the model-dependent Langevin dynamics of classical Contrastive Divergence (CD) are replaced by a predefined, EBM-parameter-free diffusion process. In its canonical formulation, DCD measures the amount by which a shared diffusion contracts the Kullback–Leibler divergence between the data distribution and the model distribution, thereby reinterpreting CD as one member of a broader diffusion-induced divergence family rather than as a procedure tied specifically to short-run MCMC (Luo et al., 2023). The term has since coexisted with several adjacent but technically distinct lines of work—contrastive objectives for denoisers, joint EBM–diffusion training, and diffusion-based representation learning—so the literature surrounding “DCD” requires careful disambiguation (Yoon et al., 2023).
1. Classical contrastive divergence and the motivation for DCD
Classical CD trains an EBM by replacing the exact negative phase of maximum-likelihood learning with samples produced by a short Markov chain initialized at the data. For an EBM written as
pθ(x)=Zθexp(fθ(x)),
the maximum-likelihood gradient has the familiar positive-phase minus negative-phase form,
and that final term is non-negligible in general (Luo et al., 2023).
A complementary line of analysis showed that CD is not best understood as approximate descent on a fixed KL-difference objective. Instead, when the transition kernel is reversible and satisfies detailed balance with respect to pθ, the usual CD update is exactly proportional to the gradient of a binary cross-entropy objective that classifies whether a Markov trajectory is presented in forward order or time-reversed. That derivation also yields a correction weight for inexact chains such as finite-step Langevin dynamics (Yair et al., 2020). This perspective does not define DCD, but it clarifies why a reformulation of CD in diffusion-theoretic terms became attractive: the classical short-run MCMC negative phase is both computationally burdensome and theoretically awkward.
2. Formal definition of Diffusion Contrastive Divergence
The decisive restriction is that the diffusion be EBM-parameter-free: ∂θ∂EpdlogZθexp(fθ(x))=Epd∂θ∂fθ(x)−Epθ∂θ∂fθ(x).0 and ∂θ∂EpdlogZθexp(fθ(x))=Epd∂θ∂fθ(x)−Epθ∂θ∂fθ(x).1 do not depend on ∂θ∂EpdlogZθexp(fθ(x))=Epd∂θ∂fθ(x)−Epθ∂θ∂fθ(x).2. Under that condition, the diffused data distribution and the diffused model distribution are transported by the same known process, and the problematic model-dependent MCMC derivative of classical CD is avoided (Luo et al., 2023).
where ∂θ∂EpdlogZθexp(fθ(x))=Epd∂θ∂fθ(x)−Epθ∂θ∂fθ(x).4 and ∂θ∂EpdlogZθexp(fθ(x))=Epd∂θ∂fθ(x)−Epθ∂θ∂fθ(x).5 are the time-∂θ∂EpdlogZθexp(fθ(x))=Epd∂θ∂fθ(x)−Epθ∂θ∂fθ(x).6 marginals obtained by diffusing the data distribution and model distribution under the same process. The main theorem gives the integral representation
Under the assumptions stated in the paper, DCD is therefore a proper probability divergence, and it can be interpreted as the accumulated discrepancy between diffused scores along the diffusion path (Luo et al., 2023).
Within this framework, classical CD appears as a special case. If the diffusion is chosen to be the EBM-induced Langevin dynamics,
then dxt=21∇xtlogpθ(xt)dt+dwt,0 is stationary, so dxt=21∇xtlogpθ(xt)dt+dwt,1, and DCD reduces to CD. This is the sense in which DCD generalizes CD rather than merely replacing one sampler with another (Luo et al., 2023).
3. Practical instantiation: variance-exploding diffusion and the one-step objective
The practical version developed in the original DCD paper is variance-exploding diffusion,
dxt=21∇xtlogpθ(xt)dt+dwt,2
This process has no drift and simply adds Gaussian noise. The paper writes the transition kernel as
dxt=21∇xtlogpθ(xt)dt+dwt,3
Because the transition is explicit and parameter-free, drawing dxt=21∇xtlogpθ(xt)dt+dwt,4 from data is inexpensive: sample dxt=21∇xtlogpθ(xt)dt+dwt,5 and perturb it with Gaussian noise (Luo et al., 2023).
For parameter-free diffusions, DCD minimization is equivalent to minimizing
dxt=21∇xtlogpθ(xt)dt+dwt,6
The difficulty shifts from MCMC sampling to the evaluation of the evolved model energy dxt=21∇xtlogpθ(xt)dt+dwt,7. In general that evolution is governed by a PDE. For VE diffusion, the paper derives
dxt=21∇xtlogpθ(xt)dt+dwt,8
Rather than solving this long-time evolution exactly, the practical algorithm uses a small-dxt=21∇xtlogpθ(xt)dt+dwt,9, one-step approximation, yielding
DCD(pd,pθ)=DKL(pd,pθ)−DKL(pd,θ(T),pθ).0
The first bracketed term has the same structure as score matching, while the second term is a contrastive energy difference between clean and noised data. The paper explicitly connects DCD to Diffusion Recovery Likelihood, identifying DRL as a special case of the same KL-contraction form under Gaussian perturbation (Luo et al., 2023).
A time-dependent variant is also described, in which one trains a time-dependent energy model DCD(pd,pθ)=DKL(pd,pθ)−DKL(pd,θ(T),pθ).1 over diffused data distributions by sampling DCD(pd,pθ)=DKL(pd,pθ)−DKL(pd,θ(T),pθ).2, diffusing data to DCD(pd,pθ)=DKL(pd,pθ)−DKL(pd,θ(T),pθ).3, computing the relevant DCD objective, and updating DCD(pd,pθ)=DKL(pd,pθ)−DKL(pd,θ(T),pθ).4 by gradient descent (Luo et al., 2023).
4. Computational characteristics, implementation, and algorithmic trade-offs
DCD changes the computational bottleneck of EBM training. Classical CD requires sequential, model-dependent MCMC, and its quality depends on chain length and mixing. DCD-VE eliminates EBM-driven MCMC and replaces it with direct Gaussian perturbation, but it requires higher-order differentiation through the energy network. In particular, the practical loss depends on DCD(pd,pθ)=DKL(pd,pθ)−DKL(pd,θ(T),pθ).5 and the Laplacian DCD(pd,pθ)=DKL(pd,pθ)−DKL(pd,θ(T),pθ).6 (Luo et al., 2023).
In low dimensions, the Laplacian can be computed directly. In high dimensions, the paper uses Hutchinson trace estimation,
DCD(pd,pθ)=DKL(pd,pθ)−DKL(pd,θ(T),pθ).7
where DCD(pd,pθ)=DKL(pd,pθ)−DKL(pd,θ(T),pθ).8. The resulting trade-off is explicit in the paper: DCD is often faster in wall-clock time than CD, but it is more memory-intensive because of second-order derivative computation (Luo et al., 2023).
The original experiments instantiate this trade-off in three regimes. In 2D synthetic density modeling, DCD-VE uses a 4-layer MLP with 300 hidden units per layer, GELU activations, DCD(pd,pθ)=DKL(pd,pθ)−DKL(pd,θ(T),pθ).9, pd,θ(T)0, Adam with learning rate pd,θ(T)1, batch size pd,θ(T)2, and pd,θ(T)3 iterations. The CD baseline uses Langevin step size pd,θ(T)4 and pd,θ(T)5 Langevin steps; the PCD baseline uses replay buffer size pd,θ(T)6, step size pd,θ(T)7, pd,θ(T)8 MCMC steps, and replay update frequency pd,θ(T)9 (Luo et al., 2023).
For image denoising, the paper uses Wide ResNet architectures with SiLU and no normalization. MNIST and FashionMNIST use depth θ0 and widen factor θ1; CIFAR10 and SVHN use depth θ2 and widen factor θ3. Inputs are scaled to θ4, training data are additionally corrupted with Gaussian noise θ5, and DCD-VE uses θ6, θ7, Adam, learning rate θ8, and θ9 (Luo et al., 2023).
For image generation on CelebA ∂θ∂DCD(pd,pθ)=Epd,θ(T)[∂θ∂fθ(x)]−Epd[∂θ∂fθ(x)]−Epd,θ(T)[logpθ(x)∂θ∂logpd,θ(T)(x)],0, the paper trains a time-dependent EBM with a residual/UNet-style architecture from an EDM VP backbone plus an extra SiLU before the last pooling layer. The forward process uses VE diffusion with ∂θ∂DCD(pd,pθ)=Epd,θ(T)[∂θ∂fθ(x)]−Epd[∂θ∂fθ(x)]−Epd,θ(T)[logpθ(x)∂θ∂logpd,θ(T)(x)],1, training samples time as ∂θ∂DCD(pd,pθ)=Epd,θ(T)[∂θ∂fθ(x)]−Epd[∂θ∂fθ(x)]−Epd,θ(T)[logpθ(x)∂θ∂logpd,θ(T)(x)],2, and reverse sampling uses a Heun solver with 18 discretized noise levels from ∂θ∂DCD(pd,pθ)=Epd,θ(T)[∂θ∂fθ(x)]−Epd[∂θ∂fθ(x)]−Epd,θ(T)[logpθ(x)∂θ∂logpd,θ(T)(x)],3 to ∂θ∂DCD(pd,pθ)=Epd,θ(T)[∂θ∂fθ(x)]−Epd[∂θ∂fθ(x)]−Epd,θ(T)[logpθ(x)∂θ∂logpd,θ(T)(x)],4 (Luo et al., 2023).
5. Empirical results, performance profile, and limitations
The empirical results reported for DCD divide naturally into synthetic density learning, denoising, and image generation. On seven 2D datasets—Swissroll, Circles, Rings, Moons, 8 Gaussians, 2 Spirals, and Checkerboard—the evaluation metric is the score matching loss
DCD-VE outperforms CD and PCD on all seven datasets. The reported values include ∂θ∂DCD(pd,pθ)=Epd,θ(T)[∂θ∂fθ(x)]−Epd[∂θ∂fθ(x)]−Epd,θ(T)[logpθ(x)∂θ∂logpd,θ(T)(x)],6 on Swissroll for DCD-VE versus ∂θ∂DCD(pd,pθ)=Epd,θ(T)[∂θ∂fθ(x)]−Epd[∂θ∂fθ(x)]−Epd,θ(T)[logpθ(x)∂θ∂logpd,θ(T)(x)],7 for both CD and PCD, ∂θ∂DCD(pd,pθ)=Epd,θ(T)[∂θ∂fθ(x)]−Epd[∂θ∂fθ(x)]−Epd,θ(T)[logpθ(x)∂θ∂logpd,θ(T)(x)],8 on Rings versus ∂θ∂DCD(pd,pθ)=Epd,θ(T)[∂θ∂fθ(x)]−Epd[∂θ∂fθ(x)]−Epd,θ(T)[logpθ(x)∂θ∂logpd,θ(T)(x)],9 for both baselines, and pθ0 on Checkerboard versus pθ1 for CD and pθ2 for PCD (Luo et al., 2023).
In image denoising, the metric is average RMSE after adding Gaussian noise at levels pθ3, pθ4, and pθ5. DCD consistently outperforms CD across MNIST, FashionMNIST, CIFAR10, and SVHN. The gap becomes especially large at high noise: on CIFAR10, DCD reports pθ6 at high noise versus pθ7 for CD; on SVHN, the corresponding values are pθ8 versus pθ9 (Luo et al., 2023). This suggests that the learned energy landscape remains useful farther from the clean data manifold, although that inference concerns interpretation rather than a theorem.
In image generation on CelebA dxt=F(xt,t)dt+G(t)dwt,0, EBM-DCD reports FIDdxt=F(xt,t)dt+G(t)dwt,1. The paper places that result as better than ABP at dxt=F(xt,t)dt+G(t)dwt,2, ABP-SRI at dxt=F(xt,t)dt+G(t)dwt,3, VAE at dxt=F(xt,t)dt+G(t)dwt,4, and Glow at dxt=F(xt,t)dt+G(t)dwt,5, comparable to DCGAN at dxt=F(xt,t)dt+G(t)dwt,6 and EBM-FCE at dxt=F(xt,t)dt+G(t)dwt,7, and worse than GEBM at dxt=F(xt,t)dt+G(t)dwt,8 and CoopFlow(T=30) at dxt=F(xt,t)dt+G(t)dwt,9 (Luo et al., 2023). The paper therefore presents DCD generation as viable rather than leading.
Two limitations are explicit. First, DCD requires higher-order derivatives, so the energy model must be at least twice differentiable. Second, exact long-time energy evolution is difficult, and the practical method relies on a one-step approximation rather than a full consistency result for long diffusion times (Luo et al., 2023). A plausible implication is that DCD is especially attractive when MCMC instability dominates and second-order autodiff is feasible.
6. Related formulations, neighboring methods, and common confusions
The phrase “Diffusion Contrastive Divergence” now sits beside several technically different frameworks. The following distinctions are essential.
Generalized Contrastive Divergence (GCD) is the nearest extension in spirit. It replaces the MCMC negative phase with an arbitrary trainable sampler dtdp(x,t)=−⟨∇x,p(x,t)F(x,t)⟩+21G2(t)Δxp(x,t),p(x,0)=p0(x).0, and when dtdp(x,t)=−⟨∇x,p(x,t)F(x,t)⟩+21G2(t)Δxp(x,t),p(x,0)=p0(x).1 is instantiated as a diffusion model the joint training becomes
The paper formulates this joint learning as a minimax problem and interprets it through inverse reinforcement learning, where the energy is a negative reward and the diffusion model is a policy (Yoon et al., 2023). Relative to DCD, the difference is structural: DCD uses a predefined diffusion and optimizes a divergence on the EBM, whereas GCD learns the sampler itself.
A second adjacent line reinterprets diffusion denoisers as implicit classifiers. “Your Diffusion Model is Secretly a Noise Classifier and Benefits from Contrastive Training” introduces Contrastive Diffusion Loss (CDL), a logistic objective
which discriminates between the clean data distribution dtdp(x,t)=−⟨∇x,p(x,t)F(x,t)⟩+21G2(t)Δxp(x,t),p(x,0)=p0(x).4 and a noisier marginal dtdp(x,t)=−⟨∇x,p(x,t)F(x,t)⟩+21G2(t)Δxp(x,t),p(x,0)=p0(x).5. The paper frames CDL as a self-supervised binary classification or density-ratio objective between two points on the diffusion path, and reports improvements in OOD denoising and especially in parallel sampling, but it does not define an energy-based diffusion model or a contrastive-divergence objective in the classical sense (Wu et al., 2024).
Other recent works use “contrastive” in representation-learning rather than EBM-training senses. DCR places an InfoNCE-style objective directly in diffusion predicted-noise space to enhance CLIP representations, explicitly arguing that a naive weighted sum of contrastive and reconstruction losses suffers from gradient conflict, with dtdp(x,t)=−⟨∇x,p(x,t)F(x,t)⟩+21G2(t)Δxp(x,t),p(x,0)=p0(x).6 of training steps having negative gradient cosine similarity (Han et al., 5 Mar 2026). DCG combines DDPM-style latent diffusion, generated-view contrastive loss, mutual-information alignment, and KL-based clustering objectives for incomplete multi-view clustering, but it contains no energy function, no partition function, and no CD-style positive-versus-negative phase (Zhang et al., 12 Mar 2025).
A recurrent source of confusion is acronymic rather than conceptual. “Dynamic Chunking for Diffusion LLMs” introduces DCDM, the Dynamic Chunking Diffusion Model, for discrete diffusion language modeling. That work explicitly states that it is not about “Diffusion Contrastive Divergence (DCD)” in the usual sense; its contribution is dynamic semantic chunking and chunk-causal attention in block diffusion LLMs, not a contrastive-divergence training objective (Zhu et al., 15 May 2026).
Taken together, the literature supports a narrow and a broad usage. In the narrow sense, Diffusion Contrastive Divergence denotes the KL-contraction family for EBM training introduced in (Luo et al., 2023). In the broader sense, it has become a reference point for several diffusion methods that use contrastive, classifier-based, or adversarial signals. Maintaining that distinction is necessary for precise reading of current arXiv work.