Constrained Discrete Diffusion
Authors: Michael Cardei
Jacob K Christopher
Bhavya Kailkhura
Thomas Hartvigsen
Ferdinando Fioretto
Venue: NeurIPS 2025 poster ()
Keywords: Discrete Diffusion
Controllable Generation
Differentiable Optimization
Primary area: deep_learning

Abstract: Discrete diffusion models are a class of generative models that construct sequences by progressively denoising samples from a categorical noise distribution. Beyond their rapidly growing ability to generate coherent natural language, these models present a new and important opportunity to enforce sequence-level constraints, a capability that current autoregressive models cannot natively provide.
This paper capitalizes on this opportunity by introducing $\textit{Constrained Discrete Diffusion}$ (CDD), a novel integration of differentiable constraint optimization within the diffusion process to ensure adherence to constraints, logic rules, or safety requirements for generated sequences. Unlike conventional text generators that often rely on post-hoc filtering or model retraining for controllable generation, CDD directly imposes constraints into the discrete diffusion sampling process, resulting in a training-free and effective approach.
Experiments in toxicity-controlled text generation, property-constrained molecule design, and instruction-constrained text completion demonstrate that CDD achieves $\textit{zero constraint violations}$ in a diverse array of tasks while preserving fluency, novelty, and coherence, and outperforming autoregressive and existing discrete diffusion approaches.

Constrained Discrete Diffusion
Michael Cardei" University of Virginia
Jacob K. Christopher' University of Virginia csk4sr@virginia edu
Thomas Hartvigsen
University of Virginia
ntr2rm@virginia. edu
hartwigsendvirginiaa edu
Bhavya Kailkhura
Ferdinando Fioretto'
Lawrence Livermore National Laboratory kailkhura1@l1n1. gov
University of Virginia fioretto@virgini. edu
Abstract
Discrete diffusion models are a class of generative models that construct sequences by progressively denoising samples from categorical noise distribution. Beyond their rapidly growing ability to generate coherent natural language, these models present a new and important opportunity to enforce sequence-level constraints, a capability that current autoregressive models cannot natively provide. This pa- per capitalizes on this opportunity by introducing Constrained Discrete Diffission (CDD), novel integration of differentiable constraint optimization within the diffusion process to ensure adherence constraints, logic rules, safety require- ments for generated sequences. Unlike conventional text generators that often rely on post-hoc filtering or model retraining for controllable generation, CDD directly imposes constraints into the discrete diffusion sampling process, result- ing a training-free and effective approach. Experiments in toxicity-come controlle text generation, coneert-constrriined molecule design, and instruction-constraine text completion demonstrate that CDD achieves zero constraint violations in a diverse array of tasks while preserving fluency, novelty, and coherence, while outperforming autoregressive and existing discrete diffusion approaches.
1 Introduction
Language generation, alongside many scientific problems, admits natural representation the generation of a discrete sequence from a finite alphabet. Examples range from natural language
molecular SMILES strings and linearized chemical procedures (1-4. While large language models (LL.Ms) and related sequence transformers have recently accelerated discovery by proposing candidate sequences with desirable attributes, their autoregressive sampling mechanism produces tokens sequentially, hindering the ability to provide native mechanism to ensure constrained feasibility. When these constraints are satisfied, the generated outputs may be unreliable and ineffective in real-world applications. For example, a single out-of-vocall -ot--blllla atom in SMILES string can render synthesized compound meaningless or even dangerous; similarly an overlooked volume unit in an autonomous laboratory protocol can trigger unsafe reactions.
To limit such risks, L.MSs often deployed with a variety of guardrails. These include soft alignment through reinforcement learning from human feedback (RLHF), rejection sampling, or heuristic post- processing 3 5. However, these methods do not offer provable compliance with logical formulas, stoichiometric rules, or regulatory thresholds. This is exacerbated by the autoregressive nature of
'Equal contribution. Contact author.
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

common language models, which generate se- quences one token at a time, making difficult to enforce constraints at the sequence level.
prompt: Complete this
email for me: [..]]
Baseline: your suggestion is stupid.
x
In contrast, discrete diffusion models offer compelling alternative generative mechanism [6-9]. They refine fully corrupted sequence by iteratively denoising the entire sample, and have shown strong performance across a variety of tasks, including text generation, molecular design, and program synthesis [4] [0]. Since each step exposes a global view of the partial sequence, creates a natural opportunity to im- pose sequence-level structure. This work intro- duces Constrained Discrete Diffusion (CDD), framework that capitalizes this property by coupling discrete diffusion with differen- tiable projection operator. Given corrupted sequence at a particular diffusion step, the pro- jection searches for new candidate that stays close to the model's 's current score distribution,
CDD: your suggestion is wrong.
prompt: Generate a molecule
with sproperty>
Baseline: CCclcCHo(CNicc <property>: 52
X
CDD: CCcIc[nH]][CNNel <propory:: 3.7
prompt: How many R's
are in "strrwwberry"?
Baseline: There are 2 R's in "strawberry"
X
CDD: There are 3 R's in "strawberry"
Figure 1: Comparison of Constrained Discrete Diffusion and baseline models. CDD imposes constraints without sacrificing fluency or expres- siveness.
preserves entropy- bappy--aaddddd diversity, and simultancously satisfies all user-defined constraints before the next denoising update. Because the introduced projection acts only at sampling time, the method is training-free and needs neither model retraining nor post hoc filtering. Its stochastic formulation also preserves the generative diversity, which is crucial for exploratory scientific design, as will be shown in the empirical analysis.
Specifically, CDD is evaluated on three representative use cases illustrated Figure T (i) toxicity mitigation with tunable thresholds for safe LLM deployment, (ii) property adherence for molecular sequence generation, and (iii) instruction- forruuttioonooooiinngg tasks requiring precise symbolic constraints. The experimental results demonstrate zero threshold violations for toxicity, up to 203.4% increase in novel molecule generation with complete property adherence, and 100% satisfaction for instruction- following constraints.
Contributions. This paper provides the following contributions:
1. It introduces Constrained Discrete Diffusion (CDD), a novel framework that integrates discrete dif- fusion models with a differentiable projection operator, enforcing global sequence-level constraints directly within the diffusion sampling process.
formulates this projection operator by solving Lagrangian dual program each denoising step, making the constrained optimization tractable and effective for guiding sequence generation. Through five extensive experiments on three different domains, we demonstrate that CDD achieves state-of-fe of-the-art constraint adherence (zero violations across all settings) while preserving high sample quality in terms of fluency, novelty, and coherence.
2
Related Work
Recent efforts in controllable text generation have largely focused on constrained decoding, where the output is dynamically restricted adhere to predetermined syntactic, semantic, lexical rules. Approaches in this area modify the decoding process to prune the vocabulary, ensuring that only tokens compliant with a formal grammar are considered [I]], or employ external modules to filter outputs when direct access to the model's logits is limited [12] Other methods have also adapted beam search encourage the presence or absence of specific words
[ 14). Although these techniques effectively guide the generation process, they depend on augmented sampling heuristics which encourage, but frequently fail provide, satisfaction of even simple constraint sets (I5). To address this, other research has implemented mappings from natural language to formal logic allowing verification of factual and logical consistency [66118] and enforcement of feasibility constraints with However, these approaches, while effective in their respective domains, often require additional, domain-specifie components to ensure that the generated outputs are not only syntactically valid but also adhere to practical or logical requirements.
external modules 119 20

---

