Manuscript Offprint
arXiv:2611.09758Diffusion-free Score Matching for Exact Conditional Sampling
Abstract
The success of modern score-based generative models is largely driven by diffusion-based training, which learns a collection of time-indexed score fields corresponding to progressively noisier versions of the data distribution. While such models achieve impressive sample quality, leveraging them for sound probabilistic inference—particularly sampling from arbitrary conditionals of the model—remains challenging. This difficulty arises because conditioning information is only available for clean data and not for the higher noise levels required to generate exact conditional samples. In this paper, we introduce Diffusion-free SCORE matching (DISCO), a principled approach that sidesteps the need for time-dependent score fields altogether. Our method is based on a principled objective that, while reminiscent of diffusion-based training, estimates only a single score of the (slightly perturbed) data distribution, for which the exact conditional score is readily obtained. In experiments, DISCO is competitive with state-of-the-art diffusion models in terms of sample quality. More importantly, DISCO yields a more faithful representation of the underlying data distribution and—crucially—enables accurate sampling from arbitrary conditionals, outperforming standard heuristic samplers. This capability opens the door to principled and flexible probabilistic reasoning with score-based models.
1 INTRODUCTION
Diffusion models currently define the state of the art in generative modeling, with remarkable success in image synthesis, molecular design, and protein structure generation [33, 41]. At their core, they arise from clas-
sical score matching [13] and its denoising variant [39], which learn the score function rather than the density itself. Classical score matching learns the score mainly near the data manifold, leaving low-density regions unconstrained, so that sampling trajectories are easily led astray. Diffusion-based models [30, 33] mitigate this by progressively broadening the region where the score is learned and sampling then iteratively denoises from high to low noise.
However, the diffusion mechanism requires learning an entire family of score vector fields, one for each noise level. This design choice has important consequences for principled probabilistic inference—the hallmark of probability theory as a rigorous framework for reasoning under uncertainty [14, 27], which ultimately reduces to two fundamental operations: marginalization and conditioning [9]. In the context of score-based generative models this translates into the question whether faithful samples can be drawn from the model's marginals and conditionals. While drawing from marginals is trivial—simply discard variables from joint samples—drawing from conditionals requires conditioning the entire diffusion process, which is generally intractable. Existing approaches rely on ad-hoc heuristics [12, 17, 33] or on particle-based methods [42], which are asymptotically exact but can be difficult to tune in practice. As demonstrated in Figure 1, conditional samples of these methods are often substantially biased—even on elementary toy problems like GMMs—revealing the brittleness of diffusion-based probabilistic reasoning.
In this work, we challenge the common assumption that expressive score-based modeling requires fitting an entire family of noisy data scores. Instead, we introduce Diffusion-free SCORE matching (DISCO), which learns a single score field while adopting the key principle underlying diffusion models, namely broadening the region over which the score is reliably learned. Specifically, starting from a mixture of importance-weighted Fisher divergences defined through a collection of progressively noisier proposal distributions, we derive a principled score matching objective. This ob-


