Constrained Language Generation with Discrete Diffusion Models

📅 2025-03-12
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
To address the challenge of ensuring that large language model (LLM) outputs reliably comply with user instructions and safety constraints, this paper proposes Constraint-Aware Discrete Diffusion (CDD). CDD is the first method to embed differentiable optimization directly into the discrete diffusion sampling process, enabling fine-grained, dynamic injection of diverse constraints—including toxicity suppression, lexical constraints (character- or sequence-level), and molecular property requirements—during generation, without post-hoc filtering or model retraining. By integrating constraint encoding with token-level gradient guidance, CDD preserves text fluency and semantic coherence while substantially improving constraint satisfaction rates. Experiments demonstrate that CDD outperforms state-of-the-art autoregressive models and existing discrete diffusion approaches across toxicity control, constrained vocabulary generation, and molecular sequence design tasks.

Technology Category

Application Category

📝 Abstract
Constraints are critical in text generation as LLM outputs are often unreliable when it comes to ensuring generated outputs adhere to user defined instruction or general safety guidelines. To address this gap, we present Constrained Discrete Diffusion (CDD), a novel method for enforcing constraints on natural language by integrating discrete diffusion models with differentiable optimization. Unlike conventional text generators, which often rely on post-hoc filtering or model retraining for controllable generation, we propose imposing constraints directly into the discrete diffusion sampling process. We illustrate how this technique can be applied to satisfy a variety of natural language constraints, including (i) toxicity mitigation by preventing harmful content from emerging, (ii) character and sequence level lexical constraints, and (iii) novel molecule sequence generation with specific property adherence. Experimental results show that our constraint-aware procedure achieves high fidelity in meeting these requirements while preserving fluency and semantic coherence, outperforming auto-regressive and existing discrete diffusion approaches.
Problem

Research questions and friction points this paper is trying to address.

Enforce constraints in text generation for reliability and safety.
Integrate discrete diffusion models with differentiable optimization for control.
Apply constraints to mitigate toxicity and ensure specific property adherence.
Innovation

Methods, ideas, or system contributions that make the work stand out.

Integrates discrete diffusion with differentiable optimization
Imposes constraints directly in diffusion sampling process
Achieves high fidelity in constraint adherence and fluency
🔎 Similar Papers
No similar papers found.