Can Continuous-Time Diffusion Models Generate and Solve Globally Constrained Discrete Problems? A Study on Sudoku
Mariia Drozdova
TL;DR
This paper examines whether standard continuous-time diffusion models can represent distributions over highly constrained discrete structures, using completed Sudoku grids as a stress test and modeling along a Gaussian probability path $p_t(x|z)=\mathcal{N}(x;\alpha_t z,\beta_t^2 I)$. It systematically compares flow matching and score-based approaches, along with DDPM-style discretizations, across deterministic (ODE) and stochastic (SDE) samplers, and across unconditional generation and guided constraint solving with hard clues. Key findings show that unconditional generation is dominated by stochastic, score-based methods, with DDPM-style samplers delivering the highest validity among diffusion approaches; under guidance, linear probability paths with $\beta(t)$-scaled noise and score SDEs become competitive, reducing the gap with DDPM-based solvers. These results demonstrate that classic diffusion/flow formulations can assign non-zero probability mass to globally constrained discrete configurations and can be repurposed for constraint satisfaction via stochastic search, offering implications for using continuous-time diffusion in discrete, structured reasoning tasks. The study also highlights limitations in efficiency and generalizability, motivating future work on adaptive noise control and hybrid approaches that integrate diffusion with symbolic reasoning.
Abstract
Can standard continuous-time generative models represent distributions whose support is an extremely sparse, globally constrained discrete set? We study this question using completed Sudoku grids as a controlled testbed, treating them as a subset of a continuous relaxation space. We train flow-matching and score-based models along a Gaussian probability path and compare deterministic (ODE) sampling, stochastic (SDE) sampling, and DDPM-style discretizations derived from the same continuous-time training. Unconditionally, stochastic sampling substantially outperforms deterministic flows; score-based samplers are the most reliable among continuous-time methods, and DDPM-style ancestral sampling achieves the highest validity overall. We further show that the same models can be repurposed for guided generation: by repeatedly sampling completions under clamped clues and stopping when constraints are satisfied, the model acts as a probabilistic Sudoku solver. Although far less sample-efficient than classical solvers and discrete-geometry-aware diffusion methods, these experiments demonstrate that classic diffusion/flow formulations can assign non-zero probability mass to globally constrained combinatorial structures and can be used for constraint satisfaction via stochastic search.
