Introduction
Standard diffusion models have revolutionized generative AI by learning to map data to unconstrained noise in $\mathbb{R}^d$. However, a fundamental mismatch exists between the theory of these models and the nature of real-world data. Most data types are inherently constrained: images are defined by pixel values within a fixed range (e.g., [0, 255]), and categorical data often resides on a probability simplex.
To prevent generated samples from wandering into impossible values, practitioners currently rely on "thresholding" or "clipping"—manually forcing values back into valid ranges during each step of the generative process. While effective, this is a mathematical heuristic that creates a discrepancy between the unconstrained training phase and the constrained sampling phase. This mismatch often manifests as artifacts, such as oversaturation in high-guidance text-to-image generation, and complicates the use of efficient deterministic sampling. Reflected Diffusion Models (RDMs) address this by incorporating constraints directly into the model's underlying physics.
The Reflected Diffusion Framework
RDMs replace standard Brownian motion with Reflected Brownian motion. In this framework, the diffusion process is governed by Reflected Stochastic Differential Equations (SDEs). Conceptually, this can be visualized as a particle diffusing within a bounded container; whenever the particle strikes a boundary, it instantly reflects back into the valid domain $\Omega$. This ensures that the probability distribution maintains support only within the specified constraints by design, rather than through post-hoc corrections.
Constrained Denoising Score Matching (CDSM)
Learning the "score" (the gradient of the log-density) on bounded domains presents a significant mathematical challenge. Standard score matching relies on Stokes' Theorem, which produces intractable boundary terms when the domain is constrained. The authors introduce Constrained Denoising Score Matching (CDSM), a novel loss function designed to handle these boundaries gracefully while remaining scalable to high-dimensional spaces.
Computational Efficiency
To maintain inference speeds comparable to standard models, RDMs utilize a hybrid computational approach to approximate the score function:
- Local Approximation: For low noise levels, the score is approximated using a Sum of Gaussians, accounting for local reflections near the boundaries.
- Global Approximation: For high noise levels, the model employs Laplacian Eigenfunctions, which capture the global harmonics of the domain.
For complex geometries like simplices, the framework uses a diffeomorphism (a smooth mapping) to transform the domain into a hypercube, simplifying the required calculations.
Key Insights and Theoretical Contributions
Thresholding as a Discretization
A primary contribution of this work is the proof that common "clipping" hacks are actually unprincipled discretizations of Reflected SDEs. By formalizing this relationship, RDMs close the gap between heuristic practices and rigorous theory, allowing models to be trained with the knowledge of the boundaries they will encounter during sampling.
Stability Under Guidance
In standard diffusion models, increasing the "guidance weight" (used to improve text alignment or image quality) often leads to "fried" or oversaturated images because the model pushes values far beyond the training distribution. RDMs are inherently robust to extreme guidance weights. Because the boundaries are baked into the model's understanding of the data manifold, the samples remain stable and high-fidelity even under high guidance.
Boundary-Free ODEs
While the reflection term in an SDE is complex, the authors demonstrate that this term disappears in the corresponding Probability Flow ODE. This allows for fast, deterministic sampling that stays perfectly within the valid domain without requiring manual thresholding.
Experimental Results
The RDM framework was evaluated across several benchmarks, demonstrating both theoretical elegance and empirical performance:
- Image Quality: On CIFAR-10, RDMs achieved an Inception Score (IS) of 10.46, surpassing many unconstrained state-of-the-art models.
- Likelihood Estimation: The model achieved 2.68 bits-per-dimension (BPD) on CIFAR-10, representing one of the highest likelihood scores recorded without the use of complex importance sampling tricks.
- High-Dimensional Scaling: The model successfully learned distributions on a 1000-dimensional simplex (using Inception classifier logits), a task where previous constrained methods typically failed to scale.
- Guidance Robustness: In tests using classifier guidance on ImageNet64, standard models saw a 75% divergence rate when thresholding was removed. In contrast, RDMs remained 100% stable.
Conclusion and Future Work
Reflected Diffusion Models provide a rigorous mathematical foundation for constrained generative modeling. By replacing heuristic clipping with reflected SDEs, they improve stability, likelihood, and sample quality.
Future research directions include applying this framework to massive latent diffusion models to natively address oversaturation issues and exploring the optimization of neural architectures specifically for reflected processes. While Latent Diffusion Models (LDMs) currently bypass some of these issues by working in learned latent spaces, RDMs offer a path toward more principled boundary handling in both pixel and latent domains.
Summary updated