Generative AI models, particularly diffusion models, have achieved remarkable success in producing high-quality samples. However, ensuring that generated samples satisfy specific constraints with absolute certainty—so-called hard constraints—remains a critical challenge. In safety-critical applications such as autonomous driving or medical imaging, soft guidance methods do not guarantee constraint satisfaction. A new research paper, "Conditional Diffusion Guidance under Hard Constraint: A Stochastic Analysis Approach," authored by Guo, Zhengyi, Tang, Wenpin, and Xu, Renyuan, and posted on arXiv on February 5, 2026, introduces a principled framework to address this limitation.
The Challenge of Hard Constraints
In standard conditional diffusion, guidance methods often rely on reward-based or classifier-based signals that steer the generation process toward desired outcomes but cannot enforce strict adherence to specified events. The authors note that such "soft or reward-based guidance methods offer no guarantee of constraint satisfaction." Their work targets scenarios where the generated sample must satisfy a prescribed event with probability one—a requirement that arises in rare-event simulation and safety-critical AI systems.
A Stochastic Analysis Approach
The researchers build on a probabilistic interpretation of diffusion models to develop a framework based on Doob's h-transform, a concept from stochastic analysis that adjusts the drift of a diffusion process to condition on future events. Specifically, they derive a guided dynamics that augments a pretrained diffusion with an explicit drift correction term. This correction involves the logarithmic gradient of a conditioning function, denoted h, and crucially does not modify the pretrained score network. The approach leverages martingale representation and quadratic variation processes to characterize the correction.
Off-Policy Learning Algorithms
To make the framework practical, the authors propose two novel off-policy learning algorithms that estimate the function h and its gradient using only trajectories generated by the pretrained model. The first algorithm uses a martingale loss, while the second employs a martingale-covariation loss. These losses exploit martingale and quadratic-variation identities to learn the guidance term without requiring retraining of the underlying diffusion model. The paper also provides non-asymptotic guarantees for the resulting conditional sampler, bounding the error in both total variation and Wasserstein distances. These guarantees explicitly characterize the impact of score approximation and guidance estimation errors.
Numerical Validation
The researchers conducted numerical experiments to demonstrate the effectiveness of their methods in enforcing hard constraints and generating rare-event samples. The code for these experiments is publicly available at the https URL provided in the paper. While the paper does not disclose specific dataset or performance metrics beyond the theoretical analysis, the experiments confirm that the proposed algorithms can reliably produce samples satisfying the required conditions.
Implications for Enterprise AI
For technology leaders evaluating AI systems for critical applications, this work offers a theoretical foundation for building generative models that can guarantee compliance with hard constraints. The ability to enforce constraints with probability one is particularly relevant for industries such as aerospace, autonomous transport, and healthcare, where even rare failures can have severe consequences. The off-policy nature of the algorithms means that existing pretrained diffusion models can be augmented without costly retraining. While the paper remains purely theoretical, it opens a path toward more reliable AI generation.