This article makes discrete masked models for the generative modeling of discrete data controllable. The goal is to generate samples of a discrete random variable that adheres to a posterior distribution, satisfies specific constraints, or optimizes a reward function. This methodological development enables broad applications across downstream tasks such as class-specific image generation and protein design. Existing approaches for controllable generation of masked models typically rely on task-specific fine-tuning or additional modifications, which can be inefficient and resource-intensive. To overcome these limitations, we propose a novel plug-and-play framework based on importance sampling that bypasses the need for training a conditional score. Our framework is agnostic to the choice of control criteria, requires no gradient information, and is well-suited for tasks such as posterior sampling, Bayesian inverse problems, and constrained generation. We demonstrate the effectiveness of our approach through extensive experiments, showcasing its versatility across multiple domains, including protein design.
翻译:本文旨在实现离散掩码模型在离散数据生成建模过程中的可控性。其核心目标是生成符合后验分布、满足特定约束条件或优化奖励函数的离散随机变量样本。该方法的提出为下游任务(如特定类别图像生成与蛋白质设计)提供了广泛的应用前景。现有针对掩码模型的可控生成方法通常依赖于任务特定的微调或额外模型修改,这类方法往往效率低下且资源消耗较大。为突破这些限制,我们提出了一种基于重要性采样的新型即插即用框架,该框架无需训练条件评分函数。我们的框架对控制准则的选择具有普适性,无需梯度信息,特别适用于后验采样、贝叶斯逆问题及约束生成等任务。通过大量实验验证了该方法的有效性,并在蛋白质设计等多个领域展示了其卓越的泛化能力。