Standard diffusion models operate on the premise that data lives in an unbounded Euclidean space. They add Gaussian noise to samples until they become indistinguishable from white noise, then learn to reverse this process. However, real-world data is rarely truly unbounded. Image pixels are confined to $[0, 255]$, robot joints have physical limits, and chemical concentrations cannot be negative.
When we apply standard diffusion to these constrained domains, the forward process frequently pushes data into "illegal" regions. To fix this, practitioners often resort to heuristic "clipping" or "thresholding"—manually forcing out-of-bounds values back into the valid range. As Aaron Lou and Stefano Ermon point out in Reflected Diffusion Models, these hacks break the mathematical foundations of the model, leading to artifacts like oversaturated pixels and poor likelihood estimation.
The emerging research direction is to build boundary awareness directly into the diffusion framework, ensuring that the stochastic process naturally respects the geometry of the domain.
The Skorokhod Problem and Reflected SDEs
The most rigorous way to constrain a diffusion process is through Reflected Stochastic Differential Equations (RSDEs). Instead of letting a particle wander freely, we introduce a "regulator" term that pushes the particle back into the interior whenever it hits a boundary.
This is formally known as the Skorokhod problem. As explored by David Lipshutz and Kavita Ramanan in Pathwise differentiability of reflected diffusions in convex polyhedral domains, this framework decomposes the motion into two parts: the standard "free" diffusion and a boundary correction term that only activates at the edges.
In the context of generative modeling, this means the forward noise process is no longer a simple Gaussian crawl. It is a "reflected" Brownian motion that bounces off the walls of the data manifold. Sebastien Bubeck, Joseph Lehec, and Ronen Eldan demonstrated the power of this approach in Projected Langevin Monte Carlo, showing that these constrained walks can efficiently sample from complex log-concave distributions.
Enforcing Neumann Boundary Conditions
To generate data, we must reverse this reflected process. This requires a "score function" (the gradient of the log-density) that is aware of the boundaries.
A key insight from Nic Fishman, Leo Klarner, and colleagues in Diffusion Models for Constrained Domains is that the score network must satisfy Neumann boundary conditions. Essentially, the learned vector field must be tangent to the boundary (or vanish at the edges) so that the reverse process never attempts to "leak" out of the domain.
By parameterizing the neural network such that its output vanishes at the domain limits, the model explicitly encodes the geometric shape of the constraints. This ensures that every step of the denoising process remains within the feasible region. This principle extends beyond simple boxes; Ricky T. Q. Chen and Yaron Lipman show in Flow Matching on General Geometries that using specific boundary conditions for spectral eigenfunctions allows generative models to respect the limits of complex manifolds, such as mazes or 3D meshes.
Multiplicative Noise and Beta Diffusion
While reflection is one way to handle boundaries, another approach is to change the nature of the noise itself. Standard diffusion uses additive Gaussian noise, which is inherently unbounded.
Beta Diffusion, introduced by Mingyuan Zhou and his team in Beta Diffusion, replaces additive noise with multiplicative transitions based on the Beta distribution. Because the Beta distribution is naturally defined on the interval $[0, 1]$, the diffusion process is mathematically incapable of leaving that range. This approach has proven particularly effective for data with strict simplex constraints, such as adjacency matrices in Advancing Graph Generation through Beta Diffusion.
Why Boundary Awareness Matters
The shift toward boundary-aware models is not just a mathematical curiosity; it solves critical engineering failures in generative AI:
- Physical Consistency: In fluid dynamics, Marten Lienen and Stephan Günnemann demonstrate in Generative Diffusion for 3D Turbulent Flows that integrating Dirichlet boundary conditions as guidance allows models to generate realistic airflows around complex, unseen objects.
- Architectural Precision: For tasks like floor plan generation, Sizhong Qin and others show in ChatHouseDiffusion that boundary-aware models prevent "leakage," ensuring internal rooms strictly respect the external walls of a building.
- Efficiency: Reflected Flow Matching by Tianyu Xie and Yu Zhu shows that by incorporating a reflection term into the underlying ODE, one can achieve the speed of Flow Matching without the artifacts caused by out-of-bounds trajectories.
By treating boundaries as fundamental geometric features rather than obstacles to be clipped away, these models achieve a higher degree of fidelity and physical validity than their unconstrained predecessors.