# Generating from Discrete Distributions Using Diffusions: Insights from Random Constraint Satisfaction Problems

*Alankrita Bhatt, Mukur Gupta, Germain Kolossov, Andrea Montanari*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/150409) · [OpenReview](https://openreview.net/forum?id=iGHKaEN77P) · [Open on the map](../papers.html#p150409)

Category: [Diffusion & Image Generation](../pcat/5.md) › [Discrete Diffusion Constrained Generation](../pgroup/694.md) · Type: empirical study · Keywords: discrete diffusion, random constraint satisfaction, k-SAT, sampling accuracy, variable ordering

## Summary
The paper connects insights from random constraint satisfaction problems to diffusion models for generating discrete data, revealing that continuous diffusions outperform masked discrete variants, learned diffusions can achieve ideal accuracy, and variable ordering significantly impacts performance.

## Explained to a 5-year-old
We have a puzzle where we need to pick answers that satisfy all rules. The paper looks at two ways to solve it: one uses smooth painting steps, the other uses step-by-step erasing. It shows that the smooth method works better. We can teach a computer to copy the best solution. Changing the order we think about the puzzle pieces helps a lot.

## Explained to a 5-year-old, longer
Imagine a big box of puzzles where each puzzle has many questions and each question must follow some rules. The goal is to find one answer set that makes every rule true, like solving a giant crossword. People have made computer programs that try to guess answers by slowly changing them, like a liquid that flows. Other programs try to change only one piece at a time, like erasing letters one by one. The paper compares these two ways to see which works better. It finds that the smooth flowing method usually gets the right answer more often. It also shows that a computer can learn how to copy the best solution it sees. The learned method can even reach the perfect answer that theory says is possible. The order in which we look at the puzzle pieces matters a lot. Sometimes picking pieces in a clever order helps, even if it is not the usual way people do it. These insights help us understand why some puzzle-solving methods work better than others. Overall, the study tells us that thinking about the structure of the puzzle can improve how we generate answers.

## For a technical reader
The paper investigates how diffusion models can be used to sample uniformly from discrete solutions of random constraint satisfaction problems such as k-SAT. It compares continuous diffusion processes with masked discrete variants and shows that the former generally achieve higher sampling accuracy. The authors demonstrate that learned diffusion models can match the theoretical optimal accuracy when properly trained. They also find that the order in which variables are processed influences performance, with smart ordering beating naive heuristics. These findings provide practical guidance for designing diffusion-based samplers for discrete data generation tasks.

## Problem
Generating uniformly random solutions to discrete constraint problems such as k-SAT formulas is challenging, and understanding how different diffusion-based generative approaches behave on these problems remains an open question.

## Method
The authors study both continuous diffusion processes and masked discrete diffusion variants to generate random solutions of random k-SAT/k-XORSAT formulas. They evaluate learned diffusions against an ideal theoretical baseline and investigate how variable ordering strategies affect accuracy.

## Results
Continuous diffusions outperform masked discrete diffusions, and learned diffusions can match the theoretical ideal accuracy. Additionally, smart variable ordering significantly boosts performance, even when it does not follow popular heuristics.

## Contributions
The paper bridges theory from random constraint satisfaction problems to diffusion-based generative models, revealing performance differences among diffusion variants and the impact of variable ordering. It provides empirical evidence that learned diffusions can achieve optimal sampling accuracy and highlights the importance of problem structure in designing generative approaches.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/150409)