Figure 1: Conditional sampling with a diffusion model vs. DISCO (a single score field) trained on a 2D GMM (, left), for the query . Gradient Guidance [12], the Replacement Heuristic [33] and the Twisted Diffusion Sampler (TDS) [42] deviate substantially from the diffusion model's true conditional (via rejection sampling), whereas DISCO, using tempered SMC on the exact conditional score (7), matches it. Details in Section 5.1 and Appendix H.
jective, while reminiscent of diffusion training, fits only the (slightly perturbed) data distribution rather than a full diffusion process, while still ensuring that the score is learned away from the data manifold. Conditioning then becomes conceptually trivial: fixing the observed variables in the joint score yields the exact conditional score (7), which standard Markov Chain Monte Carlo (MCMC) methods can sample. Here, “exact” refers to the target: samples are asymptotically exact draws from the conditional of the learned model.
Our experiments cover two regimes. In low dimensions (energy parameterization, Metropolis-corrected MCMC), DISCO's conditionals are asymptotically exact, whereas diffusion-based samplers are biased. On images, where we use an unconstrained score parameterization for scalability (exact only at the population optimum), DISCO's sample quality is close to that of diffusion models, and its conditionals drift the least of all tested samplers under repeated resampling. In summary, our contributions are:
-
We challenge the need for time-dependent diffusion and instead learn a single joint score field, for which conditioning becomes conceptually straightforward.
-
We introduce Diffusion-free SCOré matching (DISCO), a principled objective that retains diffusion's support-broadening benefits while learn-
ing a single score field, so that all conditionals are consistent with one joint model.
- In experiments, we show that DISCO is close to diffusion models in sample quality and, more importantly, yields a more faithful data representation and accurate sampling from arbitrary conditional distributions, whose consistency on images we verify by repeated resampling.
Code to reproduce all experiments is available at https://anonymous.4open.science/r/disco-code/.
Rather than parameterizing the score directly, one might use an energy-based model , that defines a density via and its score as , easily obtained via autodiff. Such models define a proper density and admit MCMC with Metropolis-Hastings corrections such as Hamiltonian Monte Carlo (HMC) [26], whereas a directly modeled score may be non-conservative and correspond to no density [3]—This distinction may be secondary for generation, but is essential for probabilistic reasoning [9, 14, 27]. We consider both parameterizations, despite the probabilistic advantages of the energy-based formulation.
2.1 Denoising Score Matching
Directly minimizing the Fisher divergence in (1) is infeasible as it depends on the unknown score, motivating alternative objectives that do not require explicit access to . A widely used variant is denoising score matching (DSM), which approximates the score of a perturbed data distribution , where is a Gaussian perturbation kernel with fixed noise level . Concretely, minimizing
turns out to be equivalent to minimizing Fisher divergence, as for all [39]. This objective and its gradients can be efficiently estimated using data samples, as it only depends on the score of the perturbation kernel, given by . In (2), one chooses to be small so that closely approximates the data distribution . Regions far from the data are thus rarely sampled, and the learned score can be inaccurate there, leading samplers astray [31].
2.2 Diffusion Models
Diffusion models address the limitation of DSM by learning score fields across multiple noise levels, thereby expanding the region over which the score is reliably estimated [30, 33]. Formally, let the clean data be denoted by , and define via the forward diffusion process:
for time with some . In this work, we focus primarily on the variance-exploding (VE) formulation [33], where and only the noise scale varies over time.¹ This process defines a family of progressively noisier distributions
where
A time-dependent score network is then trained to approximate for all and , by minimizing the Diffusion Model (DM) loss
where , , and . Here is a distribution over and is a positive weighting function. Equation (6) can be viewed as a direct extension of (2) to a time-indexed family of score fields , approximated by a shared score network .
After training, samples from are generated by reversing the diffusion process, e.g., via the reverse-time SDE [33] or ancestral sampling [11]. Training across noise levels informs the score in low-density regions—the key advantage over DSM—but complicates probabilistic inference, in particular conditioning, which we address next.
3 DIFFUSION-FREE SCORE MATCHING
Diffusion models learn an entire family of scores, although only the distribution at is ultimately of interest. A key problem is that conditioning this distribution requires reasoning through the auxiliary states , which act as latent variables and complicate probabilistic inference [9].
This difficulty with conditioning does not arise—at least in principle—when a single score field is used, as in classical score matching [13, 39]. Assume that is learned accurately, also away from the data manifold;² MCMC on this single field then yields faithful joint samples. For conditioning, we partition the variables into unobserved and conditioned and aim to sample . Here with , , ; the partition is arbitrary and chosen at inference time (e.g., masked and visible pixels), so a single model answers any conditional query—unlike autoregressive models [20] or triangular transport maps [23], where only some conditionals are tractable. For a single score field, conditioning is simple and direct, as the
¹In our notation we assume , so that denotes a slightly noisy version of .
²In theory, this should eventually occur with DSM [39] after (prohibitive) long training time.
conditional score is obtained by fixing in the joint score:
Since this identity is exact, MCMC can target the exact model conditional, using the same learned score as for the joint distribution. Under standard conditions, the resulting samples are asymptotically exact; finite-compute error arises only from incomplete mixing, rather than from an approximation of the conditional target.
In contrast, diffusion-based models maintain a family of score fields , and conditioning would require access to —conditioned on the observed clean data —for all noise levels , which is generally intractable. While considerable effort has been devoted to approximating these conditionals [12, 17, 33, 42], the problem remains challenging in practice (see Figure 1).
In this work, we challenge the assumption that diffusion-based training is strictly necessary for expressive score-based modeling. Instead, we propose to learn a single score field, akin to classical score matching [39], which directly enables sampling from arbitrary conditional distributions via (7), while retaining the key idea of diffusion models, namely broadening the region over which the score is learned. To this end, we start with a slight modification of the Fisher divergence:
Definition 1. q-Weighted Fisher Divergence. Let and q be probability densities over whose supports satisfy . We define the q-weighted Fisher divergence as
Like the Fisher divergence in Equation (1), also measures the score-mismatch between and the model , but in expectation over a proposal distribution rather than . It is easy to show that implies , hence is a principled divergence.
Next, we adopt the Gaussian perturbation kernels from (5) and let
be the corresponding Gaussian-smoothed data distributions, as in (4). We emphasize that, in contrast to diffusion models, here these smoothed distributions serve as proposal distributions and are not themselves targets of learning.
Note further that we adopted the parameter from diffusion models, which in our case does not signify diffusion time but just indexes the Gaussian smoothed distributions (9) on various noise levels . We further introduce, similar as in diffusion models, a prior distribution over and a continuous positive weighting function .
A key quantity in our method is the zero-level posterior
which is the posterior distribution over clean data under the smallest-noise kernel , even though may have been generated using any noise level .
Now, using from (9) as a family of proposal distributions, we introduce a weighted mixture of q-weighted Fisher divergences as our core objective:
(12)
Also is a principled objective, since, as is positive and is non-negative, implies that for almost all .
The objective requires the true data score , which is not available. Following DSM [39], we replace with the slightly perturbed at the lowest noise level, which closely approximates the data score for small . With this substitution, we obtain the Diffusion-free SCORE matching loss (DISCO loss):
Theorem 1. Let be a distribution over , and a positive weighting function. Further, let , , and be defined as in (4), (5), and (10), respectively, and let . The loss , defined as
has the same parameter gradients as .
The proof can be found in Appendix B.1. Theorem 1 guarantees that with sufficient capacity in , the global minimizer of will learn the true score of in the large data limit, making DISCO a sound score matching objective. That is, its population minimizer is almost everywhere. Alternatives such as MDSM [21] lack this property (Section 4). thus fits a single score by regressing on the smallest-noise kernel score, as in DSM, while averaging over many noise levels, as in diffusion training, so that is informed also far from the data.

