🤖 AI Summary
Deep generative models (DGMs) struggle to strictly satisfy hard linear equality constraints; existing approaches typically rely on heuristic post-processing, disregarding data distribution consistency and compromising sample fidelity. This work introduces the first rigorous, differentiable, and probabilistically consistent constraint-embedding framework that directly incorporates linear equality constraints into DGM training—ensuring 100% constraint compliance while guaranteeing that the generated distribution exactly matches the true conditional distribution. Our method leverages implicit differentiation on the constraint manifold and a novel gradient estimator, supporting mainstream architectures—including VAEs, GANs, and diffusion models—without requiring post-hoc correction. Evaluated across five image datasets and three scientific tasks, our approach achieves superior FID and LPIPS scores compared to all prior constrained DGM methods, with constraint satisfaction rising from 0% for baseline DGMs to 100%.
📝 Abstract
While deep generative models~(DGMs) have demonstrated remarkable success in capturing complex data distributions, they consistently fail to learn constraints that encode domain knowledge and thus require constraint integration. Existing solutions to this challenge have primarily relied on heuristic methods and often ignore the underlying data distribution, harming the generative performance. In this work, we propose a probabilistically sound approach for enforcing the hard constraints into DGMs to generate constraint-compliant and realistic data. This is achieved by our proposed gradient estimators that allow the constrained distribution, the data distribution conditioned on constraints, to be differentiably learned. We carry out extensive experiments with various DGM model architectures over five image datasets and three scientific applications in which domain knowledge is governed by linear equality constraints. We validate that the standard DGMs almost surely generate data violating the constraints. Among all the constraint integration strategies, ours not only guarantees the satisfaction of constraints in generation but also archives superior generative performance than the other methods across every benchmark.