Score-based and diffusion models have emerged as effective approaches for both conditional and unconditional generation. Still conditional generation is based on either a specific training of a conditional model or classifier guidance, which requires training a noise-dependent classifier, even when the classifier for uncorrupted data is given. We propose an approach to sample from unconditional score-based generative models enforcing arbitrary logical constraints, without any additional training. Firstly, we show how to manipulate the learned score in order to sample from an un-normalized distribution conditional on a user-defined constraint. Then, we define a flexible and numerically stable neuro-symbolic framework for encoding soft logical constraints. Combining these two ingredients we obtain a general, but approximate, conditional sampling algorithm. We further developed effective heuristics aimed at improving the approximation. Finally, we show the effectiveness of our approach for various types of constraints and data: tabular data, images and time series.
翻译:得分模型与扩散模型已成为条件生成和无条件生成的有效方法。然而,条件生成要么基于条件模型的特定训练,要么依赖分类器引导——即便已具备针对未损坏数据的分类器,仍需训练噪声依赖的分类器。我们提出一种方法,无需任何额外训练即可从无条件得分生成模型中采样并强制执行任意逻辑约束。首先,我们展示了如何操控学习到的得分,以从基于用户定义约束的非归一化条件分布中采样。其次,我们构建了一个灵活且数值稳定的神经符号框架,用于编码软逻辑约束。通过结合这两个要素,我们获得了一种通用但近似的条件采样算法。我们还开发了旨在改进近似的有效启发式方法。最后,我们在表格数据、图像和时间序列等多种数据与约束类型上验证了该方法的有效性。