Figure 2: DISCO Training: We pick a helper sample from and perturb it at level to obtain . Diffusion training regresses ; DISCO regresses , with drawn from the zero-level posterior (10), a softmax with logits and temperature . Note that need not have high posterior probability.
DISCO Training. As in existing score matching methods, the DISCO objective (13) is optimized by estimating the expectation and its gradients via sampling. The key difference to diffusion training is the order of sampling: diffusion (6) draws and then , whereas DISCO (13) draws (9) and then (10); the diffusion order would make the objective inconsistent.
Specifically, in order to sample from , we first sample . As illustrated in Figure 2, we then sample , by first sampling some intermediate “helper” data sample and then its perturbed version . The challenging part is then to sample the zero-level posterior . However, as we usually have only finitely many training data points , the data distribution is in fact the empirical distribution where denotes the Dirac-delta. From Bayes' law, we obtain
which induces a probability mass function over , as illustrated in Figure 2. We then compute for each and sample from the normalized mass function. For very large , this method starts to become prohibitive, and we discuss approximately sampling from this posterior in Appendix C. For example, one simple approximation may be to construct the posterior mass function only over a mini-batch of data. Drawing and then is simply the Monte Carlo estimator of (13), not an inference heuristic; its only approxima-
tion is the optional mini-batch posterior, ablated in Appendix F. Pseudocode is given in Algorithm 1.
Masked DISCO Training. Conditional sampling feeds the network inputs with clean and noisy , which standard DISCO training never produces. Although the global minimizer is accurate there as well (as we confirm in low dimensions), in high dimensions the network fails to generalize to such inputs. We therefore add an auxiliary term that noises only a random subset of coordinates, which does not change the global minimizer (Appendix B.3). Concretely, let be a distribution over binary masks , where is 1 on coordinates that remain clean and 0 on coordinates that are noised. Let and write and for the clean and noised coordinates of (and analogously and for ), and define . With , we minimize
and with we define as
where projects onto the noised coordinates. The global minimizer is for every ; we use throughout our experiments. Similar to (14), we draw from the conditioned “zero-level” posterior . When , will typically place all its mass on the “helper” data point that was used to produce , making posterior sampling trivial: One just takes without materializing the posterior at all (see Appendix C).
4 RELATED WORK
Time-Independence in Score-Based Models. Most similar in spirit to DISCO is the work by Li et al. [21], who share the idea of only learning using a score-matching objective. However, they do not minimize , but a variant which they term multiscale denoising score matching (MDSM), which is when (incorrectly) setting in (13). This objective in fact learns , i.e. a reweighted posterior average over scores (VE noise, ); it differs from DISCO only in drawing before . Thus, the claim of [21] that only learns the score of is erroneous (see Appendix B.2); their motivation is also analyzing diffusion training rather than conditional sampling. Other attempts to simplify or remove the time dependence in diffusion models—such as the scaled architecture of Song and Ermon [32] or the fully time-independent training of Sun et al. [34]—likewise do not recover , but instead yield posterior averages over noise-level scores (see Appendix B.4).
Conditional Sampling in Diffusion Models. Many approximations to the true conditional have been proposed: Song et al. [33, App. I] introduce the replacement method, a popular heuristic that estimates , i.e. the conditional score at time , as where is drawn from . This approximation enjoys no theoretical guarantees and often fails to produce samples coherent with the conditioning information [12].
Gradient guidance [12] relies on the fact that . While is known via , the intractable quantity is approximated, often by , where is the “denoised” input and selects the observed coordinates. Diffusion posterior sampling (DPS) [5] uses a closely related, normalized likelihood gradient; we compare to both. Evaluating it requires backpropagating through the network, and the estimates can be unreliable [44] and do not provide guarantees.
Wu et al. [42] introduced the twisted diffusion sampler (TDS), which uses gradient guidance in a twisted sequential Monte Carlo (SMC) procedure as an approximation to the (unknown) optimal twisting function. Due to this, the sampler will not produce exact samples for any finite number of simulated particles. In contrast, DISCO guarantees asymptotically exact samples from arbitray model conditionals, even when simulating a single particle.
Inverse Problems. PnP-DM [43], DPG [37] and APMC [35] sample for a known, noisy forward model and a pretrained prior. They are complementary to DISCO, which addresses how to train a joint model whose clean-coordinate conditionals are directly accessible (Appendix D). Our conditioning corresponds to the noise-free likelihood , whose posterior is singular on ; DISCO sidesteps this entirely by sampling only the unobserved coordinates.
Directly Learning Conditionals. An alternative line of work [1, 18, 29] learns models that directly sample from conditional distributions, without parameterizing a coherent joint density. DISCO instead derives all conditionals from one joint model, which guarantees their consistency.
5 EXPERIMENTS
5.1 Low-Dimensional Setting
We train both an energy-based diffusion model and an energy-based DISCO model on several 2D distributions (Moons, Checkerboard, and Rings) by minimizing and , respectively. During training, we draw exact posterior samples from and do not notice any significant slowdown compared to diffusion model training. Appendix F repeats this with the mini-batch posterior used in high dimensions (batches of 64-512): model fit degrades mainly on Rings, while inference quality is unaffected.
Figure 3 compares the norms of the learned score fields. Only DISCO accurately recovers the scores of the true empirical distribution, while the diffusion model at heavily underestimates score magnitudes, especially far from the training data. This is expected: diffusion spreads the generative process over many time-dependent fields, and a time-independent diffusion model [34] learns an average of scores.
We then evaluate conditional sampling from . As reference, we use exact conditional samples of each model, obtained by rejection sampling from its joint samples; this isolates each model's consistency with its own learned joint. Figure 1 shows that only DISCO produces faithful conditional samples that preserve the relative weights of the Gaussian components, while all other methods fail. Note that the core issue is not a bad fit to : The diffusion model's true conditionals fit the data well, but are computationally intractable to access.
Table 1 confirms this quantitatively: while DISCO performs on par with diffusion models in terms of model fit, it systematically outperforms all diffusion-based conditioning heuristics in inference quality, providing asymptotically—and practically—exact conditional samples. Both model classes use comparable compute (100 ancestral steps vs. tempered SMC with HMC). Further experimental details, including model architectures and sampler hyperparameters, are provided in Appendix H.
5.2 Image Datasets
In this section, our aim is not state-of-the-art image generation, but rather to show that DISCO (i) is competitive with SOTA DM-based generative models in terms of model fit, while (ii) showing substantial advantages in terms of faithful conditioning tasks. To this end, we train unconstrained score models (i.e., not derived from an energy-based model) with DISCO on CIFAR-10 [19] and FFHQ-64 [15]. We build on
Table 1: Quantitative Evaluation on 2D Distributions: Model Fit estimates the Wasserstein-1 distance (diffusion: ancestral sampling; DISCO: tempered SMC). Inference Quality estimates , with the exact model conditional (rejection sampling) and the heuristic or, for DISCO, SMC on (7). Mean over 30 independent runs (model fit) or 30 conditioning values (inference quality).
| Method | Moons | Checkerboard | Rings |
|---|---|---|---|
| Model Fit (joint) | |||
| Diff. Model | |||
| DISCO | |||
| Inference Quality | |||
| Replace | |||
| Grad. Guid. | |||
| TDS | |||
| DPS | |||
| DISCO | |||

