arXiv:2605.09749cs.AI2026-05被引 1

让扩散模型生成时自动满足约束条件,无需重训练。

Primal-Dual Guided Decoding for Constrained Discrete Diffusion

论文配图:Primal-Dual Guided Decoding for Constrained Discrete Diffusion
图 1 · 摘自论文原文
  • 用拉格朗日乘子动态调整词汇概率,实时引导生成
  • 在文本、分子、音乐中提升约束满足率,且不降低质量
  • 无需额外训练或采样,可同时处理多个约束

离散扩散模型通过逐步解码生成结构化序列,但在生成过程中施加全局属性约束仍具挑战。本文提出原始-对偶引导解码,一种推理阶段的方法,将受限生成建模为带KL正则的优化问题,并通过自适应拉格朗日乘子在线求解。每步去噪时,方法通过依赖约束的偏置项调整词元逻辑值,乘子基于镜面下降法根据约束违反程度更新。该偏置项是约束最优的KL正则投影,使受约束分布尽可能接近模型原分布的同时满足约束。该方法无需重训练,也无需额外模型评估,支持多个约束并存,并提供约束违反的理论边界。我们在主题文本生成、分子设计和音乐播放列表生成任务上验证,使用领域特定评分函数实例化单一算法,显著提升约束满足度,同时保持关键领域质量指标。

原文摘要 · Abstract (English)

Discrete diffusion models generate structured sequences by progressively unmasking tokens, but enforcing global property constraints during generation remains an open challenge. We propose primal-dual guided decoding, an inference-time method that formulates constrained generation as a KL-regularised optimisation problem and solves it online via adaptive Lagrangian multipliers. At each denoising step, the method modifies token logits through an additive, constraint-dependent bias, with multipliers updated by mirror descent based on constraint violation. The bias arises as the optimal KL-regularised projection of the constraint, so the constrained distribution remains as close as possible to the model's unconstrained distribution while still satisfying the constraint. The method requires no retraining and no additional model evaluations beyond standard sampling, supports multiple simultaneous constraints, and provides formal bounds on constraint violation. We evaluate our approach on topical text generation, molecular design, and music playlist generation, showing that a single algorithm instantiated via domain-specific scoring functions improves constraint satisfaction while preserving relevant domain-specific quality metrics.

扩散模型约束生成文本生成分子设计

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。