Other controllable generation approaches rely on energy energy-based sampling procedures to impose constraints on the outputs. These methods typically define an energy function combining language model likelihood with constraint penalties and leverage algorithms such as Metropolis-
to sample low-energy (i.e., high probability) sequences [21-23] While such methods are highly effective for encouraging simple properties (e.g., style transfer), they inherit many of the theoretical and practical shortcomings of rejection sampling. In particular, hard constraints are typically enforced only probabilistically, making energy-based approaches less suitable for settings requiring strict constraint satisfaction, as is desirable for the tasks considered this work.
Finally, several gradient- gradient-based sampling frameworks have been proposed to impose constraints on token sequences (24]. Building on this approach. Amini al. [25] improve generation quality via structured Hamiltonian Monte Carlo. However, these methods lack mechanisms for enforcing hard constraints, and are limited to soft attribute control. Other gradient- -hased control methods for autoregressive generation, such as PPLM (26), apply conditional steering during decoding to bias generations toward desired attributes; we compare against this methods directly, and show that while it can shift output distributions, it fails to reliably enforce structural or semantic constraints. Guided discrete diffusion methods have also been explored for protein design. For example, (27) applies gradient-based guidance to the denoiser's s hidden states during sampling to steer sequences toward desired property objectives. Compared to these gradient- gradient-based guidance methods, our method frames each denoising step constrained optimization and enforces feasibility via augmented- Lagrangian projection, presenting different behavior and formal guarantees.
Preliminaries: Discrete Diffusion Models
While diffusion models were originally developed for continuous data, they have recently been extended to discrete domains such as text, enabling non-autoregressive generation 7 28 29]. In contrast to autoregressive models which predict tokens one by one, discrete diffusion methods generate entire sequences in parallel by first corrupting sequences through a forward noising process and then iteratively reconstructing them with learned reverse process. This is key enabler recognized by this work, which exploits this modus operandi to impose global constraints while simultaneously maintaining high fidelity.
Let zig = (a....., xt)) denote an input sequence of size L, where each token z E V is represented as one-hot vector over vocabulary V of N distinct tokens. In discrete diffusion models, the forward process produces, at time E [0, T'. a sequence of values æ, E V24 that parametrizes probability distributions for each token zi in the sequence. We denote the corresponding sequence of predicted tokens by x; arg max(x;;) where the arg max operator is applied to every member æ; of the sequence x,, The diffusion process specifies forward transition, defined as:
q( x0) Cat Cat(#;; a,20 (1 (1-a0) -aaa))) P),
(I)
where ag is schedule that decreases over time, Cat(-:p) is the categorical distribution over probabil- ity vector p E A and y a fixed reference distribution that specifies the type of corruption applied to each token. For example, the Masked Diffusion Language Model (MDLM) ( uses a one-hot vector corresponding to the [MASK] token for v. In contrast, Uniform Diffusion Language Models (UDLM) [8) uses / as the uniform distribution over the vocabulary. Conversely, this instantiation allows tokens to re-perturbed in later time steps.
In the reverse process, FT is initialized from v (e.g., MDLM initializes the probability vectors as one-hots where the weight is fully concentrated on the [MASK] token). For each position in the sequence, while æi = p, the denoiser parameterizes the transitions to clean data, Lo and the probability of æ is discounted as t -+ O. Once æ, A v, the probability vector transitions into one-hot vector, concentrating all weight exclusively on the predicted token.
Cat(xx;: (x);
if + 4,
qxx Dt, To)
(2)
Cat x.; (1-a.) u (0,-0a -a.)x.(....)
if o V.
1-a;
Equation 22 formalizes this reverse process parameterization, where X Xa( 1) denotes the trained denoiser and is the subsequent timestep in the continuous time reverse process and 0 S < ( < T. Despite different corruption kernels (absorbing [MASK] vs. uniform ( both samplers expose the full token- probbbiioyy tensor 2; for all positions at every reverse step.
3

---

constrained projection
Diffusion
P( wt
[Mask]
stupid
wrong
Probability
wrong
stupid
Distribution
stupid wrong
[Mask]
[Mask]
Output
[Mosk) [Mask]
[Mask]
[Moek] ... stupid [Mask]
[Mosk) wrong.... ... [Mosk]
Figure 2: Illustration of CDD's projection step embedded throughout the sampling process.
4 Constrained Discrete Diffusion (CDD)
4.1 Projected diffusion sampling.
We begin by introducing perspective of the discrete diffusion reverse process that motivates our approach. Prior work has shown that continuous score-based diffusion sampling processes can be framed as an sequential optimization procedure [30]. Score-based parameterizations enable this framing as the model learns to predict the gradients of the data density function, X (0(2,, es v log ge (ate (o) through Score Matching, and these gradients can then be applied to optimize æ, to the data distribution ge (Zxe. This is typically conducted through a Langevin dynamics algorithms siteerddiiettiations [33]. In both cases, series of M steps of Langevin dynamics are taken for a fixed distribution (zt):
[3I], which is used either directly [32] or through predictor-corrector
=ue)) update (E)
Z((() + 7 V Vane, log qe (Z))()) xD)) + 22rcE
(for l= = M).
(3)
where "/ is the step size, is added noise, and log (2xe is the density function of the learned distribution time step t. Note that while annealing is used to improve convergence, it is applied only after every M iterations. At that point, the sample is updated (æz(ar xz)1(1)) and the model transitions to the next distribution, 1 æo), however, the step size and the distribution ge (x; wD) remain stationary throughout these M iterations.
Discrete diffusion models can leverage a discrete generalization of the score function, referred to as the Concrete score, approximate the gradient of the probability density function Score Matching provides an approach mirroring continuous Score Matching in that the estimated gradients of the probability density function are used guide the sample high density regions of the target distribution. While not always explicitly framed as Concrete Score Matching [9] [4].
Concrete
the denoiser often implicitly models the score function, as supported by theoretical results demonstrating its equivalence in simplified formulations (V log qi (x; aD) R (xp (æt, !). Vy
1...., N, in this case). This enables the use of Langevin- based samplers for discrete diffusion, as commonly employed, e.g., in (34].
Effectively, under some regularity conditions, Langevin dynamics will converge towards stationary point. As shown by Xu et al.] Langevin dynamics acts as an function, which in this case will be the negative probability density function, converging within fixed bound of the optimum. Hence, for each series of steps with stationary density function, within this fixed bound, the sampling procedure can be framed as the optimization problem,
on the optimized
minimize de
Σ
log qe (xx s.t. æ. E C.
Here, Equation extends the representation from an unconstrained optimization problem constrained version by introducing a constraint set C. However, while iteratively applying the denoiser enables sampling from the posterior distribution, it does not natively incorporate externally defined constraints, even implicit ones, given the stochastic nature of the process. Previous work

---

for continuous modalities has proposed enforcing 2, E C by applying a Euclidean projection after each denoising step [30], which is natural for continuous modalities which fall in a real space, but this is misaligned when applied to discrete diffusion which operates over probability simplex a, E A
To address this, introduce projection operator that minimizes the Kullback-Leibler (KL.) diver- gence between the projected and original probability distributions, as opposed to a Euclidean distance metric. Given the model's predicted probabilities, the projection is defined as:
3 1) (c(() def
arg min DKL. (#'ce) (1v)))
s.t. arg max(y) C.
(5)
The integration of this projection operator ensures that æ, is the "nearest sample" that falls within the feasible subdistribution according to distance metric defined over probability distributions. This ensures the denoising trajectory remains within the allowable set when C' is convex, enabling effective navigation along its boundary or interior toward optimal solution (illustrated in Figure Next, show how this projection operator can be formulated as a subproblem within the sampling procedure and efficiently solved using gradient- based methods. Moreover, while convergence guarantees available for convex constraint sets, as discussed below, Section[5ddemonse 5jemoosttaeess how this technique can effectively handles highly non-linear constraints, including toxicity mitigation, molecular generation, and instruction following, achieving zero violations across all cases.
Importantly, while state transitions imposed on the token probability distributions, constraint satisfaction is evaluated on the decoded sequence. Indeed, the constraints are formulated such that the arg max of the projected sequence y (referred to as y²), must satisfy sentence level criteria y* C However, this use of non-differentiable arg max operation also poses challenges to the resolution of the projection, which relies gradient-base based optimization.
4.2 Differentiable projection.
To address the non-differentiabiliy of the arg max function, we apply a Gumbel-Softmar relaxation 6, which approximates discrete token probabilities with continuous values [36 as
log (v)+Ee
cxp
(v)))
Tample
(6)
Le==1 exp(
N
log (v'))EE) Tampie
where (v) is the probability of token in the vocabulary, & is drawn from the Gumbel(0, 1)' distribution for token v, and T mamle > 0 is the temperature parameter controlling the smoothness of the output. This enables gradient propagation during the projection step, while closely approximating the discrete arg max operation.
4.3 Augmented Lagrangian projection.
Consider generic constraint on a sequence æ defined via measurable property given by function (x).. For instance, gr(-) RRx N + R might evaluate sentence toxicity (see Section 5.1). count the number of words occurring in a string (see Section (.3)) or even serve as a black-box function computed by external routine, as in our molecular sequence generation application (see Section
(.2).. To guide the projection operations, we require a measure of constraint violation that can later inform the parametrization of our projection update rule; for ease of presentation, we express the constraint in the form (x()) < T, where T; 2 0 represents an acceptable threshold that must not be exceeded. To quantify by how much given sequence violates the constraint, we define
(g((o(z))) = max (0. (0.9((((z))) - -T.)
where g = (g),.... 9m) can be treated as series of functions corresponding to a series of thresholds T ( and Ag (Agi,..., Agm. defined in analogously quantifying m constraints.
In practice Ag is non-linear, and, thus, to implement Equation (), we adopt an augmented La- grangian approach (37). In augmented Lagrangian methods, the problem constraints are incorporated into the objective of a minimizer via Lagrange multipliers À and a quadratic penalty term Let a/
We assume greedy decoding scheme as is standard to current diffusion-basse language models.
5

---

be the probability distribution after the denoising step at diffusion time t. We introduce projected distribution y, which is iteratively updated reduce the constraint violations (measured by the score Ag) while remaining close (in KI.-divergence) to ayp- Concretely the augmented Lagrangian dual function is defined as:
(Y M) DKL (2/(ll)) +
Σ ( + Hs Ag:(0(1))² 2
where = (AI...., Am) is non-negative Lagrange multiplier and μ (f1,... ... Mm) is a non- negative quadratic penalty term. When using Lagrangian function, the primal optimization problem becomes
arg min LALM (y. 2/; Aii H),
and is a lower bound of the original projection operator ( by weak duality 37 To obtain the strongest Lagrangian relaxation of the projection, the Lagrangian dual can be used to find the best Lagrangian multipliers À and penalty terms μ.. i...,
arg max arg min (LALM 2/; X, ni)).
A.
In practice, the Lagrangian dual a strong approximation of the original problem (our projection into the constraint space).
The optimization of (7) proceeds iteratively, fol- lowing a gradient- baseed update on while dy- namically adjusting the Lagrange multiplier À and penalty coefficient/ Specifically, we per- form the following updates [8
Algorithm 1: Augmented Lagrangian
Init: A, μ4, 7, a, 8; Input: probability distribution x// y <- 2/;; while Ag(y") < do
y - y - V (y. ai; A - x pAgly)))) # - min Pmax).
(8a)
for j +- 1 to max inner ster do
(8b)
LKL + (xL(x//ly)
L - -m ( +
(8c)
where is the gradient step size, a > is scaling factor that progressively increases μ over iterations, and Mmax is an upper bound on the penalty term. These updates drive y as close as possible satisfy Ag(ő( ()))) S J while also ensuring it remains close to the original denoised distribution a².. Pseudocode provided for our implementation in Algorithm[]
FALM + LKL + Lviol
y + y n V V.LALM
A + + μ Ag("")
p min(a Mmax)
x. + Output: xx
To assess the robustness of this projection formulation, we performed an ablation study (Appendix C examining the sensitivity of the Lagrangian hyper-parameters. Across the full grid of settings, the Lagrangian relaxation converges to feasible solutions all our test cases.
As shown in the next section, there is a high degree of flexibility in how these constraints can be implemented. For instance, they can be implemented surrogate models (e.g., g.. classifier) that can be used to provide a continuous score, allowing for smooth gradicnt-bart base updates, as shown above.
4.4 Theoretical justification.
The next result shows that the constrained reverse diffusion process converges to samples within the feasible region C' while also keeping their distribution close the data manifold. thus ensuring that the generated samples are both valid and realistic. Let DKI, C) inf yee DKI (y)lyyl) [a..) denote the KL divergence from e, to set C.
Theorem 4.1 (Convergence of CDD). Let C' be non-empty and B-prox-regular in the sense of 139 Def. 13.27J, and the score network satisfy Va, log (xx)))) S G (a standard consequence of the bounded-dan data domain after normalization). Then, for positive step sizes n, S 26=B. the following inequality holds for the distance to the feasible set C:
DKL(Z', C) < (1- o.) (xI C) + G2,
(non- asympoti feasibility)
where &e is proportional the discrete Langevin step size 7/t and G bounds the score norm.

---

Texicity Score Distributions
Taskelty
Modd
Sizu
PPL
LuMe
Coherence
Vioi (1F)
GPT2
Mulian
Colerrnnc
Clange (8)
0.25
0.75
FUDGE
124M
46,80
34.05
18:55
1.4
124M
26.46
18.70
41.3
-2.1
31.5
19.7
12.7
134M
14
-8.9
90.6
11.7
MDLM
25.1
MDLLM
10M
46.72
19.75
30.02
52.1
23.2
17.2
CIDDaw (Qur))
10M
55.55
65.42
10.15
+0.7
0.0
0.0
CDD
13 (Ours)
100
29.46
64:26
20.30
+1.3
0.0
Toxicity
Figure 3: Results across different toxicity thresholds, PPL. percentiles, LLM-Judge coherence, and coherence degradation levels. PPL is evaluated with GPT-2-XL, and coherence metrics are assessed by the LLM-Judge. Bold and underlined values denote the best and second-best, respectively.
Theorem 4. shows that the distance to the feasible set C' decreases at a rate of 1 - & at each step (up to an additive a²²²² noise). This implies e-feasibility after (( steps, with Amin x min, "t and cumulative KL drift within O(E, a.). The theorem assumes 8-prox prox-regulaarity which provides a relaxation of typical convexity assumptions, and implies that for each viable point and normal direction, small perturbations still project uniquely and smoothly back C. Theorem proofs are provided in Appendix F
5
Experiments
To empirically demonstrate the advantage provided by CDD, we compare our method against similarly sized autoregressive and iiffiusion-based language models. Specifically, we benchmark our performance on constrained text generation against autoregressive baselines: GPT-2 and Llama 3.2 440 41, and discrete diffusion basclines MDLM and UDLM 7 g. We intentionally select models of similar size to, and up to one magnitude larger than, our base discrete diffusion model, noting that we expect the performance of both classes of models to scale similarly with size. As demonstrated by Schiff et al. [8], MDLM outperforms UDLM on the natural language tasks discussed in Sections 5.T and 5.3 Consequently, we compare to both models in Section [.22 and solely MDLM for the following natural language tasks. We use UDLM as the hase discrete diffusion model for Section 5.2 and MDLM in Sections 5.1 and 5.3 For each application, CDD uses configurations described in
7
unless otherwise specified. Additional experiment details are available in Appendix B
5.1 Natural Language Toxicity Mitigation
While LLMs have demonstrated remarkable capabilities in generating human like text, a byproduct of data driven generation the inadvertent creation of harmful, offensive and dangerous text. Despite undergoing aligmment finetuning, current state-of-the-au models still frequently generate harmful outputs. While proo-pssgs methods can be effective in moderating generations, they can be circumvented by adversarial or malicious prompts, resulting in toxic output generation. In this experiment, we generate outputs conditioned on prompts from the RealToxiicitPProptt dataset [42]. We select prefixes with toxicity score above 0.5, testing how these models perform on toxic inputs, and perplexity below 30.0, avoiding incoherent generations. To model the constraints, GPT-Neo 43 is finetuned on the Jigsaw Toxic Comment Classification Challenge
[l We evaluate 1,000
samples, and discuss ALM hyper-parameters in Appendix C runtime in Appendix D and diversity
as measured by entropy [IQ in Appendix P
Figure 3 presents presentss compreheniive evaluation on model performance for toxicity mitigation, where the objective is to have the generated output satisfy some toxicity threshold, based on a surrogate model, while maintaining competitive perplexity and coherence. We report perplexity (PPL), coherence as determined by LLM judge, and violation rates at toxicity thresholds T 0.25, r = 0.50, and
T 0.75 across different model architecures and baselines.
7

---

Among the baselines, GPT2 (124M) and Llama (1B) achieve the lowest perplexity and highest coherence score, however, they frequently produce toxicity content resulting in high violations. Although PPI.M and FUDGE (124M) 15 26 are able to decrease the violations for all toxicity thresholds, they are unable to consistently prevent toxic generations while suffering from an increase in perplexity and decrease in coherence. MDLM (1 (00)) exhibits higher perplexity than GPT2 and lower coherence, and similarly shares a non-negligible amount of toxicity constraint violations. In contrast, CDD provides perfect constraint satisfaction at each toxicity thresholds, maintaining comparable perplexity scores to its base diffusion language model and other baselines. Additionally, while constraint imposition degrades the coherence of the controllable generation baselines, CDD observes an increase in coherence as evaluated by the LLM-Judge. These findings are important as they show how, using projection-bass bassd control strategies, it is possible to achieve complete toxicity constraint satisfaction at desired thresholds.
5.2 Molecular Generation
Next, we show the ability of CDD to impose constraints on a scientific task, specifically in the domain of molecular generation. In this experiment we generate SMILES strings [44], a linear representation of molecule's structure with vocabulary consisting of a limited vocabulary of forty symbols and a grammar dictating molecular validity. Recent advances in generative modeling have enabled the design of molecular sequences by leveraging techniques from natural language processing. Despite their impressive ability to optimize for specific chemical properties, these models often generate molecules that fall short of practical requirements, either by producing compounds that are difficult to synthesize or by closely mimicking existing structures. Furthermore, generated molecules often fail to maximize qualitative properties such as frug-likenesss (QED) 45 that are critical to the practicality of the generations and used as qualitative metric for the experiments discussed in this section.
To address this challenge, our framework incorporates two distinct constraint mechanisms: (1) synthetic feasibility, which ensures that generated molecules can be synthesized in a laboratory setting [46), and (2) novelly, which guarantees that the generated molecules not already present in training datasets. For each constraint, we implement a dedicated projection operator, described in B that imposes hard limits on the generation process, resulting final outputs that adhere precisely to our desired standards of synthetic accessibility or novelty.
Synthetic accessibility constraints. Synthetic accessibility is commonly assessed using black-box, non-differentiable functions. To enable gradient- gradient-based optimization, we train a surrogate model on the QM9 dataset [47), where training labels are derived from RDKit's synthetic accessibility score 488. This allows us to approximate a differentiable function g(-) for synthetic accessibility. While our molecular generation framework employs this surrogate model to optimize for synthetic accessibility during training, the actual assessment of accessibility violations is conducted by a separate, black-box external model. This external evaluation rigorously measures the degree which generated molecules comply with the synthetic accessibility criteria, using a series of thresholds (==33 3.0, 3.5, 4.0, and 4.5). For the discrete diffusion baselines, we adapt the guidance mechanisms provided by (8) for QED by retraining on synthetic accessibility labels for Classifier Based Guidance (CBG) and Classifier-Fre Free Guidance (CFG). similar adaptation is applied for the autoregressive baselines employing FUDGE guidance [15]. The results, summarized in Figure g (left), confirm that CDD achieves perfect compliance across all thresholds. This 0% violation rate is achieved, all while generating competitive number of valid molecules and exhibiting the highest drug-likeness scores.
Novelty constraints. Novelty in molecule generation refers to the model's ability produce new chemical structures that were not explicitly contained in its training set. In the context of generative modeling for drug design or other chemistry applications, novelty is often an important objective for the reasons of chemical space exploration and practical relevance. In this experiment, we generate SMILES strings constraining all valid generations be novel. The novelty constraint is enforced at every denoising step. If the current candidate sequence already exists in an external database, a projection operator minimally perturbs its token- probbbiiobabilityy vector to yield an unseen molecule, thereby approximating a gradient step through the otherwise non-differentian Specifically, the novelty projection operator is a best-first traversal of the probbbbiiyyy space: each token flip incurs a cost equal to its probability gap from the argmax, a priority queue retrieves the lowest-cost unseen sequence, and we then renormalize and cache it to prevent duplication. As selects the sequence with the minimal cumulative flip cost, our distance metric over sequences, the
novelty indicator.
8

---

Molecules (Synthetic Accessibility)
Molecales (Noveis)
Model
Valid
Novel
QED
(%
Middl
Size
No Unliance
Volid Novel
QED
AR
1023
0
0.46
91.6
78.4
62.3
42.0
00M
11
0.41
98.91
AR
9.5
9.2
92M
92M
61.45
MDLM
596
20
0.45
85.9
73.7
61.1
44.0
CDD (Curs)
90M
511
0.45
0.00
MDLMo-cr----
87.8
73.9
026
MDLMp.cao.so
436
14
0.37
50.5
48.6
46.1
44.7
ARocic
92M
79
0.60
91.61
IDEM
895
21
89.4
88.0
58.1
37.8
MEX
92M
UDLMu.cr-wse
850
18
0:47
80.6
58.6
35.9
13.9
LDLMo
92M
I/D Ma.co
896
90.1
77.8
58.6
37.7
C10h (Ours)
90M
251
0,00
0.40
CDD, (urr))))))
353
36
0.63
0.0
0.0
0.0
0.0
AR
92M
53
0.61
94.25
(DD....(Oum (urs))
863
22
0.62
0.0
0.0
0.0
MDDMM
92M
CDD (uur))
936
31
0.61
0.0
0.0
LODLM
CDD (uus))
938
33
0.58
0.0
90M
Figure 4: Left: Results for synthetic accessibility constrained molecule generation constraints. QED and constraint violations are reported for only valid molecules, and novel molecules must be valid and have no violation (r 3.0). Right: Results for novelty projection with and without QED guidance. Violation represents percentage of valid, but not novel molecule generations. QED is reported for only novel molecules. Results denoted with are reported by Schiff et al. [8] Bold and underlined values mark the best and second-bes besst, respectively.
procedure is mathematically equivalent projecting the distribution onto the set of novel sequences. Repeating this operation throughout the diffusion trajectory guarantees that only new compounds are emitted while preserving the exploratory capacity of the discrete diffusion model.
We compare against baselines with no QED guidance alongside CFG and CBG QED guidance to evaluate the impact of our novelty constraint. The results are shown in the right side of Figure Notice how the CBG setting yields a 203.4% increase novel molecule generation, while the CFG setting shows a 161. .4% increase. Even without guidance, the method still produces 48. 6.11 1% more novel molecules, with only a minimal reduction the QED score. These results are significant because they demonstrate that CDD can effectively generate novel molecules while maintaining high QED score, which is crucial for many scientific tasks.
5.3 Instruction Following
Finally, the last application focuses on satis- fying user-specified symbolic constraints, task that many autoregressive models strug- gle with. We evaluate CDD against such models using two types of constraints. First, we assess the ability of the tested mod- els to accurately answer how many letters are in word, such as 'How many R's are in Strawberry?". We additionally test lexical constraints based of the COLLIE dataset [49), prompting the models to gen- erate word-indexed constrained sentences, such as 'Generate a sentence where the third- to-last word is mankind". For each con- straint, the projection operator to imposes hard constraints on the generation, pushing the samples back onto the constraint set.
Model
Size
PPL.
LLM--Jude
(ial(
GPT-2 (xeru-bot)
124M
19.2 0.8
57.8
100
GPT-2 (fnstruction-tunod)
124M
23.4 a
70.9
5.0
Counting
izero
29.5
Llamo (instnucion-tumal)
30.7
9.1
MDLM
169M
16.9 1.0
61.2
54.5
CDD (Ours)
169M
17.9 1.1
60.4
0.0
GPT-2 (zero sbot)
124M
26.5
28.1
97.6
(instrnctioontuuee))
124M
62.2 2.9
96.4
(xero-shot)
1ama 3.2 (inémuciian-tmoo))
66.5 6.1
22.9
93.6
MDLM
169M
2..9
3488
97.5
CDD (Ours)
169M
26.6
65.1
0.0
Table 1: PPL is assessed using GPT2. Bold and underlined mark the best and second-best, respectively,
Counting constraints. As illustrated in the top of Table I unconstrained GPT-2 and Llama 3.2 fail to satisfy any letter-count requirement. Instruction tuning helps. reducing violation rates to 5.0% (GPT-2) and 9.1 % (Llama 3.2), but still leaves a notable error margin. Alternatively, MDLM achieves the lowest perplexity and second-best coherence, but over half of its outputs violate the constraint. By contrast, CDD fully eliminates violations while preserving near-best fluency (17.9 perplexity). demonstrating its provision of strict compliance without sacrificing language quality.

---

Lexical constraints. The results for lexical constraints are shown in the bottom of Table [ The zero-shot and instruction-tune tundon versions of GPT-2 and Llama 3.2 show similarly high violation rates (ahout 97%), and instruction tuning only minimally improves these figures. MDLM again delivers relatively high fluency (21.9 perplexity, 34.8 coherence) but fails to address the precise positional requirements (97.5% violations). In stark contrast, CDD ensures perfect adherence and the best LLM-as-a-Judge score (65.1 coherence), with only a moderate increase in perplexity, thus confirming the effectiveness of its projection mechanism for enforcing hard lexical constraints. Taken together, these experiments reveal a fundamental limitation of conventional and instruction-tuned language models in scenarios requiring strict constraints. Conversely, discrete diffusion models, when equipped with constraints, can effectively produces outputs that satisfy both counting and lexical requirements, opening new avenues for applications in controlled text generation.
We include more evaluation and experiments the Appendix. Specifically, Appendix B details the experimental setup, (innendix(evvluuaaa CDD's 's robustness through an extensive hyper-parameter ablation, and Appendix reports runtime comparisons with the baselines.
Limitations
There are two key limitations that are currently faced in the development of constrained discrete models. The first regards the size of currently available discrete diffusion models. While current discrete diffusion models provide comparable performance in fluency and perplexity similarly sized autoregressive models, including wtat-off-hee-an models such as Llama 3.2 IB, their generative capabilities fall short of large-scale language models. Larger scale, closed-source discrete diffusion models have been developed and boasted impressive performance [29], but larger open-source models yet to be provided to the research community. It is expected that the release of such larger models will further boost the performance of our proposed methods.
The second key limitation concerns inherent byproduct of constraint imposition: increased computational overhead. While unconstrained discrete diffusion language models have been shown to provide significant speed-ups over autoregressive language models due to the parallelization of token generation 7 [ [50,, the inclusion constraints within the generation process may limit this benefit. Nevertheless, this trade-off is often justified, imposing constraints is essential in scenarios where correctness outweighs generation speed, such as ensuring safety-critical outputs or supporting rigorous scientific exploration. In such contexts, achieving accurate and reliable outcomes is prioritized over computational efficiency.
7 Conclusion
In this paper we presented Constrained Discrete Diffusion (CDD), a novel method for imposing both structured and unstructured constraints during sequence generation. CDD relies on the adoption of discrete diffusion models which enable the consideration of entire sequences when imposing constraints during the generation process. Offering a key departure from current paradigms for controllable text generation, CDD integrates differentiable optimization methods into the diffusion reverse process. This integration, governed by rigorous mathematical optimization framework, provides precise control for discrete sequence generation. The method is empirically validated on (i) toxicity mitigation and harmful content prevention, (ii) generation of novel molecular sequences that adhere to specific properties for drug discovery, and (iii) imposition of lexical constraints at character and sequence levels, reporting state-of the-art results for controllable generation in both terms of constraint adherence and quality metrics.
10

---

Acknowledgments
This material is based upon work supported by the National Science Foundation Graduate Research Fellowship Program under Grant No 2234693. Any opinions, findings, and conclusions or recom- mendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation. This work was partially supported by NSF grants CAREER- 2401285, RI-2533631, RI-2334936, DARPA under Contract No. #HR001 1252E005, and UVA's National Security Data & Policy Institute, ODNI Contracting Activity #2024-24070100000 The work has also been supported by L.NNL. under Contract DE-AC52- 07NA27344 and by the LLNL-LDRD Program under Project No. 24-ERD-010 and 24-S1-008. This manuscript has been co-authored by Lawrence Livermore National Security, LLC under Contract No. DE-ACC2-07NN27334 with the U.S. Department of Energy. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the NSF, DOE, DARPA, or DOD.
References
[1] Manling Li, Shiyu Zhao, Qineng Wang, Kangrui Wang, Yu Zhou, Sanjana Srivastava, Cem Gokmen, Tony Lee, Erran Li, Ruohan Zhang, et al. Embodied agent interface: Benchmarking Ilms for embodied decision making. arXiv preprint arXiv:2410.077
2024.
[2] Jingru Jia, Zehua Yuan, Junhao Pan, Paul E McNamara, and Deming Chen. Decision-making be- havior evaluation framework for 1ims under uncertain context. arXiv preprint arXiv:2406.05977 05972, 2024.
[3] Yuexiang Zhai, Hao Bai, Zipeng Lin, Jiayi Pan, Shengbang Tong, Yifei Zhou, Alane Suhr, Saining Xie, Yann LeCun, Yi Ma, et al. Fine-tuning large vision-language models as decision- making agents via reinforcement learning. arXiv preprint arXiv:2405. 10292, 2024.
[4] Jiacheng Ye, Jiahui Gao, Shansan Gong, Lin Zheng, Xin Jiang, Zhenguo Li, and Lingpeng Kong. Beyond autoregression: Discrete diffusion for complex reasoning and planning. arXiv preprint arXiv:2410. 14157, 2024.
[5] Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. Advances in neural information processing systems, 35:27730-27744, 2022.
[6] Jacob Austin, Daniel D. Johnson, Jonathan Ho, Daniel Tarlow, and Rianne van den Berg. Structured denoising diffusion models discrete state-spaces, 2023. URL htttt:///txxiii arg/abs/2107... 2ttp//200770006666
[7] Subham Sekhar Sahoo, Marianne Arriola, Yair Schiff, Aaron Gokaslan, Edgar Marroquin, Justin T Chiu, Alexander Rush, and Volodymyr Kuleshov. Simple and effective masked diffusion language models. arXiv preprint arXiv:2406.07524, 2024.
[8] Yair Schiff, Subham Sekhar Sahoo, Hao Phung, Guanghan Wang, Sam Boshar, Hugo Dalla- torre, Bernardo P de Almeida, Alexander Rush, Thomas Pierrot, and Volodymyr Kuleshov. Simple guidance mechanisms for discrete diffusion models. arXiv preprint 2rXiv:2412.10193, 2024.
[9] Aaron Lou, Chenlin Meng, and Stefano Ermon. Discrete diffusion modeling by estimating the ratios of the data distribution. In Forty-first International Conference on Machine Learning, 2024.
[10] Kaiwen Zheng, Yongxin Chen, Hanzi Mao. Ming- Yu Liu, Jun Zhu, and Qinsheng Zhang. Masked diffusion models are secretly time-agnostic masked models and exploit inaccurate categorical sampling. arXiv preprint arXiv:2409.02908, 2024.
[11] Saibo Geng, Martin Josifoski, Maxime Peyrard, and Robert West. Grammar-constrained decoding for structured NI.P tasks without finetuning. In Houda Bouamor, Juan Pino, and Kalika Bali, editors, Proceedings of the 2023 Conference Empirical Methods in Natural Language
11

---

Processing, pages 10932-10952, Singapore, December 2023. Association for Computational Linguistics. doi:
URL /tttt//t///allltttiooogyy/ org/
2023. emnlp-main .644
[12] Saibo Geng, Berkay Döner, Chris Wendler, Martin Josifoski, and Robert West. Sketch-guided constrained decoding for boosting blackbox large language models without logit access. arXiv preprint arXiv:2401.09967, 2024.
[13] Ximing Lu, Peter West, Rowan Zellers, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. Neurologic decoding:(un) supervised neural text generation with predicate logic constraints. arXiv preprint arXiv:2010. 128844 2020.
[14) Ximing Lu, Sean Welleck, Peter West, Liwei Jiang, Jungo Kasai, Daniel Khashabi, Ronan Le Bras, Lianhui Qin, Youngjae Yu, Rowan Zellers, et al. Neurologic a esque decoding: Con- strained text generation with lookahead heuristics. arXiv preprint arXiv:2112.08722 2021.
[15] Kevin Yang and Dan Klein. Fudge: Controlled text generation with future discriminators. In Proceedings of the 2021 Conference of the North Americun Chapter of the Association for Computational Linguistics; Human Language Technologies. Association for Computational Linguistics, 2021. doi: 10. (0.18653/v1// waw.:mm..aammmmm..2.222 URL 18653/v1/2021 www.aaaallmmmmmm main.. 276
doi org/10
[16] Nakul Gopalan, Dilip Arumugam, Lawson LS Wong, and Stefanie Tellex. language grounding of non- mor-markov task specifications. In Robotics: Science and Systems, volume 2018 2018
[17] Jason Xinyu Liu, Ziyi Yang, Ifrah Idrees, Sam Liang, Benjamin Schomstein, Stefanie Tellex, and Ankit Shah. Grounding complex natural language commands for temporal tasks in unseen environments. In Conference on Robot Learning, pages 1084-1110. PMLR, 2023.
[18] Hanmeng Liu, Zhiyang Teng. Chaoli Zhang, and Yue Zhang. Logic agent: Enhancing validity with logic rule invocation. arXiv preprint arXiv:2404. 18130, 2024.
[19] Yongchao Chen, Jacob Arkin, Yang Zhang, Nicholas Roy, and Chuchu Fan. Autotamp: Au- toregressive task and motion planning with ilms as translators and checkers. arXiv preprint arXiv:2306.0653. 06531, 2023.
[20] Kevin Lin, Christopher Agia, Toki Migimatsu, Marco Pavone, and Jeannette Bohg. Text2motion: From natural language instructions to feasible plans. Autonomous Robots, (1(8):1345-136) 2023.
[21] Ning Miao, Hao Zhou, Lili Mou, Rui Yan, and Lei Li. Cgmh: Constrained sentence gener- ation by metropolis-hasting sampling. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 6834-6842, 2019.
[22] Jarad Forristal, Niloofar Mireshghallah, Greg Durrett, and Taylor Berg- Kirkpatrick. A block metropolis- hastingg sampler for controllable energy- based text generation. arXiv preprint urXiv:2312.045111 2023.
[23] Daniel Gareev, Thomas Hofmann, Ezhilmathi Krishnasamy, and Tiago Pimentel. Local and global decoding in text generation. arXiv preprint arXiv:2410. 10810, 2024.
[24] Sachin Kumar, Biswajit Paria, and Yulia Tsvetkov. Gradient-based constrained sampling from language models. arXiv preprint arXiv:2205. 12558, 2022.
[25] Afra Amini, Li Du, and Ryan Cotterell. Structured voronoi sampling. Advances in Neural Information Processing Systems, 36:3 1689-31716. 2023.
[26] Sumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung. Eric Frank, Piero Molino, Jason Yosinski, and Rosanne Liu. Plug and play language models: A simple approach to controlled text generation. arXiv preprint arXiv: 19999222166. 2019.
[27] Nate Gruver, Samuel Stanton, Nathan C. Frey, Tim G. J. Rudner, Isidro Hotzel, Julien Lafrance- Vanasse, Arvind Rajpal, Kyunghyun Cho, and Andrew Gordon Wilson. Protein design with guided discrete diffusion, 2023. URL httthtts:// //arxiiv arxxvv.vvvv org/ abs 200..30500000
12

---

[28] Jacob Austin, Daniel D Johnson, Jonathan Ho, Daniel Tarlow, and Rianne Van Den Berg. Structured denoising diffusion models in discrete state-spaces. Advances in Neural Information Processing Systems, 34:17981 11111199119999 2021.
[29] Jiaxin Shi, Kehang Han, Zhe Wang, Arnadd Doucet, and Michalis Titsias. Simplified and generalized masked diffusion for discrete data. arXiv preprint Stl1:22406.03329, 2024.
[30] Jacob K Christopher, Stephen Back, and Ferdinando Fioretto. Constrained synthesis with projected diffusion models, 2024.
[31] Max Welling and Yee W Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th international conference on machine learning (ICML-11), pages 681-688. Citeseer, 2011.
[32] Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. Advances in neural information processing systems, 32, 2019.
[33] Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011. 13456, 2020.
[34] Chenlin Meng, Kristy Choi, Jiaming Song, and Stefano Ermon. Concrete score matching: Generalized score matching for discrete data. Advances in Neural Information Processing Systems, 35:34532-34555 2022.
[35] Pan Xu, Jinghui Chen, Difan Zou, and Quanquan Gu. Global convergence of langevin dynamics based algorithms for nonconvex optimization. Advances in Neural Information Processing Systems, 31, 2018
[36] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterizatioo with gumbel-softman arXiv preprint
2016.
[37] Stephen Boyd. Convex optimization. Cambridge UP, 2004.
[38] Ferdinando Fioretto, Pascal Van Hentenryck, Terrence W. K. Mak, Cuong Tran, Federico Baldo, and Michele Lombardi. Lagrangian duality for constrained deep learning. In European Conference Machine Learning, volume 12461 of Lecture Notes in Computer Science, pages 118- Springer, 2020. doi: 10. 101100/977--30000-677---0000 1007/978-3-030-676777
httpp:///doi..ooo
[39] Tyrrell Rockafellar and Roger J-B Wets, Variational analysis, volume 317. Springer Science & Business Media, 2009.
[40] Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and lyya Sutskever. Language models are unsupervised multitask learners. OpenAl blog, 2019.
[41] Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ah- mad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, Amy Yang, Angela Fan, Anirudh Goyal, Anthony Hartshorn, Aobo Yang. Archi Mitra, Archie Sravankumar, Artem Korenev, Arthur Hinsvark, Arun Rao, Aston Zhang, Aurelien Rodriguez, Austen Gregerson, Ava Spataru, Baptiste Roziere, Bethany Biron, Binh Tang, Bobbie Chern, Charlotte Caucheteux, Chaya Nayak, Chloe Bi, Chris Marra, Chris McConnell, Christian Keller, Christophe Touret, Chunyang Wu. Corinne Wong, Cristian Canton Ferrer, Cyrus Nikolaidis. Damien Allonsius,
Daniel Song, Danielle Pintz, Danny Livshits, Danny Wyatt, David Esiobu, Dhruv Choudhary, Dhruv Mahajan, Diego Garcia-Olano, Diego Perino, Dieuwke Hupkes, Egor Lakomkin. Ehab AlBadawy, Elina Lobanova, Emily Dinan, Eric Michael Smith, Filip Radenovic, Francisco Guzmán, Frank Zhang. Gabriel Synnaeve, Gabrielle Lee, Georgia Lewis Anderson, Govind Thattai, Graeme Nail, Gregoire Mialon, Guan Pang. Guillem Cucurell, Hailey Nguyen, Hannah Korevaar, Hu Xu, Hugo Touvron, Iliyan Zarov, Imanol Arrieta Ibarra, Isabel Kloumann, Ishan Misra, Ivan Evtimov, Jack Zhang, Jade Copet, Jaewon Lee, Jan Geffert, Jana Vranes, Jason Park, Jay Mahadeokar, Jeet Shah, Jelmer van der Linde, Jennifer Billock, Jenny Hong, Jenya Lee, Jeremy Fu, Jianfeng Chi, Jianyu Huang, Jiawen Liu, Jie Wang, Jiecao Yu, Joanna Bitton,
13

---

Joe Spisak, Jongsoo Park, Joseph Rocca, Joshua Johnstun, Joshua Saxe, Junteng Jia, Kalyan Va- suden Alwala, Karthik Prasad. Kartikeya Upasani, Kate Plawiak, Ke Li, Kenneth Heafield. Kevin Stone, Khalid El-Arini, Krithika Iyer, Kshitiz Malik, Kuenley Chiu, Kunal Bhalla, Kushal Lakhotia, Lauren Rantala- Yeary, Laurens van der Maaten, Lawrence Chen, Liang Tan, Liz Jenkins, Louis Martin, Lovish Madaan, Lubo Malo, Lukas Blecher, Lukas Landzaat, Luke de Oliveira, Madeline Muzzi, Mahesh Pasupuleti, Mannat Singh, Manohar Paluri, Marcin Kardas, Maria Tsimpoukelli, Mathew Oldham, Mathieu Rita, Maya Pavlova, Melanie Kam- badur, Mike Lewis, Min Si, Mitesh Kumar Singh, Mona Hassan, Naman Goyal, Narjes Torabi, Nikolay Bashlykov, Nikolay Bogoychev, Niladri Chatterji, Ning Zhang. Olivier Duchenne, Onur Çelebi. Patrick AIrassy, Pengchuan Zhang, Pengwei Li, Petar Vasic, Peter Weng. Prajjwal Bhargava, Pratik Dubal, Praveen Krishman, Punit Singh Koura, Puxin Xu, Qing He, Qingxiao Dong, Ragavan Srinivasan, Raj Ganapathy, Ramon Calderer, Ricardo Silveira Cabral, Robert Stojnic, Roberta Raileanu, Rohan Maheswari, Rohit Girdhar, Rohit Patel, Romain Sauvestre, Ronnie Polidoro, Roshan Sumbaly, Ross Taylor, Ruan Silva, Rui Hou, Rui Wang. Saghar Hos- seini, Sahana Chennabasappa, Sanjay Singh, Sean Bell, Seohyun Sonia Kim, Sergey Edunov, Shaoliang Nie, Sharan Narang, Sharath Raparthy, Sheng Shen, Shengye Wan, Shruti Bhosale, Shun Zhang, Simon Vandenhende, Soumya Batra, Spencer Whitman, Sten Sootla, Stephane Collot, Suchin Gururangan, Sydney Borodinsky, Tamar Herman, Tara Fowler, Tarek Sheasha, Thomas Georgiou. Thomas Scialom, Tobias Speckbacher, Todor Mihaylov. Tong Xiao, Ujjwal Karn, Vedanuj Goswami, Vibhor Gupta. Vignesh Ramanathan, Viktor Kerkez, Vincent Gonguet, Virginie Do. Vish Vogeti, Vítor Albiero, Vladan Petrovic, Weiwei Chu, Wenhan Xiong, Wenyin Fu, Whitney Meers, Xavier Martinet, Xiaodong Wang. Xiaofang Wang. Xiaoqing Ellen Tan, Xide Xia, Xinfeng Xie, Xuchao Jia, Xuewei Wang, Yaelle Goldschlag, Yashesh Gaur, Yasmine Babaei, Yi Wen, Yiwen Song. Yuchen Zhang. Yue Li, Yuning Mao, Zacharie Delpierre Coudert, Zheng Yan, Zhengxing Chen, Zoe Papakipos, Aaditya Singh, Aayushi Srivastava, Abha Jain, Adam Kelsey, Adam Shajnfeld. Adithya Gangidi, Adolfo Victoria, Ahuva Goldstand, Ajay Menon, Ajay Sharma, Alex Boesenberg, Alexei Baevski, Allie Feinstein, Amanda Kallet, Amit Sangani, Amos Teo, Anam Yunus, Andrei Lupu, Andres Alvarado, Andrew Caples, Andrew Gu, Andrew Ho, Andrew Poulton, Andrew Ryan, Ankit Ramchandani, Annie Dong, Annie Franco, Anuj Goyal, Aparajita Saraf. Arkabandhu Chowdhury, Ashley Gabriel, Ashwin Bharambe, Assaf Eisenman, Azadeh Yazdan, Beau James, Ben Maurer, Benjamin Leonhardi, Bernie Huang, Beth Loyd, Beto De Paola, Bhargavi Paranjape, Bing Liu, Bo Wu, Boyu Ni, Braden Hancock, Bram Wasti, Brandon Spence, Brani Stojkovic, Brian Gamido, Britt Montalvo, Carl Parker, Carly Burton, Catalina Mejia, Ce Liu, Changhan Wang, Changkyu Kim, Chao Zhou, Chester Hu, Ching-Hsiang Chu, Chris Cai, Chris Tindal, Christoph Feichtenhofer, Cynthia Gao, Damon Civin, Dana Beaty, Daniel Kreymer, Daniel Li, David Adkins, David Xu, Davide Testuggine, Delia David, Devi Parikh, Diana Liskovich, Didem Foss, Dingkang Wang, Duc Le, Dustin Holland, Edward Dowling, Eissa Jamil, Elaine Montgomery, Eleonora Presani, Emily Hahn, Emily Wood, Eric-Tuan Lc, Erik Brinkman, Esteban Arcaute, Evan Dunbar, Evan Smothers, Fei Felix Kreuk, Feng Tian, Filippos Kokkinos, Firat Ozgenel, Francesco Caggioni. Frank Kanayet, Frank Seide, Gabriela Medina Florez, Gabriella Schwarz, Gada Badeer, Georgia Swee, Gil Halpern, Grant Herman, Grigory Sizov, Guangyi, Zhang, Guna Lakshminarayanan, Hakan Inan, Hamid Shojanazeri, Han Zou, Hannah Wang, Hanwen Zha, Haroun Habeeb, Harrison Rudolph, Helen Suk, Henry Aspegren, Hunter Goldman, Hongyuan Zhan, Ibrahim Damlaj, Igor Molybog, Igor Tufanov, Ilias Leontiadis, Irina-Elena Veliche, Itai Gat, Jake Weissman, James Geboski, James Kohli, Janice Lam, Japhet Asher, Jean-Baptiste Gaya, Jeff Marcus, Jeff Tang, Jennifer Chan, Jenny Zhen, Jeremy Reizenstein, Jeremy Teboul, Jessica Zhong, Jian Jin, Jingyi Yang, Joe Cummings, Jon Carvill, Jon Shepard, Jonathan McPhie, Jonathan Torres, Josh Ginsburg, Junjie Wang, Kai Wu, Kam Hou U, Karan Saxena, Kartikay Khandelwal, Katayoun Zand, Kathy Matosich, Kaushik Veeraraghavan, Kelly Michelena. Keqian Li, Kiran Jagadeesh, Kun Huang. Kunal Chawla, Kyle Huang, Lailin Chen, Lakshya Garg. Lavender A. Leandro Silva, Lee Bell, Lei Zhang. Liangpeng Guo, Licheng Yu, Liron Moshkovich, Luca Wehrstedt, Madian Khabsa, Manav Avalani, Manish Bhatt, Martynas Mankus, Matan Hasson, Matthew Lennie, Matthias Reso, Maxim Groshev, Maxim Naumov, Maya Lathi, Meghan Keneally, Miao Liu, Michael L. Seltzer, Michal Valko, Michelle Restrepo, Mihir Patel, Mik Vyatskov, Mikayel Samvelyan, Mike Clark, Mike Macey, Mike Wang, Miquel Jubert Hermoso, Mo Metanat, Mohammad Rastegari, Munish Bansal, Nandhini Santhanam, Natascha Parks, Natasha White, Navyata Bawa, Nayan Singhal, Nick Egebo, Nicolas Usunier, Nikhil Mehta, Nikolay Pavlovich Laptev, Ning Dong, Norman Cheng, Oleg Chernoguz, Olivia Hart, Omkar Salpekar, Ozlem
14

---

Kalinli, Parkin Kent, Parth Parekh, Paul Saab, Pavan Balaji, Pedro Rittner, Philip Bontrager, Pierre Roux, Piotr Dollar. Polina Zvyagina, Prashant Ratanchandani, Pritish Yuvraj. Qian Liang, Rachad Alao, Rachel Rodriguez, Raf Ayub, Raghotham Murthy, Raghu Nayani, Rahul Mitra, Rangaprabhu Parthasarathy, Raymond Li, Rehekkah Hogan, Robin Battey, Rocky Wang, Russ Howes, Ruty Rinott, Sachin Mehta, Sachin Siby, Sai Jayesh Bondu, Samyak Datta, Sara Chugh, Sara Hunt, Sargun Dhillon, Sasha Sidorov, Satadru Pan, Saurabh Mahajan, Saurabh Verma, Seiji Yamamoto, Sharadh Ramaswamy, Shaun Lindsay, Shaun Lindsay, Sheng Feng. Shenghao Lin, Shengxin Cindy Zha, Shishir Patil, Shiva Shankar, Shugiang Zhang, Shuqiang Zhang, Sinong Wang, Sneha Agarwal, Soji Sajuyigbe, Soumith Chintala, Stephanie Max, Stephen Chen, Steve Kchoe, Steve Satterfield, Sudarshan Govindaprasad, Sumit Gupta, Summer Deng, Sungmin Cho, Sunny Virk, Suraj Subramanian, Sy Choudhury, Sydney Goldman, Tal Remez, Tamar Glaser, Tamara Best, Thilo Koehler, Thomas Robinson, Tianhe Li, Tianjun Zhang, Tim Matthews, Timothy Chou, Tzook Shaked, Varun Vontimitta, Victoria Ajayi, Victoria Montanez, Vijai Mohan, Vinay Satish Kumar, Vishal Mangla, Vlad lonescu, Vlad Poenaru, Vlad Tiberiu Mihailescu, Vladimir Ivanov, Wei Li, Wenchen Wang, Wenwen Jiang, Wes Bouaziz, Will Con- stable, Xiaocheng Tang, Xiaojian Wu, Xiaolan Wang, Xilun Wu, Xinbo Gao, Yaniv Kleinman, Yanjun Chen, Ye Hu, Ye Jia, Ye Qi. Yenda Li, Yilin Zhang, Ying Zhang, Yossi Adi, Youngjin Nam, Yu, Wang, Yu Zhao, Yuchen Hao, Yundi Qian, Yunlu Li, Yuzi He, Zach Rait, Zachary Vito, Zef Rosnbrick, Zhaoduo Wen, Zhenyu Yang, Zhiwei Zhao, and Zhiyu Ma. The llama herd of models, 2024. URL /tttts://aaxiii htwpg//bb/2407... 2407 21783
[42] Samuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi, and Noah A Smith. Real- toxicityprompts: Evaluating neural toxic degeneration in language models. arXiv preprint arXiv:2009.11463 2020.
[43] Sid Black, Leo Gao, Phil Wang, Connor Leahy, and Stella Biderman. Gpt-neo: Large scale autoregressive language modeling with mesh-tensorflow. you use this software, please cite it using these metadata, 58(2), 2021.
[44] David Weininger. Smiles, a chemical language and information system. 1. introduction to methodology and encoding rules. Journal of chemical information and computer sciences, 28 (1):31-36, 1988.
[45] G Richard Bickerton, Gaia V Paolini, Jérémy Besnard, Sorel Muresan, and Andrew L Hopkins. Quantifying the chemical beauty of drugs. Nature chemistry, 4(2):90-98, 2012.
[46] Peter Ertl and Ansgar Schuffenhauer. Estimation of synthetic accessibility score of drug-like molecules based on molecular complexity and fragment contributions. Journal of cheminfor- matics, 1:1-11, 2009.
[47] Lars Ruddigkeit, Ruud Van Deursen, Lorenz C Blum, and Jean-Louis Reymond. Enumeration of 166 billion organic small molecules in the chemical universe database gdb- 17. Journal of chemical information and modeling, 52 1):2)))422887777 2012.
[48] A Patrícia Bento, Anne Hersey, Eloy Félix, Greg Landrum, Anna Gaulton, Francis Atkinson, Louisa J Bellis, Marleen De Veij, and Andrew R Leach. An open source chemical structure curation pipeline using rdkit. Journal of Cheminfornatics, 12:1-16, 2020.
[49] Shunyu Yao, Howard Chen, Austin W Hanjie, Runzhe Yang, and Karthik Narasimhan. Collie: Systematic construction of constrained text generation tasks. arXiv preprint a07 2023.
[50] Jacob K Christopher, Brian R Bartoldson, Bhavya Kailkhura, and Ferdinando Fioretto. Specula- tive diffusion decoding: Accelerating language generation through diffusion. arXiv preprint arXiv:2408.0 05636, 2024.
[51] Gabriel Poesia, Oleksandr Polozov, Vu Le, Ashish Tiwari, Gustavo Soares, Christopher Meek, and Sumit Gulwani. Synchromesh: Reliable code generation from pre-trained language models. arXiv preprint arXiv:2001.11227 2022.
[52] Richard Shin, Christopher Lin, Sam Thomson, Charles Chen, Subhro Roy, Emmanouil Antonios Platanios, Adam Pauls, Dan Klein, Jason Eisner, and Benjamin Van Durme. Constrained
15

---

language models yield few-shot semantic parsers. In Marie-Franchie Moens, Xuanjing Huang. Lucia Specia. and Scott Wen-tau Yih. editors, Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 7699-7715, Online and Punta Cana, Dominican Republic, November 2021. Association for Computational Linguisties. doi: 10. 18653/v1/2021.
emnlp-main.608. URL httttssss//caaaanholl.go.//o//// org 2021. www.p-ennnmm....m. 608
[53] Torsten Scholak, Nathan Schucher, and Dzmitry Bahdanau. PICARD: Parsing incrementally for constrained rego-segressive decoding from language models. In Marie-Francine Moens, Xuanjing Huang, Lucia Specia, and Scott Wen-tau Yih, editors, Proceedings of the 2021 Con- ference on Empirical Methods in Natural Language Processing, pages 9895-9901, Online and Punta Cana, Dominican Republic, November 2021. Association for Computational Lin- guistics. doi: 10. 10.18633/v1/2011 2/06:///120011..emmmmaa..... mimnlpmmiin..
URL Sttp::tp:s.. pttttp:://aclanttolooo org/202/
[54] Thomas Hartvigsen, Saadia Gabriel. Hamid Palangi, Maarten Sap. Dipankar Ray, and Ece Kamar. Toxigen: A large-scale machine-generated dataset for adversarial and implicit hate speech detection. arXiv preprint arXiv:2203. 09509, 2022.
[55] Theo Olausson, Alex Gu, Benjamin Lipkin, Cedegao E. Zhang, Armando Solar-Lezama. Joshua B Tenenbaum, and Roger Levy. Line: A neurosymbolic approach for logical reasoning by combining language models with first-order logic provers. arXiv preprint urXiv:2310.15164 2023.
[56] Dongwei Jiang, Marcio Fonseca, and Shay B. Cohen. Leanreasoner: Boosting complex logical reasoning with lean, 2024.
[57] Hanlin Zhang, Jiani Huang, Ziyang Li, Mayur Naik, and Eric Xing. Improved logical reasoning of language models via differentiable symbolic programming, 2023.
[58] Nathaniel Weir, Peter Clark, and Benjamin Van Durme. Nellie: neuro-symbolic inference engine for grounded, compositional, and explainable reasoning, 2023.
[59] Ziyi Yang, Shreyas S Raman, Ankit Shah, and Stefanie Tellex. Plug in the safety chip: Enforcing constraints for llm-driven robot agents. arXiv preprint arXiv:2309.099 09919, 2023.
[60] Lianmin Zheng, Wei-Lin Chiang. Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric P. Xing. Hao Zhang, Joseph E. Gonzalez, and lon Stoica. Judging llm-as-a-judge with mt-bench and chatbot arena, 2023. (tttss/s:://arr org/
abs Abss2380 2206 05685.
[61] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020.
[62] Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. arXiv preprint arXiv:2207. /2598, 2022.
16

---

NeurIPS Paper Checklist
1. Claims
Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Answer: [Yes]
Justification: Yes, the claims made in the abstract and introduction are reflected and elabo- rated throughout the paper and appendix.
Guidelines:
The answer NA means that the abstract and introduction do not include the claims made in the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.
It is fine to include aspirational goals as motivation long is clear that these goals are not attained by the paper.
2. Limitations
Question:
Does the paper discuss the limitations of the work performed by the authors?
Answer: [Yes]
Justification: Yes, please see Appendix for the limitations. Furthermore, thorough ablation studies are available in Appendix and runtime is discussed in
Guidelines:
The answer NA means that the paper has limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.
The authors are encouraged to create a separate "Limitations" section in their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (c.g.. independence assumptions, noiseless settings, model sellsspeciiiationn asymptotic approximations only holding locally). ). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on few datasets or with few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect on the factors that influence the performance of the approach. For example, facial recognition algorithm may perform poorly when image resolution low or images are taken in low lighting. Or speech-to-tex, system might not be used reliably to provide closed captions for online lectures because it fails handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and faimesss.
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't 't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an impor- tant role in developing norms that preserve the integrity of the community, Reviewers will be specifically instructed to not penalize honesty concerning limitations.
3. Theory assumptions and proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and complete (and correct) proof?
17

---

Answer: [Yes]
Justification: Theoretical results are discussed in with missing proofs in Appendix
Guidelines:
The answer NA means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross- referenced.
All assumptions should be clearly stated or referenced in the statement of any theorems.
The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch provide intuition.
Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
4. Experimental result reproducibility
Question: Does the paper fully disclose all information needed to reproduce the main ex- perimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?
Answer: [Yes]
Justification: We provide experimental details in Section 5 description of implementations in Appendix B and hyperparameter choices in Appendix Code will be released following
the review process.
Guidelines:
The answer NA means that the paper does not include experiments.
If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is novel architecture, describing the architecture fully might suffice, or if the contribution a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way accomplish this, but reproducibility instructions for how to replicate the results, access to a hosted model (e.g.. in the case of large language model), releasing of a model checkpoint, other means that appropriate to the research performed.
also be provided via detailed
While NeurIPS does not require releasing code, the conference does require all submis- sions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.
(b) the contribution is primarily new model architecture, the paper should describe the architecture clearly and fully.
(c) If the contribution is a new model (e.g., a large language model), then there should either way to access this model for reproducing the results or way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).
(d) We recognize that reprodueibility may be tricky in some cases, in which authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers have some path reproducing or verifying the results.
5. Open access to data and code
18

---

Does the paper provide open access to the data and code, with sufficient instruc- tions faithfully reproduce the main experimental results, as described in supplemental material?
Question:
Answer: [Yes]
Justification: We use datasets and models that are publicly accessible. Information to faithfully reproduce the experimental results are included in Section S and Appendix B and
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurlPS code and data submission guidelines (https://nips.ce
for more details.
While we encourage the release of code and data, we understand that this might not be possible, so "No" an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for new open-source benchmark).
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines (https
sooolioicciiiiiiiiiooooooooiiiii for more details.
The authors should provide instructions on data access and preparation, including how access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only subset of experiments are reproducible, they should state which ones are omitted from the script and why.
At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).
Providing much information possible in supplemental material (appended to the paper) recommended, but including URLs to data and code permitted.
6. Experimental setting/details
Question: Does the paper specify all the training and test details (e.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification: Please see Appendix B and C
Guidelines:
The answer NA means that the paper does include experiments.
The experimental setting should be presented in the core the paper to level of detail that is necessary to appreciate the results and make sense of them.
The full details can be provided either with the code, in appendix, as supplemental material.
7. Experiment statistical significance
Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Question:
Answer: [Yes]
Justification:
We report error bars and distributional information where applicable.
Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results are accompanied by error bars, confi- dence intervals, or statistical significance tests, least for the experiments that support the main claims of the paper.
The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall with given experimental conditions).
19

---

The method for calculating the error bars should be explained (closed form formula, call a library function, bootstrap, etc.)
The assumptions made should be given (e.g., Normally distributed errors).
It should be clear whether the error bar is the standard deviation the standard error of the mean.
It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have 96% CI, if the hypothesis of Normality of errors is not verified.
For asymmetric distributions, the authors should be careful figures symmetric error bars that would yield results that are out of range (e.g. negative rates).
show in tables or
If error bars are reported in tables or plots, The authors should explain the text how they were calculated and reference the corresponding figures tables in the text.
8. Experiments compute resources
For each experiment, does the paper provide sufficient information on the puter resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
Question:
Answer: [Yes]
Justification: Please see Appendix C and
Guidelines:
The answer NA means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount of compute required for each of the individual experimental runs as well estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary failed experiments that didn't 't make it into the paper).
9. Code of ethics
Question: Does the research conducted in the paper conform, in every respect, with the NeurlPS Code of Ethics
Answer:
[Yes]
Justification:
We followed the NeurIPS Code of Ethics.
Guidelines:
The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.
If the authors answer No, they should explain the special cireumstances that require deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g., if there is special consid- cration due to laws or regulations in their jurisdiction).
10. Broader impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [NA]
Justification: While positive impacts are discussed in Section 5 there are no negative societal impacts in our work that need to be discussed.
Guidelines:
The answer NA means that there is no societal impact of the work performed.
If the authors answer NA or No, they should explain why their work has no societal impact why the paper does not address societal impact.
20

---

Examples of negative societal impacts include potential malicious unintended uses (e.g., disinformation, generating fake profiles, surveillance), faireess considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional unintentional) misuse of the technology.
If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms monitor how system learns from feedback over time, improving the efficiency and accessibility of ML).
11. Safeguards
Does the paper deseribe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
Question:
Answer: [NA]
Justification:
We do not introduce data or models that pose a high risk of misuse.
Guidelines:
The answer NA means that the paper poses no such risks.
Released models that have high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make best faith effort.
12. Licenses for existing assets
Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Question:
Answer: [Yes]
Justification: The creators original asset owners have been credited in appropriate ways.
Guidelines:
The answer NA means that the paper does use existing assets.
The authors should cite the original paper that produced the code package dataset.
The authors should state which version of the asset used and, possible, include URL.
The name of the license (e.g., CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (e.g., website). the copyright and terms of service of that source should be provided.
If assets are released, the license, copyright information, and terms use in package should be provided. For popular datasets, paperswithcode com/ datasets has curated licenses for some datasets. Their licensing guide can help determine the license of dataset.
21

---

For existing datasets that are re-packaged, both the original license and the license of the derived asset (if has changed) should be provided.
If this information is not available online, the authors are encouraged to reach out to the asset's s creators.
13. New assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
Answer: [NA]
Justification: In this work, no new assets are released.
Guidelines:
The answer NA means that the paper does not release new assets.
Researchers should communicate the details of the dataset/code/moddl as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent was obtained from people whose asset used.
At submission time, remember to anonymize your assets (if applicable). You can either create anonymized URL or include anonymized zip file.
14. Crowdsourcing and research with human subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?
Answer: [NA]
Justification: This work does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information in the supplemental material is fine, but if the main contribu- tion of the paper involves human subjects, then as much detail as possible should be included in the main paper.
According the NeurIPS Code of Bthies, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.
15. Institutional review board (IRB) approvals or equivalent for research with human subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or equivalent approval/review based the requirements of your country or institution) were obtained?
Answer: [NA]
Justification: This paper does involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurlPS Code of Ethics and the guidelines for their institution.
For initial submissions, not include any information that would break anonymity (if applicable), such the institution conducting the review.
22

---

16. Declaration of LLM usage
Question: Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods in this research? Note that if the LLM is used only for writing, editing, or formatting purposes and does not impact the core methodology. scientific rigorousness, originality of the research, declaration is not required.
Answer: [NA]
Justification: The core methodology, scientific rigorousness, or originality of the research does not involve the usage of LLMS
Guidelines:
The answer NA means that the core method development in this research does not involve LLMs as any important, original, or non-standard components.
Please refer to our LLM policy battps://neurre wwwpurrppp.ccoooeeeeeeeeeeeeee ///Cooffreences/22225 for what should or should be described.
23

---

A Expanded Related Work
Constrained Decoding Algorithms. A prominent strategy in controllable text generation is to employ constrained decoding algorithms, which incrementally parse outputs under specified for- matting structure requirements. Such approaches have been extensively used in tasks like code generation [51], semantic parsing (52). SQL queries [53], and grammar-constraine text generation [T] These methods typically prune the vocabulary each decoding step to only those tokens that comply with the target representation' ' syntax or semantics, For instance. [eng et al. confine the logit distribution tokens valid within a formal grammar, then employ completion engine to extend partial sequences while maintaining grammatical consistency. Mcanwhile, approaches that treat the original language model as a black box resort to external constraints. For example. [12] harnesses a secondary model to parse and restrict outputs, an option that becomes necessary when direct access to the logits is unavailable. However, these workarounds may suffer performance penalties due to their indirect control over the primary model's probability distribution.
Beyond syntax-focused constraints, lexical constraints have also been extensively studied. Lu et al. [13 devise Neurologic decoding, which encourages the presence or absence of specific words in generated text via modified beam search. They later improve adherence to these constraints by employing an A search variant [4). Similar frameworks combine toxicity classifiers with beam search steer generation toward more benign text [26 54). Although these methods can effectively address a range of constraints, they generally rely on augmented sampling heuristics or additional classifiers rather than natively integrating constraints into the generation process.
Natural Language Verification with Formal Logic. Another line of work has examined mapping
natural language into logical representations ensure factual and logical consistency [8 By encoding linguistic inputs in formal system, these methods can detect inconsistencies or factual emoos and thereby provide measure of control over generated outputs. For instance, Olausson et al. Jiang et al.] and Zhang et convert natural language statements into first-order logic (FOL. and leverage theorem proving verify factual correctness. However, FOL struggles to capture complex temporal or sequential dependencies, limiting its applicability to planning or process-oriented tasks. Similarly, other work uses entailment models verify that a conclusion logically follows from set of premises (58), though these methods generally stop short of actively generating text that satisfies domain-specific constraints.
Agent Constraint Satisfaction. In robotics and embodied AI, natural language planning frequently incorporates specialized external modules to handle feasibility constraints. For example, Chen et al. 19 and Lin et al. [20] defer to domain-specific motion planners to generate viable trajectories, embedding constraint satisfaction directly into the underlying optimization routines. Although these solutions can integrate strong, domain-aware constraints, they do so by delegating control to highly specialized components. On the discrete side, Yang et al. [59] achieves constraint satisfaction by running a validation module at each step of plan construction and discarding infeasible actions through rejection sampling. While effective in certain settings, such methods typically require domain-specific expertise and do not uniformly integrate constraint enforcement into the generative model itself.
B Experimental Setup
B.1 Toxicity Mitigation
LLM-as-a-Judde Setup. To quantify the fluency and coherence of generated continuations we follow the increasingly adopted LLM-as-a-Judge evaluation. This method has been shown to result in similar evaluation as human judgment [60]. Specifically, each post-prefix sentence is scored by the 2--MAA---775 IT model and issued the following prompt:
instruction-tunar
"You are a language expert evaluating the fluency and coherence of the following AI- generated sentence... Give single integer score between (poor) and 100 (excellent), with no explanation or comments."
The model returns single scalar E |0, 100) for each sentence. Using an LLM evaluator offers two key advantages: (i) strong correlation with human judgments at negligible annotation cost, and (ii) scalability for thousands of evaluations performed in various experiments.
24

---

Surrogate Model. As the surrogate model for toxicity task, we use a GPT-Neo (1.3B) model, adapted for binary classification. We finetune this model the Jigsaw toxicity dataset which includes multiple toxicity-related labels such as toxic, severe toxic, insult, etc. We consolidate these columns into a single binary target (toxic vs, non-toxic).
PPLM Implementation. As baseline for toxicity reduction in natural language generation we include the PPLM methodology [26] PPLM uses a frozen pretrained GPT-2 generator for output steering. At every decoding step the algorithm runs the usual forward pass, takes few gradient-ascent steps on the cached key/value activations to maximize the score of small attribute model which in this case is toxicity classifier trained on the Jigsaw toxicity dataset. It simultaneously keeps the perturbed logits close to the original distribution with a KL penalty and a geometric-meat fusion term. We the authors implementation and code structure without architectural modifications. The underlying steering mechanism, loss terms and papee--rrammter values are unchanged from the authors' baseline.
FUDGE Implementation. For another toxicity control baseline we additionally implemented FUDGE (I5] on the Jigsaw Toxicity dataset. Following the authors implementation we use an LSTM followed by a linear output layer trained to predict future toxicity from partial prefixes, At inference time we add its scaled log non-toxicity probability to GPT-2's next-token logits for the top candidates then sample from the re-weighted distribution. While the original implementation of FUDGE fixes
the guidance strength À 1, we perform a hyperparameter seach and sample from the resulting
distribution with À E {1,... 9), displaying the toxicity and perplexity results in Table 2 authors' original code structure, and base language model.
We use the
PPL (Avg)
Coherence
Viol % r 0.25
Viol % r 0.5
Viol % 0.75
20.34
41.64
33.5
20.0
13.1
26.46
41.79
31.6
19.7
12.7
3 36.36
40.07
33.1
20.7
13.3
43,80
40.37
31.8
21.5
13.3
5
54.37
40.12
31.7
21.6
13.0
65.23
39.33
33.1
21.7
13.1
7
75.23
38.76
32.5
20.3
12.9
76.51
39.09
32.2
20.8
12.6
81.84
38.91
30.6
19.6
11.4
Table 2: FUDGE perplexity, coherence, and violation rates at three thresholds for varying X.
Diffusion Guidance Implementation. While recent literature g has proposed adaptations of classifier-based guidance [61] and classifier-free guidance [62] for discrete diffusion models, these approaches have only been employed for settings with limited vocabulary sizes (e.g., molecule generation where the vocabulary is composed of 40 tokens). For natural language tasks which have much larger vocabulary sizes, for instance, the GPT2 tokenizer is composed of over 50,000 tokens- these techniques have not been applied. Currently, this is a scalability issue, as these approaches require that guidance vectors are computed of size I L making it much simpler and efficient when operating on limited vocabulary size. Hence, as there is no prior literature to the extent of our knowledge that has scaled these techniques to natural language tasks, we defer comparison to these methods for the molecular generation setting.
Implementation Details. For the ALM projection, we initialize using the following hyperparame- ters: Aini 0.0, /iin = 1.0, outer seeerritrrraaa = 1000, inner_iter jtter = 10, 0.20. We choose these setting for the toxicity experiment as they result in the lowest perplexity in the Appendix aablation study. For natural language toxicity reduction details we use generation length of 100 tokens.
B.2 Molecular Generation
Training Dataset. For our molecule generation experiments, we utilize the QM9 dataset [47, as used by Schiff et al. [8). This dataset comprises approximately 133,885 small organic molecules,
25

---

Synthetic Accesibility Score Distributions
8-
Synthetic Accestblin
2-
ARy
HOL
NBLMa
UELMoo
cDP.-10 12
CBD..15
cD0.44
Figure 5: Synthetic Accessibility score distributions for CDD versus competing baselines. Importantly, CDD is the only model that never violates the specified toxicity thresholds.
each encoded as a SMILES string 44 which compactly represents the molecular structure through sequence of characters. The SMILES representation facilitates discrete modeling by enabling the treatment of molecular generation as sequence prediction task, making it particularly amenable to discrete diffusion approaches. By leveraging QM9, we can rigorously evaluate the performance of our generative models on tasks that require both the preservation of chemical validity and the precise control of molecular properties, aligning with established protocols in the literature.
B.2.1 Synthetic Accessibility Constraints
Pc
Surrogate Model. We train our surrogate model on the QM9 dataset 47 but manually label the training data with RDKIT's synthetic accessibility score 48. We finetune GPT2 (124M) to act as this surrogate model and di- rectly output score s E 10).
T-65
CICCICHOCIONIC
FUDGE Implementation. For this setting, we follow the FUDGE implementation provided by []. However, while their guidance is trained on QED scores, labeling samples from the QM9 dataset with these scores, adapt it to label the training data with RDKIT's computation of the synthetic accessibility scores.
Figure 6: SA projection illustration.
Diffuusio Guidance Implementation. Similar to the implementation of FUDGE, we adapt the guidance mechanisms provided by [8] for QED by retraining on synthetic accessibility labels. Otherwise, our implementation mirrors their approach for QED guidance.
ALM Implmenetation. For the ALM projection, we initialize using the following hyperparameters: 0.0, Pinit 1.0, Mmax 1000, outer iter 1000, inner iter 100, 17 1.0.
Appit
B.2.2 Novelty Constraints
Novelty Projection Operator. In order to project the molecule sequences into a novel set, we apply best-first search (BFS) the probability distribution level. We begin by defining flip cost for forcing a token to become the new argmax; this cost is the difference between the current top token's 's probability and the candidate token's probability, or zero if the candidate is already top-ranked. To find novel sequence at minimal total flip cost, we start with an empty sequence and expand it position by position, accumulating flip costs in priority queue. Once a full sequence constructed, we decode it and check if it is absent from our existing dataset. If it is indeed novel, we finalize sequence, shift the probability distribution so that each selected token becomes the definitive argmax, and insert the resulting sequence into the dataset to prevent re-generation. This procedure systematically maintains high-likelihood sequences while avoiding those already present, terminating for each sample as soon finds suitable novel result before proceeding to the next sample.
26

---

FUDGE Implementation. For this application, we similarly follow the FUDGE implementation and configuration in 8 for QED guidance.
Diffusion Guidance Implementation. for QED as implemented in [].
We use classifier based guidance and classifier free guidance
B.3 Instruction Following
LLM-as---Judee Setup. To quantity the fluency and coherence of generated continuations we follow the increasingly adopted LLM-as-a-Judge evaluation. This method has been shown to result in similar evaluation as human judgment [60]. Specifically, each post-prefi, sentence is scored by the instruction-tun tunde Gemini- momini-2.0. O-Flash model and issued the following prompt:
"You are a language expert evaluating the fluency and coherence of the following Al- generated sentence... Give single integer score between 0 (poor) and 100 (excellent), with explanation comments."
The model returns single scalar [0, 100] for each sentence. Using an LLM evaluator offers two key advantages: (i) strong correlation with human judgments at negligible annotation cost, and (ii) scalability for thousands of evlautions performed in various experiments.
Discrete Diffusion Base Model. While in Section 5.1 we directly utilize the pretrained MDLM checkpoint provided by M. for the experiments Section 5.. we pretrain and subsequently instruction-tune a slightly larger MDLM model, adopting the Llama 1 tokenizer. Empirical ob- servations indicated that employing a marginally larger model and vocabulary size was essential for optimal performance on cnrruction-guidenn tasks. Consequently, we adopt this enhanced model for all subsequent evaluations this context, including both the base MDLM experiments and the proposed CDD framework. Our instruction tuning is conducted using the ShareGPT dataset, and all pretraining follows the design choices and hyperparameters provided by 7
B.3.1 Counting Constraints
Instuuction-Tuning Dataset. We manually construct a dataset of letter counting examples in an instruction -tunnnttunnngggnnn format. We use random words and select random character from these words 80% of the time. The other 20% of the time we select letter at random, which may or may not be contained in the word, to represent cases where the correct answer is zero.
Projection Operator. Our implementation of this projection operator involves integrating an external module to count the number of times specific letter appears in given word. First, leverage the external module to obtain the accurate count, ensuring that the correct numerical value is determined. Then, during output generation, tokens so that the token corresponding to this count is assigned the highest probability, while the probabilities of other numerical tokens are appropriately diminished. This approach guarantees that when the model is queried about the frequency of letter in word, it outputs the correct numerical token with the highest weight in the distribution, maintaining consistency and precision in the final answer.
adjust the probability distribution
the numerical
B.3.2 Lexical Constraints
Instruction-Tuniin Dataset. We finetune models on a dataset of examples constructed from evaluation of GPT-4 the COLLIE dataset provided by Yao et al. [4)] As GPT-4 performs well on these examples, we apply knowledge distillation by compiling these generations into an instruction tuning dataset. The dataset can be directly constructed from the logs included in the code base from Yao et al.
Projection Operator. Our implementation of the projection operator begins by parsing the decoded string to locate the position corresponding to the nith word. Because token indices do not necessarily match word indices, owing to the nuances of subword tokenization, we perform an alignment procedure that accurately maps word positions to their respective token indices. Once the index in
27

---

the sequence corresponding to the ne word is identified, we apply closed-fone gradient update that adjusts the probability distribution over the vocabulary. This update maximizes the probability of the correct token at the specified position while ensuring that the overall distribution remains valid (i.e., probabilities sum to one).
C Hyper-parameter Ablation Study
ALM Hyper-parameters Ablation
75
60
65.0
Aung perplexiity
58
65
60.0
60
55.0
0.4
Learning Rele
Initial
Inner Loogs
260
250
600
240
200
500
Avg
150
220
400
200
300
100
0.2
0.4
0.6
0.8
2
4
6 p Initial
8
10
20
30
40
50
Learning Rote
Inner Loops
Figure 7: Augmented-LLarangiann Method syper-parameter ablation study.
To evaluate the robustness of CDD we perform a hyper-pprameen sensitivity study for toxicity constraints in natural language generation. We sweep three key Augmentted-Lagraagiian optimization hyper-parameters: learning-rate, number of inner loop steps, and jz-initialization values. We further examine the impact of projection frequency on constraint generation. our study we evaluate for constraint satisfaction, perplexity of generated sequences, and runtime. Crucially, for every configuration in the search space the toxicity threshold constraint fully satisfied, indicating that the method remains reliable under substantial dyper-paramete variations. For all test setting we evaluate with the same subset of 200 random samples, and all are run on a single NVIDIA RTX A6000 GPU.
Parameters The Eegemented-Lagraggiing Method lets us express the detoxification goal (loxicity < 7) smooth, differentiable objective rather than hard discrete constraint. At every outer iteration ALM augments the loss with (i) a linear Lagrange term that guides the solution toward feasibility and (ii) quadratic penalty that makes constraint violations increasingly costly. This dual penalty keeps gradients informative even when the constraint is initially violated, yet avoids the numerical instability of single, very large fixed penalty. The inner optimizer therefore steers the logits toward region that is both close to the original sentence (via the KL term) and certified non-toxic (via the AL penalty). To assess robustness and sensitivity, we perform grid search over three key ALM hyper-parameters:
1. Learning rate controls the size of each optimization step on the logits. Higher yj acceler- ates early progress but overshoot when the penalty weight μ grows; lower 1) stabilizes training at the cost of more iterations.
2. Initial penalty weight μ4l sets the starting strength of the quadratic term. A small allows the optimizer to explore broader region and preserve fluency, while large po enforces the toxicity constraint aggressively from the beginning.
3. Max inner loops determines the number of optimization steps taken before updating À and μ. This value controls the trade-off, where too few steps may lead to an under-optimized solution, whereas too many leads to wasted compute and runtime.
28

---

The main trends are summarized in Figure 7 and exhaustively detailed in Table
Ablation Study Frequency
100
500
Avg perplexity
Avg time (5)
40
200
100
100
80
Inspection Frequency
Inspection Frequency
Figure Effect of constraint-checking frequency on runtime and perplexity.
Frequency Ablation We further perform ablation study with different inspection frequencies. This ablation examines the trade-off between sample quality, constraint satisfaction, and runtime. A more frequent schedule results in consistent adherence at price of increased compute and runtime. We observe as the inspection frequency increases the average runtime decreases consistently. By analyzing this we demonstrate this method's robustness and note that for all settings, constraint satisfaction is met. Results are shown in Figure g
Ablation Study Constraint Start
260
perplesity
240
220
200
100
200
400
500
100
200
400
500
Constraint-Checkinng Start
Constraint-Cheekingg Start
Figure 9: Constraint-checking start analysis perplexity and runtime.
Constraint Start Ablation We include a constraint-start ablation, where we examine the run- time/perplexity tradeoff by turning the projection operator on only after specific amounts of reverse-dee diffrs-diffusion steps. Early enforcements allows the projection to satisfy the constraints very early iterations at the cost of increased runtime. Notably, across all setting, constraint satisfaction is met for all samples.
D Runtime Analysis
To benchmark the computational overhead of CDD as compared to the baselines, we compare the runtime of our method and the other baselines on the toxicity mitigation task. To normalize for the overhead of base models (MDLM and GPT2), we make two adjustment: we reduce the number of diffusion steps from 1000 100 and adjust the generation sequence length 1024; prior work on discrete diffusion has indicated that these hyperparameters can be used to approximately match the inference time of autoregressive models [9. Empirically, we find that, while the speed is not identical, these adjustments result in a much more similar
rate for the base models.
Practically, MDLM could be accelerated even further by reducing the number of diffusion steps further, but we abstain from this so as to maintain consistency with the baselines. For every system we report the mean generation time, the 25th/50th/75th percentiles, and the slowdown relative the respective baseline.
29

---

ALM hyper-parameters
Perplexity
Wall-clock time (s)
LLM-Judge
LR
Loops
Mean
25%
50%
75%
Mean
25%
50%
75%
Score
0.20
10
53.97
29.91
44.33
66.18
258.52
10.75
12.29
153.54
18.59
0.20
25
64.92
28.54
44.34
66.53
448.47
13.15
15.02
374.19
19,46
0.20
50
61.95
31.44
45.58
74.66
637.53
13.18
14.82
454.52
20.29
0.20
10
60.25
29.15
45.31
71.67
236.39
13.49
130.67
20.09
0.20
25
59.78
28.56
44.38
72.20
343.61
10.54
11.92
192.14
19.64
0.20
50
79.71
28.32
44.53
71.44
809.47
10.60
11.93
307.58
19.31
0.20
10
10
57.42
27.69
42.31
75.10
194.37
10,97
13.46
105.79
19.61
0,20
25
58.64
27.45
43.73
67.97
636.73
10.56
12.15
126.59
19.25
0.20
10
50
64.90
29.97
45.67
72.46
760.28
11.03
13.86
186.85
20.49
0.40
10
64.45
30.65
45.00
74.42
149.41
10.80
12.87
113.80
20.01
0,40
25
62.11
33.07
46.49
76.91
223.79
10.55
12.07
200.18
20.44
0,40
50
58.95
29.10
44.23
72.99
356.07
10.50
11.52
175.66
20.15
0.40
10
58.33
28.29
43.18
66.50
124.73
10.63
104.85
20.00
0.40
25
68.55
29.19
45.34
69.38
213.77
10.66
11.76
204.08
20.11
0.40
50
73.02
31.72
45.83
76.92
220.34
10.65
11.74
81.31
20.18
0,40
10
10
69.06
29.22
45.00
73.44
136.86
10.63
12.00
95.29
19.67
0,40
25
61.22
30.51
45.34
72.76
193.70
10.77
12.01
123.57
20.11
0.40
10
50
102.30
32.47
46.62
74.88
250.82
10.70
12.44
135.07
19.77
0.60
10
66.69
30.22
45.67
74.00
106.81
10.82
11.77
94.56
19.67
0.60
25
87.59
32.07
45.77
69.40
196.40
10.77
12.04
170.36
19.10
0.60
50
126.00
30.38
46.98
74.85
228.66
10.64
12.02
153.14
19.23
0.60
10
65.16
31.96
44.59
72.71
97.96
10.89
12.13
71.26
19.57
0.60
25
64.33
29.15
45.80
77.38
144.82
10.76
11.87
144.06
19.34
0.60
50
93.99
31.56
47.41
76.91
211.75
10.91
12.14
141.92
19.65
0.60
10
10
65.32
30.79
46.20
77.53
87.94
11.11
12.73
50.27
19.98
0.60
25
68.26
30.51
47.78
75.92
158.64
10.76
11.96
70.02
19.27
0.60
10
50
71.86
29.99
44.51
72.47
167.33
10.85
12.17
105.36
19.55
0.80
10
74.68
31.81
47.64
78.54
96.14
10.75
11.83
50.56
18.83
0.80
25
77.26
30.62
45.77
76.91
158.28
10.77
11.77
115.30
20.57
0.80
50
84.82
30.51
45.77
77.38
297.94
11.90
15.24
157.88
19.91
0.80
10
68.87
29.05
44.67
70.50
85.59
14.12
16.06
38.68
19.34
0.80
25
60.04
26.73
44.05
68.03
129.18
14.84
17.11
64.22
19.60
0.80
50
56.15
27.77
44.24
69.18
175.82
15.61
17.76
88.31
19.41
0.80
10
10
74.68
28.95
45.31
74.14
88.95
15.62
17.56
65.28
19.14
0.80
10
25
78.71
29.99
45.67
69.43
146.18
14.99
16.95
105.86
19.41
0.80
10
50
66.70
28.29
44.24
75.66
134.23
10.65
11.74
74.80
19.50
Table 3: Perplexity and wall-clock time statistics, together with LLM--Judge coherence scores, across all ALM hyper-parameter settings.
Toxicity
Runtime
Runtime (s)
Increase
Model
Size
Mean
25%
50%
75%
Factor
GPT2
124M
10.31
10.28
10.32
10,36
GPT2PPMM
124M
878.47
857.38
869.69
887.41
85,21
GPT2
124M
1387.28
1386.47
1387.00
1387.73
134.56
GPT2
124M
1481.94
1479.71
1480,27
1484.47
143.74
Llama 3.2
IB
16.43
16.38
16.44
16.46
MDLM
110M
4.59
4.40
4.49
4.74
CDD, 0.25 (Ours)
110M
401.15
9,09
9.67
11.71
87.02
CDD, 0.50 (Ours)
110M
230.89
9.19
9.62
10.46
50.08
CDD, = 0.75 (Ours)
110M
63.71
9.20
9.56
10.21
13.82
Table 4: Runtime statistics for all evaluated models and respective runtime increase from base model. Bold and underlined values mark the best and second-best time increase factor, respectively.
30

---

Notably, we find that even without optimizing for runtime (besides selecting specific ALM hyperpa- rameters) CDD provides the least additional overhead compared other controllable generation methods. Further adjustment (e.g., hot-starting the ALM projection, further reduction in diffusion steps) could be made increase this margin even further.
E Entropy Analysis
For the toxicity application, we additionally evaluate CDD and its unconstrained base model using entropy. As described [10], entropy measures the diversity the generated sequence. For generated sequence of length I. with K distinct tokens, let L denote the count of token k. and define the token probabilities Рı L. The entropy of this distribution is k= Ps. log Ps- Lower entropy indicates that probability mass is concentrated on few tokens, reflecting a lower diversity, whereas higher entropy indicates more uniform token usage and greater generative diversity.
As observed in Table 5 across all thresholds, CDD results in negligible entropy decrease of 0.59-1.0% compared to the base model. As the decrease small and within narrow confidence intervals, this validates that CDD preserves generative diversity.
Model MDLM
Size
Mean Entropy
95% CI
% Decrease
110M
5.577
0,0178
CDD, 0.25
110M
5.521
0,0709
1.00
CDD, 0.50
110M
5.519
0.0851
CDD, = 0.75
110M
5.544
0.0709
0.59
Table 5: CDD mean entropy, 95% confidence intervals, and percent decrease from base model at different thresholds for the toxicity application.
F
Missing Proofs
Proof of Theorem
We begin by proving this bound holds for projected diffusion methods operating in the image space:
Proof.
DKI(E',, < (1- a.) DKL C) + G2
(9)
For ease of notation, we will denote subsequent timestep in terms of an arbitrary t, such that ft-1 Fg and the subsequent timestep after that is denoted æt-2, etc.
Consider that at each iteration of the denoising process, projected diffusion methods can be split into two steps:
Gradient Step: at = 02 + 7t. Va, log qr (3r+)
2. Projection Step: .:-1 Po(x!)
These steps are sequentially applied in the reverse process to sample from constrained subdistribu- tion.
8t + Pc(x1) = It-1 - It-1 1 + Yt 18:-1 Pe(a(_1) Ft-2 .... 3t
By construction, R:-1 = Pc(x)) E C. Next, us define the projection distance to C as:
f(x) = (xL(x, C) = DKL (=I(Pc(x))
Since C is 8-prox regular, by definition the following hold:
31

---

f is differentiable outside C (in neighborhood)
V f()) 2( Pc(x))
Vf L-Lipshitz with -=
The standard "descent lemma" (or smoothness inequality) for L-smooth functions applies: Lemma F.1. Va, in the neighborhood of C:
f(y) - f()) + (Vf(x), y - x) + 2113 - x1²²= f(x) + 2(x - Pc(x)) y - x) 3 y x
Applying this lemma, let use x = _ and y x/c Noting that Pc 2t-11 1, we get:
DKL (a' C) S DKI(z C) +2 (0 It 2, x
x 10/-1) 1 +
|0o x/-211
Term A
Term
Term C
Decomposing Term B. First, consider that since the step size is decreasing "t 2 7--1
1/-1 Ft-2 S ( 1 x2-2) + 18-18-11
S (x1-1 x2-2) + 7
By the same rationale,
o 1/-1 S (ax 11-1) + 7e(8z 82-1).
(Definition B.1)
Proof of expansianssse of the projection operator. Next, we prove the non-expansiveness the projection operator:
| x2-1l1 S 7
(C+)
Given = Po(a4)1) and x;-1 = Pc(x(),
|| .:-1 (| - Po(x)))l S || - æx|l
since projections onto closed prox-regular sets are L-Lipshitz. Now:
x'41 = #1+1 + 714181413
x/ xz + 768
2/41 x/ (I++1 xt) + (144184111 - 7()).
(Definition B.2)
Making the projection residual,
Et-1 - 32 1t+1 - (c(4441)
orthogonal to the target space m, (and any vector of the form 8141 8t). Thus, since || S G Vt:
|| 2/ = 1|++19++111 + //rssell S (72-1 + G2
Taking the square root:
|2/411 x''1 S // 12t1 + G
Since 7641 7h:
|| -2/1l S V2
22t+1
Finally, by applying Definition (B.1), ||441 x11| - | +1
x/ ||. and thus:
| - xi S 2
32

---

Now, regulargy gives: (2/_1 22-2, 2/ -x/-))
x ot xz-1
4 G²
(Bound B.1)
where the Bound B.1 derived by applying (C+). Since C in 8-prox regular, for any point a near C and E C:
(u Pc(u), Pa(u)) /|| Pa(u)]²
Above, we substitute:
x/ 2t 718t
v = Zt
Pa(l) #t-1
Now, expanding the inner product:
(a//-1 21 x2/-1) (a0/-1 2t (2t + 7+8)) (#t-1 7-118-11
I (2/-11 Tt-2, (2) Σ(-1) 1) + + s(-1))
I (x/-1 2. (2) x(-1)) 1)) + (x'--1 21-2, N1(s st-1))
and since || < G
vt: (81+1, 81) < || sell S G² so (81-1, 82) - -||s1-111 G², and:
(z/-11 - xz- 7e(5 82-1)) 1)) S G²²
(Bound B.2)
By applying Definition (B.2): (ar-1 22 z/
x x/-1) (ar/-1 3y 2, (rt xit) + (7181 18--8)1))
S (x/-11 -:-2; (I: x{-1))
Therefore, by applying Bound (B.1) to the previous inequality and Bound (B.2) directly, Term is upper bounded by:
(a/-1 :2-2, x/-1) s 8372 2
(Bound B.3)
Decomposing Term Next, we derive a bound on Term C in Eq. (x). As already shown, b --/ 2/-1ll < 44:G,
given:
x/ - 2/-1 & (x, x, xz-1)
+
Ta(s: - s1-1)
S20+1
S2G
S 44t+GG
Thus,
16
||ay x//_1
112
B 7t G2
(Bound C.1)
8
Combining bounds (B.3) and (C.1) into (+), and recalling that 7t-1 2 76:
(xL( C) < DKL (xL(2(-1,)) + (8.3 + 2 + B
re+1 G2
d
Now, we rewrite Term A, which for ease of notation will refer to d:
d = (1 23 28
Thus:
DKL(2/ C) S 2, d + 2 + G22 (1 2,3++)d [23 + K Ko?- G2]
Next, through Young's inequality, simplify this expression further.
33

---

Theorem F2. (Young's Inequality) Yu, 2 0,6 >
0:
Wv Σ u² ev²
2e 2
we choose u = v28 = VK+++ 7+ G. and c G then
23d
wu = 1 x v VK G
V2KK Gd
Applying Young's Inequality:
u²
cv
ue -
+
2c
2
cv2
+
2 K
23d
k1 G2
EV2
+
2
Kntt1 G2
1
23d
2
K
K2 G2
+ B
Thus,
Kr2n G2
Y2 Gd S
+ Briid
Finally, taken altogether:
23 Krtt GP Briid+
Brtzdd
K 2
-20 +
G2
2
Since 7o+1 2 then
K
16 8
G2 <
83 22+
10 = 0(39)
2
1++
3
which is bounded by 724 G for all B 0.
Thus,
2 + Ky G² < 2 G2 G².
By substitution we obtain:
DKL(Z', < (xx 2 G²
O
Finally, reparameterize this, such that a; -23%, implying 7: 23'
Plugging this in, we get:
Dxt, C) < (1 0. DKI (2/ C) 7
< (1 a. (1 a G2
C)
and thus,
DKL(Z', C) < (1 - a,
C) a G2
34


Reviews:
[{"review_id": "6jCkpBdzu5", "reviewer": "Reviewer_sK3h", "summary": "This paper proposes a new method for generating discrete data that strictly satisfies constraints on the sequence-level. The proposed algorithm, based on discrete diffusion, uses a gradient-based approach to project the denoised sequence onto the closest sequence that satisfies the set of constraints.", "questions": "1. In what respect does your paper differ substantially from [1]? It also uses an inner loop with gradient-based optimisation to optimise for a specific objective, which also exactly includes a KL divergence term and a reward term (here, a constraint term). Please point out clear differences. I could be mistaken in my understanding of your method.\n2. While the method works well, it requires a great deal of additional runtime (which, I understand, can be a cost that is absolutely fine to pay, in some contexts). Do you believe your method could be sped up in any simple way?\n3. Have you tried methods such as ReinMax [2], that allow for differentiable discrete sampling instead of Gumbel softmax?\n4. Have you attempted your method in combination with other SOTA sampling methods, such as P2 [3]?", "limitations": "I am concerned about the novelty of the work, primarily.\n\nReferences\n---\n[1] Protein Design with Guided Discrete Diffusion (2023). Nate Gruver, Samuel Stanton, Nathan C. Frey, Tim G. J. Rudner, Isidro Hotzel, Julien Lafrance-Vanasse, Arvind Rajpal, Kyunghyun Cho, Andrew Gordon Wilson.\n\n[2] Bridging Discrete and Backpropagation: Straight-Through and Beyond (2023). Liyuan Liu, Chengyu Dong, Xiaodong Liu, Bin Yu, Jianfeng Gao.\n\n[3] Path Planning for Masked Diffusion Model Sampling (2025). Fred Zhangzhi Peng, Zachary Bezemek, Sawan Patel, Jarrid Rector-Brooks, Sherwood Yao, Avishek Joey Bose, Alexander Tong, Pranam Chatterjee.", "rating": 4, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 2, "clarity": 3, "significance": 2, "originality": 1, "strengths_and_weaknesses": "Strengths:\n1. The paper’s presentation is clear and rather simple. The goals and methods are understandable.\n2. The empirical evaluation seems rigorous overall and is extensive.\n3. The method empirically achieves the desired goal of no violation whatsoever of the desired constraints.\n\nWeaknesses:\n1. While overall the paper is not too poorly written, section 4 should be broken down into subsections, as it is currently quite hard to read, in terms of structure.\n2. The authors make no mention of [1], while it is an extremely close method to the one they propose. In [1], authors also propose a gradient-based approach to optimise for a reward while generating a sequence with discrete diffusion. As a matter of fact, I would like the authors to show the novelties their work offers when compared to [1]; it is my biggest concern about this work.\n3. Theoretically, the paper is relatively weak. Moreover, while the proof of Theorem 4.1 seems relatively sound, I fail to follow a few parts which could, I believe, use a bit of clarification. Namely, “ $\\forall x, y$ in *the* neighbourhood of $C$ ”: what does this mean? which neighbourhood? (Maybe in “a” neighbourhood?) What is $\\beta$-prox regularity? These are just a few examples, and the paper contains a few (minor) typos here and there. I am not so concerned by this point, as the paper evidently is more oriented towards experiments.\n\nOverall, I think the paper is of good quality, but I am truly concerned about its novelty. I would be happy to reevaluate my opinion on that matter, should the authors provide good evidence.", "was_revised": true, "final_justification": "While the paper presents little originality in its method, it sets a new baseline for constrained generation using discrete diffusion. Discrete diffusion being a very active topic in the community, it will most certainly be referred to in further works to compare with arguably a relatively bruteforce method, which admittedly does empirically work.", "rebuttal": "Thank you for the helpful review, and, in particular, for the acknowledgement of the *rigorous and extensive empirical evaluation and performance*. We address below the outstanding questions.\n\n> **1. In what respect does your paper differ substantially from NOS?**\n\nOur method aims to solve a **different mathematical problem** and has a **different behavior and guarantees** when compared to NOS. Specifically, while NOS appends a gradient term to the denoising step for soft guidance, our method implements an augmented Lagragian projection operator that enforces **all samples to lie in the constraint feasibility set $\\textbf{C}$**. \nWithin the inner loop, our method solves the projection problem: find the nearest point to the original sample that lies in the constraint set $\\textbf{C}$. Differently from NOS, the KL term here is used as distance measure in the projection objective: it keeps the new sample as close as possible to the model’s current score distribution. Another novelty of our framework is the theoretical ground provided: Feasibility (as convergence to a constrained set) is reported in Theorem 4.1. Additionally, empirically, CDD shows zero constraint violations in every experiment tested. \n\n\nIn contrast, in NOS the KL term acts a regularizer between the current and original logits with the $\\lambda$ term regulating the trade‑off between distance and reward. The guidance is encoded only through this scalar reward and depends on tuning $\\lambda$. It also provides no convergence guarantees. Qualitatively this technique is largely outperformed by our method. For example, [B] assesses the NOS guidance scheme for the same molecule domain we study in this paper, adapting it to MDLM and UDLM. Below we provide a side-by-side comparison for the novelty setting:\n\n| **Model**  | **Valid & Novel** | **QED** | **Viol (%)** |\n|------------|-------------------|---------|--------------|\n| UDLM       |         345       |   0.46  |    61.45     |\n| UDLM + NOS |         159       |   0.47  |    71.01     |\n| UDLM + CDD |         511       |   0.45  |     0.00     |\n\n\nNote how adding NOS to UDML (second row) actually increases the violations by ~10\\% with respect to its baseline while adding our constrained projection method (last row) reduces these violations to 0. \nHence, we hold that our comparison in Figure 4 effectively illustrates significant improvement over the state-of-the-art, illustrating for the first time such drastic constraint reductions in these challenging domains. \n\nWe appreciate the question and will make sure to explain these differences in an updated Related Work section.\n\n\n> **2. Theoretically, the paper is relatively weak. Moreover, while the proof of Theorem 4.1 seems relatively sound, I fail to follow a few parts which could, I believe, use a bit of clarification. Namely, \"$\\forall x, y$ in the neighbourhood of $\\textbf{C}$ \": what does this mean? which neighbourhood? (Maybe in “a” neighbourhood?) What is $\\beta$-prox regularity?**\n\nFirst, let us highlight that to the best of our knowledge, CDD provides the first framework for discrete sequence modeling which incorporates theoretical guarantees for *non-asymptotic feasibility*, while also providing a formulation which enables modeling of *arbitrary constraint sets*. \n\nAs specified in Theorem 4.1, we adopt the notion of $\\beta$-prox regularity as defined by [A] (Def. 13.27). This is a classical tool in convex optimization theory which implies that for each viable point and normal direction, small perturbations still project uniquely and smoothly back to $\\textbf{C}$. The \"neighborhood\" referenced is defined in this sense. It indicates the region in which the prox‑regularity inequalities hold. The fact that our framework, relying on a principled methodology, allows us to derive theoretical guarantees should be seen as a strengths in our view. \nWe appreciate your suggestion and will explicitly present this definitions in the final version of the paper.\n\n\n> **3. While the method works well, it requires a great deal of additional runtime (which, I understand, can be a cost that is absolutely fine to pay, in some contexts). Do you believe your method could be sped up in any simple way?**\n\nYes, there are ways to accelerate this method, although they lie outside the scope of our initial investigation. \nFirst, however, let us notice that, when compared to other controllable generation baselines, CDD provides the least additional overhead (see Table 4).\n\nOur analysis in Appendix D explores a few of the \"knobs\" that can be adjusted when controlling the tradeoff between quality and runtime. Most notably, by adjusting the projection frequency and the timestep at which projection steps begins, one can control sampling speed and quality. Our results in Table 3, Figure 8, and Figure 9 show that starting to projection at later steps, alongside less frequent projections, results in faster sampling times while still satisfying the desired constraints. \n\nFinally, as you mention, in high-assured context (e.g., scientific tasks) certificates of constraint satisfaction outweigh latency considerations. \nIndeed, providing outputs that violate critical constraints and physical principles make them unsuitable for production and testing, potentially slowing down, instead of accelerating, the AI-driven discovery pipeline. \n\n\n> **4. section 4 should be broken down into subsections**\n\nThank you for this suggestion. We agree and will update the final version. In particular, we will include subsections covering the following concepts:\n\n1. Projected Diffusion Sampling\n2. Differentiable Projection\n3. Augmented-Lagrangian Projection\n4. Theoretical justification\n\nThanks again!\n\n\n> **5. Have you tried methods such as ReinMax [C], that allow for differentiable discrete sampling instead of Gumbel softmax?**\n\nThis is an interesting suggestion, and we certainly will consider this as a direction for future work. However, a few concerns were uncovered by our early investigation during the rebuttal phase. \nFirst, ReinMax depends on multiple forward-backward passes which introduce further overhead; this will be *especially challenging for the high-dimensional problems* (e.g., we use a ~60K vocabulary). In fact [C] only tests on toy problems (with *independent 128 bernulli variables)*, thus there a significant concern as to the scaling of this approach. \nSecond, we suspect that ReinMax's reliance on Taylor approximations *may introduce bias which could impact the projection dynamics of CDD*. That said, we look forward to test it in our future work. \n\n\n> **6. Have you attempted your method in combination with other SOTA sampling methods, such as P2 [D]?**\n\nWe appreciate the suggestion, which may constitute an interesting follow-up study. For this paper, we have not provided such a comparison for a few primary reasons. First, our experimental analysis is designed to ablate the performance of *our proposed method*; to accurately assess the efficacy of projected discrete diffusion sampling processes, we validate this approach in isolation, rather than introducing variance through a composite approach. As **such variations of traditional sampling techniques are yet to be adopted as de facto sampling schemes**, it is most practical to assess our approach using the most common sampling processes.\n\nSecond, while CDD and P2 are not fundamentally incompatible, as [D] reorders the denoising trajectory while CDD enforces feasibility by projecting each intermediate distribution (orthogonal objectives), there are several practical limitations of P2 that make us hesitant to pursue this particular direction. One concern is that the additional overhead that is induced by P2 will compound with the inherent complexity introduced when certifying constraint satisfaction. Another challenge is that P2 may not generalize well to the domains that we explore in this paper, as the robustness of different planners has yet to be fully tested under domain shift. Hence, while we believe this certainly could be an interesting direction to explore, the work would likely fit the scope of an independent investigation.\n\n\n---\n\nThank you for your detailed review! We hope that our response addressed all of your questions. We are also happy to provide any other requested details. \n\n\n[A] Rockafellar, R. Tyrrell, and Roger JB Wets. Variational analysis. Berlin, Heidelberg: Springer Berlin Heidelberg, 1998.\n\n[B] Schiff, Yair, et al. \"Simple guidance mechanisms for discrete diffusion models.\" arXiv preprint arXiv:2412.10193 (2024).\n\n[C] Bridging Discrete and Backpropagation: Straight-Through and Beyond (2023). Liyuan Liu, Chengyu Dong, Xiaodong Liu, Bin Yu, Jianfeng Gao.\n\n[D] Path Planning for Masked Diffusion Model Sampling (2025). Fred Zhangzhi Peng, Zachary Bezemek, Sawan Patel, Jarrid Rector-Brooks, Sherwood Yao, Avishek Joey Bose, Alexander Tong, Pranam Chatterjee."}, {"review_id": "P6tNAlXUC3", "reviewer": "Reviewer_v7jP", "summary": "The paper introduces Constrained Discrete Diffusion, a framework that integrates discrete diffusion models with differentiable constraint optimization to enforce sequence-level constraints during generation. CDD leverages the parallel denoising process of diffusion models to impose constraints iteratively. The key innovation is a projection operator that minimizes KL divergence between the denoised distribution and a feasible set, ensuring constraint satisfaction while preserving sample quality. The method is evaluated on three tasks: toxicity-controlled text generation, property-constrained molecule design, and instruction-following text completion.", "questions": "- Since $\\mathbf{C}$ represents the constraint set and $\\mathbf{y}$ denotes the projected probability distributions in Eq.5, the meaning of $\\arg\\max(\\mathbf{y}) \\in \\mathbf{C}$ is quite confusing. What does it mean in the task of natural language toxicity mitigation?\n- Surrogate models are trained on clean data but applied to noisy intermediate samples during diffusion. How does this affect their reliability?\n- While Table 4 shows CDD’s runtime overhead, how does the frequency of projection steps impact sample quality?", "limitations": "yes", "rating": 3, "confidence": 2, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 2, "significance": 2, "originality": 2, "strengths_and_weaknesses": "### Strengths\n- The paper is technically sound, with rigorous theoretical grounding (e.g., convergence guarantees in Theorem 4.1) and experiments validating the method’s effectiveness. The ablation studies and runtime analysis further strengthen the empirical claims.  \n- The training-free nature of the approach is a practical advantage. CDD addresses a critical limitation of autoregressive models by enabling hard constraint satisfaction, which is valuable for safety-critical applications (e.g., toxicity mitigation) and scientific tasks (e.g., molecule design). \n- The integration of Lagrangian optimization with discrete diffusion is novel.\n\n### Weaknesses\n- Designing task-specific projection operators adds overhead, limiting plug-and-play usability. The paper could better discuss generalizability to unseen constraints. \n- Since some tasks require training a surrogate model, my concern is whether a model trained on noiseless data can accurately offer effective guidance when the input is incompletely denoised intermediates during the sampling process.\n- While the method is training-free, the projection steps introduce runtime overhead (Table 4). The trade-off between constraint adherence and speed could be analyzed further.", "was_revised": true, "final_justification": "The authors have provided a explanation of the projection formulation in Eq.5 and committed to improving its exposition in the revision. Despite clarifications, Section 4 as currently written is still opaque, and the key technical steps require more intuitive explanation to be accessible to a broader audience.\nThe evaluation remains somewhat narrow; the generalizability to substantially different constraints or settings is still mostly argued rather than demonstrated empirically.\nThe paper is technically sound and makes a novel contribution. However, the clarity and breadth of empirical evaluation limit its accessibility and impact in its current form.", "rebuttal": "We thank the reviewer for their comments, and, in particular, the **acknowledgement of the rigorous theoretical grounding** and **novelty of our work**. Below we provide our answers to their questions.\n\n> **1. Since $\\textbf{C}$ represents the constraint set and $\\textbf{y}$ denotes the projected probability distributions in Eq.5, the meaning of $ \\arg\\max(\\textbf{y}) \\in \\textbf{C}$ is quite confusing. What does it mean in the task of natural language toxicity mitigation?**\n\nIn Equation~(5), the constraint is placed not on the probability tensor itself but on the decoded sequence $\\textbf{y}^{\\star}=\\arg\\max\\bigl(\\textbf{y}\\bigr)$ where $\\textbf{y}\\in\\mathbb{R}^{L\\times |V|}$ is the projected probability distribution. \nAs greedy decoding picks the highest–probability token at each position, the condition $\\arg\\max(\\textbf{y})\\in\\textbf{C}$ means the decoded sequence must be feasible. Specifically for toxicity control $\\mathbf{C}=\\lbrace\\mathbf{y}\\in V^{L} : g(\\mathbf{y}^{\\ast})\\le \\tau \\rbrace,$ where $g(\\cdot)$ is a differentiable toxicity surrogate and $\\tau\\in[0,1]$ is the threshold. Therefore, in the task of natural language toxicity mitigation, $\\arg\\max(\\textbf{y})\\in\\textbf{C}$ is the set of sequences which are less toxic than $\\tau$ as score by the surrogate model. Since $\\arg\\max$ is non-differentiable, the projection optimizes an augmented–Lagrangian objective using a Gumbel Softmax relaxation $\\tilde{\\phi}(\\textbf{y})$ and penalizes violations of $g\\bigl(\\tilde{\\phi}(\\textbf{y})\\bigr)\\le \\tau$. \n*In the reported benchmarks, this procedure yielded $0\\%$ violations at the tested thresholds without retraining the base model!*\n\n\n> **2. Surrogate models are trained on clean data but applied to noisy intermediate samples during diffusion. How does this affect their reliability?**\n\nThis is an interesting question, which is closely connected to ongoing discourse within the context of classifier-based guidance methods [A-C]. Specifically, recent works exploring **\"training-free\"** guidance methods have analyzed how pretrained classifiers, trained exclusively on clean data, could be directly adopted for diffusion model guidance without explicit finetuning on noisy samples. The trade-off here is well established: employing pretrained models directly on noisy inputs significantly reduces implementation complexity, albeit at the cost of slightly reduced performance due to distribution shift. *Our adoption of surrogates trained exclusively on clean data can thus be understood within this well-established trade-off;* indeed, *we observed strong empirical results even without noisy-domain finetuning*. \n\nNext, it is important to clarify what \"reliability\" means in this context. We interpret this as the accuracy with which the surrogate models the constraint set. Let us stress that *the combinatorial set of feasible generations defined by our surrogate remains unchanged regardless of the input noise*. As the surrogate model defines a closed set of allowable generations, **the noise level of the measured sequences does not compromise the integrity of the surrogate's prediction of set membership**. At worst, the noisy data may lead to slightly less accurate gradients (as documented by training-free guidance literature), introducing slightly longer runtime for the convergence of the ALM projection. However, as we have theoretically shown (Theorem 4.1), CDD effectively converges towards the training data distribution while simultaneously converging to the constraint set.\n\n\n\n> **3. While Table 4 shows CDD’s runtime overhead, how does the frequency of projection steps impact sample quality?**\n\nThank you for bringing up this important point. **Indeed, we examine this in Appendix D, where we ablate the projection frequency over various frequencies $\\{1,5,10,20,50,100\\}$ and report the average perplexity and runtime in Figure 8.** We also include sensitivity studies for Augmented Lagrangian hyperparameters in Table 3 and for the projection start time in Figure 9. Notably, across all settings, constraints remain fully satisfied (0% violations), underscoring the robustness of our method. In practice this method comes with practical knobs for practitioners which allows users to control compute, speed, and generation quality while preserving feasibility.\n\n\n> **4. Designing task-specific projection operators adds overhead, limiting plug-and-play usability. The paper could better discuss generalizability to unseen constraints.**\n\nWe appreciate the reviewer highlighting this point. Indeed, this concern closely relates to the earlier discussion in Response (2) about training-free guidance. In that context, we noted that our approach explicitly avoids reliance on surrogate models pretrained on noisy diffusion outputs. Consequently, **training a surrogate model for arbitrary, unseen constraint sets is relatively straightforward**, requiring only standard supervised training procedures without specialized diffusion-domain fine-tuning. This is consistent with prior work on attribute-controlled diffusion using surrogate models where constraint-specific loss functions or guidance models are similarly required [D,E]. Thus, the method naturally generalizes to a wide variety of constraints with minimal overhead.\n\nFurthermore, we have also demonstrated that the approach generalizes to other representations of constraint (e.g., symbolic, black-box, neural surrogate), which are treated as **modular inputs to the optimization procedure**. For a given setting, it is *only necessary to devise a differentiable constraint function* -- which, again, can take many forms. Therefore, rather than requiring \"task-specific projection operators,\" our method only necessitates defining differentiable \"constraint violation functions.\" We emphasize that defining these constraint functions has a long tradition in optimization and should not be seen as a barrier to generalizability.\n\nWe would be glad to explicitly incorporate additional explanation into the paper, emphasizing the distinction between task-specific projection operators (which our method avoids) and differentiable constraint representations.\n\n\n---\n\nThank you for your detailed review! We hope that our response addressed all of your questions. We are also happy to provide any other requested details. \n\n\n\n[A] Sadat, Seyedmorteza, et al. \"No training, no problem: Rethinking classifier-free guidance for diffusion models.\" arXiv preprint arXiv:2407.02687 (2024).\n\n[B] Ye, Haotian, et al. \"Tfg: Unified training-free guidance for diffusion models.\" Advances in Neural Information Processing Systems 37 (2024): 22370-22417.\n\n[C] Shen, Yifei, et al. \"Understanding and improving training-free loss-based diffusion guidance.\" Advances in Neural Information Processing Systems 37 (2024): 108974-109002.\n\n[D] Schiff, Yair, et al. \"Simple guidance mechanisms for discrete diffusion models.\" arXiv preprint arXiv:2412.10193 (2024).\n\n[E] Gruver, Nate, et al. \"Protein design with guided discrete diffusion.\" Advances in neural information processing systems 36 (2023): 12489-12517."}, {"review_id": "lBLsE0w3hO", "reviewer": "Reviewer_kckY", "summary": "This paper propose a strategy for constraining the output of discrete diffusion models—at the sequence level—in a way that has otherwise been missing from traditional auto-regressive language models. It highlights how discrete diffusion models generates entire sequences-at-once, allowing for a greater level of controllability during this generative process. In practice, the proposed Constraint Discrete Diffusion (CDD) model introduces a constraint set C over the output. Rather than just applying a projection at the output, the paper shows how to sample from the projected probability distribution at every step of the diffusion procedure, selecting the $x_s$ within the feasible subdistribution. While the theory holds for convex sets C, in practice, the strategy for constraint application holds for complex non-linear constraints as well such as toxicity.  The theoretical algorithm based on Lagrange multipliers and increasing the strength of the penalty terms drives denoising to outputs that are close to the original denoised distribution but that also satisfy the given constraints. Experiments on toxicity, novelty and synthetic accessibility in molecules, and instruction all show significant improvements in constraint satisfaction in comparison to standard approaches for autoregressive models—though at some cost to generative perplexity.", "questions": "Questions:\n1) Does the number of steps used for diffusion decoding make a significant difference in the application of constraints? Do you expect this method to work with low NFE methods such as consistency-distilled discrete diffusion models?\n2) Could Constrained Discrete Diffusion be used to edit already completed generations (e.g. from the output of a AR model)?\n3) Could the be a larger discussion about “constraint start ablation” and associated runtimes in the main body of the paper. Greater signposting in Appendix D could be helpful. Related, it may be interesting to explore the extent to which late-starting of constraints could be applied and the minimum number of steps required to enforce constraints. This may heavily differ between MDLM and UDLM but would make for a different level of usability.\n\nNits:\nIncluding arrows for text showcasing which direction leads to an improvement in all plots (e.g. LLM-Judge Coherence in Figure 3) would help reader understanding.", "limitations": "Yes", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 4, "significance": 3, "originality": 3, "strengths_and_weaknesses": "Strengths:\n1) The paper is very well-written, highlighting how discrete diffusion methods open a new avenue for constrained generation and sampling.\n2) The application of constraints and use of projections that minimize the distance to the original denoising distribution is theoretically well-motivated. The proof and convergence of CDD for convex sets C motivates its usage and are also well-presented in the main body of the work.\n3) The experimental results are promising and well-discussed in the paper. The core experiments around nonlinear constraints on GPT-2-like language models showcase a variety of examples where constrained discrete diffusion appears an applicable solution to constrained generation.\n\nWeaknesses:\n1) The distinction between ULDM and MDLM should be discussed in greater detail, especially in the context the limitations of available and design of constraints. For example, my understanding is that the novelty and synthetic accessibility constraints applied to molecule generation in section 5.2 are only possible because the entire sequence is available at every step. This however differs from base model used for toxicity or instruction-following which utilize the masked diffusion framework. In these cases, it may be possible to enforce the constraints on partially available input (e.g. counting or lexical) but it is less clear to me how LLM-as-a-Judge or surrogate models can be used to evaluate partially decoded sequences. Please consider adding additional details and specifying why each base model was chosen in each case.\n2) As the paper explicitly requires the constraints to be defined and evaluated at runtime, a number of other baselines, such as standard decoding + rejection sampling for the constraint should be considered. This may further highlight the benefits of the constrained diffusion approach, as the number of samples required could lead to drastically longer runtimes for AR models or diffusion models without explicit sampling constraints.", "was_revised": true, "final_justification": "I stand by the original score and am supportive of the acceptance of this paper. The authors were able to provider greater detail to address a number of the potential concerns (e.g. compatibility with low NFE). The authors also provided greater clarity on the importance of using UDLM for the CDD framework in order to judge the complete generation and provide constraints. The addition of these details to the final paper will be of use to the reader.", "rebuttal": "We thank the reviewer for their insights, and in particular the **acknowledgement of the strong empirical results** and **well motivated theoretical support**. We provide our answers to their questions and comments.\n\n> **1. The distinction between ULDM and MDLM should be discussed in greater detail, especially in the context the limitations of available and design of constraints. [...]**\n\nThank you for the opportunity to clarify the use of UDLM [A] and MDLM [B] and their interactions with constraints. MDLM and UDLM share the same discrete-diffusion backbone, in which they corrupt a clean sample with a schedule and then iteratively denoise to learn the target distribution. However, they use different noise kernels; MDLM uses an absorbing $\\texttt{[MASK]}$ process, where once a token is unmasked it is not further updated, and UDLM uses uniform categorical noise in which any token may be revised at further states. We chose UDLM for the molecular experiments as empirically in [A] UDLM has been shown to perform better for small vocabularies, and MDLM has better performance for larger vocabularies, which covers natural language generation tasks. \n\nCrucially, *in both cases the sampler exposes a full $L \\times |V|$ probability tensor at every reverse step,* and therefore **CDD always operates on the whole sequence rather than a partial generations.** The reviewer's point that some constraints are enforceable on partial generations (e.g., counting or lexical constraints) is insightful, but in many application we need global consistency. This cannot be achieved with the level of control provided with current autoregressive architectures. This is highlighted well by our molecule generation experiments, where autoregressive models report the poorest performance in generating molecules which are both novel and valid. This occurs as the models often reach intermediate states where no valid and novel continuations remain. Consequently, they become \"stuck,\" and either reproduce known samples (violating the novelty constraint) or generate invalid structures (violating molecule validity).\n\nEven in Section 5.3, where it may be possible to enforce constraints on partial generations, we find that there are distinct benefits to imposing the constraints in a non-autoregressive paradigm, as evidenced by better PPL and LLM-as-a-Judge scores. Specifically, lexical constraints benefitted from non-autoregressive generation as tokens both preceding and following the constrained positions can be simultaneously adjusted, a flexibility unavailable to strictly autoregressive models.\n\nAs a final note, the LLM-as-a-Judge is evaluation-only on the **post-generation**. During sampling we use a differentiable surrogate models (or other differentiable constraint functions) to evaluate the *entire sequences*, not partial generations. After applying the Gumbel SoftMax, we then embed these distributions directly into autoregressive LLM-based surrogates (using the same tokenizer as the base model), creating a continuous, fully differentiable computational graph. In scenarios involving hard constraints, we leverage hand-coded rule-based constraint functions, enabling us to avoid relaxation and embedding, and directly evaluate the argmax-decoded sequences. More details on these implementations are provided in Appendix C.\n\nWe thank you for bringing up this point and will add a concise subsection clarifying these points and explicitly justify the base model choice per task.\n\n\n> **2. Does the number of steps used for diffusion decoding make a significant difference in the application of constraints? Do you expect this method to work with low NFE methods such as consistency-distilled discrete diffusion models?**\n\nWhile the number of denoising steps effects efficiency and sample quality, it does not prevent CDD from enforcing constraints. As the projection operates directly on token‑level probability outputs, **CDD is fully compatible with low‑NFE samplers**, including consistency‑distilled discrete diffusion models, without architectural changes. \n\nThe performance on such methods could be extrapolated from our analysis in Appendix D, where *we analyze the effects of reducing the number of projections* (by taking more diffusion steps between each projection). The only difference would be that low‑NFE samplers would take a single large step between projections, whereas in our analysis many small steps were taken between projections. We observed that performance only degraded slightly when a higher number of steps occurred between projections, and, based on this result, we believe that this suggestion could be a promising area to explore in future work as consistency-distilled discrete diffusion models become more readily available. Thank you for pointing it out!\n\n\n> **3. As the paper explicitly requires the constraints to be defined and evaluated at runtime, a number of other baselines, such as standard decoding + rejection sampling for the constraint should be considered. This may further highlight the benefits of the constrained diffusion approach, as the number of samples required could lead to drastically longer runtimes for AR models or diffusion models without explicit sampling constraints.**\n\nIndeed, **rejection sampling is implicitly included as one of our baselines**. In all experiments we report the percentage of samples which violate the constraint set. These samples can be treated as those which would have been 'rejected'. We'd be happy to highlight this point in the main text.\n\n\n> **4. Could Constrained Discrete Diffusion be used to edit already completed generations (e.g. from the output of a AR model)?**\n\nThis is an interesting suggestion and could be an intriguing application of CDD. In fact, our research team has already been exploring this idea for continuous diffusion models; in such settings, **we found that there are some significant benefits that can be realized**, which very likely extend to discrete settings as well. In short, CDD could be applied in this way by initializing the input sequence with an existing sequence. Deviation from the original sequence could be controlled by tuning the masking schedule (and how many diffusion steps to take). However, if the original output is quite far from the constraint set (e.g., imposing toxicity constraints on a very harsh sequence), this may result in a largely changed sequence. Thank you again for this suggestion! \n\n\n> **5. Could the be a larger discussion about “constraint start ablation” and associated runtimes in the main body of the paper. Greater signposting in Appendix D could be helpful. Related, it may be interesting to explore the extent to which late-starting of constraints could be applied and the minimum number of steps required to enforce constraints. This may heavily differ between MDLM and UDLM but would make for a different level of usability.**\n\nWe appreciate this suggestion. It adds to the clarity and we will implement these suggestions on the updated manuscript. To the latter point, note also that *the question of late-starting of constraints and the minimum number of steps required to enforce constraints is a result we have characterized theoretically* (Theorem 4.1). We are happy to pair this explanation with the empirical analysis conducted in Appendix D in the updated version of our paper. \n\n\n---\n\nWe thank you for your suggestion and are happy to include your suggestions in the final version and to engage further if there are any additional questions. Thank you!\n\n\n[A] Schiff, Yair, et al. \"Simple guidance mechanisms for discrete diffusion models.\" arXiv preprint arXiv:2412.10193 (2024).\n\n[B] Sahoo, Subham, et al. \"Simple and effective masked diffusion language models.\" Advances in Neural Information Processing Systems 37 (2024): 130136-130184."}, {"review_id": "9YKOZtpTpm", "reviewer": "Reviewer_3U4L", "summary": "The paper introduces a method for enforcing constraints during inference in discrete diffusion models. It builds on the framework of concrete score matching, used here as a discrete denoising strategy. The core idea is to incorporate a constraint set CC into the denoising process to guide generation. However, two main challenges arise: 1) The constraints can only be meaningfully evaluated on fully denoised instances, 2)The constraint set C is intractable; one can only evaluate whether a candidate $x \\in C$.\n\nTo address these issues, the authors propose projecting the intermediate noisy instance to the fullyb denoised distribution and  relaxing the constraints into an optimization objective. This is implemented using an augmented Lagrangian projection, which allows for approximate enforcement of constraints during inference.\n\nEmpirical results across two domains, language modeling and molecular generation, demonstrate the effectiveness of the proposed approach in improving constraints enforcement.", "questions": "## Suggestions for Improvement\n\nI think the following suggestions would greatly contribute to improve the paper: \n- Include a concise but self-contained explanation of concrete score matching or, at minimum, provide intuition and references.\n- Discuss the choice and role of the noise distribution $\\nu$ used in training and inference.\n- Reorganize the structure so that preliminary material does not dominate sections meant for methodological exposition.\n- If relevant, discuss the relation of the method to RL-based constraint enforcement approaches, and provide comparative context.\n- Justify the use of concrete score matching over $x_0$-prediction in terms of both modeling power and practical advantages.\n\n## Question:\nWhy not use a more common $x_0$-prediction-based method?", "limitations": "The proposed method includes an optimization step at each denoising step, which suggests a potentially significant computational overhead. This limitation is not discussed in the paper. A thorough discussion, ideally accompanied by empirical evaluation, of the method’s computational cost would greatly improve the assessment of its practical applicability and scalability.", "rating": 4, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 1, "clarity": 1, "significance": 2, "originality": 2, "strengths_and_weaknesses": "## Strengths\n\n- The use of an augmented Lagrangian formulation to enforce constraints during discrete diffusion is an interesting and potentially impactful idea.\n- The method is accompanied by a theoretical justification, which lends formal support to the approach, although, as discussed below, its assumption are difficult to verify.\n\n## Weaknesses\n\n### Lack of Clarity\nSeveral important aspects of the paper remain unclear due to missing definitions, unspecified choices, or inconsistencies across sections. Below are representative examples of clarity issues:\n\nUndefined terms: Equation (5) appears central to understanding the proposed method. However, several critical terms in the equation such as $x'$, $y$, and $t(l)$ are not defined.\n  \nExternal dependencies without context:\n- The paper relies on concrete score matching as the core denoising framework, but it is not explicitly described and justified. In contrast, the diffusion-based method using $x_0$-prediction is explicitly explained.\n- The $\\beta$-prox-regularity assumption in Theorem 4.1 is used without definition or intuition, only a reference. Readers unfamiliar with this property are left without the tools to evaluate its implications.\n\nUnspecified experimental choices: The noise distribution $\\nu$ used in experiments is never mentioned. How the choice of noise affect the model's behavior (and which noise choice are even possible within the method is not discussed). \n  \nStructural inconsistencies: The first three paragraphs of Section 4 continue to introduce background material rather than presenting core contributions. This disrupts the logical flow of the paper and may confuse readers expecting new material at that stage.\n\n### 2. Missing Discussion of Connections to RL\n\nThe proposed method, after constraint relaxation, resembles a reinforcement learning (RL) framework where the augmented Lagrangian term serves as a reward signal. If this interpretation is correct, it raises the following concerns:\n- The paper does not position the work in the context of related RL-based constraint enforcement methods.\n- There is no comparative discussion or evaluation against RL baselines in either the related work section or experiments.\n\nGiven this potential overlap, the absence of any mention of RL frameworks appears to be a missed opportunity for clarity and positioning.\n\n### 3. Unjustified Methodological Choices\n\n- It remains unclear why concrete score matching was chosen as the modeling framework. Since the method requires sampling from $x_0$, it is reasonable to ask: *Why not use a more common $x_0$-prediction-based method*?\n\n\n### 4. Evaluation Concerns\n\n- It is surprising that the proposed method is not applied to maximize validity, a common metric in molecular generation tasks. This raises concerns that the method may not be effective for enforcing structural validity. At least, the authors should discuss this point.", "was_revised": true, "final_justification": "hTe authors have addressed most of my concerns during the discussion. They have committed to substantial revisions in the updated version of the paper. My score reflects the fact  these forthcoming changes cannot be evaluated.", "rebuttal": "Thank you for the comments. We respond to your questions below and welcome further discussion.\n\n> **1. Undefined terms: Equation (5) appears central to understanding the proposed method. However, several critical terms in the equation such as $\\mathbf{x}'$, $\\textbf{y}$, and $t(\\ell)$ are not defined.**\n\nThis is something that might have been overlooked. All the symbols are defined in the paper, e.g., $x_{t(\\ell)}'$ is defined in Equation (3), and $\\mathbf{y}$ is defined in line 177, it's the minimizer variable in the $\\arg\\min$ (the projected sequence). \n\n\n> **2. The paper relies on concrete score matching as the core denoising framework, but it is not explicitly described and justified. In contrast, the diffusion-based method using $\\mathbf{x_0}$ prediction is explicitly explained. Why not use a more common $\\mathbf{x_0}$-prediction-based method?**\n\nPlease notice that we describe and justify the use of score matching in the first paragraph of Section 4. \n\nTo elaborate further, projected diffusion sampling processes have recently emerged for constrained generation within continuous domains. These approaches have adopted score-based Langevin samplers due to the theoretical perspective that is enabled by this sampling approach. Our work extends this to discrete domains, offering both SOTA empirical results *and* novel strong theoretical guarantees. *Concrete score matching, in particular, enables presenting the theoretical results in a clear way*.\n\nHowever, we'd like to stress that **$\\mathbf{x_0}$ predictive models implicitly capture concrete score matching!** We'd encourage the reviewer to check Appendix C of [D], where the connection between MDLM (the model we employ) and concrete score matching is explicitly drawn. \n\nAlso note that **our experimental validation adopts $\\mathbf{x_0}$-prediction-based generation**. CDD is parameterization-agnostic, and the projection step only requires the per-step categorical token distributions, which are available under both $\\mathbf{x_0}$-prediction and Concrete Score Matching parameterizations. MDLM uses $\\mathbf{x_0}$-prediction on masked positions while previously unmasked positions remain fixed, resulting in the distributions that CDD projects onto with a KL-based augmented-Lagrangian optimization.\n\n\n> **3. The $\\beta$ -prox-regularity assumption in Theorem 4.1 is used without definition or intuition, only a reference. Readers unfamiliar with this property are left without the tools to evaluate its implications.**\n\nThe definition of $\\beta$-prox regularity is from [C] (Def. 13.27) as specified already in the statement of Theorem 4.1. This is a common notion in convex optimization theory, but we will be happy to add additional details in the final version of the paper. \nIn short, this condition is a relaxation of typical convexity assumptions; it implies that for each viable point and normal direction, small perturbations still project uniquely and smoothly back to $\\mathbf{C}$. This is used instead of a convexity assumption, as it **allows us to broaden the applicability of the theory** to constraint sets that are not strictly convex.\n\n\n> **4. Unspecified experimental choices: The noise distribution $\\nu$ used in experiments is never mentioned. How the choice of noise affect the model's behavior (and which noise choice are even possible within the method is not discussed)**\n\nThis might have been overlooked by the reviewer. Please note that the reference distribution $\\nu$ is the fixed categorical corruption used in the forward process as discussed in lines~115--121. As noted we discuss two standard choices: \n(i) mask corruption, where $\\nu$ is a one-hot on [MASK] as done in MDLM [A] (better for larger vocabularies such as natural language); and \n(ii) uniform corruption, where $\\nu$ is uniform over the vocabulary as in UDLM [B] (better for smaller vocabularies such as SMILES). \n\nIn our experiments, natural-language tasks use the corruption choice introduced in MDLM, in which $\\nu$ is the one-hot [MASK], while molecule generation uses the corruption introduced in UDLM where $\\nu$ is uniform. CDD’s augmented-Lagrangian projection operates on the token-probability vectors returned by the reverse sampler after each denoising step and is therefore compatible with any fixed $\\nu$ the base diffusion model is trained with.  \n\n\n> **5. Missing Discussion of Connections to RL. The paper does not position the work in the context of related RL-based constraint enforcement methods. There is no comparative discussion or evaluation against RL baselines in either the related work section or experiments.**\n\n\nRL-methods differ fundamentally from our approach in both goal and methodology:\n\n1. Our method enforces hard, per-sample constraints at inference time in discrete diffusion, without requiring retraining. In contrast, RL methods operate during training and optimize expected reward across samples and do not offer per-sample control at test time.\n\n2. Our approach projects each diffusion step back onto the feasible set, providing theoretical guarantees and ensuring zero constraint violations in our experiments. RL-based methods rely on policy optimization and do not provide such guarantees during sampling.\n  \nCDD intervenes in the sampling process, and **the augmented Lagrangian method enforces constraints by projecting the sample onto the constraint set**, rather than implicitly through reward maximization.\nRecall also that CDD achieves zero violations in our experiments without retraining. \n\n*Because of these fundamental mechanisms and objective mismatch, RL-based approaches are deemed outside the scope of this work.* \nWe will be happy to add a discussion. \n\n\n> **6. The proposed method is not applied to maximize validity [...] this raises concerns that the method may not be effective for enforcing structural validity. At least, the authors should discuss this point.**\n\nOur framework can handle arbitrary constraints, so we see this as an exciting opportunity. However, this paper did not focus solely on synthetic chemistry experiments, but prioritized a breadth of applications, as pointed out also positively by other reviewers. \n\nPlease notice **our evaluation indeed included validity** and shows that our method **provides state-of-the-art results for generating valid and novel molecules** even if validity is not enforced as a constraint. \nIn our evaluation, we outperform the prior SOTA dramatically, reporting a 48% increase in valid **and** novel generations. This increase is even more substantial when conditioning on drug-likeliness, **producing more than three times valid and novel samples as compared baselines**. \n\nTo show how CCD could handle additional constraints we ran additional experiments during rebuttal in which we extended the molecule generation setting to handle an instability related constraint. Instability undermines potency and developability. The structural properties of 'three‑membered heterocycles' has been shown to exacerbate instability and reactivity [E]. For this application, we use the RDKit library [F] (the same library we use to check for chemical correctness) to flag molecules violating this structural property and implement a projection to ensure that generated molecules do not contain this structure. The projection operator consists of multiple structural editing stems. First, it expands the ring by inserting an atom so it becomes a 4- or 5-membered ring; if that isn’t possible, it then opens the ring by breaking one bond so the fragment is linear. If still flagged, it then removes the entire three-membered ring and directly reconnects the substituents.\n\nEmpirically we report $0\\%$ violation rate in the molecules generated with the CDD method while all the baselines report large violations.  \n\n| **Model** | **Three-membered heterocycles (Viol \\%)** |\n|-----------|------------------------------------------|\n| AR | $9.3 \\pm 7.6$ |\n| MDLM | $22.2 \\pm 2.1$ |\n| UDLM | $16.9 \\pm 2.1$ |\n| CDD | $\\mathbf{0.0 \\pm 0.0}$ |\n\nThese results show how important this technique can become for applications such as synthetic chemistry and beyond. \n\n\n> **7. The proposed method includes an optimization step at each denoising step, which suggests a potentially significant computational overhead. This limitation is not discussed in the paper.**\n\nThis limitation is acknowledged and discussed in detail in the paper (limitation section, deferred to Appendix A). We also encourage the reviewer to check Appendix E, where we analyze and report the runtime. Here, we find that **CDD is orders of magnitude faster than other controllable generation methods**. \n\nFurthermore, analysis in Appendix D explores several hyperparameters that can be adjusted to control the tradeoff between quality and runtime as seen in  **Table 3**, **Figure 8**, and **Figure 9**. Also, we would like to highlight **Table 4** where we compare the overhead with the baselines and observe that CDD provides the least additional overhead as compared to other controllable generation baselines. \n\nFinally, in many settings, such as scientific tasks, generating feasible and physically plausible material largely outweigh latency considerations, given that physically unreliable content might not be even synthesizable. \n\n---\n\nThank you for your feedback. We hope our response addressed all your concerns; We also provided new results and noted missed items. Given your comments that these would strengthen the work, we hope that you could re-evaluate it, in light of our rebuttal.\n\n\n[A] Simple and effective masked diffusion language models\n\n[B] Simple guidance mechanisms for discrete diffusion models\n\n[C] Variational analysis\n\n[D] Constrained synthesis with projected diffusion models\n\n[E] Flavin-enabled reductive and oxidative epoxide ring opening reactions\n\n[F] G. Landrum et al. RDKit 2024.09.5 (Q3 2024) release. Zenodo, 2025\n\n[G] Grammars and reinforcement learning for molecule optimization"}, {"review_id": "LtpXDQcpI4", "reviewer": "Reviewer_c5DD", "summary": "This work presents an inference time algorithm for controlled generation with discrete diffusion models to produce samples that satisfy user-specified constraints. Importantly, the proposed constraint discrete diffusion (CDD) algorithm can be applied on top of pre-trained models without requiring fine-tuning or re-training of the underlying denoising model.", "questions": "1. For the counting constraint task, having access to the ground truth correct count response seems to render the results here less interpretable. Could the authors clarify why this is not label leakage for this task?", "limitations": "The increased computational complexity at inference time is described in Section E.", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 4, "originality": 4, "strengths_and_weaknesses": "### **Strengths**\n\nThe proposed method is a novel adaptation of a comparable method for continuous signal diffusion models from Christopher et al [1]. The ability to layer this CDD algorithm on top of pre-trained models without the need to perform additional training renders the approach especially appealing in my opinion and aligns with recent emphasis in our field on leveraging test time compute / inference scaling.\n\nThe experimental section is robust and the results are convincing. The details provided in the appendix are extensive and indicative of the reproducibility of this method.\n\n### **Weaknesses**\n\n1. The notation used in Sections 3 and 4 was confusing in my opinion. Specifically, in Section 3 the boldface variables, e.g., $\\mathbf{x}\\_s, \\mathbf{x}\\_t$ represent one-hot variables. However, if my understanding is correct then in Section 4, these variables, e.g., $\\mathbf{x}\\_{t(\\ell)}, \\mathbf{x}\\_s, \\mathbf{y}$, seem to represent vectors in the interior of the simplex, i.e. not one-hot vectors. \n2. It would be important to add entropy to tables in Figure 3 and Table 1 to ensure the generative perplexity value is not being “gamed”, an issue several works have noted with this metric, e.g., Zheng et al [2].\n3. Along those lines, the drop in quality (as measured by PPL) in the table in Figure 3 between MDLM and CDD is quite stark.\n4. In Appendix A, the authors note that there are no open-source large scale discrete diffusion models, however there have been several released recently, specifically Llada [3] and Dream [4] which are both 7-8B parameter models.\n\n\n### **Other / More Minor Comments & Suggestions**\n\n1. I found the intro to be quite heavily focused on the molecule generation application of this method, but the experimental results clearly indicate that this is a more widely applicable algorithm. \n2. On Line 152, the citation format for “Xu et al” seems to be inconsistent with the “[xx]” used throughout the rest of the manuscript. (Same issue on line 843)\n3. Line 297 is missing the word “Appendix” before “Appendix C”.\n4. There is a typo on line 335, “scientifi tasks” should be “scientific tasks”.\n\n---\n\n[1] Christopher, Jacob K., Stephen Baek, and Nando Fioretto. \"Constrained synthesis with projected diffusion models.\" Advances in Neural Information Processing Systems 37 (2024): 89307-89333.\n\n[2] Zheng, Kaiwen, et al. \"Masked diffusion models are secretly time-agnostic masked models and exploit inaccurate categorical sampling.\" arXiv preprint arXiv:2409.02908 (2024).\n\n[3] Nie, Shen, et al. \"Large language diffusion models.\" arXiv preprint arXiv:2502.09992 (2025).\n\n[4] Jiacheng, Ye et al. “Dream 7B”", "was_revised": true, "final_justification": "This is solid work that would be of interest to the community. During the rebuttal, the authors addressed my concerns.", "rebuttal": "We thank the reviewer for their insights, particularly their acknowledgment of our robust experimental results as well as the timeliness of our work. Below, we provide our answers to their questions and comments.\n\n> **1. The notation used in Sections 3 and 4 was confusing in my opinion.**\n\nWe are happy to clarify. The variables represent vectors in the interior of the simplex at higher noise levels. As $t \\rightarrow 0$, these vectors transition to one-hots. For instance, when MDLM unmasks a token, it transitions to a one-hot; the masking probability decreases with $t$, so the probability of a given position being a one hot changes as dictated by the masking schedule. \n\nWe can expand further on the notation in the final version of the paper and we are certainly also receptive to the reviewer's suggestions they may provide during rebuttal.\n\n\n> **2. It would be important to add entropy to tables in Figure 3 and Table 1 to ensure the generative perplexity value is not being “gamed”, an issue several works have noted with this metric, e.g., Zheng et al [2].**\n\nExcellent point. To check whether the true generative perplexity may be \"gamed\" we have ran some additional experiments during rebuttal and include an LLM-as-a-Judge as an evaluation metrics. _Interestingly, it shows no degradation in generation quality_. \n\n| **Setting**   | **Avg Entropy** | **95% CI** |\n|---------------|------------------|------------|\n| MDLM       | 5.577            | 0.017823   |\n| $\\text{CDD}_{\\tau=0.75}$ | 5.544            | 0.070966   |\n|$\\text{CDD}_{\\tau=0.50}$ | 5.519            | 0.085119   |\n| $\\text{CDD}_{\\tau=0.25}$ | 5.521            | 0.085564   |\n|$\\text{GPT2}_\\text{PPLM}$  | 2.978            | 0.166751   |\n\nIn the table above, we have show results for further experimentation with the entropy-based evaluation as described in [A] and report that CDD preserves predictive entropy relative to its base diffusion model (MDLM in this case) with at most a ∼ 1% decrease in average entropy. This demonstrates that CDD preserves diversity even while enforcing toxicity constraints. The last row of the table reports yet another model we ran during rebuttal, the baseline of PPLM for Autoregressive models, which sees a much larger decrease in token diversity! \n\nWe are happy to include and extend these results in the final version of the paper. \n\n\n> **3. In Appendix A, the authors note that there are no open-source large scale discrete diffusion models, however there have been several released recently, specifically Llada [3] and Dream [4] which are both 7-8B parameter models**\n\nWe are quite excited to see the significant progress that researchers have recently made in the development of discrete diffusion for language generation! Indeed, we will modify this statement to indicate that **no open-source large scale discrete diffusion models were available at the time of development**. In fact, Dream [A] was released in April, and Llada [B] appeared in late February, with the code being released several weeks later. \n\nWe are excited to extend CDD to these larger architectures in our future work, and we are currently actively working on it. \n\n\n> **3. Along those lines, the drop in quality (as measured by PPL) in the table in Figure 3 between MDLM and CDD is quite stark.**\n\nWhile we acknowledge that CDD does incur a perplexity decrease relative to the base MDLM, there are many scenarios where this as an acceptable trade-off for strict constraint satisfaction, especially in safety-critical settings where any violation is unacceptable. Furthermore, controllable generation baselines like PPLM and FUDGE demonstrate an even more substantial perplexity degradation while still resulting in constraint violations. \n\nAs shown in Response (2), while other controllable generation methods may be \"gaming\" the perplexity metric, CDD certainly is not. *Thus, (and as you also acknowledged) the perplexity metric is not a perfect gauge of the model's true performance*. As result we further use LLM-as-a-Judge as a quality metric in which CDD actually benefits with a minimal improvement, while PPLM and FUDGE report large degradation. Additionally, when measuring entropy, another important quality metric, we report negligible decrease in token diversity. \n\n\n\n> **4. On Line 152, the citation format for “Xu et al” seems to be inconsistent with the “[xx]” used throughout the rest of the manuscript. (Same issue on line 843) | Line 297 is missing the word “Appendix” before “Appendix C”. | There is a typo on line 335, “scientifi tasks” should be “scientific tasks”.**\n\nThank you very much! We have updated our paper with these fixes.\n\n\n\n---\n\nWe hope the clarifications above resolve the remaining questions about our contributions, and we are happy to elaborate further as needed. Thank you!\n\n\n[A] Jiacheng, Ye et al. “Dream 7B”\n\n[B] Nie, Shen, et al. \"Large language diffusion models.\" arXiv preprint arXiv:2502.09992 (2025).\n\n[C] Sahoo, Subham, et al. \"Simple and effective masked diffusion language models.\" Advances in Neural Information Processing Systems 37 (2024): 130136-130184.\n\n[D] Lou, Aaron, Chenlin Meng, and Stefano Ermon. \"Discrete diffusion modeling by estimating the ratios of the data distribution.\" arXiv preprint arXiv:2310.16834 (2023)."}]

Author rebuttal:

Meta-review: This paper introduces a novel way to enforce constraints in discrete diffusion models using an augmented Lagrangian method. While the exact methodology is not technically novel, and it is questionable to what sequence lengths and vocabulary sizes it can be used for because of the Gumbel-softmax operation, the current results are compelling. Getting 100% constraint satisfaction while maintaining diversity is a good benchmark and should be applauded. The reviewers had several concerns regarding the clarity of presentation in sections 3-4 and some Appendix items that I encourage the authors to incorporate further. Furthermore, I encourage the authors to incorporate the feedback on related work and positioning of this paper, especially with respect to the growing body of work on finetuning discrete diffusion models. Having said that, I still think this is an interesting contribution that should be presented at NeurIPS.
Decision: Accept (poster)