Figure 3: Qualitative Results on 2D Distributions: norms of the scores of the empirical distribution, an energy-based DISCO model, an energy-based DM without access to (as in Sun et al. [34]), and an energy-based DM at ; samples from on the left. Only DISCO recovers the true score magnitudes.
Table 2: Quantitative Inpainting Results: On both CIFAR-10 and FFHQ-64, DISCO often outperforms post-hoc inpainting heuristics (Replacement, Gradient Guidance, DPS, RePaint and TDS) applied to a pretrained diffusion model with EDM architecture. EDM Masked (gray) learns separate conditional scores at each noise level and is a strong task-specific reference, but its conditionals need not be consistent with a single joint distribution. DISCO outperforms it on CIFAR-10 and comes close on FFHQ-64 while deriving all conditionals from a single score field (consistent with a joint in the limit of an exactly learned score), and has better unconditional samples on FFHQ-64 (see Table 3). Bold: best among methods that sample conditionals of a single joint model; EDM Masked is excluded.
| CIFAR-10Method | Wide | Narrow | Super-Resolve 2x | Altern. | Lines | Half | Expand | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| LPIPS↓ | SSIM↑ | LPIPS↓ | SSIM↑ | LPIPS↓ | SSIM↑ | LPIPS↓ | SSIM↑ | LPIPS↓ | SSIM↑ | LPIPS↓ | SSIM↑ | LPIPS↓ | SSIM↑ | |
| Replacement | 0.255 | 0.658 | 0.064 | 0.916 | 0.431 | 0.516 | 0.187 | 0.767 | 0.296 | 0.549 | 0.607 | 0.094 | ||
| Grad. Guidance | 0.203 | 0.732 | 0.036 | 0.943 | 0.196 | 0.727 | 0.082 | 0.860 | 0.262 | 0.600 | 0.581 | 0.125 | ||
| DPS | 0.190 | 0.752 | 0.032 | 0.948 | 0.130 | 0.793 | 0.065 | 0.882 | 0.261 | 0.614 | 0.552 | 0.210 | ||
| RePaint | 0.225 | 0.732 | 0.078 | 0.914 | 0.339 | 0.676 | 0.184 | 0.806 | 0.285 | 0.593 | 0.627 | 0.140 | ||
| TDS | 0.232 | 0.760 | 0.053 | 0.937 | 0.255 | 0.746 | 0.124 | 0.857 | 0.308 | 0.623 | 0.630 | 0.230 | ||
| DISCO | 0.161 | 0.790 | 0.018 | 0.971 | 0.120 | 0.831 | 0.053 | 0.899 | 0.227 | 0.630 | 0.535 | 0.170 | ||
| EDM Masked | 0.165 | 0.765 | 0.025 | 0.954 | 0.113 | 0.789 | 0.060 | 0.881 | 0.232 | 0.624 | 0.539 | 0.170 | ||
| FFHQMethod | Wide | Narrow | Super-Resolve 2x | Altern. | Lines | Half | Expand | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| LPIPS↓ | SSIM↑ | LPIPS↓ | SSIM↑ | LPIPS↓ | SSIM↑ | LPIPS↓ | SSIM↑ | LPIPS↓ | SSIM↑ | LPIPS↓ | SSIM↑ | LPIPS↓ | SSIM↑ | |
| Replacement | 0.192 | 0.673 | 0.048 | 0.916 | 0.410 | 0.562 | 0.106 | 0.851 | 0.218 | 0.595 | 0.502 | 0.150 | ||
| Grad. Guidance | 0.140 | 0.749 | 0.027 | 0.941 | 0.114 | 0.797 | 0.037 | 0.914 | 0.178 | 0.665 | 0.481 | 0.186 | ||
| DPS | 0.123 | 0.774 | 0.023 | 0.949 | 0.059 | 0.859 | 0.026 | 0.932 | 0.168 | 0.682 | 0.429 | 0.269 | ||
| RePaint | 0.136 | 0.767 | 0.027 | 0.942 | 0.107 | 0.820 | 0.057 | 0.903 | 0.184 | 0.670 | 0.491 | 0.211 | ||
| TDS | 0.142 | 0.786 | 0.028 | 0.951 | 0.136 | 0.829 | 0.059 | 0.916 | 0.189 | 0.697 | 0.488 | 0.209 | ||
| DISCO | 0.112 | 0.784 | 0.029 | 0.945 | 0.067 | 0.842 | 0.024 | 0.931 | 0.161 | 0.686 | 0.431 | 0.250 | ||
| EDM Masked | 0.108 | 0.787 | 0.018 | 0.956 | 0.050 | 0.865 | 0.022 | 0.935 | 0.164 | 0.680 | 0.435 | 0.247 | ||
the popular EDM framework [16], adapting its architecture to be time-independent and training it by minimizing with and the mini-batch approximation to sample from the posterior (see Appendix G for details). Training hyperparameters are inherited from EDM; DISCO was about as sensitive to and as diffusion training, and robust to the mask distribution.
As a baseline, we train EDM Masked, which is equivalent to the original diffusion model with EDM architecture [16], except that it minimizes (defined in Appendix A) with instead of (6). directly fits conditional scores at every noise level, with no guarantee that they are consistent with a single joint distribution; EDM Masked is thus a heuristic rather than a principled probabilistic model (Ap-

Figure 4: Qualitative Inpainting Results: Comparison of inpainting methods on FFHQ-64 with the samplers of Table 2; Input dims the unobserved pixels, Truth shows the original image. Best viewed zoomed in. More results (conditional and unconditional) can be found in Appendix J.
Table 3: FID scores on unconditional image generation.
| Dataset | EDM | EDM Masked | DISCO |
|---|---|---|---|
| CIFAR-10 | 1.97 | 2.85 | 3.18 |
| FFHQ-64 | 2.39 | 3.18 | 2.54 |
pendix A). Inconsistent conditionals can still inpaint well: EDM Masked is a strong task-specific model, whereas DISCO yields one coherent joint, which matters when many queries must be answered consistently, e.g., in uncertainty quantification or scientific modeling. As inpainting is just one application of conditioning, we compare to the same general-purpose heuristics as before [12, 17, 33], plus RePaint [22] and DPS [5] (Appendix H).
To sample unconditionally and conditionally from DISCO or EDM Masked, we use the second-order Heun sampler [16]; DISCO's settings were tuned, while EDM Masked uses its default settings except for using DISCO's number of steps for FFHQ-64 inpainting (Appendix H). Table 3 reports unconditional (joint) sample quality: While DISCO shows a gap to diffusion models on CIFAR-10, it—perhaps surprisingly—outperforms the EDM Masked baseline on FFHQ-64, demonstrating that learning a single score vector field can yield high visual sample quality compared to state-of-the-art diffusion-based training.
Inpainting results are reported qualitatively in Figure 4 and quantitatively in Table 2, using LPIPS [45] and SSIM [40]. DISCO outperforms almost all post-hoc heuristics on CIFAR-10, is on par with the strongest one, DPS, on FFHQ-64, and outperforms EDM Masked on CIFAR-10 while coming close on FFHQ-64, with all conditionals derived from a single score field (consistent with a joint in the limit of an exactly learned score). Remaining differences (e.g., on Super-Resolve 2x) may stem from the mini-batch posterior and untuned training hyperparameters [34].

