Manuscript Offprint

arXiv:2609.09009

Let It Go or Learn to Self-Correct: Continuous Diffusion for Constrained Discrete Tasks

Mariia Drozdova, Stéphane Liem Nguyen, François Fleuret

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Denoising Diffusion Probabilistic Models (DDPMs) generate samples by starting from noise and repeatedly denoising while keeping each update close to the current noisy state. This behavior is effective in many continuous domains, but its role is less clear for globally constrained discrete tasks, such as Sudoku, graph connectivity, Latin squares, and N-queens. In such settings, early discrete errors can be difficult to undo. As a result, standard diffusion sampling may preserve early mistakes, even when the model's clean predictions are informative. We compare standard samplers to sampling directly from the model's clean prediction. Without retraining, this single change improves Sudoku validity from 31% to 95%, with consistent gains across the other discrete tasks. We hypothesize that staying close to the current noisy state is harmful because the reverse trajectory can drift off the forward noising distribution the model was trained on. To reduce this train-test mismatch, we further introduce self-correction training, which exposes the model to its own predictions, improving robustness to errors that arise during inference. This substantially improves the performance of standard samplers. Our results suggest that continuous diffusion models can learn nontrivial global constraints, but discrete reasoning tasks require better alignment between training and inference: either through samplers that reduce commitment to early decisions, or through training that teaches the model to correct its own inference-time errors.

1 Introduction

Diffusion models have become a dominant paradigm for generative modeling in continuous domains, achieving state-of-the-art performance on high-dimensional perceptual data such as images [17, 25, 44, 47, 41] and videos [1, 18, 55]. Given this success, it is worth asking whether they can also handle globally constrained discrete tasks. Prior work has incorporated constraints into diffusion models through explicit mechanisms: projection [10, 49], guidance [22], or search-based post-processing [48]. Discrete diffusion methods built on D3PM [3] have been applied to combinatorial optimization [48], puzzle solving and satisfiability [56], and controlled text and molecule generation [7]. On combinatorial problems, DIFUSCO [48] evaluated both D3PM-based discrete diffusion and continuous diffusion [9], reporting the latter as less effective. In this work, we investigate why standard continuous diffusion sampling can fail on these tasks and whether changes to sampling and training can mitigate these failures.

We study constrained discrete tasks where constraints are implicit in the data rather than provided explicitly to the model: Sudoku [24, 51, 54], graph connectivity [15], Latin squares, and N-queens.

Preprint.

These benchmarks are closely related to recent iterative-reasoning approaches: HRM/TRM use recursive refinement [51, 24], SRM studies denoising-based spatial reasoning and sampling-order choices [54], and IRED casts graph connectivity as iterative energy diffusion [15]. Our goal is complementary: we use these tasks to diagnose standard continuous diffusion itself, asking when the denoiser learns useful global structure, why inference can fail to produce valid samples, and how it can be improved.

In DDPMs [17], each reverse step makes a small update conditioned on the current state, which is well suited to perceptual data but its effect on globally constrained discrete tasks is less clear. In constrained discrete tasks, we observe a failure mode of standard DDPM sampling: generated samples can look locally plausible (e.g. each cell resembles a valid symbol: one-hot encoding or valid MNIST image) but remain globally invalid (e.g. Sudoku constraints are not satisfied). This raises a question: does the denoiser fail to learn the constraints, or does the reverse update fail to use the denoiser's clean prediction effectively?

We first test this by modifying only the reverse update. Both DDPM and the modified sampler use the current state xtx_t as input to the denoiser, producing a clean proposal x^0(xt,t)\hat{x}_0(x_t, t). The difference is what happens after this proposal is formed: DDPM carries a direct xtx_t-dependent residual into the reverse mean, keeping the next state tied to the current analog state. We remove this direct residual, yielding a limiting case of the generalized DDIM/DDPM sampling family [44] that we call Tweedie reprojection. This inference-only change gives large gains on the same checkpoints, improving one-hot Sudoku validity from 31% to 95%. Thus, the denoiser has learned useful constraint structure, but not always robustly enough to guide the DDPM trajectory once that trajectory begins to drift.

We interpret this as a form of training-inference mismatch [37, 36, 13, 40, 57, 31]. During training, the model sees forward-noised valid samples. During sampling, however, the reverse process is driven by the model's own imperfect predictions. Small denoising errors can move the trajectory toward states that are locally plausible but globally invalid; the DDPM residual can then keep subsequent updates close to these states, causing errors to compound. This motivates us to also modify the training process with self-correction loss, where the model is exposed to noised versions of its own intermediate predictions and trained to recover the original valid target. This training modification improves standard samplers: for example, DDPM's validity on one-hot Sudoku rises from 31% to 87%.

Our study focuses on controlled constrained-discrete benchmarks. Tweedie reprojection should be viewed as a diagnostic for decoded constraint satisfaction, not as a general sampler: in perceptually rich domains, the xtx_t residual may carry important detail and discarding it may harm generation quality. Self-correction only partially addresses the training-inference mismatch; more complete approaches remain future work.

In summary, our contributions are:

  • We identify a failure mode of continuous diffusion on constrained discrete reasoning tasks, where inference can lead to locally plausible but globally inconsistent states.

  • We study the role of the direct xtx_t-dependent residual in DDPM sampling, and show that removing this residual can substantially improve constraint satisfaction without retraining.

  • We propose a self-correction training procedure exposing the denoiser to noisy versions of its own predictions. This reduces the training-inference mismatch and improves standard samplers (Euler, Euler-Maruyama, DDPM).¹

References (53)