Figure 5: Resampling Consistency Test: FID-10k (log scale) under repeated resampling of random masks, starting from each model's samples.
Consistency of Conditionals. To test consistency, we start from 10,000 samples of each model and repeatedly resample the pixels outside a random training mask with the method's conditional sampler. For conditionals of a single joint, this blocked Gibbs sampler leaves the sample distribution, and hence FID, invariant. All post-hoc samplers drift by a factor of 5 or more, EDM Masked by 3.2 (CIFAR-10: 4.9 → 15.5 after 60 rounds), and DISCO least (6.6 → 9.2; FFHQ-64: 4.2 → 7.2; Figure 5). Without Metropolis correction, the drift mixes model and sampler error; see Appendix I for details and qualitative results.
6 CONCLUSION
In this paper, we challenge the prevailing belief that diffusion processes are essential for training effective score-based generative models. We introduce DISCO, a diffusion-free score matching framework that avoids time-indexed score fields in favor of learning a single, time-independent score function. It is close to diffusion models in sample quality and, more importantly, provides a principled foundation for asymptotically exact conditional sampling.
AI Use Statement
In this work, we used generative AI tools to assist in implementing methods, namely the code for our experiments and for the baseline methods, and in running these experiments. All LLM-generated code was verified for correctness by the authors. We did not use generative AI tools to generate research ideas or hypotheses, to develop theoretical models, to formulate mathematical claims, or to provide ingredients for or write proofs; generating synthetic data sets, translation, cleaning or reformatting data sets, and qualitative data analysis are not applicable to this work. We also used generative AI tools to suggest and give feedback on experiments, to suggest experimental parameters, and to assist in interpreting experimental results, all of which were reviewed by the authors. Additionally, we used generative AI tools to assist in writing and editing the paper, in creating figures, and in formatting references. We have reviewed all AI-assisted work, and we take full responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of generative AI.
Acknowledgements
This research was funded in whole or in part by the Austrian Science Fund (FWF) 10.55776/COE12. This project has received funding from the European Union's EIC Pathfinder Challenges 2022 programme under grant agreement No 101115317 (NEO).
References
[1] Ricardo Baptista, Aram-Alexandre Pooladian, Michael Brennan, Youssef Marzouk, and Jonathan Niles-Weed. Conditional simulation via entropic optimal transport: Toward non-parametric estimation of conditional brenier maps. arXiv preprint arXiv:2411.07154, 2024.
[2] Alberto Cabezas, Adrien Corenflos, Junpeng Lao, and Rémi Louf. Blackjax: Composable Bayesian inference in JAX, 2024.
[3] Chen-Hao Chao, Wei-Fang Sun, Bo-Wun Cheng, and Chun-Yi Lee. On investigating the conservative property of score-based generative models. arXiv preprint arXiv:2209.12753, 2022.
[4] Nicolas Chopin, Omiros Papaspiliopoulos, et al. An introduction to sequential Monte Carlo, volume 4. Springer, 2020.
[5] Hyungjin Chung, Jeongsol Kim, Michael T. McCann, Marc L. Klasky, and Jong Chul Ye. Diffusion posterior sampling for general noisy inverse problems. In International Conference on Learning Representations, 2023.
[6] Pierre Del Moral, Arnaud Doucet, and Ajay Jasra. Sequential Monte Carlo samplers. Journal of the Royal Statistical Society Series B: Statistical Methodology, 68(3):411–436, 2006.
[7] Arnaud Doucet, Nando De Freitas, Neil James Gordon, et al. Sequential Monte Carlo methods in practice, volume 1. Springer, 2001.
[8] Yilun Du, Conor Durkan, Robin Strudel, Joshua B Tenenbaum, Sander Dieleman, Rob Fergus, Jascha Sohl-Dickstein, Arnaud Doucet, and Will Sussman Grathwohl. Reduce, reuse, recycle: Compositional generation with energy-based diffusion models and mcmc. In International conference on machine learning, pages 8489–8510. PMLR, 2023.
[9] Zoubin Ghahramani. Probabilistic machine learning and artificial intelligence. Nature, 521(7553):452–459, 2015.
[10] Aristides Gionis, Piotr Indyk, Rajeev Motwani, et al. Similarity search in high dimensions via hashing. In Vldb, volume 99, pages 518–529, 1999.
[11] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840–6851, 2020.
[12] Jonathan Ho, Tim Salimans, Alexey Gritsenko, William Chan, Mohammad Norouzi, and David J Fleet. Video diffusion models. Advances in Neural Information Processing Systems, 35:8633–8646, 2022.
[13] Aapo Hyvärinen and Peter Dayan. Estimation of non-normalized statistical models by score matching. Journal of Machine Learning Research, 6(4), 2005.
[14] Edwin Thompson Jaynes. Probability theory: the logic of science. Citeseer, 1995.
[15] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 4401–4410, 2019.
[16] Tero Karras, Miika Aittala, Timo Aila, and Samuli Laine. Elucidating the design space of diffusion-based generative models. Advances in neural information processing systems, 35:26565–26577, 2022. URL https://github.com/NVlabs/edm. This work is licensed under CC BY-NC-SA 4.0.
[17] Bahjat Kawar, Michael Elad, Stefano Ermon, and Jiaming Song. Denoising diffusion restoration models. Advances in Neural Information Processing Systems, 35:23593–23606, 2022.
[18] Gavin Kerrigan, Giosue Migliorini, and Padhraic Smyth. Dynamic conditional optimal transport through simulation-free flows. Advances in Neural Information Processing Systems, 37:93602–93642, 2024.
[19] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
[20] Hugo Larochelle and Iain Murray. The neural autoregressive distribution estimator. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pages 29–37. JMLR Workshop and Conference Proceedings, 2011.
[21] Zengyi Li, Yubei Chen, and Friedrich T Sommer. Learning energy-based models in high-dimensional spaces with multiscale denoising-score matching. Entropy, 25(10):1367, 2023.
[22] Andreas Lugmayr, Martin Danelljan, Andres Romero, Fisher Yu, Radu Timofte, and Luc Van Gool. Repaint: Inpainting using denoising diffusion probabilistic models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 11461–11471, 2022.
[23] Youssef Marzouk, Tarek Moselhy, Matthew Parno, and Alessio Spantini. Sampling via measure transport: An introduction. In Handbook of Uncertainty Quantification, pages 1–41. Springer, 2016.
[24] Christian A Naesseth, Fredrik Lindsten, Thomas B Schön, et al. Elements of sequential Monte Carlo. Foundations and Trends® in Machine Learning, 12(3):307–392, 2019.
[25] Radford M Neal. Sampling from multimodal distributions using tempered transitions. Statistics and computing, 6:353–366, 1996.
[26] Radford M Neal et al. MCMC using Hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, 2(11):2, 2011.
[27] Judea Pearl. Probabilistic reasoning in intelligent systems: Networks of plausible inference, 1988.
[28] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.
[29] Yuyang Shi, Valentin De Bortoli, George Deligiannidis, and Arnaud Doucet. Conditional simulation using diffusion schrödinger bridges. In Uncertainty in Artificial Intelligence, pages 1792–1802. PMLR, 2022.
[30] Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In International conference on machine learning, pages 2256–2265. pmlr, 2015.
[31] Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. Advances in neural information processing systems, 32, 2019.
[32] Yang Song and Stefano Ermon. Improved techniques for training score-based generative models. Advances in neural information processing systems, 33:12438–12448, 2020.
[33] Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456, 2020. URL https://github.com/yang-song/score_sde. This work is licensed under Apache 2.0 License.
[34] Qiao Sun, Zhicheng Jiang, Hanhong Zhao, and Kaiming He. Is noise conditioning necessary for denoising generative models? arXiv preprint arXiv:2502.13129, 2025.
[35] Yu Sun, Zihui Wu, Yifan Chen, Berthy T. Feng, and Katherine L. Bouman. Provable probabilistic imaging using score-based generative priors. IEEE Transactions on Computational Imaging, 2024.
[36] Matthew Tancik, Pratul Srinivasan, Ben Mildenhall, Sara Fridovich-Keil, Nithin Raghavan, Utkarsh Singhal, Ravi Ramamoorthi, Jonathan Barron, and Ren Ng. Fourier features let networks learn high frequency functions in low dimensional domains. Advances in neural information processing systems, 33:7537–7547, 2020.
[37] Haoyue Tang, Tian Xie, Aosong Feng, Hanyu Wang, Chenyang Zhang, and Yang Bai. Solving general noisy inverse problem via posterior sampling: A policy gradient viewpoint. In International Conference on Artificial Intelligence and Statistics, 2024.
[38] Alexander Tong, Kilian Fatras, Nikolay Malkin, Guillaume Huguet, Yanlei Zhang, Jarrid Rector-Brooks, Guy Wolf, and Yoshua Bengio. Improving and generalizing flow-based generative models with minibatch optimal transport. arXiv preprint arXiv:2302.00482, 2023.
[39] Pascal Vincent. A connection between score matching and denoising autoencoders. Neural computation, 23(7):1661–1674, 2011.
[40] Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image quality assessment:
from error visibility to structural similarity. IEEE transactions on image processing, 13(4):600–612, 2004.
[41] Joseph L Watson, David Juergens, Nathaniel R Bennett, Brian L Trippe, Jason Yim, Helen E Eisenach, Woody Ahern, Andrew J Borst, Robert J Ragotte, Lukas F Milles, et al. De novo design of protein structure and function with rfdiffusion. Nature, 620(7976):1089–1100, 2023.
[42] Luhuan Wu, Brian Trippe, Christian Naesseth, David Blei, and John P Cunningham. Practical and asymptotically exact conditional sampling in diffusion models. Advances in Neural Information Processing Systems, 36:31372–31403, 2023.
[43] Zihui Wu, Yu Sun, Yifan Chen, Bingliang Zhang, Yisong Yue, and Katherine L. Bouman. Principled probabilistic imaging using diffusion models as plug-and-play priors. In Advances in Neural Information Processing Systems, 2024.
[44] Guanhua Zhang, Jiabao Ji, Yang Zhang, Mo Yu, Tommi S Jaakkola, and Shiyu Chang. Towards coherent image inpainting using denoising diffusion implicit models. 2023.
[45] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 586–595, 2018.
Diffusion-free Score Matching for Exact Conditional Sampling: Supplementary Materials
A MASKED DIFFUSION MODEL TRAINING
To provide a baseline for the masked DISCO training, we analogously define a masked diffusion model training objective. With
and some , we again minimize
where is defined as
For the empty mask , the global optimum of is . For other , the global optimum is . Note that this is merely circumventing the problem of probabilistic inference by directly trying to learn the otherwise intractable quantities. Therefore, we have no guarantee that the conditionals we learn are consistent, i.e., that there exists a joint distribution whose conditionals coincide with the learned ones. Clearly, this breaks sound probabilistic reasoning, and hence, these models should also be considered a heuristic baseline, rather than a principled approach.
B PROOFS
B.1 DISCO Objective
Let be a prior distribution over a “time” parameter , let denote the data distribution, and let and be positive functions of time. Given the distributions with and with and
we will show that the DISCO Loss
is equivalent to
up to an additive constant independent of , where denotes the slightly Gaussian-perturbed data distribution as defined in the main text.
Proof. We see that
We want to stress that it has only the meaning of time in diffusion models, while in DISCO it indexes a family of successively noisier proposal distributions.
We have
where are constants w.r.t. . We notice that
and hence,
which implies that
which concludes the proof.
B.2 Multiscale Denoising Score Matching
We show that the multiscale denoising score matching (MDSM) [21] objective
has the minimizer when and for all (variance exploding).
Proof. For convenience, we assume , as this can always be subsumed into the prior without affecting the minimizer. Moreover, we assume . With , we denote with the marginal over (not to be confused with , which conditions on ). We have
(24) where the last step follows the same argument as in Section B.1. With and repeating this argument, we see that
where clearly, the minimizer is
Expanding , we get
Via Tweedie's formula, we can express the posterior mean as , and thus,
which concludes the proof.
This shows that the claim made in Li et al. [21] that only learns is incorrect.
B.3 Masked DISCO Training
We prove that the global minimum of is the same as that of .
Proof. Recall that
where
and .
Let denote the global minimizer of . From Proof B.1, we know that
We now show that also minimizes , for any . Analogously to Proof B.1, we have that
Note that the perturbation only acts on the coordinates where is 1 (i.e., the masked coordinates), and hence,
Using this fact, we have
which shows that the projection regresses the conditional score . Since obeys
for any mask , this implies that also minimizes .
B.4 Time-Independent Diffusion Models
Scaled architecture. Song and Ermon [32] proposed the parametrization , where is time-independent. This assumes that scores at different noise levels are simply scaled versions of one another, which is generally false: there exists no constant such that for all and , except in the trivial case where is Gaussian. Hence this parametrization cannot recover the correct scores even with infinite capacity.
Fully time-independent diffusion training. We show that minimizing with a time-independent score model , i.e.,
leads to a minimizer when and for all .
Proof. As the proof looks almost identical to Proof B.2, we will only briefly sketch it and refer the reader to Sun et al. [34] for more details. With , we again have that
Again via Tweedie's formula, we obtain
which concludes the proof.
C POSTERIOR SAMPLING
When optimizing , we need to draw samples from the posterior
When we set , we can draw exact samples from : Given , we compute for each , and sample from the normalized mass function over elements in . Intuitively, since the perturbation kernel is an isotropic Gaussian, it will assign more probability mass to points that are close to . This is distinct but reminiscent of the popular (minibatch) optimal transport techniques in the flow matching literature [38].
Sampling from the posterior in this way needs operations, where . In our low-dimensional experiments ( and ) we draw exact posterior samples and do not observe any significant slow-down during model training. In our high-dimensional experiments (CIFAR-10, FFHQ-64), we draw approximate posterior samples by computing the mass function over a minibatch instead of the entire dataset.
Future work may explore utilizing techniques like Locality Sensitive Hashing [10] or k-d Trees to efficiently get the nearest neighbors of , and then compute the mass function over just these neighbors. If is sufficiently small, this will be a good approximation to the true posterior mass function over all elements in .
When optimizing , we need to draw samples from the “zero-level” posterior, conditioned on :
In all image modeling experiments where we employ this, we will have that will be a single Dirac-delta where is the “helper” data point that was used to produce (since only has support on “large enough” masks ). Therefore, sampling from is trivial by sampling , , , and setting and .
D CONDITIONAL SAMPLING VS. INVERSE PROBLEMS
A related but distinct problem is Bayesian inference in inverse problems, where one observes through a known, typically noisy forward model and samples using a pretrained diffusion or score-based prior, e.g., via DPS [5], plug-and-play diffusion models (PnP-DM) [43], policy-gradient guidance (DPG) [37], or annealed Langevin methods with guarantees (APMC) [35]. Conditioning on clean coordinates is a special case only with the noise-free likelihood , for which the posterior is singular on the ambient space ; DISCO avoids this by sampling directly in the unobserved coordinates with the conditional score (7). These methods are therefore complementary: they address how to use a given prior under an explicit likelihood, whereas DISCO addresses how to train a score-based joint model whose arbitrary clean-coordinate conditionals are directly and coherently accessible. In particular, our Gradient Guidance baseline is the DPS-style likelihood-gradient approximation specialized to clean-coordinate conditioning, and we additionally report DPS itself in Table 2.
E DISCO TRAINING ALGORITHM
Algorithm 1 summarizes one training step of DISCO with a directly parameterized score network; for an energy-based model, . The posterior in line 4 is either computed exactly over the full dataset (low-dimensional experiments) or approximated over the current mini-batch (image experiments). For , one additionally draws a mask per sample, noises only the coordinates , uses the helper sample as target (Appendix C), and adds the resulting loss with weight .
Algorithm 1 One DISCO training step
Require: dataset , noise scale , , , score network , batch size
1: for do 2: , helper sample , \quad 3: \quad exact sample from 4: for all \quad or over the mini-batch 5: , \quad \quad 6: end for 7: 8: update with a gradient step on
F ABLATION: MINI-BATCH POSTERIOR APPROXIMATION
In our image experiments, we sample the zero-level posterior over a mini-batch instead of the full dataset (Appendix C). To isolate the effect of this approximation, we repeat the low-dimensional experiments of Section 5.1 (Table 1), but compute the posterior mass function over mini-batches of different sizes; all other settings are unchanged. Tables 4 and 5 report model fit and inference quality, respectively, with the same metrics as Table 1 (mean ).
The effect on joint model fit is dataset-dependent: Checkerboard is essentially unchanged, Moons degrades only mildly, whereas Rings benefits noticeably from larger batches and exact posterior sampling. Since DISCO targets the conditional of the learned model, inference quality remains uniformly strong across all batch sizes.
Table 4: Mini-batch posterior, model fit: W_1(p_0(\mathbf{x}), p_\boldsymbol{\theta}(\mathbf{x})) for DISCO trained with the zero-level posterior computed over mini-batches of the given size, or exactly over the full dataset (as in Table 1).
| Batch size | Moons | Checkerboard | Rings |
|---|---|---|---|
| 64 | |||
| 128 | |||
| 256 | |||
| 512 | |||
| Full dataset |
Table 5: Mini-batch posterior, inference quality: \mathbb{E}_{p_{0}(x_1)}[W_1(p_\boldsymbol{\theta}(x_2 \mid x_1), \hat{p}_{\boldsymbol{\theta}}(x_2 \mid x_1))] for the same models as in Table 4, with p_\boldsymbol{\theta} the exact model conditional (via rejection sampling) and obtained by tempered SMC on the conditional score (7).
| Batch size | Moons | Checkerboard | Rings |
|---|---|---|---|
| 64 | |||
| 128 | |||
| 256 | |||
| 512 | |||
| Full dataset |
G EDM-BASED DISCO TRAINING
We use the EDM implementation [16], which parameterizes a denoising network , from which the corresponding score network is obtained as
Since , it follows that simplifies to
(40) where we drop because it is a constant factor w.r.t. . Karras et al. [16] model their time-dependent denoiser as
where is the direct output of the neural network, and , , , are scalar-valued functions. Since we model a time-independent denoiser, we do not use and let the network predict both and via a linear layer with a sigmoid activation at the output. We train by minimizing with , using the mini-batch approximation to sample from the posterior (see Appendix C). Our mask distribution includes randomly sized patches and factorized Bernoulli distributions for the mask variables.
H EXPERIMENTAL DETAILS
Computing Infrastructure. All experiments ran on GPU nodes of SLURM clusters. The low-dimensional models were trained and evaluated on single NVIDIA Quadro RTX 8000 or L40 GPUs. Each image model (DISCO and EDM Masked) was trained data-parallel on a single node with 4–8 NVIDIA Quadro RTX 8000 or L40 GPUs. Sampling and evaluation (FID, inpainting, and the resampling consistency test) ran on NVIDIA Quadro RTX 8000, L40, H100 and B200 GPUs.
Assets and Licenses. We use the following existing assets. Datasets: CIFAR-10 [19], distributed by its authors for research use without an explicit license; FFHQ [15], whose compilation is licensed under CC BY-NC-SA 4.0 by NVIDIA, with the individual images under CC BY 2.0, CC BY-NC 2.0, Public Domain Mark 1.0, CC0 1.0, or U.S. Government Works licenses; the two-moons data is generated with scikit-learn [28] (BSD-3-Clause), and all other low-dimensional data is synthetic. Code and models: the EDM code base and the pretrained EDM checkpoints [16] (CC BY-NC-SA 4.0), including the Inception-v3 network used for FID; the score SDE code base [33] (Apache 2.0); LPIPS [45] (BSD-2-Clause); and the official TDS implementation [42], which is publicly available without an explicit license and which we only used to evaluate the TDS baseline, without redistributing it. Our code is derived from EDM and the score SDE code base and is released under their respective licenses (CC BY-NC-SA 4.0 for the image experiments, Apache 2.0 for the low-dimensional experiments).
H.1 Low-Dimensional Setting
DISCO Samples. As discussed in Section 2, we might use unconstrained or energy-based score models for training DISCO, which influences our options for sampling. For unconstrained scores, we might use Unadjusted Langevin Algorithm (ULA) to draw samples from our model. However, since it is well known that Langevin algorithms suffer from slow mixing times if the target distribution is multimodal, we employ tempering strategies [25] by considering a sequence of distributions with
where is a schedule of inverse temperature parameters. As , approaches a uniform distribution, and as , we recover the original model . Tempering simply scales the score, i.e., . In the same way, we can also temper any conditional distribution of given by (7).
For sampling from the DISCO model, we use BlackJAX [2] and apply tempered sequential Monte Carlo (SMC) [4, 6, 7, 24] with an adaptive schedule for the inverse temperatures , using an ESS target of 0.75. We perform systematic resampling after 2 Hamiltonian Monte Carlo (HMC) steps, using 3 leapfrog integration steps each. Since , we initialize the SMC sampler with the uniform distribution between -2.5 and 2.5.
Wasserstein-1 Distance. To evaluate model fit, we sample from the model 10,000 times, sample from 10,000 times, and compute (discrete) distance between them. We repeat this 30 times and report mean two times the standard deviation. To evaluate inference quality, we draw samples from the (joint) model. We then sample 30 times from and for each , we use rejection sampling (with ) to slice out the conditional samples from the joint samples. We then sample from the conditional model (e.g. using a heuristic, or DISCO via the same tempered SMC sampler) and again compute between these sets. Finally, we report the mean distance two times the standard deviation.
Diffusion Model Samples. To sample from the (joint) diffusion model, we use the ancestral sampling scheme with 100 steps. This is roughly equivalent in terms of computational cost to sampling from the DISCO model. The conditional heuristics use the same 100 ancestral steps. For DPS [5], we selected the step size per dataset from by inference quality on 10 held-out conditioning values ( for Moons and for Checkerboard and Rings).
Weighting Function. In all low-dimensional experiments, we let and use for all .
Network Architecture. The network architectures of the diffusion models and DISCO models are identical, except that the diffusion models receive the noise level as input, while the DISCO models do not. In the former case, we use a simple positional embedding for , which we concatenate to the input. Moreover, following Tancik et al. [36], we also use the same positional embedding for each coordinate in the input . The remainder of the MLP consists of 4 blocks (with residual connections), where each block contains 2 affine layers followed by leaky ReLU activations, and normalization layers at the start of each block, after the first affine layer (InstanceNorm++ introduced in Song and Ermon [31]). All affine layers in these blocks are maps , where we choose when . The final block is followed by the same normalization and activation layers, and a final affine layer mapping from to . When parameterizing the score directly, we use the output of the final hidden layer as our score approximation. When building an energy-based model, we follow Du et al. [8] and compute the energy as .
H.2 High-Dimensional Setting
Training. To train both DISCO and the EDM Masked model, we follow the EDM repository and use the same training hyperparameters of edm-cifar10-32x32-uncond-vp and edm-ffhq-64x64-uncond-vp, respectively—except for the following changes: We set the Adam hyperparameter for DISCO ( for EDM Masked, as in EDM) and use a batch size of (CIFAR) and (FFHQ). Each batch is constructed by sampling clean images, and using the same images for both the unmasked and the masked loss (sampling fresh masks every time).
Checkpoints. All post-hoc heuristics (Replacement, Gradient Guidance, DPS, RePaint, TDS) and the EDM column of Table 3 use the official pretrained EDM checkpoints edm-cifar10-32x32-uncond-vp and edm-ffhq-64x64-uncond-vp. EDM Masked uses the snapshot after 100.4M (CIFAR-10) and 100.1M (FFHQ-64) training images in both tables. We trained DISCO for 200M (CIFAR-10) and 187.7M (FFHQ-64) images, saving snapshots every 5–10M images. For unconditional generation (Table 3), we select the snapshot with the lowest FID: 135.5M images for CIFAR-10 (50k samples, over 19 snapshots) and 160.2M images for FFHQ-64 (8,192 samples, over the snapshots between 120.2M and 187.7M images). For inpainting (Table 2), we use the final snapshots (200M and 187.7M images), which scored better in the sampler search described below.
Sampler Hyperparameters. EDM and EDM Masked use the second-order Heun sampler of Karras et al. [16] with its default settings (; 18 steps, i.e., NFE = 35, for CIFAR-10 and 40 steps, i.e., NFE = 79, for FFHQ-64); for inpainting, EDM Masked additionally uses , , and , and on FFHQ-64 the same 300 steps as DISCO. For DISCO, we tuned the hyperparameters of the same (stochastic) Heun sampler—number of steps, , and , , , —by a search scored with FID on 8,192 samples (unconditional) and with mean LPIPS minus mean SSIM over all six masks on 512 images per mask (inpainting).
Unconditional Sampling. We follow Karras et al. [16] and their repository and use the same sampling settings for both CIFAR and FFHQ, except for DISCO, where we use the stochastic Heun sampler with 40 steps, and (CIFAR-10), and and (FFHQ-64), with , and .
Inpainting. For DISCO, we use the stochastic Heun sampler with , , and , with 18 steps (CIFAR-10) and 300 steps (FFHQ-64), and a mask-dependent . On CIFAR-10, we use for Narrow and Wide, for Altern. Lines and Super-Resolve 2x, for Expand, and
for Half. On FFHQ-64, we use for Wide, for Super-Resolve 2x, for Narrow, Half and Altern. Lines, and for Expand. The post-hoc heuristics use Euler-Maruyama ancestral sampling with the VP discretization of Karras et al. [16] and 36 (CIFAR-10) or 80 (FFHQ-64) steps, matching the NFE of the default Heun sampler. For TDS, we use the official implementation of Wu et al. [42] with particles per conditioning image and the same number of steps, and evaluate the particle with the largest final importance weight. DPS [5] follows their Algorithm 1 (an unguided ancestral step, followed by a step of size along ) with the same steps as the other heuristics; was selected from by LPIPS and SSIM on the first 256 images of the Wide and Half masks. For all methods, the observed pixels of each sample are set to the conditioning image, both for LPIPS and SSIM and in Figure 4. LPIPS and SSIM are computed on the first 1,024 images of the CIFAR-10 test set and of the FFHQ-64 dataset, respectively; the inpainting sampler search used the first 512 of these images.
The RePaint heuristic uses a jump size of 1 and 4 resampling steps, while adjusting the outer loop iteration count such that the total number of function evaluations is the same.
I RESAMPLING CONSISTENCY TEST

Figure 6: One chain of the resampling consistency test (seed 0) per method, shown every 10 rounds. DISCO and EDM Masked start from their own samples, the post-hoc samplers from the same sample of the pretrained EDM. Under a consistent sampler the image content may change from round to round (the chain mixes), but its quality should not degrade.
Each of 10,000 chains starts from an unconditional sample of the respective model (for the post-hoc samplers use samples of the pretrained EDM) and repeats for 60 rounds: draw a mask from the masked-training distribution (left or right half, Bernoulli(0.5) pixels, or a random rectangle covering at least 25% of the image), keep the observed pixels, resample the remaining ones with the method's conditional sampler, and quantize to 8 bits. All methods see identical masks; the four seeds change the starting samples, masks and sampler noise. We report FID against the dataset statistics on all 10,000 chains after every round; Figure 5 shows the mean over the four seeds (example chains in Figure 6), whose standard deviations (at most 0.3 FID for DISCO and EDM Masked, and at most 1.1 for all methods) are too small to be visible. DISCO and EDM Masked use the snapshots after 100.4M (CIFAR-10) and 100.1M (FFHQ-64) training images and the deterministic Heun sampler (, , 18 and 40 steps); DISCO stops at its smallest training noise level . The post-hoc samplers use the settings of Table 2, except that TDS uses our own implementation in the EDM code base, with particles per chain.
J ADDITIONAL HIGH-DIMENSIONAL QUALITATIVE RESULTS

Figure 7: Unconditional samples from the DISCO model trained on FFHQ-64.

Figure 8: Unconditional samples from the diffusion model trained on FFHQ-64.

Figure 9: Qualitative inpainting results on FFHQ-64 (images 16–21 of the evaluation set, one per mask), with the samplers of Table 2; Input dims the unobserved pixels, Truth shows the original image.

Figure 10: Qualitative inpainting results on FFHQ-64 (images 10–15 of the evaluation set, one per mask), with the samplers of Table 2; Input dims the unobserved pixels, Truth shows the original image.

Figure 11: Unconditional samples from the DISCO model trained on CIFAR-10.

Figure 12: Unconditional samples from the diffusion model trained on CIFAR-10.