Unlocking Guidance for Discrete State-Space Diffusion and Flow Models
Authors: Hunter Nisonoff
Junhao Xiong
Stephan Allenspach
Jennifer Listgarten
Venue: ICLR 2025 Poster (2025)
Keywords: discrete state-space generative models
diffusion
flow-matching
flow models
guidance
protein design
Primary area: applications to physical sciences (physics, chemistry, biology, etc.)

Abstract: Generative models on discrete state-spaces have a wide range of potential applications, particularly in the domain of natural sciences. In continuous state-spaces, controllable and flexible generation of samples with desired properties has been realized using guidance on diffusion and flow models. However, these guidance approaches are not readily amenable to discrete state-space models. Consequently, we introduce a general and principled method for applying guidance on such models. Our method depends on leveraging continuous-time Markov processes on discrete state-spaces, which unlocks computational tractability for sampling from a desired guided distribution. We demonstrate the utility of our approach, Discrete Guidance, on a range of applications including guided generation of small-molecules, DNA sequences and protein sequences.

Published as a conference paper at ICLR 2025
UNLOCKING GUIDANCE FOR DISCRETE STATE-SPACE DIFFUSION AND FLOW MODELS
Hunter Nisonoff, Junhao Xiong, Stephan Allenspach, Jennifer Listgarten
University of California, Berkeley (hunter ni nonofff, junhao xi ong, stephall 1, jenn Jeberkeeeyeeeei
ABSTRACT
Generative models on discrete state-spaces have a wide range of potential applica- tions, particularly in the domain of natural sciences. In continuous state-spaces, controllable and flexible generation of samples with desired properties has been realized using guidance on diffusion and flow models. However, these guidance ap- proaches are not readily amenable to discrete state-space models. Consequently, we introduce general and principled method for applying guidance on such models. Our method depends on leveraging continuous-time Markov processes on discrete state-spaces, which unlocks computational tractability for sampling from desired guided distribution. We demonstrate the utility of our approach, Discrete Guidance, range of applications including guided generation of small-molecules, DNA sequences and protein sequences.
DIFFUSION AND FLOW-BASED GENERATIVE MODELS FOR SCIENCE
Generative models based on diffusion (Sohl-Dickstein et al., 2015; Song et al., 2021; Ho et al., 2020). and more recently on flow matching (Liu et al., 2023; Lipman et al., 2023; Albergo & Vanden- Eijnden, 2023), have unlocked great potential not only in image applications (Rombach et al., 2022; Ma et al., 2024), but also increasingly in the sciences. For example, these models have been suggested for generating molecular conformations (Corso et al., 2023; Xu et al., 2022: Hoogeboom et al., 2022), protein backbone coordinates (Ingraham et al., 2023; Watson al., 2023), and all-atom coordinates of small molecule- molecule-protein complexes (Krishna et al., 2024; Abramson et al., 2024; Qiao et al., 2024; Lu et al., 2024). In these scientific examples, the models are operating in real-valued state-spaces of 3D coordinates. However, in many scientific applications, not to mention natural language processing, the objects of interest lie in discrete state-spaces. In the sciences, discrete state-spaces emerge from biological sequences (DNA/RNA/prooein) and molecular graphs (Wang al., 2023), for example. Discrete state-spaces pose unique challenges for developing diffusion and flow- models, which have been focused predominantly on real-valued spaces. In particular, continuous sate-space diffusion processes rely at their core on gradients of probability densities with respect to variables in real-valued state spaces-the score function; consequently, when the state-space discrete, one easily runs into problems. Flow matching, on the other hand, is typically implemented with a linear interpolation between a noise and target distribution, which has been shown to behave pathologically for discrete state-spaces, stimulating alternative approaches, such as one which operates on the continuous state-space of the probabilistic simplex (Stärk et al., 2024).
number of discrete time, discrete state-space diffusion approaches have been proposed (Austin et al., 2021; Hoogeboom et al., 2021a; Vignac al., 2023). On the other hand, Campbell and colleagues have developed frameworks of continuous time diffusion and flow matching on discrete state-spaces by leveraging continuous-time Markov chains (CTMCs) (Campbell et al., 2022; 2024). In such formulations, one effectively learns a denoising neural network that approximates the instantancous probability of transitioning between states-that is, a rate matrix-instedd of a score or flow-generating vector field. However, one major ingredient missing from these approaches that operate on discrete state-spaces is the ability construct conditional generative models by way of guidance in principled way (Dhariwal & Nichol, 2021; Sohl- bick-iikstten et al., 2015; Ho & Salimans, 2021; Song et al., 2021). Indeed, arguably the most important ingredient enabling useful application
"Contributed equally: Author order is randomized and can be adjusted as needed for individual purposes.

---

Published as a conference paper at ICLR 2025
a Unconditional Generation
b
Predictor
Guided Generation
p(X))
p(x)
p(t)
p
p(yx)))
p(lx)
p(xply)
p(xly)
p(ally)
Discrete-state states
Discrete-states
Discrete-stalee
Time
Time
Time
Figure 1: Illustration of guidance for continuous-time discrete state-space models. Color denotes the time-dependent density in each panel. with brighter as higher probability. a, A CTMC evolves samples (indicated by white lines) from an initial noise distribution, p(zo), through time, generate samples from a desired target distribution, p(z1). by alternating between holding a state in time (horizontal lines), and jumping new states (vertical lines). b, A predictor model trained to predict on time-dependent noisy samples of x. c, Discrete Guidance guides the unconditional model with the predictor to sample from p(ri)) ly).
of diffusion and flow models is that of conditioning the generative process on desired criteria. For example, in protein engineering, may want to condition sequence generation a backbone structure, binding affinity, or enzymatic activity (Hsu et al., 2024; Dauparas et al., 2022; Hsu et al., 2022; Li et al., 2023; Vanella al., 2022). Conditioning of diffusion models is typically achieved by way of introducing guidance, either in classifier-fie free way (Ho & Salimans, 2021), or by using classifier (Dhariwal & Nichol, 2021). Classifier guidance, in particular, provides the key ability to leverage an already-trained unconditional model without re-training it, to generate conditional samples simply by modulating its generative process with guidance from a classifier (Du et al., 2023). Such strategy is particularly important in the sciences where one frequently has orders of magnitude more unlabelled data than labeled data; one can therefore invest considerably in one unconditional model and then repurpose it for many different tasks (Ingraham et al., 2023).
Herein, for the first time, we introduce a principled approach, Discrete Guidance, to perform guidance for diffusion and flow models discrete state-spaces (Figure 1). Discrete Guidance applies not only diffusion and flow models on discrete state-spaces, but also, in principle, to the broad class of generative models on discrete state-spaces realized through CTMCs. Our key insight that, in continuous time, only a single dimension of the discrete state-space Markov chain can change any point in time, making guidance exact and tractable. We empirically demonstrate the effectiveness of Discrete Guidance by applying it to a broad set of discrete state-space conditional generation tasks, including mole-llle,, DNA sequences, and protein sequences. Because in the sciences, conditioning is often on real-valued properties rather than on satisfying a particular class, we refer to guidance more generally as predictor guidance and predictor-free guidance.
to continuous-
In summary, our contributions are:
1. We introduce an exact, theoretically rigorous, general framework, Discrete Guidance (DG), for applying both predictor guidance (PG) and predictor-free guidance (PFG) to generative models discrete state-spaces based on CTMCs, such diffusion and flow matching.
2. We develop approximation to our guidance framework that leads to more efficient sampling while maintaining sample quality.
3. We empirically explore and demonstrate the potential utility of our guidance framework across a wide range problem domains, using either diffusion or flow models.
CHALLENGES OF GUIDANCE IN DISCRETE STATE-SPACES
We first consider diffusion models. Roughly speaking, the generation of states, (e.g., protein sequences), can be guided towards a desired property, y (e.g., binding affinity to a target), through application of Bayes' theorem so to obtain the desired conditional. That is, the conceptual strategy is to take an unconditional density, p(x). and a classifier- or regression- p) to obtain p(rly) p(v)s))(w)//p(() However, because diffusion models continuous
likelihood.
2

---

Published as a conference paper at ICLR 2025
state-spaces learn the score, Va (ogp(())) ly, the normalizing constant, p(y), conveniently drops out as it does not depend on z. More specifically, in continuous state-space models, sampling x ~ p(zzl) can be achieved by sampling from the reverse process at time t with a conditional score function, (rall), obtained by combining the unconditional score function, vz, log (x(ee). and the score function of predictor, Vz, log pe (y)(z)) as follows, Va, log pe (3:e (y)
Va, log
pe log
x log pa(e)) v., log Poggeeyyee ()) "Sohl-Dickstein et al., 2015; Song et al., 2021; Dhariwal & Nichol, 2021). However, for discrete state-space models, these score functions are not defined, and such an approach cannot be readily adopted. While generalizations of the score function to discrete state saaeesspacss have been proposed (Sun et al., 2023b; Meng et al., 2022; Lou al., 2023), these developments do not address guidance. We sidestep the need for score function by instead returning to Bayes' theorem, which, in the context of diffusion on discrete state-spaces, dictates that we must effectively compute
plylare- at, Te
p(ec+ar( 3)
Σ plyl=' Fe )p(())(((( (1(( (2re'
where dt and xy are separated by infinitesimal time step di, and y is the desired property we wish to condition on. In a D-dimensional discrete state-space where each dimension has cardinality S, there are SD terms in the normalizing constant of Equation I, rendering it generally intractable. Each term arises from the fact that, without constraints, any state can be reached from any other state. Intuitively, tractability can only be achieved if the number of terms not exponential, thereby implying some constraints on the allowed state transitions. Later, we shall see how the continuous time formulation of discrete state-space diffusion models enables us to tractably compute the normalizing constant by imposing such constraints without losing any model expressibility. As it turns out, the same underlying computations will also unlock flow-based guidance for us. To date, there has been limited work on incorporating guidance into flow models, even in continuous sate-spaces (Dao et al., 2023; Zheng et al., 2023); although Stärk et al. (2024) perform flow matching on the probabilistic simplex to generate discrete samples, and explore guidance in the continuous state-space of the simplex.
BACKGROUND ON DISCRETE DIFFUSION AND FLOW MODELS
Continuous-time Markov Chains (CTMCs) are class of continuous-time stochastic processes on discrete spaces (Norris, 1998). They have been used to build continuous time discrete diffusion (CTDD) (Campbell et al., 2022), and discrete flow models (DFM) (Campbell et al., 2024). Intuitively, a CTMC can be described as a generative process wherein a state remains unchanged over some amount of holding time, which is exponentially distributed. Once the holding time is over, then the state must change (jump) to new state, according to what is sometimes called the jump probability (Figure la). In practice, these two processes of holding, and jumping, are all jointly encoded in a (time- dependent) rate matrix, Re, which describes the time derivative of the probability of transitioning from any state to any other state time f. Consequently, the entries of this rate matrix are the key objects that determine both the frequencies and the destinations of the jumps. These rates, Rd (z. .). are related to the probability of an instantaneous transition occurring at time from a state x to a state T at time + dl through p( = a.; = = ō_.ā + Re( T dl. Transitions that change the state (xr A 7 so that ___0 = 0) have positive rates (i.e., 0 S RG (x., 8) for x o 2), while transitions from states to themselves (x= i so that 6z,2 1) have negative rates (i.e., (x, S 0).
Given these rates Re (z. .) at every time point t, in addition to an initial distribution p(z+=o), the generative process is fully defined and can be concretely used to simulate the corresponding CTMC through time, for example, by straightforward Euler integration (Campbell et al., 2024), but also with more sophisticated methods (Appendix B). Both the diffusion and flowe models discrete state-spaces mentioned above (CTDD and DFM) are generative models on discrete state-spaces that leverage CTMCs to define their generative processes.' 1 Both can be thought of at training time, progressively adding noise to the original data distribution (e.g., by accumulating masked states), and then learning a denoising model to reverse that CTMC. Similarly to continuous state-space diffusion, the learned denoising model, pd (I1 (zt), is trained to predict the initial (noise-free) data I2 from noisy data Ft, where the specific loss function to do so depends on whether the model is diffusion- or flow-based. However, for discrete state-spaces the corresponding denoising model induces learned
'oor all models, we follow the convention of flow-hased models, where f = 1 is the target (training) distribution, and 0 the noise distribution.
3

---

Published as a conference paper at ICLR 2025
rate matrix (Appendix B), which can be used to generate samples. To do so, one starts with a sample from the known and toasy-pe- from noise distribution, then moves toward the desired target distribution by integrating over time with the time-dependent rate matrices. Similarly, for conditional generation of x given a desired property y, one can in principle leverage conditional rate matrices (2r, Fly)dt dt if one had access to these conditional rate matrices. One strategy to obtain these matrices would be to extract the conditional rates Re (2, Fly) directly from learned conditional denoising model p" (x) (Tee)) (e.g., using either CTDD (Campbell et al., 2022) or DFM (Campbell et al., 2024)). Such direct approaches to conditional modeling in diffusion models have typically been shown be outperformed by guidance- based approaches (Dhariwal & Nichol, 2021; Ho & Salimans, 2021). Consequently, in the next section, we introduce Discrete Guidance to unlock guidance for these kinds of models.
p( = 22, = 2; y) = 6z.z
4 UNLOCKIGG GUIDANCE IN DISCRETE STATE-SPACES
Both CTDD (Campbell et al., 2022) and DFM (Campbell et al., 2024) assume that the noising processes in each dimension are independent of one another (but not necessarily identical). Even in those models, without any attempt at guidance, this assumption has an important consequence: when the continuous time noising process in each dimension is independent of the others, the probability that two or more dimensions of the current state jump (transition) exactly the same time is zero (Campbell et al., 2022). Consequently, at any given time I, only D x (S - 1) + 1 entries, (z, ). in the rate matrix² are non-zero, making such models tractable. This assumption does not constrain model expressivity, because in any finite time interval, there is a non-zero probability to transition from one state to any other state.
It turns out that the same assumption which makes unguided CTDD and DFM tractable, also unlocks tractable guidance of these same models. Specifically, using the same reasoning, follows that the sum in the denominator of Equation is only over D x (S - 1)+ 1 terms instead of S". This occurs because we need only consider terms p( = x' x = computed from non-zero rates Re Re x').
Here, we briefly present our main results and refer to Appendix C for their detailed derivation and to Appendix D for their minimal implementation in PyTorch. As both CTDD and DFM are formulated in terms of rates that are linked to the transition probabilities, we present our results in terms of rates. Consequently, we obtain Discrete Guidance by reformulating Bayes' theorem in Equation 1 in terms of rates. In doing so, find, in analogy to predictor guidance in continuous state-space Dicks-Dickttein et al., 2015; Song et al., 2021; Dhariwal & Nichol, 2021), an expression for the conditional rates, (x, Bly), in terms of the unconditional rates, (x, F), and a (guiding) predictive distribution, p(y) xr 1), as
plylā, 1) p(ylzr)) t) R,(x,
RA Gly)
for any state ā * x. When v= x. owing to conservation of probability flow for any rate matrix, we have (,, = - Er R2(2, Note that for CTMCs defined by discrete state-space diffuusion and flow models, tractability of the sum in the denominator of Bayes' theorem in Equation I is tantamount tractability of the sum in (I, xly),, which is analogous to the normalizing constant of a probability distribution. The tractability arises because only D x (S - 1) + of the rates are non-zero (Campbell et al., 2022; 2024). As for the intuition behind Equation 2, we see that the conditional rates can be obtained by modulating the unconditional rates with a likelihood ratio describing how much the guidance signal increases (or decreases) in an infinitesimal time step.
As in guidance in continuous state-space (Song et al., 2021; Dhariwal & Nichol, 2021), one can tune the impact of guidance by raising the likelihood ratio term in Equation 2 by the guidance strength, E IR+, to obtain the predictor- guided (PG) rates R2(2) (x. Fly) [p(sla.01 R, R, .) for x + 5.
In analogy to predictor-free guidance in continuous state-spaces (Ho & Salimans, 2021), we too can derive predictor free guidance, wherein one seeks to blend an unconditional model with a conditional model of x given y. In analogy to predictor-free guidance in continuous state-spaces (Ho & Salimans, 2021), we find (Appendix C) that the wredictorggiides rates can alternatively obtained in terms of
2(S 1) transitions in each of the D dimensions and a single identity transition.
4

---

Published as a conference paper at ICLR 2025
conditional, Re(2, Bly), and unconditional, R2, B), rates for o E in the form
R (x, - (1, Rr (x, ")²-"
The rates in Equation 3 do not depend on any predictive distribution and we therefore call them predictor-free griree (PFG) rates. In practice, ceedictor-fre-guidaae
achieved by learning both a conditional, RV (z, Ely), and unconditional, R. (zx, ă), rate matrix and combining them as described in Equation Note that the guided rates, 12!7) (ar, Kly), are a generalization of both the conditional
[u( (z, k Re (Ir, T [)] and unconditional (i.e., fully unguided) [z]]=00 (zz, .By) = Re =)]
rates. Prior work found that y > often produces higher-quality samples that satisfy the desired conditioning criterion (Dhariwal & Nichol, 2021).
Finally, we note that the rate adjustments just presented apply not only to continuous- diffusion and flow models discrete state-spaces but also, in principle, to broad class of generative models on discrete state-spaces realized through CTMCs (Appendix C.9).
4.1 EFFICIENT APPROXIMATIONS FOR PREDICTOR GUIDANCE
Although we just saw how overeome the combinatorial complexity of computing the normalizing constant in Bayes' theorem for guidance in discrete state-spaces, computing the adjusted rates in Equations may still be practically onerous in some cases. In particular, to generate a sample requires D (S - 1) + function calls of the predictor model, p(y (z. f), for each step in the reverse sampling process. This is tractable for moderately-sized D and S, but may be prohibitively expensive applications. To enable more efficient sampling for such cases, we draw insights from Grathwohl et al. (2021), where it was noted that even when trained on discrete x, a neural network model, p (y) (z, t). is continuous function guidance log-likelln leeelkllihodd ratio required in Equation can be approximated as
some
IR Dxx' enabling first-order Taylor series approximation. Thus the
log (gy t) log p (y Tr t) - log pd (y) xr 1) (a - x)" Va logp (1)
(4)
requiring only one forward and one backward pass of the predictor model with the input v, instead of D x 1)+ forward passes; this makes estimation of the guide-adjusted rates O(1) rather than O(D x S). We refer to this Taylor-appro approxiapre guidance (TAG). Note that Equation 4 is only ever evaluated at discrete values of ē and x. Although it is not obvious that such gradient-based approximation can provide accurate estimate of the true likelihood ratio, this idea builds large set of literature demonstrating empirical success in applying Taylor series approximations to neural networks on discrete data (Zhang et al., 2022: Kirjner al., 2023; Sun et al., 2022: 2023a). Additionally, our own results substantiate these findings further-we we systematically compared TAG to exact guidance in all our empirical investigations. finding that in most cases, TAG matches the sample quality of exact guidance (Section 6). Finally, note that although TAG bears superficial resemblance to DiGress (Vignac et al., 2023), the methods are quite distinct (Section 5), with correspondingly large difference in empirical results, generally showing TAG to be superior (Section 6).
5 RELATED WORK
Discrete Guidance builds on both the discrete flow model (DFM) (Campbell et al., 2024) and the continuous-time discrete diffusion model (CTDD) (Campbell et al., 2022), both of which operate on discrete spaces with continuous time. Those works extend prior work on diffusion in discrete spaces with discrete time (Hoogeboom et al., 2021b; Austin et al., 2021). Other approaches for continuous- time diffusion on discrete spaces also build on a CTMC formulation but employ alternative objectives to the BLBO (Sun et al., 2023b; Lou al., 2023). More recent work generalizes the flow-matching framework in Campbell et al. (2024) to more general family of probability paths (Gat et al., 2024). None of the aforementioned work propose a method to perform guidance; however, as each method defines the sampling process through CTMC, each can be used naturally with Discrete Guidance.
In continuous state-spaces: Sohl-Dickstein et al. (2015) illustrate how an unconditional discrete-ting time diffusion model can be modified for conditioning. Song et al. (2021) and Dhariwal & Nichol (2021) further build on this result for controllable generation in a score- score-based continuous continuous-time, continuous state-space framework by using classifier, while Ho & Salimans (2021) shows how similar result
5

---

Published as a conference paper at ICLR 2025
can be achieved without the need for classifier; instead, they blend score estimates of conditional diffusion model with a jointly trained unconditional diffusion model.
Several methods sidestep the issue of performing guidance in discrete space by instead performing it on a learned, continuous embedding of the discrete state-space, thereby leveraging standard guidance for real-valued spaces (Gruver et al., 2024; Li et al., 2022). Such approaches require additional training and hyperparameter selection to obtain the required embedding. In contrast, Discrete Guidance enables easier re-purposing of already well-developed predictor models that work on the native, discrete input space (e.g., see Section 6.3).
Stärk al. (2024) introduce Dirichlet FM, enabling generation of samples in discrete spaces by flow matching on the continuous state-space of the probability simplex; they can perform both In contrast, our approach directly operates on the native discrete state-space. Empirically, we find our wredictor-guidnne approach to yield better results than Dirichlet FM on the same task presented by Stärk et al. (2024) (Section 6.2).
predictor-free guidance and predictor-guidance
The DiGress method of Vignac et al. (2023) performs approximate guidance in a discrete- -ime, discrete state-space diffusion framework. To do so, similarly to (yet distinctive of) our TAG approach, they use Taylor series approximation of the predictor model operating on the discrete state-space. Although our TAG approximation bears resemblance to DiGress, DiGress is fundamentally anchored in discrete-time, which has been shown to be limiting in theory and in practice (Campbell et al., 2022; 2024; Lou et al., 2023; Gat et al., 2024), and further substantiated in our experimental results. In particular, because DiGress is based on discrete-time formulation, the normalizing constant required for conditioning (Equation 1) is intractable, therefore requiring additional approximations beyond our TAG approximation (Appendix E). Moreover, with Discrete Guidance, we can perform tractable exact guidance, which at times provides benefit over TAG, whereas DiGress can only perform approximate guidance. Finally, DiGress specific to diffusion and not readily generalizable to flow matching. Further discussion of related work can be found in Appendix E.
6 EMPIRICAL INVESTIGATIONS
We deployed Discrete Guidance on three conditional generation tasks spanning problems on small molecules, DNA sequences and protein sequences. On the whole, we found unconditional flow matching training to be more stable than unconditional diffusion, so we trained our own unconditional fow-matching models to be used with guidance in all three experiments, following the training procedure in Campbell et al. (2024). To demonstrate that Discrete Guidance also readily applies to continuous-time discrete diffusion models, we also guided a pre-trained discrete diffusion model to produce class-conditional images (Appendix F.1). When preditoo-ggidant predictor must be trained separately (Appendix C.5). The task-specific training procedures for these models are detailed in Appendix F.2-F4. Note that in our flow matching experiments we used stochasticity hy typrparrmetter at sampling time, which Campbell et al. (2024) showed could improve sample quality.
is used, time-dependent
Our goals were to investigate if Discrete Guidance worked as expected and to investigate potential benefits offered by our approach. For each task, we compared to the discrete- time, discrete diffusion guidance approach DiGress (Vignac et al., 2023) to illustrate the empirical advantage of Discrete Guidance. In all experiments, DiGress used the same architecture and hyperparameters as Discrete Guidance for both the unconditional and predictor models. For the DNA and protein tasks, compared to additional task-specific baselines that could yield additional insights into the utility of approach. Our intent in this section is not to claim optimal sample generation on any particular problem, rather, to demonstrate that Discrete Guidance can be successfully applied to multiple domains. Further details of all experiments can be found in Appendix F.1-F.4.
6.1 SMALL-MOLECULES GENERATION
First, we used Discrete Guidance with unconditional generative model of small molecules for each of two properties: the number of rings (N,) and the lipophilicity (LogP). The values of both chemical properties were obtained using RDKit (Landrum, 2010), where LogP is approximated using the Wildman- Crippen approach (Wildman & Crippen, 1999). Our dataset, consisting of 610,575 unique molecules with weight below 750 Da, up to 7 number of rings, and lipophilicity in [-3,

---

Published as a conference paper at ICLR 2025
N==1
5
LogP*=-2
LogP*=10
p p(()
b
p(()
d
p M
p(xxlLogg*))
2
5
6
7
0
2
4
5
6
7
-4
8
12
-
8
12
N.
N,
LogP
LogP
g
(N,=1)
(N:55)
[LogP 3.04)
(LagP-9.22)
(V.11)
(5.
Lopp P.66777
LogP=10400
J
0.5
MAB
0.5
0.2
1.0
0,0
0.0
0.0
DiGreas
DG-TAG DG-Exact
DiGress
DG-TAG DG-Exact
DiGress
DG-TAG
DG-Exact
DiGress
DG-TAG
DG-Exact
Figure 2: Predictor guidance for small molecule generation conditioned number of rings (N or lipophilicity (LogP). a-d, Property-histogrann histograms of 1,000 generated valid SMILES strings (i.e., molecules) sampled from the unconditional model, pd (1r), and by Discrete Guidance with predictor- guidance, p (xly") ), where y" = N or LogP". Guidance strength was = and stochasticity was 1 30. e-h, First two molecules sampled from the predictor-guidee model indicated above (in a-d), i-1, Mean absolute eтror (MAE) between specified target properties indicated respectively in panels a- and those of the 1,000 generated valid SMILES strings by each of three methods: DiGress (Vignac et al., 2023), Discrete Guidance with both exact IDG-Exact) and maylor-approximated guidance (DG-TAG). Error bars correspond to standard errors. asterisk (*) denotes statistical significance difference in MAE between the two models under the start and end point of the lines below it (two-sided Mann- Mann-Whitney test, p 0.05), while n.s. denotes lack statistical significance.
10], is based on QMugs (Isert et al., 2021) and has been constructed as described in Appendix F.2.1. Using simplified molecular-ing input line-entry system (SMILES) (Weininger, 1988) strings a discrete state-space representation of the molecules, we trained an unconditional masking flow model for discrete state spaces (Camphell et al., 2024), then guided it either with number-of-rinee model, lipophilicity model. Model architectures and training procedures are detailed in Appendix F.2.2.
We generated SMILES strings from both the unconditional model, pzx), and also from the condi- tional model, pd (x' obtained by guiding the unconditional model with a predictor model to the target property value y* (Figure 2a-d). As generated SMILES strings are not guaranteed to be valid (i.e., corresponding to molecules), we sampled until 1,000 valid SMILES strings were generated, using these molecules be assessed. We the stochasticity hyperparameter of the unconditional model to 7/ = 30, as this value maximized the validity of SMILES strings generation. Increasing the guidance strength, 7, led to a decrease SMILES string validity and we selected 7 = 2 for our experiments as the largest y resulting in reasonable validity. Further details concerning generation, SMILES string validity, and choice of stochasticity can be found in Appendix F.2.3 and F.2.4.
As expected, Discrete Guidance shifted the histograms of sampled molecule property values compared to the unguided model, for conditioning on each of number of rings (N; 1, Figure 2a,b), and specified target lipophilicity (LogP* 2, 10, Figure 2c.d). Inspecting the first two molecules generated with Discrete Guidance, we find molecules with N, matching the specified value N (Figure 2e,f) and molecules with LogP close the specified LogP* (Figure 2g.h). Further results
7

---

Published as a conference paper at ICLR 2025
Class ceas-Coniittaall FBD
Class
Class-Conditions FBD
Class 2
Class-Conditiona FBD
Class
Cleas Cleas-Condd Conditional FBD
Class
Method
400
400
100
DG-TAG
100
DiGress
200
50
DVFM-CC
50
200
0.0
0.7
0.4
0.6
0.0
0.7
0.4
0.6
0.00
0.25
0.50
0:75
0.0
0.2
0.4
0.6
Probabllity
Class Probability
Class Probability
Class Probability
Cless
Class-Condttional FSD
Cless 6
Class-Con Cost-Caditional FBD
Cless 7
Claps Cas--Cndiiinn Conditional FBD
Class
400
Clacs Canditiial
600
400
200
100
200
200
0.50
0.6
0.2 Class Probability
Class Probability
Class Probability
Class Probability
Figure 3: Cell type-conditioned DNA enhancer sequence generation for eight cell type classes. The FBD, and the higher the average sample Class
better the model. the lower the Probability. Thus, roughly speaking. better conditional generative models will appear in the lower, right-hand portion of each panel. Each point in each panel arises from 1,000 sampled sequences for one guidance strength. Mean and standard deviation of both metrics were estimated over five bootstrap replicates (the standard deviations are small and are not readily discernible). For each method, guidance strengths increase from the left to the right in each panel.
wider range of target property values, discussion of chemical bonds and their relation to lipophilicity, and an assessment of diversity can be found in Appendix F.2.5.
Finally, we compared Discrete Guidance using both exact and the shylo--approoimmted guidance (TAG)- to DiGress, an approach for guided diffusion (Vignac et al., 2023). To compare methods, we used the mean absolute error (MAE) the properties of molecules generated with both methods with the same guidance strength, 7, to each of specified property values (shown for y = 2 in Figure 2i-1 and for additional N₁, LogP*, and y in Appendix F.2.6). Discrete Guidance was statistically significantly better able to generate molecules with properties closer to their specified values than was DiGress. Exact guidance with Discrete Guidance led to comparable or better results than using TAG.
6.2 ENHANCER DNA DESIGN
Following the experimental setup of Stärk et (2024), we next instantiated Discrete Guidance on a class-conditional DNA sequence generation task centered enhancers. Enhancers are non-coding DNA sequences that regulate gene expression, often cell-specific manner. We used the same enhancer sequence dataset Stärk et al. (2024), comprising 104k DNA sequences of length 500, each with one of 81 possible cell type class labels (Janssens et al., 2022; Taskiran et al., 2024). We compared
method to the Dirichlet FM (DirFM) conditional models of Stärk et al. (2024), namely both the classifier-free (DirFM-CFG) and classifier-guidee (DirFM-CG) models, which use flow-matching in the (continuous) space of the probability simplex. For Discrete Guidance, we trained an unconditional flow-mate wow-matching model, then used predictor guidance with either exact (DG-Exact) or faylor-approximated guidance (DG-TAG). We also trained conditional flow-mathhing model to be used with predictor-free guidance (DG-PFG). As predictor-free guidance for DirFM-CFG and DG-PFG behaved comparably (Appendix F.3.5), we focused here on predictor guidance. addition, we compared to DiGress (Vignac et al., 2023). Further details are in Appendix F.3.2.
We used the same two evaluation metries as Stärk et al. (2024), which depend on an oracle classifier model that gives the probability of each cell type class given sequence; it was trained on only un-noised data. One evaluation metric was the Fréchet Biological Distance (FBD), used to compare generated samples to the training data, for each specified 2024). The other metric was the probability of the desired target class under this same oracle classifier model higher probability is better. We note that the FBD is heuristic metric for measuring the distributional similarity between the generated samples and the training data, and that the target class probability is the metric which better reflects the effectiveness of guidance.
FBD is better (Stärk et al.,
We evaluated the methods on total of eight different cell type classes, including the three cell type classes chosen for evaluation in Stärk al. (2024). These cell type classes were randomly
8

---

Published as a conference paper at ICLR 2025
chosen among the classes where the oracle classifier had relatively good performance (Appendix F.3.4). We computed both metrics from 1,000 generated sequences conditioned on each of the eight target classes. For both DG-Exact and DG-TAG, sampling stochasticity, 7) was set to 0 as this led to the best unconditional FBD. For each method, we varied the guidance strengths of each model to trace out how the two metrics changed (Figure 3). Originally, for DirFM-CC we used the same guidance strengths E {1. 3. 6, 10, 20} reported by Stärk et al. (2024). For Discrete Guidance and DiGress, we used similar guidance strengths ? {1, 2. 5, 10, 20). However, we noticed that with the original guidance strengths, DirFM-CG was unable to match the performance of other methods, and so expanded the range of guidance strengths for DirFM-CG, which in some cases improved its results. Details of the sampling procedure can be found in Appendix F.3.3.
Across all cell type classes, DG-Fxact, DG-TAG and DiGress perform comparably, while DirFM-CG performed more poorly by comparison (Figure 3). We hypothesize that DirFM-CG may suffer from the need to project the classifier score function onto the tangent plane of the simplex to perform guidance within the simplex. Additional results can be found in Appendix F.3.4.
6.3 GUIDING INVERSE- FOLDDIG MODELS FOR STABILITY
Inverse- models are conditional generative models of protein sequence, conditioned on protein backbone structure. That is, one provides a structure as input, and can then sample different protein sequences that are likely to fold into that structure. These models play a key role in machine learning-driven protein engineering (Dauparas et al., 2022; Hsu et al., 2022; Sumida et al., 2024); consequently, any improvements we can make to them would be broadly valuable to the protein engineering community. Full experimental details are in Appendix F.4, with an overview here.
Herein, explore whether guiding such conditional generative models with a protein stability predictive model might prove useful. In particular, our goal is to generate protein sequences that are just as likely to fold into the correct structure improved predicted stability. To provide predictor guidance for Discrete Guidance, we trained a Sobblity--redicting regression model from large dataset of protein folding stability measurements on mini-proteins (Tsuboyama et al., 2023). Stability is reported in real-valued units of AAG, which reflects the difference in stability from the wild-type sequence. Herein, we define a stable protein as one that is at least as stable as the wild-type (i.e., AAG 2 0), although one might consider using other thresholds. Altogether then, we start with a standard (not cuabilit--oodittioned inverse folding model, p(x c). where x corresponds to protein sequence and e is the structure condition. Then we apply Discrete Guidance to obtain the stability-conditions
standard inverse folding model, while having
model, p(x c, AAG > 0). Concretely, we first trained a flow-matching inverse folding model using data in Dauparas et al. (2022), which we refer as a Flow-Matching Inverse Folding (FMIF) model. We also trained a regression model, p(AAG) x, c). to use for guidance-thir this model showed good generalization on a holdout set (Appendix F.4).
We applied this set-up on eight randomly chosen proteins from the dataset provided by Tsuboyama et al. (2023). Here we show the summary of the results for all eight proteins, while detailed results for each individual protein can be found in Appendix F.4.6. We compared FMIF to both exact (FMIF-DGGFFxact) and Taylor-aprroximart DiGress. We also included as a haseline, ProteinMPNN (Dauparas et al., 2022), a very widely-used approach for inverse folding, which does not explicitly model stability (Sumida et al., 2024). A stochasticity level, 7,, of was used for sampling with the flow-atchhnn models. For ProteinMPNN and FMIF we sampled from the models with arrucure-conditioned temperature values 1.0 and 0.01. When guidance was applied, we evaluated with guidance strengths E {1, 10, 100} and used a crudttre-conditioond temperature value of 0.1, as we observed that this temperature had much better RMSD values for the non-guided models (i..., ProteinMPNN and FMIF) than a temperature of 1.0.
(FMIF-DGG-TAG) predictor guidance,
well to
For each of the methods we sampled 100 sequences. The success criterion had two components: (1) the generated sequences should fold into the desired structure, c, and (2) the generated sequences should be at least as stable as the wild-type sequence, AAG > O. To evaluate how well a generated sequence folds onto desired structure, we used AlphaFold 2 (Jumper et al., 2021) to predict the structure of the sequence and compare the RMSD of the predicted structure to the desired structure c. Following previous evaluation criteria for inverse folding models, consider sequence to achieve the desired fold if the RMSD is less than or equal to 2A (Campbell et al., 2024). To evaluate the folding stability of our sequences, we use our AAG regression model.

---

Published as a conference paper at ICLR 2025
ProteinMPNN
FMIF
DiGress
80
FMIF-DG-TAG
FMIF-DG-Exact
Success (%)
60
20
0
5KPH 1FOM
6M3N
106X
2JT1
2J
6ACV
2K5N
Figure 4: Stability-guided inverse-folding for eight randomly chosen proteins. Five generative models (in legend) were assessed by the success rate of their 100 generated samples, where success was defined as sequences that had correct predicted structure (RMSD < 2Å), and were stable (AAG' 2 0). For non-guide non-guided models (ProteinMPNN and FMIF) success was defined over the maximum of the three structure structure-conditoon conditioned temperature values, while for the guided methods (all others) success was defined over the maximum of the three guidance strength values. Top-performing methods are indicated by plus sign (+), which denotes that each such model lacks a statistically significant difference from the one method with highest success rate (one-sided t-test, p < 0.05).
We observed that across all methods, FMIF-DG-Exact and FMIF-DG-TAG consistently had the highest success rates (Figure 4), with FMIF-DG-Exact outperforming or matching all other methods on seven out of eight proteins. There was protein, 6ACV, for which FMIF-DG-TAG actually performed better than FMIF-DG-ExacE We hypothesize that this is a result of the time-dependant predictor model used in guidance being miscalibrated with respect to the original oracle predictor. In such instances, exact guidance may actually result in worse sample quality compared to approximate methods since the guidance can be led astray by the miscalibrated predictor. Interestingly among the two non non-guided models, FMIF consistently matched or outperformed ProteinMPPNN, suggesting possible benefits to using matchhin models for inverse folding over order-agnostic autoregressive models. Altogether, these results suggest that sability-guided inverse folding with Discrete Guidance a promising direction for updating protein generative models with experimental stability data.
DISCUSSION
We introduced and empirically explored a principled and general approach to perform guidance on discrete state-spaces. Our approach, Discrete Guidance, is applicable to a broad class of generative models on discrete state-spaces realized through CTMCs, including continuous-time diffusion and flow models. We evaluated our approach empirically by applying it to guided conditional generation tasks in multiple domains, including small moleellols,,sss, DNA sequences and protein sequences.
While our work demonstrated the effectiveness of Discrete Guidance in variety of applications, also leaves some avenues for further investigations and improvements. Although we have shown that approxiape guidance works well empirically, it lacks the theoretical guarantees offered by exact guidance, and further investigation into the potential trade-off between efficiency and accuracy would be of interest to the community. Also, guidance requires training predictors noised samples, and it is unclear what training strategies would lead to the most effective guided generation (Klarner al., 2024). Finally, it would also be interesting and potentially fruitful to explore Discrete Guidance for controllable text generation of language models.
Our work illustrates that guided conditional generation in discrete state-spaces has the potential be leveraged across the natural sciences. We expect that future work will more fully realize the potential of guided generation in these and other domains.
10

---

Published as a conference paper at ICLR 2025
ETHICS STATEMENT
Our work focuses on improving conditional generative modeling. There are many potential positive impacts of this work. Conditional generative modeling is increasingly being used in drug discovery and protein engineering creating positive impacts for human health. However, there is also risk that such models could be used for malicious purposes like bioweapons. They also can amplify biases present in the training data that can lead to unfair treatment of certain groups.
REPRODUCIBILITY STATEMENT
We have included detailed derivations of the results presented in Appendix C. Appendix D provides minimal PyTorch implementations Discrete Guidance and source code available at https//ggttub.coo//niinooff///// guidance. Detailed descriptions of each of the experiments included Appendix
ACKNOWLEDGEMENTS
We thank Jiang, J. Bowden, M. Giammar, K. Atz, and H. Stärk for helpful discussions. This work was funded in part by DTRA under award HDTRA 1036045 and supported by the Office of Naval Research (ONR) under grant N00014-23-1-2587 Additional support was provided by the U.S. Department of Energy, Office of Science, Office of Biological and Environmental Re- search, Lawrence Livermore National Laboratory BioSecure SFA within the Secure Biosystems Design program (SCW1710). S. A. was supported by the Swiss National Science Foundation (grant no. P500PT_214430)
REFERENCES
Josh Abramson, Jonas Adler, Jack Dunger, Richard Evans, Tim Green, Alexander Pritzel, Olaf Ronneberger. Lindsay Willmore, Andrew Ballard, Joshua Bambrick, et al. Accurate structure prediction of biomolccular interactions with AlphaFold Nature, pp. 1-3, 2024. URL https: // //www. nature....... www.:naatrru..eeeeeeeo www.tuee..o/aartiiieieeceooooeee wwt.o//aticlles.ooooooooooo 0
Ackley, David H. and Hinton, Geoffrey E. and Sejnowski, Terrence J. A Learning Algorithm for Boltz- mann Machines. Cognitive Science, 9:14 1985. URL https: http://wwwww.eee...cc www.ncedireee..............eeeie
com/sciencee pccclnnce/arttcll/a///pppppppppp
Michael S. Albergo and Eric Vanden-Eijnden. Building Normalizing Flows with Stochastic In-
terpolants. In International Conference on Learning Representations, 2023. URL https:
//openrevies ew net teee/forrue wttf://ddddm17meamaaaa
David F Anderson. A modified next reaction method for simulating chemical systems with time dependent propensities and delays. The Journal of chemical physics, 127 (21), 2007. URL https: ptttps://pubss http://usssa.pp.ppp......p. 349528/A (tf522///-mdifiied midifiied- next method rexereattittoooi
reaction
for--foo--uiiss simulating.
Jacob Austin, Daniel Johnson, Jonathan Ho, Daniel Tarlow, and Rianne Van Den Berg. Struc- tured Denoising Diffusion Models in Discrete State-Spaces. Advances in Neural Information Processing Systems, 34:17981-17993, 2021. URL https: http://ppppevvveeeeeee net forum? id-h7-XixPCAL.
Pavel Avdeyev, Chenlai Shi, Yuhao Tan, Kseniia Dudnyk. and Jian Zhou. Dirichlet Diffusson Score Model for Biological Sequence Generation. International Conference on Machine Learning, pp. 1276-1301, 2023. URL avdeyev23a.c pdf.
mlr. ppr.sppessa... v202 avdeyev23a. 3a/
Andrew Campbell, Joe Benton, Valentin De Bortoli, Thomas Rainforth, George Deligiannidis, and Amaud Doucet. A Continuous Time Framework for Discrete Denoising Models. Advances in Neural Information Processing Systems, 35:28266 222299 2022. URL https: battps://ppeneeeeee /perrevie.. net forum? 1
11

---

Published as a conference paper at ICLR 2025
Andrew Campbell, Jason Yim, Regina Barzilay, Tom Rainforth, and Tommi S. Jaakkola. Generative Flows on Discrete State-Spaces: Enabling Multimodal Flows with Applications to Protein Co- Design. In International Conference Machine Learning, 2024. URL:ttpps///peeeevveer net / forum? i d= dd=kgwsbwBBR.
Ting Chen, Ruixiang Zhang, and Geoffrey Hinton. Analog Bits: Generating Discrete Data using Dif- fusion Models with Self-Conditioning. In International Conference on Learning Representations, 2023. URL https: : / wwwppppwwwwwweeeeee.pee 3t JR9OxFw.
d-- 3it
Shriram Chennakesavalu, Frank Hu, Sebastian Ibarraran, and Grant M Rotskoff. Energy rank alignment: Using preference optimization search chemical space at scale. arXiv preprint 1rXiv:2405.12961 2024. URL https: aaaii.iiiiv..... org/ abs/ 2405. 12961.1.11
Hyungjin Chung, Jeongsol Kim, Michael T Mccann, Mare L Klasky, and Jong Chul Ye. Diffusion posterior sampling for general noisy inverse problems. In International Conference on Learning Representations, 2023. URL https: // arxiv wwtpw/v........e....... abs wwtpaabsss.2 14687.
Gabriele Corso, Hannes Stärk, Bowen Jing. Regina Barzilay, and Tommi S. Jaakkola. DiffDock: Diffusion Steps, Twists, and Turns for Molecular Docking. In International Conference on Learning Representations, 2023. URL https: /tttps://openceee http:///ppeeeeeeeeeeeeeeeeeeeeee wwt.nooummdddieeeee..... B_BBbB..
Quan Dao, Hao Phung, Binh Nguyen, and Anh Tran. Flow Matching in Latent Space. arXiv:2307.08698, 2023, URL https: /arxivv.// org/
ptggabs/////aaoo.aet.gggg.eaaep/ abs/ 2307. 08698.
Sumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung, Eric Frank, Piero Molino, Jason Yosinski, and Rosanne Liu. Plug and Play Language Models: Simple Approach to Controlled Text Generation. In International Conference on Learning Representations, 2020. URL https: //openreviews www.neee net/ forum 2 dd=H1 edEyBKDS.
Justas Dauparas, Ivan Anishchenko, Nathaniel Bennett, Hua Bai, Robert Ragotte, Lukas F Milles, Basile IM Wicky, Alexis Courbet, Rob de Haas, Neville Bethel, al. Robust deep learning- based protein sequence design using ProteinMPNN. Science, 378(6615):49-55 2022. URL
https: www. scw.scieeeee org doi/ /00.011111111 112./116/////// wtt///cceenceee add2187.
Prafulla Dhariwal and Alexander Nichol. Diffusion Models Beat GANs on Image Synthesis, Advances in Neural Information Processing Systems, 34:8780-8794, 2021. URL http:::ttt//teeeeeeeeee net/ / Eorum? n Pererddd-Ann AWWCCaaa...
Sander Dieleman, Laurent Sartran, Arman Roshannai, Nikolay Savinov, Yaroslav Ganin, Pierre H Richemond, Arnaud Doucet, Robin Strudel, Chris Dyer, Conor Durkan, et al. Continuous diffu- sion for categorical data, vrXiv:2211.15008 2022. URL 15089.
http///axvvvcco///// www.v.org/bbss 22211
Yilun Du, Conor Durkan, Robin Strudel, Joshua B Tenenbaum, Sander Dieleman, Rob Fergus, Jascha Sohl-Dickstein, Arnaud Doucet, and Will Sussman Grathwohl. Reduce, Reuse, Recycle: Compositional Generation with Hoergy-Based Diffusion Models and MCMC. In International Conference on Machine Learning. pp. 8489-8511 2023. URL Oreas/v202//e du23a du2.3 pddf.
mlr.
Griffin Floto. Thorsteinn Jonsson, Mihai Nica, Scott Sanner, and Eric Zhengyu Zhu. Diffusion on the Probability Simplex. arXiv:2309.02530, 2023. URL
02530.
Nathan C Frey, Daniel Berenberg, Karina Zadorozhny, Joseph Kleinhenz, Julien Lafrance- Vanassee-Vanasse, Isidro Hotzel, Yan Wu, Stephen Ra, Richard Bonneau, Kyunghyun Cho, et al. Protein Discovery with Discrete Walk-Jump Sampling. In International Conference on Learning Representations, 2024. URL hwwph:tt//////t htttts:://pperrviieee net. forum? d=
HKOmQNb. d...==M
Itai Gat, Tal Remez, Neta Shaul, Felix Kreuk, Ricky TQ Chen, Gabriel Synnaeve, Yossi Adi, and Yaron Lipman. Discrete flow matching. In Advances in Neural Information Processing Systems, volume 2024. URL ht URL.tttpss///ooreedddnngg neurips ee /wtpppaprr... files/paper/ waweeed--tttttttteeeeeeeeee
html.
12

---

Published as a conference paper at ICLR 2025
Anna Gaulton, Louisa J. Bellis, A. Patricia Bento, Jon Chambers, Mark Davies, Anne Hersey, Yvonne Light, Shaun McGlinchey, David Michalovich, Bissan Al-Lazikani, and John P. Overington. ChEMBL: lcrge-scale bioactivity database for drug discovery. Nucleic Acids Research, 40(D1): D1100-D1107, 09 2011. ISSN 0305-1048. doi: 10. 1093//aa//gk/777... URL https: /doii. /doi.
Daniel T Gillespie. Exact stochastic simulation of coupled chemical reactions. The Journal of Physical Chemistry, 81(25):230--2661, 1977. URL https: /ttttpp:://pb..s// acs orr.orr/....o...ooo............. do / 1021/3 (11///1005400000
Daniel T Gillespie. Approximate accelerated stochastic simulation of chemically react- ing systems. The Journal of Physical Chemistry, 115(4)1116-11333, 2001. URL
https: http://pssaaaaeee www.ai.pppaaa.aa...aoa http:://p/pptttt.eeeettttt////// Approximate
acce wew.iaatttaceeeeetteeeeee fulltext.
Rafael Jomez-Bombarecle Jennifer N. Wei, David Duvenaud, José Miguel Hernández-Lobato. Benjamín Sánchez- Lennchez- Dennis Sheberla, Jorge Aguilera- Iparrauurr, Timothy D. Hirzel, Ryan P. Adams, and Alán Aspuru-Guzik, Automatic Chemical Design Using Data- Con- tinuous Representation of Molecules. ACS Central Science, 4(2), 2018. doi: 10.1021/acscen 7b00572. URL https:
acs . org/ doi/10 1021/ wtlo///acccceee acscentsci. 7b00572.
Shansan Gong, Mukai Li, Jiangtao Feng, Zhiyong Wu, and Lingpeng Kong. DiffuSeq: Sequence to Sequence Text Generation with Diffusion Models. In International Conference on Learning Representations, 2023. URL https: /pwnrevieeeeeeeeeeeeeeeeeeereeee feee:/forummdd=jj----0
Will Grathwohl, Kevin Swersky, Milad Hashemi, David Duvenaud, and Chris Maddison. Oops I Took Gradient: Scalable Sampling for Discrete Distributions. In International Conference on Machine Learning, pp. 3831-3841, 2021. URL https: htt.htts::/pproeeddine .am.dinngmm............m...... mlr. www.m.rrrss..........m...m..m... press/
v139/ httggggrattthhh11g httpa//gratttthhhaaaaa / pdf.
Nate Gruver, Samuel Stanton, Nathan Frey, Tim GJ Rudner, Isidro Hotzel, Julien Lafrance- Vanasse, Arvind Rajpal, Kyunghyun Cho, and Andrew G Wilson. Protein Design with Guided Discrete Diffusion. Advances in Neural Information Processing Systems, 36, 2024. URL https:// openreview n forum? iidiiiMiMMGaaa..
Ishaan Gulrajani and Tatsunori B Hashimoto. Likelihood-Based Diffusion Language Models. Advances in Neural Information Processing Systems, 36, 2024. URL /tppptppp:////eeeeeiee
20Gu1rajani9 $5D (1tappooolieee1111130--eaaaaaaaa Ishaan
Xiaochuang Han, Sachin Kumar, and Yulia Tsvetkov. SSD-LM: Semi-auloregressive simplex-based diffusion language model for text generation and modular control. In Anna Rogers, Jordan Boyd- Graber, and Naoaki Okazaki (eds.), Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 11575-11596, Toronto, Canada, July 2023, Association for Computational Linguistics. doi: 10. 1188536/11222333 act.o// URL https:
httpps://aclantheee www.clnnnhoogyyyy .ot.orggg//.. (trrg22223.acm a01-2...cllomm 647/-
Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. GANs Trained by a Two Time-Scale Update Rule Converge to a Lo- cal Nash Equilibrium. Advances in Neural Information Processing Systems, 30, 2017. URL /tttoee//prooeeeiingg... nwwrips.e.ppp... wttpppprr_iieessppppeeeeeeeeee file://alds111T0aaeeeees11111222
pdf.
Jonathan Ho and Tim Salimans. Classifier-Free Diffusion Guidance. In Neural Information Processing
Systems Workshop on Deep Generative Models and Downstream Applications, 2021. URL
https:/
attps://cpenrevate ope.reviewwww.... net Forum?id=gua BAKxxXKI..
Jonathan Ho, Ajay Jain, and Pieter Abbeel.
Denoising Diffusion Probabilistic Mod- els. Advances in Neural Information Processing Systems, 33:6840-6851, 2020.
URL
https::/prroceeigg...o. neuriisss..g....nu.p............ cc/ cttpsppr.cpppppppppeeeeee httprripsssppppppprfeeeeee/eeeee httpeee_fiieeeepppe/2///////./
13

---

Published as a conference paper at ICLR 2025
Emiel Hoogeboom, Alexey A Gritsenko, Jasmijn Bastings, Ben Poole, Rianne van den Berg, and Tim Salimans. Autoregressive Diffusson Models. International Conference on Learning Representations, 2021a. URL
Emiel Hoogeboom, Didrik Nielsen, Priyank Jaini, Patrick Forré, and Max Welling. Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions. Advances in Neural Information
Processing Systems, 34:12454-12465, 2021b. URL https: bttt:p:://peeeeviiii net net/pdf? pdd
6nbpPqUCI17.
Emiel Hoogeboom, Victor Garcia Satorras, Clément Vignac, and Max Welling. Equivariant Dif- fusion for Molecule Generation in 3D. In International Conference on Machine Learning, pp. 8867-8887, 2022. URL https: httpss///pcceeeggg...... .ww.hngsmml......mmm.........m.m prwss/veeveee /vls2vv1222/// wet/////oooooo2/a/eeeee/e hoogeboom222a ..d...
Chloe Hsu, Robert Verkuil, Jason Liu, Zeming Lin, Brian Hie, Tom Sercu, Adam Lerer, and Alexander Rives. Learning inverse folding from millions of predicted structures. In International Conference on Machine Learning, pp. 8946-8970, 2022. URL https: http///ppoceee...cceeco
htt.o////..totpp/oooe/oonnngnnn mlr mtt.pp.sssg.....sss.s...s... press/
wet5/hhss2aaassuuuue pdf.
Chloe Hsu, Clara Fannjiang, and Jennifer Listgarten. Generative models for protein structures and sequences. Nature Biotechnology, 42(():196-19))) 2024. URL https: /www nature com/ articles/s4155 00075877-230000 023-02115
Aapo Hyvärinen. Some extensions of score matching. Computational Statistics & Data analysis, 51
(5):2499-2512, 2007. URL https://ww/ abs/pii/ /0111///01794//100 711.667777700022662
John B Ingraham, Max Baranov, Zak Costello, Karl W Barber, Wujie Wang, Ahmed Ismail, Vincent Frappier, Dana M Lord, Christopher Ng-Thow-Hing Erik R Van Vlack, et al. Illuminating protein space with programmable generative model. Nature, 623(7989):1070-1007 2023. URL
https://doi.oor /trgg/10 1038 1038//41586-0223333 020-88--22----2-----8--
Clemens Isert, Kenneth Atz, José Jiménez-Luna and Gisbert Schneider. QMugs, quantum me- chanical properties drug-like molecules. Scientific Data, 9, 2021. URL https://api.
semanticscholl Lrgg/Corpuslii 03355941866
Jasper Janssens, Sara Aibar, Ibrahim Ihsan Taskiran, Joy N Ismail, Alicia Estacio Gomez, Gabriel Aughey, Katina Spanier, Florian De Rop. Carmen Bravo Gonzalez-Blat Mare Dionne, et al. Decoding gene regulation in the fly brain. Nature, 601(7894):630-6633 636, 2022. URL https: http://wwww/natt naw.re.tuue.. www.ert.ooaaaeeeeeeeeeeee. comm/articless. a4 1511586-60
John Jumper, Richard Evans, Alexander Pritzel, Tim Green, Michael Figurnov, Olaf Ronneberger, Kathryn Tunyasuvuakooo,, Russ Bates, Augustin Židck, Anna Potapenko, et al. Highly accurate protein structure prediction with AlphaFold. Nature, 596(7873):583-588) 2021. URL https: // //www. nature. com/ articles s415es///415660000 02 01005-80---0------
Diederik Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. In International Conference Learning Representations, 2015. URL 6980.
Andrew Kirjner, Jason Yim, Raman Samusevich, Shahar Bracha, Tommi S Jaakkola, Regina Barzilay, and Ila R Fiete. Improving protein optimization with smoothed fitness landscapes. In The Twelfth International Conference on Learning Representations, 2023. URL https: /tttps://pperrviii net/ forum? (td=xx11222233
Leo Klamer, Tim G. J. Rudner, Garrett M. Morris, Charlotte M. Deane, and Yee Whye Teh. Context-guided diffusion for out-of-distribution molecular and protein design. arXiv preprint arXiv:2407.11942, 2024. URL https: arwiv. http:///awaaattooaa//o/////sss//
11942.
Mario Krenn, Florian Hase, AkshatKumar Nigam, Pascal Friederich, and Alán Aspuru-Guzik, Self- referencing embedded strings (SELFIES): A 100% robust molecular string representation. Machine Learning: Science and Technology, 1, 2019. URL https: / api, http://:/...a......neeeeeeeeeeee www.ntiesccootii....... .org//
CorpusID:21220 222415210.....
14

---

Published as a conference paper at ICLR 2025
Rohith Krishna, Jue Wang, Woody Ahem, Pascal Sturmfels, Preetham Venkatesh, Indrek Kalvet, Gyu Rie Lee, Felix Morey-Burrowy Burrows, Ivan Anishchenko, lan R Humphreys, et al. Generalized biomolecular modeling and design with TTsFol All-Atom. Science, 384(669))cud112528, 2024. URL https://///.......
/www sc ence wrg/doi /10. 1126 6/ wwtsscciennccccccc/.eee ad1252B.
G. Landrum. RDKit: Open-Soure Cheminformatics Software, 2010. UtLhttp:: rdkit. org.
Lin Li, Esther Gupta, John Spaeth, Leslie Shing, Rafael Jaimes, Emily Engelhart, Randolph Lopez, Rajmonda S Caceres, Tristan Bepler, and Matthew E Walsh. Machine learning opti- mization candidate antibody yields highly diverse sub-nanomolar affinity antibody libraries. Nature Communicaations, 14(1):3454, 2023. URL hetppa:/www.... nature cwweeeccccaaaaaaaaaaaeeeeeeeeeee com/articles/////cccccm..mmmml.t 0077--022-302222220
Xiang Li, John Thickstun, Ishaan Guirajani, Percy S Liang, and Tatsunori Hashimoto. Diffusion- LM Improves Controllable Text Generation. Advances in Neural Information Processing Systems, 35:4328 4343, 2022. URL https: http///ppppeeeeeeeeeeeeeeeeeeeet net http://wwwwttttoooodemdd333399 IrEss
Christopher A. Lipinski. Lead- and drug-like compounds: the rule-of-five revolution. rivlouoti Drug Discovery Today, Technologies, 144):337-41, 2004. URL https: //api./pppp// semanticscholee..e...e..ecc
CorpusID:2655133
Yaron Lipman, Ricky T. Q. Chen, Heli Ben-Hamu, Maximilian Nickel, and Matthew Le. Flow Matching for Generative Modeling. In International Conference Learning Representations, 2023. URL
net Forum?id-PPa Ptw.um/miidppwWDTTTSt....
Xingchao Liu, Chengyue Gong, and Qiang Liu. Flow Straight and Fast: Learn- ing to Generate and Transfer Data with Rectified Flow. In International Confer- ence on Learning Representations, 2023. URL https: .pdf
Aaron Lou, Chenlin Meng, and Stefano Ermon. Discrete Diffusion Language Modeling by Estimating the Ratios of the Data Distribution. arXiv:2310.16834, 2023. URL https: wrwiv.orvooooo......o......... org/
abs/ 1aas/2310 . 16334
Wei Lu, Jixian Zhang, Weifeng Huang, Ziqiao Zhang, Xiangyu Jia, Zhenyu Wang, Leilei Shi, Chengtao Li, Peter G Wolynes, and Shuangjia Zheng. DynamicBind: predicting ligand-specific protein-ligand complex structure with deep equivariant generative model. Nature Communica- lions, 15(1) (511):1071 2024. URL https:ttp//.c.mm....m /oii orggorgggoo /10. 1000///00 a 4674467-00 024-45461--22
Nanye Ma, Mark Goldstein, Michael Albergo, Nicholas Boffi, Eric Vanden- Dijuden,,n,ee,, and Saining Xie. SiT: Exploring Flow and Diffusion-based Generative Models with Scalable Interpolant Transformers. arXiv:240J 087440, 2024. URL https: //wx/xxxivv///// org/ abs 2401. 08740.
H. B. Mann and D. Whitney, On Test Whether one of Two Random Variables is Stochastically Larger than the Other. The Annals of Mathematical Statistics, 18(1):50 - 60, 1947. doi: 10.1214/ aoms/1 177730491. URL https: /oi. org 10. 121 4/ aoms (tmms/117710 11177730791.
Chenlin Meng, Kristy Choi, Jiaming Song, and Stefano Ermon. Concrete Score Matching: General- ized Score Matching for Discrete Data. Advances in Neural Information Processing Systems, 35: 34532 34545, 2022. URL https: https::/openzer////// /openrevie net forum?ide htt.ummdd_d__tdtttteee
RL7wtHKPJE
Milot Mirdita, Konstantin Schütze, Yoshitaka Moriwaki, Lim Heo, Sergey Ovchinnikov, and Martin Steinegger. ColabFold: making protein folding accessible all. Nature Methods, 19(6):679-66 2022. URL https:://// //t::://wwww /tttps://ww.... nature. com/ 22ti:deee//115552222003333
Harry L. Morgan. The Generation of a Unique Machine Description for Chemical Structures-A Technique Developed at Chemical Abstracts Service. Journal of Chemical Documentation, 5: 107-113, 1965. URL sattps://agge http://pp....aiisieeeeeem semanticschoiar. org/ htt.://oaaa.oggooooououusua:::: 62164893.
James R Norris. Markov Chains. Cambridge University Press, 1998.
15

---

Published as a conference paper at ICLR 2025
Zhuoran Qiao, Weili Nie, Arash Vahdat, Thomas F Miller III, and Animashree Anandkumar. State-specific protein Lanein complex structure prediction with a multiscale deep generative model. Nature Machine Intelligence, pp. 1-14, 2024. URL https://b...orr/1...1000 s
Yiming Qin, Clément Vignac, and Pascal Frossard. Sparse Training of Discrete Diffusion Models for Graph Generation. arXiv:2311.02142 2023. URL 02142.
/
Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D Manning, Stefano Ermon, and Chelsea Finn. Direct preference optimization: Your language model is secretly reward model. In Advances in Neural Information Processing Systems, volume pp. 53728- 53741, 2023. URL htt.a///e....eeeeeeaaaaaaaaeeeee
weeerriss cc
Pierre H Richemond, Sander Dieleman, and Arnaud Doucet. Categorical SDEs with Simplex Diffusion, arXi::22/0.1478. 2022. http:: httttp:://aaxxi..regg/e httpxi/.rrg//bb//21..1111 2278.
Herbert Robbins. An Empirical Bayes Approach to Statistics. In Breakthroughs in Statistics: Foundations and Basic Theory, pp. 388- URL
394. Springer. 1992.
chapter/An Empiricaalii. Bayes Approach to Appccpp Statistics /bsmsp/
Pnapter/An-Bmpiricall-
1200501653.
David Rogers and Mathew Hahn. Extended-Connectivve Fingerprints. Journal of Chemical Information and Modeling, 50(5):742-754, 2010. doi: 10.1021/ci100050. URL https:
//doi. ort/10..0010..000
Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High- Resolution Image Synthesis with Latent Diffusion Models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10684-10695, 2022. URL https: /ttp://c//e/.cssseeeeeeeeo ttwecffcom//ceeeee cheew/f.ccm//ooteee//////2222222
hwtponttenn////2222///// ppppers/pppppssseeeeee/ ctppp//aet2eeppppee//t/taattttt RRmbach
High- Recch-Resolutll Ttittutiiinnnneeoneeeeeeaa Baan__naannnSSSnsiiiiiiieeee patpaassssttttttaattteeeeeaaaaan CVPR 2022 pttpe2_ppprrppppp
Tim Salimans, Ian Goodfellow, Wojeiech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved Techniques for Training GANs. Advances in Neural Information Processing Sys- tems, 29, 2016. URL https: https::/tppotooooo 8a3363abe 3ataaaa2272222277766600300300002
http://pocccecn...eeeep https://proceeding
http://ww....uuppppo.c//appppp/p http:/ccppp.p/.///a.....a/ filel/
.df..
Javier E Santos, Zachary R Fox, Nicholas Lubbers, and Yen Ting Lin. Blackout Diffusion: Generative Diffusion Models in Discrete-Stare Spaces. In International Conference on Machine Learning, pp. 9034-9059, 2023. URL attps://proceed/eee wttppiinn...............e /v202/ santos23a/ osa3.. pdf.
Saeed Saremi and Aapo Hyvärinen. Neural Empirical Bayes. Journal Machine Learning Research, 20(181):1-23, 2019. URL https: jmwr. org wwwpgg/ppppss/////ppe http:///ii....oo/ppp////////////
htmll
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv: 1rXiv:1707.06347, 2017. URL htt.t:://aaaiiiiii //tpxii.woggr///////...../.. abs/1707, 06347.
Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan. and Surya Ganguli. Deep Unsuper- vised Learning using Nonequilibrium Thermodynamics. In International Conference on Ma- chine Learning, pp. 0256-2265. 2015. URL https:: https://proceednng www.press/ver....mmm sohl-dickstein1 hatm............m
Jiaming Song, Arash Vahdat, Morteza Mardani, and Jan Kautz. Pseudoinverse-guide diffusion models for inverse problems. In International Conference on Learning Representations, 2023.
URL htt.pss://pperreiieeeeee net. fortm//ormmmmm/ deterrummmideee_e _d=$$_gsMAAARRRK
16

---

Published as a conference paper at ICLR 2025
Yang Song, Jascha Sohl-Dicksteed Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based Generative Modeling through Stochastic Differential Equations. In International Conference Learning Representations, 2021. URL https::/ net/forr d= 2RRHS.
Robin Strudel, Corentin Tallec, Florent Altché, Yilun Du, Yaroslav Ganin, Arthur Mensch, Will Grathwohl, Nikolay Savinov, Sander Dieleman, Laurent Sifre, al. Self-conditioned Embedding Diffusion for Text Generation. arXiv:2211.04236 2022. URL https: attpp:///ariiv http//axvvvvio///aaa/a/aa org/ abs/
2211. 04236.
Hannes Stärk, Bowen Jing, Chenyu Wang, Gabriele Corso, Bonnie Berger, Regina Barzilay, and Tommi Jaakkola. Dirichlet flow matching with applications to dna sequence design. In International Conference on Machine Learning, 2024. URL https: openrevieew ww..viewwrr.... net/ forum? -Frrum?L-=xxx
Kiera Sumida, Reyes Núñez-Franco, Indrek Kalvet, Samuel J Pellock, Basile IM Wicky, Lukas Milles, Justas Dauparas, Jue Wang, Yakov Kipnis, Noel Jameson, al. Improving Protein Expression, Stability, and Function with ProteinMPNN. Journal of the American Chemical Society, 146(3):2054-0661 2024. URL https:///upbst acs .eas.ogg//ee wttg///o//....../ooooooogoooo 001100.101/1010 jacs/jacs. 3c10941.
Haoran Sun, Hanjun Dai, and Dale Schuurmans. Optimal scaling for locally balanced propos- als discrete spaces. Advances in Neural Information Processing Systems, 35:23867-23880, 2022. URL https: hptp://///occcecs..e/eee/sc neurips. cccppaper_iils//ppeeeeeeeeeeeeep aasa wwnferenceecceeeeeeeeeeoeoo
Haoran Sun, Katayoon Goshvadi, Azade Nova, Dale Schuurmans, and Hanjun Dai. Revisiting sampling for combinatorial optimization. International Conference on Machine Learning, pp. 32859-32874. PMLR, 2023a. BtLhtttps:/pproceeddii html.
mlr mlr. v222/ vtteesssvv0///un22.c sun23c.
Haoran Sun, Lijun Yu, Bo Dai, Dale Schuurmans, and Hanjun Dai. Score-based Continuous time Discrete Diffusion Models. In International Conference on Learning Representations, 2023b. URL htttps://openreviiet net forumoidd
T.T Tanimoto. An elementary mathematical theory classificattin and prediction. International Busi- ness Machines Corporation, 1958. URL htwphtttp//tc http://///aaaaaaallooooo gww.aa.ooo.aaauaaaaaaa..a au/nla. cat- voniii-n11i 71721..
gov
Ibrahim I Taskiran, Katina Spanier, Hannah Dickmänken, Niklas Kempynek, Alexandra Pančíková, Eren Can Ekşi, Gert Hulselmans, Joy N Ismail, Koen Theunis, Roel Vandepoel, et al. Cell- type-directed design of synthetic enhancers. Nature, 626(7997):212- 222220, 2024. URL https: // //www. nature. com/ www.aaatiieeeeeeeeeeeeeeeeeeeeee 1tt.iileee//15860222333 0ttp:/444186-0222059696
Kotaro Tsuboyama, Justas Dauparas, Jonathan Chen, Elodie Laine, Yasser Mohseni Behbahani, Jonathan Weinstein, Niall M Mangan, Sergey Ovchinnikov, and Gabriel J Rocklin. Mega-scale experimental analysis of protein folding stability in biology and design. Nature, 620(7973):434- 444, 2023. URL https:/ www. nature. com htamm//rtilleseeeee s 586-58668889 023 003000338866 6.
Rosario Vanella, Gordana Kovacevic, Vanni Doffini, Jaime Fernández de Santaella, and Michael A Nash. High-throughput screening, next generation sequencing and machine learning: advanced methods in enzyme engineering. Chemical Communications, 58(15):2455-22 2467, 2022. URL https:/ //oi .org/ 100. 1039 cc004 635g.
Clément Vignac, Igor Krawezuk, Antoine Siraudin, Bohan Wang, Volkan Cevher, and Pascal Frossard. DiGress: Discrete Denoising diffusion for graph generation. In International Confer- ence on Learning Representations, 2023. URL https://///..ccc... /oop/oopeeeieeeeeeeeeeeee net http//ormmmmm/mmm did=
UaAD-NuB 6WX.
Hanchen Wang, Tianfan Fu, Yuanqi Du, Wenhao Gao, Kexin Huang, Ziming Liu, Payal Chandak, Shengchao Liu, Peter Van Katwyk, Andreea Deac, al. Scientifie discovery in the age of artificial intelligence. Nature, 620(7972):47-60, 2023, URL https: /www www..natue articles 25l//44155822202222222
nat nature. com/
17

---

Published as a conference paper at ICLR 2025
Xinyou Wang, Zaixiang Zheng, Fei Ye, Dongyu Xue, Shujian Huang, and Quanquan Gu. Diffusion Language Models Are Versatile Protein Learners. arXiv:2402.18567, 2024. URL https:
Joseph Watson, David Juergens, Nathaniel R Bennett, Brian L Trippe, Jason Yim, Helen Eisenach, Woody Ahem, Andrew Borst, Robert Ragotte, Lukas F Milles, et al. De novo design of protein structure and function with RFdiffusion. Nature, (2007976):1089-11000 1000, 2023. URL /at////111800200155555
bettps:/www....
David Weininger. SMILES, Chemical Language and Information System. 1. Introduction to Methodology and Encoding Rules. Journal of Chemical Information & Computer Sciences, 28(1): 31-36, 1988. URL https: / /pwpsppp//////////// acs org/ doii /10..10..0.. 1021/ wt2./ci10057200......0000000000
Talal Widatalla, Rafael Rafailov, and Brian Hie. Aligning protein generative models with experimental fitness via direct preference optimization. bioRxiv, pp. 2024-05, 2024. URL https: /www.
biorxiv. org. cwwtent////////ooo/ooooo 1tt11111111011 1101/2024 05 20. 595026v1 abstract.
Scott Wildman and Gordon M. Crippen. Prediction of Physicochemical Parameters by Atomic Contributions. Journal of Chemical Information & Computer Sciences, 39:868 873, 1999. URL
https::/apl semant icscholar. wwt.or////ooooooo Ctrg/CCrrpsIDD 1521142744
Luhuan Wu, Brian Trippe, Christian Naesseth, David Blei, and John P Cunningham. Practical and asymptotically exact conditional sampling in diffusion models. Advances in Neural Information Processing Systems, 36, 2024.
Minkai Xu, Lantao Yu, Yang Song. Chence Shi, Stefano Ermon, and Jian Tang. GeoDiff: A Geometric Diffusion Model for Molecular Conformation Generation. International Conference Learning Representations, 2022. URL
forum htt.riieeeeeeouumeeeee/e wtw.:e/ee/ooummoeeooooottttto wil=icixe=eeeeee
Kevin Yang and Dan Klein. FUDGE: Controlled Text Generation With Future Discriminators. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 3511-3535, 2021. URL https:
//aclanthology org/2021 naacl mmain. 276/.
Ruqi Zhang, Xingchao Liu, and Qiang Liu. A langevin-like sampler for discrete distributions. In
International Conference on Machine Learning, pp. 26375-26396. PMLR, 2022. URL https: //proceedings.nlt mmr...mmmm.. ppe.ss Teteess/vv2//nn/i 22t6g222.222.t...mmm .hw.mml.2..........m.mmmm
Qinqing Zheng, Matt Lee, Neta Shaul, Yaron Lipman, Aditya Grover, and Ricky TQ Chen. Guided Flows for Generative Modeling and Decision Making. W.Xiv:2311.13443 2023.
https:
//arr //rxiiv... 2331111443.
18

---

Published as a conference paper at ICLR 2025
APPENDIX
A ORGANIZATION OF APPENDIX
The Appendix is organized as follows. Appendix B provides additional backgrounds on CTMCs and the models based on CTMCs. Appendix C contains detailed derivations of the main results. Appendix D provides minimal PyTorch implementations of Discrete Guidance, as well as the derivations for an extension of DFM for states with fixed components. Appendix contains further discussion of related work, including detailed comparison with other approaches for guidance. Appendix F provides further details and results for the experiments.
B ADDITIONAL BACKGROUND
In this section, we provide more detailed backgrounds on Continuous- Markov Chains (CTMCs), as well as continuous-time discrete diffusion models (CTDD) and discrete flow models (DFM), which are based on CTMCs.
First, recall that the rates, (x, R), are related to the probability of an instantaneous transition occurring at time t from a state x: to a state ğ at time & + dt through:
Pe-deje ( = -|a,, =x) òr,ā a + Rx, R)dl.
This can be derived from the Kolmogorov forward equation:
O.pi = Σ R.(T, = .) Σ Re(x,, =xx) x)).
Intuitively, the Kolmogorov forward equation states that the difference between the incoming and outgoing probability mass of any given state is the time derivative of the marginal (Campbell et al., 2024), ensuring that the total flow is conserved globally. Also. note that for generative modeling, the CTMCs are not homogeneous, because we specifically want the process correspond to regimes with more or less noise, hence the subscript on the rate matrix.
In CTDD (Campbell et al., 2022), the user specifies dime-dependent rate matrices (e .) (referred to as the forward process for diffusion models) that govern the noise process evolving from = to t= O, where = 0 pure noise. The model is trained on an ELBO loss, which continuous-time analogy of the discrete-time ELBO derived in Austin er al. (2021). Minimizing this ELBO can be intuitively thought of as minimizing the KL-divergence between the forward process posterior, and learned reverse process, as the time step size goes to zero. By minimizing the ELBO, we learn denoising model, pf (an (ax)), which turn induces a backward-in-timg rate matrix, R2 (ft,,.). In the notation of flow-based models, this learned backward-in -nntad------eeeeee-e rate matrix can be rewritten as
Pqj (Fe( Σ Pipi (2r)21) (11 (r)).
R (xx, 3t) = Re( x3
In DFM (Campbell et al., 2024), rather than specifying a forward rate matrix such as in CTDD, the user specifies a data-conditional flow Pejuf (-(x)), which induces a family of data-conditional rate matrices, Rg (22, -(z1). ). that each generate the relevant conditional flow (by satisfying the Kolmogorov equations). Commonly used conditional flows include those that linearly interpolate towards æ1 from a uniform prior or fully-masked state M (Camphell et al., 2024), and can also be generalized to other types of probability paths (Gat et al., 2024). We primarily used the masking noising process introduced in Camphell et al. (2024) in our experiments: p (I, (x.) = Cat(t (x1, + (1 - (M, xx }).
Campbell et al. (2024) show that the rates used in generative sampling can be obtained by training neural network with parameters 6, p (x1 (x,), to approximate the true denoising distribution using
the standard cross-entropy loss:
Lee Epau(e, M1(1..
[Iogp] (3ra [122)
(5)
19

---

Published as a conference paper at ICLR 2025
where (t; is uniform distribution on [0, 1]. 2, can be sampled from Peji (21(21). As shown in Campbell et al. (2024), the cross entropy loss can be understood as a simplification to the ELBO used to train CTDDs. Given such trained denoising model ( used in sampling is defined as:
(xz), the unconditional rate matrix
R (Iee Epg ((r)))))) (1 121)
(6)
where Re (2r,, ((1) is induced by Pt11 (x). DFM generalizes CTDD by enabling more flexible choices of R2 (I,, 1211) at compling-timed since there is family of data-conditional rate matrices (x ((11) that all generate Peti (21 by maintaining detailed balance (Campbell et al., 2024).
There are many methods for sampling from CTMCs given the rates and an initial distribution. One simple approach is to use RV (z,.-) to estimate the transition probability Pl+ (#+++ (x(ee) via finite Euler step of step size Åt. Alternatively, the Gillespie's 's Algorithm (Gillespie, 1977) can simulate a time-homogeneous CTMC exactly by alternating between sampling holding time and sampling the next state, where both the holding time and the state transition probabilities depend on the rates. The Gillespie's 's Algorithm can be adjusted for time-inhomogenoou CTMC with the modified next reaction method, which involves numerical integration of the time-dependent rate matrices (Anderson, 2007). Finally, r-leaping (Gillespie, 2001; Campbell al., 2022) is approximate simulation method to allow transitions in multiple dimensions to be applied simultaneously. which recovers the exact simulation in the limit as 0.
C GUIDANCE IN CTMCS
C.1 UNCONDITIONAL. GENERATION WITH CTMCS
In this subsection, we provide an overview of the work of Refs. (Campbell et al., 2022; 2024) that formulate discrete state-space diffusion and flow models CTMCs. We denote ne as the random- variable describing the state of the system at time that can take any state-value x in the state-space X. As deseribed in Section 3, the dynamics of CTMC is specified by an initial distribution p(r)) at time t = 0 and the rates [x, At) that are related to the infinitesimal transition probabilities p(z (2z) through
BEL+AIiiI = 62,3 + (z 2 At + (At"+)
= = + 5z,5 Ru (z. 5 A + (1 0n,5) ((.
(7)
= -g +
i)) + (1 (1- (( O(At
for a transition from a state 2, (with value x) to state Iı-At (with value .)) at time f, where we define (e(x, Re (((;;=a I++A: z)) In comparison to the exposition in the main paper. here we explicitly write these transition probabilities as an expansion in At following Camphell et al. (2022), while implicitly assuming At - for Equation 7 and in this entire section. We use ((tl++)) to denote all terms that tend to zero faster than At (i.e., with a positive < 1).
In the following, we assume that the rates, R₂ (a. σ) are known; for example they could be induced by a learned probability distribution re (21 (2x) with parameters 0 as discussed in Appendix B. Using these rates, a known initial distribution p(ro)) can be propagated in time to p(x.) for any 2 0 using Equation 7 along with some integrator in time, such as those described above.
As p(2 a probability distribution, it must fulfill, for all Fe+Ar and Zt, (i) 0 < p(Fc+Ae/2Z) (x)) and (ii) Exuse p(x(+1e/2z) = 1. From (i) with Equation 7 it follows that 0 < (x) for all x' + x. and from (ii) with Equation 7, it follows that
(L, 0,
(8)
which can also be written in the alternative form
R2
Σ (x, B40
(9)
Note that R2 (2. x² < O because 0 < (z, Z) for all i + x. Thus, if Rx, 2) is known for all à + x, then one derive R2 (x, 2)) from these values.
20

---

Published as a conference paper at ICLR 2025
C.2 CONDITIONAL CTMCS
The unconditional CTMC framework can be adapted for conditional generation given a property by learning Pip (2r (rt, y) that induces the conditional rates (r, Fly) as in the unconditional scenario discussed Appendix B. These conditional rates then specify the infinitesimal transition probabilities in the conditional form of Equation 7:
p( = 2010:/100000 = x. y) = 6,.2 + Re(x, + O(At!*)
(10)
= 53,5 [1 + (2 x y A4 + (1
As in the unconditional case, the rates must fulfill 0 - Rg (z, kly) for all 5 * x and Σ3 Rg (z, kly)
O or equivalently (x, = Σn Re (x, Bly)
After learning the conditional rates during training from data Pdata (z. y). one can sample zly from pd (zily) by generating samples from a (conditional) them to using Equation 10.
p(zoly) and propagating
Conditional generation in this form requires either y-labeled data during training, fine-tuning of an unconditional model (trained on an unlabeled set) by transfer-learning on another (potentially smaller) labeled set. Note that, in the continuous state-space case, conditional training does lack the modularity offered by guidance (Du et al., 2023).
C.3 PREDICTOR GUIDANCE IN CTMCs
We will show that instead of obtaining the conditional rates (x,, from directly-learned conditional model, Pij (x1 (T y), one can instead leverage Bayes' theorem to construct them by combining the unconditional rates [z, Z) with y-eredictive distribution, baaobbutiion.pyll4aaaa4 = 2, 2, =)). In particular, we can rewrite the left-hand side of Equation 10 as
p(1++A== = 7|.; =x, p(y| ã. 24 = pr)ppp((()) = -|1
Σ / Σ ((('))((e+4===0111
(11)
Where we have defined g(x*) plu ri+a:= = Iz- zz) in the last step. Using the expression of - in Equation 7 we can rewrite Equation 11 as
q( =(=)
Σ
( 52. 1+ (r, R1
+ +11 - SE R2 R(
Ed(x')
[1 (2, + 8 Re
(x))
1 R4 (2, A/
((x)
1+ x At
Σ (("")
6z yltl
[1 x) A) + [| [1-
Sm
g(z)
RI(I, (
gl0)
4(2)
Re x)) At + Σ
g(a')
Re
(( 0
((x)
8z.h e 1 At
[1-dp.6
R
(x, 5) (t 0
1+, x) At + Σ R(1) (I. At (()
2'$20
(12)
21

---

Published as a conference paper at ICLR 2025
where we have defined
2(x²) R2 (1r, x²x g(xx)
Re (x(x
p Re(xxx²*)
(13)
for any x² o x: in the last step.
Next, we use the Taylor expansion around v = 0 of 1/ u) = -1--0 denominator in Equation 12 to
-
v + O(u to transform the
1+ 2x(xxx)
E
##2
(1.))// ((. (..
=1 (((1,
Σ
x'Zx
= 1 (t Σ R (E. +0(At))
1 2) Σ (1.2 0(AP))
= x)
x'#2
and insert this back into Equation 12
- = 8z.5 [1 RI, x) Ad]
[ -n,5
(x, +0(A4)
Re x At Σ R (Ir (()
80.5 [1 x) A|
[1 8 (I,, 8) 0
x 1 R1(2, Σ (x, -
82,8
1 + Re(a Re(r,F)Ai Σ R
[ |R! (r. A) + O(Alt))
+
6,,5 1 Σ R (I, + [1-dw, (2 1O0+++0(2) +0(A0+))
(14)
As the left-hand sides of Equation 10 and Equation 14 are the same, we can compare terms in 62,z) deduce
Re( (x, -1 Re a),
(15)
where, in the second step, have inserted the definition of 12(5) (xx, 7) (Equation 13). We find 0 < (I, fly) for all & * x, as required for rates, because 0 < R1 F) for all ă & and 0 S p(y|=++A| = x", Dt x) for any y. x, x², because p(y) (e++ x² 34 x)) probability distribution.
Comparing the terms in 5r At in Equation 10 and Equation 14, we deduce
R (zz
Σ (x,'') =- Σ Re(2, x'ly)
(16)
where, in the second step, we have used Equation 15. Note that Equation 16 is analogous to Equation and is equivalent to Σn Re (I., x x'(l)) (in analogy Equation 8) as required for rates.
22

---

Published as a conference paper at ICLR 2025
Equation 15 illustrates that conditionality can be introduced to unconditional CTMC with rates (x, using the predictive distribution [ = z', 2z = z). As a predictive distribution is used here to adjust the rates, this adjustment can be considered realization of predictor guidance for CTMCs in analogy to continuous state-space diffusion (Sohl-Dickstein et al., 2015; Dhariwal & Nichol, 2021).
The sum in Equation 16 is theoretically over the entire (exponentially large) state space (that is 8 1 many states). However, in CTMCs defined by discrete state-space diffusion and flow models only D x (5 1) + 1 of the unconditional rates R& (z, T) (Campbell et al., 2022; 2024) [and thus
according to Equation 15 of the guide-adjusted rates R2 (M) (I, 7)] are non-zero. As consequence, the
sum in Equation 16 must only be computed over D x (S - 1) terms in practice.
C.4 SIMPLIFYING PREDICTOR GUIDANCE IN CTMCS
The predictor-guide-adiuse rates defined in Equation 15 involve the ratio of predictive distributions of the form p(y at Iy =)). We will show now how these distributions can be transformed rates. analogy to
to simpler form thereby simplifying the form the predictor guidance for continuous state-space diffusion in Dhariwal & Nichol (2021), use Bayes' theorem to find
p - x -: /
(17)
p(x: = =x)
In predictor guidance, the noising process (I++At xz,) is independent of the guide property y so that IL 21 and therefore p(z: = x//++11 = x" y p( = 20 2++1 = =x)). Inserting this into Equation 17 we find
p(y p( = x = (
p( = =x²)
(18)
-
and Equation 15 can be simplified to
plylxe+ - T, xx) p(yla++ = .4. =x)
plylā, t) plulæ, 1)
Re (x 8)
p(y| Rx(2,
Re R2 T).
(19)
where, in the last step, we express p(y) 2(+a(=2)) (with an implicit time-dependence) as p u/y=" .t) (with explicit time dependence) using instead of t At in the limit of At 0. The intuition behind Equation 19 is that conditioning achieved by moving to states á that have higher predictive likelihood for the desired guidance property (1) than does the originating state, x, quantified by the likelihood ratio raised to the power of the guidance strength.
C.5 TRAINING A NOISY PREDICTOR MODEL
In practice, and following Song al. (2021); Dhariwal & Nichol (2021), one can parameterize the noisy predictor model p(y ( .) with learnable distribution (y|(" (t)."")) The parameters of this distribution, o, are then obtained by maximizing
L())
logn
(2) Pas ( (-
> mm)
using a labeled data distribution Pdata (I1, (r,,)) y), a uniform distribution 2((0, 1) and the unconditional noising (i.e., forward) process p(ze|=1). So in words; one samples a state together with its label y from the data distribution, samples a time t, samples a noised state x" at time t based on Iz, and evaluates the probabbiiyy for y. z², and at the current model parameters c. There are also alternative strategies for approximating ply|ø*, t) that does not involve training a noisy predictor model discussed in Appendix F.2.
23

---

Published as a conference paper at ICLR 2025
C.6
TEMPERATURE SAMPLING
Instead of sampling from
8z,2 Re( Byy) + O(Ar!t))
ply R. f(y
= 82.2
R () O(At!+
p x,)
(using Equation 19 obtain the second from the first line) can introduce guidance lemperature T, or equivalent an inverse guidance temperature ? = 1/T, which we call the guidance strength, and sample from
p(ylūtt) t) p(uka, t)
pl)
Re(z, O(AF+))
(20)
òr 5 Rf (z, +
where we have defined
(z, = p(ylž,1) () p(y)111)) (x(
(21)
for x * T.
This procedure is known temperature sampling (Ackley, David H. and Hinton, Geoffrey E. and Sejnowski, Terrence J., 1985) and is for example used in continuous state-space diffusion models (Dhariwal & Nichol, 2021; Ho & Salimans, 2021). Lowering the temperature enables one
to tune the generative process from fully unconditional (R. (R( (z, āly) = (x, .)) to conditional (R( (z, Ely) Rg (z, 2ly)). One
go beyond the exact conditioning, making the guidance
signal stronger still (1 < y or equivalently T 1). We note that effectively sampling from the true cemperature-annellee distribution of diffusion models remains open problem (Ingraham al., 2023; Du et al., 2023).
C.7 PREDICTOR- FREE GUIDANCE CTMCS
We will show now that Equation 20 can also be reformulated in terms of rates Re .) of unconditional CTMC and (z(zūlg) of a conditional CTMC. This step is in direct analogy to predictor-free guidance in continuous state-space diffusion (Ho Salimans, 2021) that has been derived as an alternative to predictor- guidance in continuous state-space diffusion (Sohl-Dickstein al., 2015; Dhariwal Nichol, 2021). This result will, as in the continuous state-space case, allow us to apply the controllability of predictor guidance but without the dependence on any predictor, and therefore corresponds to a realization predictor-free guidance for CTMCs.
predictor-guidance
Using Equation 17, Equation 18, and Bayes' theorem, we rewrite (2(2) (xr Fly) defined in Equation 21 for è # x as
plylū, p(ulor, 1)
p p(u
R2 (a, Fly)
Rs (x,
Rs (x,,
pl 7|0, 10/p,,=0 = v.
7ppp 2//0 =
R₁ (x ē)
(22)
p(u++A1 x| /2 - x, xr,.)))(uuue w)ppularr==--- 2) -.c. x)
7 x +
())
p(Z++A1 = x = w0..)pp((+4ttttc -0/, -
Using expressions for the relationships between transition probabilities and rate matrices (uncondi-
tional in Equation 7 and conditional in Equation 10), we can further expand Equation 22 follows
24

---

Published as a conference paper at ICLR 2025
(assuming ă + x, which will be used to transform the second to the third line).
(z, (x, (ly)
p - Re(x,ā)
O + {
(x,
(e R x (1+
(x,
1 +(
RM T (x,
(x 3) O(t
Re(r, bly)
1 ((A)))
Re(x,
(x)
((At))
Then again use the Taylor expansion around v = -1- -0--00 for 1+0(A()) simplif'
1 O
= =[1+
I I ((A))
so that
xly)
R (x,
[1 [1+ O(At)) R(,,) " "( O(At).
(x(2, #)
(23)
Inserting this expression of R2 (z, Zly) into the temperature-mmodulated version of the conditional transition probabilities (Equation 20), we obtain
pl (01+ 65,x' + RC (e,
83.5 +
0(Ar) At A++O(ANHt) (24)
= 62.3 + Re(x, (1/+
Thus, instead of adjusting the unconditional rates R (I. .)) employing predictor guidance at an inverse guidance temperature 7 1/T, which call the guidance strength, with predictive distribution Plylae+As Xt) via Equation 20, we can equivalently use predictor-free guidance at guidance strength y using the unconditional rates and the conditional rates Ra (z, āly) via Equation 24. Note that in practice, one would learn both a conditional, Rf (I, Ely).. and an unconditional, R. (1, Z). rate matrix (induced by a conditional, Pf. (=1 (2,, y). and an unconditional model. P (z (xx). respectively) and
combine them to employ predictor-free guidance with R!1) (z. Ely) = R2 (a, a y) R (x, 1-7
C.8 SUMMARY OF GUIDANCE IN CTMCS
Summarizing our results, we have demonstrated that, in the limit At - 0, one can sample the next state F++1i 3 (starting in state 2; æ)) guidance strength (corresponding the inverse guidance temperature) 7 = 1/T from
P ( - = 82,2 + R (x,
+ly) +
using either the predictor-guide guided (PG) version of the rates (Equation 19)
1pylā ( p(yla, (,
R (1r, kly) =
Re(x,
(25)
25

---

Published as a conference paper at ICLR 2025
with (learnable) predictor distribution p(y|æ*, t), or the predictor-free-guudee (PFG) version of the rates (Equation 23)
(x,āl)) (2 (x,
(26)
for è + z in both Equations 25 and 26. When ăt x, as mentioned earlier based on conservation of flow for rate matrices, we use
(x, - Σ #2
n (x,x'1v)) x'w),
(27)
for both PG and PFG. For CTMCs realized with CTDD (Campbell et al., 2022) and DFM (Campbell et al., 2024) only one component of the state can change in infinitesimal time, so that only x (S 1) + 1 rates Rg (zz 2') are non-zero. Thus, only the corresponding D x (8 - 1) + rates R (z, x' lv) are non-zero, therefore ensuring that the identity rate R (z. zly) (Equation 27) is tractable.
C.9 GENERALITY OF OUR RESULTS
The results summarized in Equations 25, 26 and 27 assumed only that the rates of a general (unguided) CTMC are known. In practice. one requires tractability of the identity rate (i.e., the sum in Equa- tion 27) to apply guidance to the CTMC. However, similar to CTMCs realized with CTDD (Campbell al., 2022) and DFM (Camphell et al., 2024), tractability of the unconditional identity rate
(x(xx))= = Σ (z,
x'zZ
or the conditional identity rate
RR(x, xlu) = Σ Re(x,, #'
where (x,, and Re(x, (y) are induced by an unconditional and conditional, respectively, (e.g., denoising) model in any (unguided) CTMC (as discussed in Appendix B), should guarantee tractability of the corresponding identity rate (Equation 27) in guided CTMC (Appendix C.8).
Note that we have only instantiated Discrete Guidance for CTDD (Campbell et al., 2022) and DFM (Campbell et al., 2024). Conceptually, however, our framework applies generally any generative model that can be realized by a CTMC for which transitions are independent across dimensions. does not matter (for Discrete Guidance) how these rate matrices have been determined (e.g., within a continuous-time discrete space diffusion or flow-model framework, approach not yet invented). We are currently only aware of CTMCs used for generative modeling in discrete-state spaces realized with diffusion (Campbell et al., 2022; Lou et al., 2023; Sun et al., 2023b) and flow matching (Campbell et al., 2024; Gat et al., 2024), but one can envision that other frameworks might be developed for this purpose in the future.
some other
D IMPLEMENTATION DETAILS
In this section we provide implementation details of Discrete Guidance, both as algorithmic summary and PyTorch code. First, we describe the procedure of training discrete state-space flow models (DFM) under masking process as detailed in Campbell et al. (2024) (Algorithm 1). Then, we describe the procedure for obtaining the guide adjusted rates (Algorithm 2), both with exact calculations (Listing 1) and ahylo--approoimated guidance (TAG) (Listing 2). Finally, we also provide the minimal implementations for how Discrete Guidance can be integrated with the sampling of DFM with masking process (Algorithm 3; predictor guidance in Listing 3; predictor- free guidance in Listing 4). We note that the algorithmic summaries are only meant for illustrative purpose and we refer the readers to the PyTorch implementations for more detailed information.
The implementations for DFM sampling are adapted from the DFM GitHub repository." We also provide a derivation for extending the DFM to work for states with fixed components (Appendix D.4).
hhtg:://gittihccommndeeeerrrriie flow models
26

---

Published as a conference paper at ICLR 2025
D.1 TRAINING DISCRETE STATE-SPACE FLOW MODELS
The procedure for training a discrete state-space flow models (DFM) under a masking process is detailed in Campbell et al. (2024) and summarized it in Algorithm
Algorithm Training Flow Matching Model with Masking Process
Require: Training dataset {a1} ) denoising model pi (21 (24), learning rate |
Ensure: Trained model parameters 9
1: for each batch Iı in dataset do
2: Sample uniform time ~ (/(0 1) for batch
3: Sample 22 mask (21 Cat(tō + t)
Forward process
4: Get logits from p (31 (.te)
Shape (B, D, S)
5: C.e -EE, [log (x1((x)))
b Cross entropy loss
6: 0 - VV
Gradient update
7: end for
D.2 CALCULATION OF GUIDE- ADJUSTED RATES
The procedure for obtaining the guide adjusted rates is summarized in Algorithm 2. PyTorch imple- mentations are provided for exact calculations (Listing 1) and Taylor-approximated guidance (TAG) (Listing 2).
Algorithm 2 Computing Guide-Adjusted Rates
Require: Predictor model p(y (x, t), current state xs. time t, target property y. unconditional rates (xas) E Dx8 (with dimension size and state space size S), guidance strength y
Ensure: Guide-adjusted rates R( e Dxs
1: if using exact guidance then
3: {Ā} < ((y],,,
2: log,2,, log x4, t)
D All possible next states
4: for each possible
state do log Pa < log p(y| a(x,, .) + log Ps
5:
log Ps.
Log ratio for this next state
7:
end for
8: Collate alx,, .) for all à into ((
9:
else
using TAG D Xx E RDD is the one-hot encoding of z;
X one www.hht.eenoodeer.
11:
g+ Vx logp(y((e,t)
> Vz lollogp(pu p(y]2, at A> Taylor approximation all next states, where = (1) Sx
12:
a(x,,,) + (xt 2 g)g
13: end if
14: ((Ie.)) + 7
b Apply guidance strength
15: (x,,) .)
Ra( :) @ exp(a(a..))
Adjust rates
16: return (
27

---

Published as a conference paper at ICLR 2025
Listing 1: Compute the exact quide-adjusted rates
import torch
import borch.nn. funccionaal as
def get_quidee (oded, xt, t, y_guide, S, R guide_terp ]:
Obtain the exact guide-adjusted rates for predi ctor guidance (PG)
Variables: for batch size, for number of dimensions, for state- space size
Assumes we are given trained noisy predictor "pred_medeil model" that
takes as input of shape (B, D) and time of shape (B,). Assunos "pred_modei" implements a function peretion"ge__og___ prob_log_prob (xt, t, y) which takes inputs xt, t and guidance values of shape (B,)
and outputs log p xt, of shape (B,).
12
Also assumes we are given function
(xt) that takes as input xt of shape (B, D) and outputs xt_jumps of shape (B*D*S, DJ with all states after an identity transition, plus all possible states after jump from xt.
13
14
Args:
15
model (nn.Module), Trained noisy predictor. xt storch.tensore Noised input, shape (B, D)
(torch.tensor): Time values used to obtain xt, shape (B,).
18
Y_guide (torch.tensor): Guidance values we want to condition on, shape (B,).
s (int): Size of the input state-space of xt. The learned unconditional rates used for generative sampling, shape (B, D, S).
RLt
21
guide_temp (float) Guidance temperature.
22
Returns:
(torch. tensor) The guide-adjusted rates used for sampling with guidance, shape (3, D, S)
25
26
B, D xt
Get log prob of log_prob_xt model.get_.oogprrbbee t, y_guide)
28
29
30
# Get log prob of all possible states after 1 jump xt st_jumps = get_a t (xt) log_prob_xt_jjmpp
transitions model. modell.eet_log_pree xt xt_jumps, t. repeat (1, D+S) flatten
33
34
y_guide. repeat (1, D+ .flatten)
35
) J.view(, D,, S)
Compute log likelihood ratics log pwcbbrrrtiii log preb xt jumps- log prob vieview (B, 1, 1)
38
39
# Temperature adjustment tog_prob_ratto /= guide_temp
42
43
Adjust the unconditional rates
44
prob_ratio- torch. (log_prob_ratio)
R_t = R_t prob_ratio
R_t
28

---

Published as a conference paper at ICLR 2025
Listing 2: Compute the guide-adjusted rate matrices with Taylor-approximaaed guidance (TAG)
import torch
import torch functional as
def get_guiiddd (model, xt, t, y_guide, s, RLt, guide_temp)
Optain the guide-adjusted rates for predictor guidance (PG) with Tayllor-apprxximtee gui guidance (TAG)
Variables: for batch size, for number of dimensions, for state- space size
Assumes we given trained noisy predictor "model" that takes
input xt of shape (3, D) and time of shape (B,) Assumes "model
implements a function "got_log_prob (xt, t, y) which takes
inputs xt, t and guidance values y of shape (B,) and outputs log ply xt, t) of shape (3,).
12
Note this function assumes the data is categorical, not ordinal.
13
Args:
model (an.Module): Trained noisy predictor.
xt (torch.tensors Noised input, shape (B, D)
17
t (torch.tensor) Time values used to obtain xt, shape (B,).
Y-guide (torch.tensor). Guidance values we want to condition on, shape (B,).
(int): Size the input state-space of R_t (torch, tensor) The learned unconditional rates used for generative sampling, shape (B, D, S). guide_temp (float) Guidance temperature.
20
21
23
Returns:
34
The guide adjusted rates with TAG used for sampling with gui dance, shape (B, D, S)
B, shapee
27
One-hot encode xt, then compute log prob of xt with gradient calculated with autograd
28
(xt. () xt
(), num_classes-S) to (torch. float) with torchhenaabe__grad:::
xt rerouiire__grrd_(frnn
31
log_prob_ke xt model.get__og__rrbbbeeeeee
t, y_guide)
32
icg_prob_xt. sum smm)smm
Lead_log_prob___0 = xt.grad
Compute likelihood ratics with TAG
35
log_prob_ratis grad_log_ (xt goad sum (dim
=-1, keepdim=True)
36
Temperature adjustment log_prob_ratio /- guide_temp
39
40
Adjust the unconditional rates prob_ ratio torch.exp
R_t RLt prob_ratio
return R_t
29

---

Published as a conference paper at ICLR 2025
D.3 DFM SAMPLING WITH GUIDANCE
The procedure to perform guided sampling with discrete flow model with masking process illustrated in Algorithm 3. PyTorch implementation for predictor guidance is in Listing 3 and predictor-free guidance is in Listing 4.
Algorithm 3 Guided Discrete Flow Matching Sampling with Masking Process
Require: Denoising model (1 predictor model (y)( or conditional model Pfje (1 (Zt, target property y, guidance strength y, step size dt
Ensure: Generated sequence 21
1: Initialize x, with all mask tokens except fixed positions
2: 0
3: while t < do
4: if using predictor guidance then
5: Get logits from pf (2) (xx)
6:
Compute unconditional rates (x..
Equation 6 in Appendix B (y/az, t), Te, t, (x),
H! (Iz, < compute compute.guided..ateee.ee....eee.
7:
8:
else if using predictor-fres guidance then
9:
Get unconditional logits from (zj((z)/z)) and conditional logits from pîje (21 (21
10:
Compute Ri (xt, -) and Rt (Izz .1))
>> Equation in Appendix
11:
(I + (2), 1 7 R2 (xe, 1
12:
end
13:
Adjust diagonal rates and normalize
Sample next 2y from transition probabilities derived from R(2) (I(s
14:
15:
+ dt
16:
end while
17:
return 27
Listing DFM sampling loop with the masking process, with predictor guidance (PG)
import torch
import terch.nn nn. functional as
categorical from torch.dis www.dibuttttutii.. iiaicrerbaii.s.c.cttoooioalll import Categorical
Variables: for batch size, for number of dimensions, for state- space size. We specify the guide values "y_guide" shape (B,) that we want to condition on
Assumes have trained denoising model "denoise_model that takes as input xt of shape (B, D) and time of shape (B, and outputs x1 prediction logits of shape (B, D, S)
Also assumes are given trained noisy predictod ctor "pred_model" that and time of shape (B,) . Assumes
takes as input of shape pred model" implements a function
(xt, t, y) which
takes inputs xt, t and guidance values of shape (B, and outputs log p xt, t) of shape (B,).
13
dt 0.001 $ Euler step size
14
noise = 0 DEM stochasticity
guide_temp 1.0 # Guidance temperature
tep
# Temperature for the xl prediction logits Mask tcken
17
mask_token_ic
18
model.eval ()
xt mask__okee_ia id torch.ones ((B D), dtype=torch.1ong -0.0
30

---

Published as a conference paper at ICLR 2025
mask het torch. zeros ((,)) mask_one_hox [mask_token_id] 1.0
23
24
25
while t < 1.0:
# Get (x1 xt), scaled by temperature, shape (3, D, 8)
logits model (xt, torch.cnes (n)))(B))) (B,)))
28
pt_xi_probs F. softmax (logits / xl_temp, dim=-1)
29
Compute the rates and the probabilities When the current state is masked, compute rates for unmasking
xt_ st_is_mask (xt mask_token_id) .view (8, D, 1). flcatt
33
R_t xt_is_mask pt_xi_probs
((1 noise t) / (1 - t))
34
when the current state is net a mask, compute rates for remasking remask_rates = (1 - xt is mask) mask_ hot viewl, 1, -1] noise R_t remask_rates
37
38
Perform predictor guidance by adjusting the unconditional rates R_t = retes model, xt, t, y_guide, s, Rt, guide_terp
39
41
# Adjust the diagonals of the rates to negative row sun R_t [_t.scatter_(1l, [t[;; :, None], 0.0) R.t.scatter_ xtl:, ;, Nenel, sum keepdim=True) )
42
45
Obtain probabilities from the rates
46
step_probs (R_t dt) clamp (min=0.0, max=1.0)
step_probs scatter_ xt[:, :, None], 0.0)
htt.prros.scatter____ xtl:, :, Nonel, (1.0 torch.sum (stepppprobos
dim=-1, keepdim=Crue)) .clmmp (min=0.c))
49
step Ctep_prcbs torch.clamp (step probs, (step_probs, min=0.0, 0, max=1.0)
50
51
Sample the next xt, shape (B, D) xt torch. distributionns Categerical (satecgrrccalstte_ppppooo (step_probs) sample
53
54
dt
Listing 4: DFM sampling loop with the masking process, with predictor-free guidance (PFG)
import torch
2.
import torch.nn nn. functional as
from torch.distre wiw.rdbutitiiss....mmmm categorical import Categorical
u**
Variables: for batch size, D for number of dimensions, S for state-
space size
We specify the guide values "y_guide" of shape (B, that want to condition on
Assumes we have a trained dencising model "model" that takes as input xt of shape (B, D), time of shape (B,) and the guide values "y_guide" of shape (B,) that we want to condition on, and outputs x1 prediction logits shape (B, D, S)
10
11 Also assumes we are given "no_cls_tcken_i the input to the denoising model that represents the input for the unconditional case
13
14
at 0.001 # Euler step size noise = 0 DEM stochasticity
guide_tent temp 1.0 Guidance temperature # Temperature for the xl prediction logits
xe_
18
mask_token id
1 & Mask taken id eps = 1e-9 # For numerical stability in the log
model.eval
31

---

Published as a conference paper at ICLR 2025
xt mask tcken id torch. ones ((, D), dtype-torch.long]
23
0.0
24
mask_one_het = torch.zeros ( (6,))
25
mask_onc_hets [mask_tokon_ = 1.0
while
1.0: Get (xx1 xt) for the uncenditional prediction, scaled by temperature
28
29
cls "is_input_uncee _ncond = (no_cls cis_tcken__te + torch. ones ((B,)) )) .ong i_iut
torch. (B,))
logits model (xt, t_input, cla_ (a_inputt_uccod) (8, D, pt_xi_probs F. sofotmax (logits / xl_temp, dim=-1)
32
33
# Also get the conditional prediction for the class want to guide towards: px1 xt, y)
35
logits_come model (xt, t_input, y_guide) & (B, D, S)
36
pt_xi_probs_cond = F.softmax (logits_cond x1_temp, dim=-1)
37
When the current state is masked, compute rates for unmasking xt [r_is_mast (xt mask_token_id)..... vviewwidd..wi(BB... D, f).alc
40
# Compute unconditional rates, shape (B, D, S)
41
R_t xt_is_mask * pt_xi_prebs * ((1 noise t) / (1 - t))
# Compute conditional rates, shape (B, D, S)
cend xt is mask pt xt probs_cond ((1 + noise t) (1
44
45
when the current state is not à mask, compute rates for remasking
remask_rates (1 xt_is_mask) mask_one_hot.vveew v1, 1, -1] noise Add remask rates to unconditienal rates R += remask_rates
48
49
Forform predictor-free guidance by using both the unconditional and conditional rates
51
First add the remask rates the conditional rates R R_t_cond +- remask_ratea
52
53
# Perform rate adjustment, nete that we scale by the inverse temperature
If Inverse_gvide_tee
(guide_temp inf), equivalent sereerseeguiddeeeeeee temp = 1, (guide_temy 1), equivalent to
inconditional
55
# If inverse_
conditional
inverse_guide_ete
/ guide_temp
57
R_t torch. exp www.erseeguuieeeeee
torch. (R_t_cond eps) (1
Lnverse_guide_teng
corch.log (R_t + ops)
58
# Adjust the diagonals of the rates to negative PLt.scatter_[-1 xt|: :, None], 0.0) R_t.scatter xtli, i, Nonel,
sum keepdim=True) )
62
# Obtain probabilities from the rates
step_probs (R_t dt) (min=0.0, max=1.0)
step_probs scatter_ xtl:, :, Nonel, 0.0)
htw._prrobsscatter_____
66
sca.rorrsstatttrrr11. xtl:, ;, None], (1.0 torch. (step_probs,
dim=-1, keepdim=Crue)) ..ti:ruee)ll.c...... clamp (min=0.C))
torch.clamp setee__prbb, min=0.0, max=1.0)
Sample the next xt, shape (B, (step_ ssmple
70
xt torch, dorcch.isttiiutiion..co cat.aapcccioocccccoocaaaaaaaaaca
71
+= dt
32

---

Published as a conference paper at ICLR 2025
D.4 DISCRETE FLOW MATCHING FOR STATES WITH FIXED COMPONENTS
In some of our experiments, we work with padded sequences, where padded tokens stay padded during the noising process. The noising processes discussed in Campbell al. (2024) for DFM noising to either (i) fully masked or (ii) a uniform stationary-state at ( = 0. These processes do not directly include the case where the component of a state (e.g. the token of sequence) is fixed (e.g. padded) during noising, Here, we will show how to augment the masking process (i) for states with a fixed component and derive the rates for this scenario analogy to the derivation of the rates for the masking process in Campbell et al. (2024) whose notation we adopt here for this derivation. We will refer to the d-th component of a state, Iz, as the component-sien a².
The data-conditional (noising) flow factorizes over the components d E ().....D}
Pan (2t
II Pan (2/1=4)
d=1
where the data-conditional flow of the masking process in component d, (en((ff(()) is given by (Campbell et al., 2024)
(ap(<((a))) = 160g +
1)6 = Pil1 (pills((a( (1))
(28)
using TM denote the masked component-state of component d.
Here, we introduce an additional fixed component-state z (for an arbitrary component d) that remains unchanged during noising (i.e., masking). In analogy to Equation 28, the data-conditional (denoising) flow in component d for a masking process including fixed component-state can be written as
85g.a (1 6zg 2 Piiz Pet (=)(()())))
maak
(xx (x/(104)
(29)
8 1 (1 8 0
16 20 + (1
1) (11-))0a
The intuition behind this choice is that the data-conditional flow leaves the component-state x unchanged for all times, it corresponds the fixed component-state x at f = Otherwise, masks the component-state as in the standard masking case (Equation 28). The time derivative of Equation 29 is given by
Op (27ll21111 (1 01 8ag and 102 dgg
Øl
and can be used to determine the data-conditional rates
max 0, Open (24) Sp (2r (m4))
(24, x4 1-44)=
Dt
aa Pep (af124)
max 0, 5aa 624
5mgg - 5agg
(30)
Z, 21 G.g.
of
(1 8og agg Zz [z(11
6d aa + (1 t)0
624 2e a 634
following the analogous derivation for standard masking in Campbell al. (2024). We note that [x9r = ( Pqi (#+ (=q) > 0} is the number of component-states with finite probability at
time & that is [=g]] 1 for all & and [z 2 for xf * o state for t E (0, 1). The data- conditional rates in Equation 30 are zero for x = o and have the same expression as in the masking process (Campbell et al., 2024) for rá # x
Following Campbell al. (2024), one can add additional rates that satisfy detailed balance. Because we do not allow transitions from or to the fixed component-ste state 24, the detailed balance data- conditional rates of component d are given by
R RDBdd (xd. 3d (14) = (1 - 55f. )
nt
0 aef + 17 a 22
(31)
1
ad
33

---

Published as a conference paper at ICLR 2025
with stochasticity 7/. The rate in Equation 31 is similar to the corresponding rate in the standard masking (Campbell et al., 2024), with the exception that we only allow transitions for 2 * z here.
We can combine the data-conditional rates, R (2 2 Ix1),, with these detailed balance data- conditional rates, Re...d(zt 5
(2f). obtaining
Rio (ap (a%, : (aa""=a)) = (x 5d
(2)
[x1) + RDB (x) 241,51aa (24)
+ nt
= (1 62f aag)
t dag wa dgn + n7 04 o
that has the same expression as in the standard masking case (Campbell et al., 2024) for of * xz. Finally, following the derivation in Camphell et al. (2024), we find the rates, induced by the denoising model pije (x1 (2t)) for the masking process including fixed component-stater
(x) I:D ,-5)
E pi (=
Roonnd
R
(09.0"121) 2 [21)
i Pijc(= I:D) (D)) Σ 2
(xo F² 12))))
D)
Σ pip ( 1: )1 (1-6 6aftan)
+ nyt
8ut
6z 0 + no 1q Or
1 t
1 + Tyt
= (1 - 62 P (20 = 3²d (x!1111) 1::D)
52 A
1 - t
+ (1 ب xp Pije
x | ( gd 2d
(32)
=1-6
= (1 - 6g ) P2 = zdd xx) L:D + ntt
a
uummas (24))
+ (1 Je ao
nd24 201 (1
=R d
Commank (2r
(2.1D, (22d)
=(1- - 6zn ang RR R.,uumakk (xr .20) + (1 80g.ng og) R.yeemac (z. 1:D ,I²"),
280)
where we have used that (x = xy |r. (:::) 0 for 24 = 2% and p = (x/11
for
of # aie- so that Plee(a5 xt ( = 1 -1-02 627 discussed in Campbell et al. (2024). We have, in the last step of Equation 32, defined R.d Remmm (x..D, ,.))) and R Ru (x.I. .d) as the induced unmasking and remasking rates, respectively, that have the same expression as in the standard masking case (Campbell et al., 2024). Intuitively, Equation 32 illustrates that we can neither unmask to fixed component-stee state remask fixed component-stare Thus. fixed component- states become isolated from the wumasking/emmasking operations during denoising and remain unchanged from == 0 to / = 1 as demanded.
In summary, when noising (i.e,, masking) the data, we follow Equation 29 and thus sample ze using the masking rates pll mask (24 (x4) followed by a restoration of the fixed component-state for all components that have x4 = sa. This noising procedure is used to learn pf (xflar.))) P) as in the standard masking case (Campbell et al., 2024). During denoising (i.e., generation), we first determine the unmasking, R2 uumaskk (I!:D. ,dd). and remasking, Ri_d (r.remask (x] ..d). rates induced by (afl:: In a second step, all unmasking or remasking rates are set to zero for which id = xf (i.e., unmasking to the fixed component-state is forbidden) or aze = (i.e., remasking the fixed component-state is forbidden), respectively.
E FURTHER DISCUSSION OF RELATED WORK
In this section, we include additional discussions of related work (Appendix E. and a detailed comparisons among various guidance approaches (Appendix F.2).
34

---

Published as a conference paper at ICLR 2025
E. ADDITIONAL DISCUSSION
There are other approaches for constructing continuous-time discrete diffusion models besides Campbell et al. (2022) using alternative objectives to the ELBO (Sun et al., 2023b; Meng et al., 2022; Lou al., 2023; Santos et al., 2023). Sun et al. (2023b) extend the original insight from Hyvärinen (2007) to train on ratio-matching loss. Meng et al. (2022) propose concrete score as the generalization of the (Stein) score for discrete settings, which are defined by the rate of change of the likelihood with respect to local directional changes of the input, and learns these scores using a 1,--norm based loss. Lou et al. (2023) further refine this approach to learn these data ratios using the score entropy. We note that although these works also involve the notion of data likelihood ratios, they are trained via a score matching objective and do not introduce guidance. Our approach of predictor guidance can also be viewed as using the likelihood ratios of the predictor model to modulate the sampling process, analogous to how the score of the predictor model is used to modulate the sampling process in continuous state-space diffusion.
Another line of works proposed to model discrete data by embedding the data into continuous state- spaces, either on probabilistic simplex (Richemond et al., 2022; Floto et al., 2023; Avdeyev et al., 2023) or on a continuous latent space (Li et al., 2022; Dieleman et al., 2022; Han et al., 2023; Strudel al., 2022; Gong et al., 2023; Chen et al., 2023; Gulrajani & Hashimoto, 2024). As an example, Frey et al. (2024) generate samples in discrete state-spaces by way of Langevin MCMC in a continuous latent space, using ideas from empirical Bayes (Robbins, 1992; Saremi & Hyvärinen, 2019), but do not specify how to perform guidance. Some of the approaches proposed to apply guidance to diffusion models on the continuous state-space representations of discrete state-space objects in order utilize the guidance approaches for continuous state-space diffusion. Li et al. (2022) model text by first embedding the discrete text tokens into continuous word embeddings, perform standard Gaussian diffusion the embeddings, then decode the embedding back to discrete tokens. This approach requires specialized modeling choices e.g., reparameterization of the loss function and clamping the predictions to the nearest word embedding, which might be challenging to adapt to domains other than natural languages. In an alternative approach, Gruver et al. (2024) (NOS) propose to perform guidance in the hidden layers of the unconditional diffusion model. However, NOS requires additional training procedures and hyperparameters, e.g. jointly training the unconditional denoising model and the classifier on one hidden layer of the denoising model, potentially limiting the flexibility and adaptability of such approach. We note that approaches which perform guidance in continuous latent spaces lose the discrete structure of the data during guidance, which can be important for settings where the discrete structures contain information that are useful for guidance (Campbell et al., 2024; Qin et al., 2023).
Guidance has also been explored in the framework of discrete-time, discrete state-space diffusion (Vi- gnac et al., 2023). particular, Vignac et al. (2023) (DiGress) use discrete time, discrete state-space diffusion for graph generation. They propose to perform approximate guidance using gradient on the one-hot representation of the discrete input. Even though the original presentation of guidance in DiGress addresses only graph inputs, we note that guidance with DiGress shares similar form to mnylor-approximater guidance (Equation 4). However, since DiGress uses a fixed number of time steps training time, the gradient approximation is applied all possible transition states. On the other hand, we present a continuous-timg exactly by adjusting the rates, and derived approo-appoo guidance to specifically approximate the likelihood ratios of only the transitions that change single dimension. Furthermore, Discrete Guidance allows the user to adjust the number of time steps at inference time and choose among different sampling algorithms (e.g., those discussed in Appendix B) for the best performance on downstream tasks. Wang et al. (2024) use a similar guidance approach to DiGress in a diffusion language model for protein sequences.
formulation which allows guidance to be achieved
For autoregressive models, Yang & Klein (2021) propose an approach (FUDGE) of applying guidance by training a predictor on each step of the decoding process and adjusting the decoding probabilities accordingly. This can be viewed as being similar to how a predictor can be trained at various noise scale for predictor guidance in diffusion. In an alternative approach (PPLM), Dathathri et al. (2020) steer the output of a pre-trained language model towards desired attributes by applying gradient ascent on the hidden states using attribute model. There is also extensive literature on fine-tuning a pre- pre-trained autoregressive models for controllable generations (Schulman et al., 2017; Rafailov et al., 2023), and some of these approaches have been recently applied to tasks in the natural
35

---

Published as a conference paper at ICLR 2025
Table I: Comparisons between approaches for guidance in continuous and discrete state-spaces, under either continuous or discrete time formulation.
Space \
Time
Discrete
Continuous
Continuous
Sohl-Dickstein et al. (2015) Vignac al. (2023)
Song et al. (2021)
Discrete
Discrete Guidance (this work)
sciences (Widatalla al., 2024; Chennakesavalu al., 2024). We note that key advantage of guidance over these approaches is that guidance can leverage a already-trained unconditional model without further fine-tuning, which can be prohibitively expensive. Furthermore, predictor guidance also allows for different predictors to be combined in modular fashion.
E.2 COMPARISONS WITH OTHER GUIDANCE APPROACHES
In this section, we make a more detailed comparisons among the approaches for guidance in continu- ous and discrete state-spaces, under either a continuous or discrete time formulation. We will start by reviewing the derivation from Sohl-Dickstein et al. (2015) for constructing a general conditional reverse diffusion process in discrete-time continuous state-space diffusion framework and the ap- proximations they introduced. Then, we show that the guidance procedure DiGress (Vignac et al., 2023) corresponds to making two similar approximations, which refer to the discreeicrttiitioonn approximation and the grudient approximation. The time-discretization approximation is made exact in the limit of continuous-time, which corresponds to Taylor-approximated guidance (Equation 4). The gradient approximation is made exact by explicitly calculating the likelihood ratios of all D (S 1) possible transitions, corresponding continuous state-spaces, no gradient approximation is required and the only approximation error incurred through time-dicrettzzaton, which is made exact the continuous-time score-based diffusion framework (Song et al., 2021). The relationships between these approaches are summarized Table I.
exact guidance (Equation 2). In the case of
Sohl-Dickstein et al. (2015) note that to condition an unconditional reverse diffusion process given property label y, suffices to sample each transition according to Equation 11, which we repeat in part here for clarity:
- p(y|2I+A = =)p(==+
- p
(33)
where we used the simplification
shown in Appendix C.4. It is typically intractable to sample from this distribution exactly due to the intractability of the denominator, which in discrete state-spaces involves summing over all possible states, and in continuous state-spaces corresponds to integrating over all possible states.
Now, suppose the reverse process follows Gaussian distribution:
p(=:+A:= 2|z; = r) N(p 2x)
popp(=+A:= - 1
4u) - -ee) + +.
where C2 is the normalizing constant. Sohl-Dickstein et al. (2015) approximate log 1ogp(v/=+4 using a Taylor expansion around T+t = /4:
log ply p(yl=:+4 -t) log p(yp:/++r+tr m4) (# pi) V Ve.eor log p(ylp((+))) x Ser
With this approximation, the conditional transition distribution be approximated by the following Gaussian distribution with a shifted mean:
= p(z = ã|2, =x, 2 SN + Ee Varsar log ((+ 2u1 Ex)
Sohl-Dickstein et al. (2015) noted that this approximation valid under the assumption that log p(y] has low curvature compared Σ, As noted in Dhariwal & Nichol (2021),
36

---

Published as a conference paper at ICLR 2025
this assumption, and correspondingly the approximation, is correct in the limit of infinite diffusion steps, which corresponds to At - (i.e., in the continuous citiiuuuus-tmee limit), where || + 0. However, in discrete-timee the error of the approximation depends the number of time steps chosen at training time and can be large. This approximation is made exact in Song et al. (2021) by leveraging the connection between score matching and denoising diffusion models. In particular, they show that to sample from the conditional distribution in Equation 33, it suffices to sample using the following score function
V B1+As logp(re++r Fe, v) = V. Vetar log p(z(+4//1z) + Var4A log logp(y/<++A))
(34)
that is obtained by taking gradient of the first line of Equation 33 with respect to At+ Equation 34 is written in terms of conditional score functions, while the scores in Song et al. (2021) are marginal scores of the form s(x,) = Vz, log p(xx)) resulting in
Vx, log (z, 11) V V., log)(( V., log log
(35)
which is the marginal version of Equation 34.
In discrete spatesspacss the score funetion is not defined. We now provide alternative view of predictor guidance that might provide more intuition on the connection between guidance in discrete and continuous state-spaces. First, note that the first line of Equation 33 can equivalently be written in log-space as:
log p( 2/24 v, v) logp(se+
+ (logpuyleeerr
logppulu;; =x]]
From this, we can deduce that the quantities we need to estimate in order to perform predictor guidance are indeed the likelihood ratios: log log Fe+ =.) - log p(y] =2), for all & * z. Now, in order to sample from p(z++ = x z. y), normalized probability is needed. Therefore, in discrete state-spaces, we still need to estimate this quantity for all 5 possible states. However, as we have shown in Appendix C.3, by working with the rates in CTMCs, we only need to estimate D x (S 1) + of these likelihood ratios to make all the rate adjustments that are needed sample from the conditional distribution exactly. Furthermore, when p(yl x = is continuous function on x E D (e.g., a neural network), we showed that we can also leverage first-order Taylor series approximation achieve more efficient sampling:
log p(y| = 2) log p(y (r =z) ve (o 2) 2, log pogp(v/=
Vignac et al. (2023) (DiGress) uses an approximation of a similar form for guided sampling in a discrete-time, discrete state-space diffusion formulation. They directly introduce gradient approxi- mation to Equation 33:
exp (p)))pp))p =x)
0( -x, Σ exp [g(x')) (((x))p((+++4 = =x)
where g(x") = (x"-x) x)² V Petas log logp(y/z++ac) m+4 This approximate reverse distribution is still intractable sample from due the intractability of the denominator. To bypass this, DiGress assumes that dimensions factorize and samples each dimension independently. Since DiGress operates in discrete time, this introduces an additional time-discreiization approximation, which only becomes exact as At + O. In discrete time, however, the error introduced by this approximation depends on the number of time steps fixed during training.
There is another related line of work which performs predictor guidance without explicitly training a time-dependent noisy predictor (Chung al., 2023: Song al., 2023). We note that the procedure to compute the guide-adjusted rate matrix in Equation 2 is the same regardless of how one obtains the estimate for p(y) az). As noted in Chung et al. (2023), the true distribution p(y) ary) intractable, and the closer one's approximation is to the true distribution, the closer the generated samples would be to being from the true posterior distribution p(zly)) Concretely, for continuous state-spaces, one approach for approximating p(y|z,, (z2) is by training predictor that takes in noisy input, p² (y/arz) where 2; is the "noisy" version of the input x at time step t in the noising process. Alternatively, in Chung et al. (2023), one estimates p(y) (x)) p(u (y) (+1). where è1 E,, papppppaar [x1] and p(y) 21 is a "clean" " predictor trained only on unnoised data. It's important to note that both training a noisy predictor and the approach in Chung et al. (2023) are approximations the true distribution p(y)ax)).
37

---

Published as a conference paper at ICLR 2025
The training procedure of the predictor can be modified better match the true p(y(æz), such as those we detailed in Appendix F.2-F.4, while the approach in Chung et al. (2023) has been shown to perform sub-optimally without additional corrections, e.g.. via sequential Monte Carlo (SMC) as suggested by Wu et al. (2024). It is not immediately obvious how to extend these training-free approaches discrete state-spaces. For example, one potential issue is that when the input space is discrete, 1 = lE,,, =p(x))))))))) [21] can lie on the probabilistic simplex for one-hot encoded states di, while p(y (21) only takes discrete input (i.e., in the corners of the simplex), although there are potential ways to bypass this issue that are beyond the scope of this work.
F EXPERIMENTAL DETAILS
This section contains detailed descriptions and results of each of the experiments: images (Appendix F.I). small molecules (Appendix F.2), enhancer DNA (Appendix F.3) and proteins (Appendix F.4).
F.1 IMAGE MODELING
Following Campbell et al. (2022), we modeled a CIFAR-I0 image dataset as discrete pixels. Campbell et al. (2022) used this dataset to demonstrate successful unconditional modeling discrete state- spaces, while we used this dataset to demonstrate that Discrete Guidance can readily leverage a pre-trained discrete diffusion models, and can be applied to high-dimensional problem like images to generate samples with desired properties. Details of model architecture and training can found in Appendix F.1.I and detailed results are in Appendix F.1.2.
F.1.1 MODEL. ARCHITECTURE AND TRAINING
We used the pre-trained unconditional denoising network from Campbell et al. (2022), which is a standard U-net architecture. The weights of the pre-trained model are taken from the official repository.* The classifier architecture is the downsampling trunk of the same U-net model with global average pooling layer. We trained the noisy classifier for 200 epochs on the same training set as the denoising model, with noise added using the same forward process used train the denoising model. We used accuracy evaluated on the validation set for early stopping. We used the Adam optimizer (Kingma& & Ba, 2015) with a learning rate of 0.0002 with 5,000 linear warmup steps. We set the dropout rate of the network at 0.1. The input images have random horizontal flips applied to them during training. We trained on one RTX 6000A GPU. Training the classifier for 200 epochs takes 2 hours.
F.1.2 RESULTS
For sampling. we used r-leaping with T 0.001 without predictor-corrector steps. To generate class conditional images, we used predictor guidance with Taylor-approximated guidance. Randomly chosen class-conditionas samples for all classes are shown for guidance strength y = 3 (Figure 5) and 7 = (Figure 6). By visual inspection, we see that guidance produced expected class-conditional images with reasonable quality.
More quantitatively, we also compared the unconditional model used by Campbell et al. (2022), CTDD, and that model with Discrete Guidance using PG (CTDD-DG) on the quality of unconditional samples on two metrics: Inception Score (IS) (Salimans et al., 2016) and Fréchet Inception Distance (FID) (Heusel et al., 2017) (by marginalizing (2021)). We emphasize that the goal of this comparison was not to claim improved performance on unconditional generation, as unconditional generation is not the goal of guidance, but as more quantitative check for how well guidance covers the distributions over all target classes. To calculate the Inception Score and FID values in Table 2, we used the same library as Campbell et al. (2022).² Intuitively, Inception Score rewards samples that can be well-classifedd, while the FID aims to better capture nuances and diversity. We observed that by marginalizing out the class labels, CTDD-PG can match, in some cases exceed the performance of CTDD on unconditional generation metrics, suggesting that guidance produces class-conditional images with comparable sample quality and
the class labels, done in Dhariwal & Nichol
38

---

Published as a conference paper at ICLR 2025
Figure 5: Randomly chosen class-conditional image samples with guidance strength y = 3. Each row corresponds class. From top bottom, the classes are: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck.
Figure 6: Randomly chosen class-conditional image samples with guidance strength y = 2. Each row corresponds class. From top bottom, the classes are: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck.
39

---

Published as a conference paper at ICLR 2025
Table 2: Sample quality metrics of unconditional samples generated both with and without guidance. The Inception Score (IS) and Fréchet Inception Distance (FID) were calculated using 50,000 samples. CTDD refers to the baseline model from Campbell al. (2022), while CTDD-DG are predictor- guided version of that model with Discrete Guidance for each of two guidance strengths (7).
Method
IS (1)
FID (L)
CTDD
8.74
8.10
CTDD-DG (y 2)
8.91
7.86
CTDD-DG (7 = 3)
9.09
9.04
diversity as its unconditional counterpart. addition, we observed that increasing the guidance strength from 2 to 3 improved the Inception Score further, while worsening the FID due to decreased sample diversity, suggesting that varying guidance strength might allow one to trade-off sample quality and diversity, aligning with previous observations by Dhariwal & Nichol (2021).
F.2 MOLECULE GENERATION
Here, we will present the details concerning dataset construction (Appendix F.2.1), model architec- tures and training (Appendix F.2.2), SMILES string generation (Appendix F.2.3), SMILES string validity (Appendix F.2.4), propert--historrant across wide range of specified molecular property values (Appendix F.2.5), and a comparison of Discrete Guidance to DiGress (Vignac et al., 2023) (Appendix F.2.6).
F.2.1 DATASET CONSTRUCTION
We constructed our dataset as a subset of QMugs (Isert et al., 2021) that itself contains drug-like like molecules extracted from the ChEMBL database (Gaulton et al, 2011). Using RDKit (Landrum, 2010) and the ChEMBL Structure pipeline we preprocessed the molecules of QMugs by (i) standardizing them (removing remaining fragments), (ii) removing stereo-chemical information, and (iii) transform- ing them to canonical simplified molecular-input line-entry system (SMILES) strings (Weininger, 1988). In the following, we will refer canonical SMILES strings as SMILES strings if not stated otherwise. 630,508 unique molecules remained after these preprocessing steps.
Next, we removed molecules with molecular weight of more than 750 Da that corresponds 1.5 times the upper boundary of 500 Da proposed heuristically by Lipinski's 's rule of five (Lipinski, 2004) trade-off between number
for diueesis We have selected this upper boundary for the weight of included molecules and Ktrug-likenes, of the molecules. Figure 7a compares the weight-histogran of the unfiltered molecules and of the molecules with weight below 750 Da. After filtering by weight, we removed molecules with SMILES length above, more than 7 rings, outside [-3, 10]. The Fildmann-Cripeen LogP values have been determined for all molecules with RDKit (including hydrogen atoms in the computation) following the method presented in Wildman & Crippen (1999). As shown in Figure 7b-d, these boundaries (corresponding to the edges of the Included area) were chosen filter molecules in the tails (Tail-filters) of the corresponding histograms and did not dilute our dataset. After these filtering steps, 610,575 unique molecules remained in the dataset that then randomly-splic into train- and holdout-set with ratio of 4:1. We used SMILES strings, padded to a length of 100 tokens, as discrete-state representation æ, resulting in discrete-state space specified by D 100 and a number of S 32 possible tokens (including one pad and one mask token).
LogP value
F.2.2 MODEL ARCHITECTURE AND TRAINING
We trained three different fully-connected neural networks (FCNNs): (i) an unconditional discrete flow model with masking (Campbell et al., 2024) p=))), (z), (ii) number-of-rings (N,) predictor e (Nr t) and (iii) a lipophilicity (LogP) predictor " (LogP|æ. t).
The unconditional discrete flow model with masking (Campbell et al., 2024) were parameterized by
p (x(x1 = Categorical 21 SoftMax [f (zx))
hhans//giithhhccc////ee//////// Structure Pipeline
40

---

Published as a conference paper at ICLR 2025
35000
30000
b
Included
30000
25000
Unfiltered
Number of molecules
(m s 750 Dalton)- filter
25000
20000
Tail-filters
20000
15000
15000
10000
10000
5000
5000
0
0
250
500
750
1000
0
50
100
150
Molecular weight (m)
SMILES length
60000
d
200000
50000
Number of molocuulss
150000
40000
30000
100000
20000
50000
10000
0
-5 -3 -1
11
5 7
10
Lipophilicity (LogP)
Number of rings (N,)
Figure 7: Influence of the filter-operations the cnppert-diistribution of the molecules in the dataset. The Tail-filter in panels b-d corresponded to the exclusion of molecules with a SMILES length larger than 100 tokens, LogP values outside [-3, 10] and more than 7 number of rings.
for mee-oot- 2, where f Px8 + DxS was an FCNN consisting of two hidden layers each containing 20,000 units using ReLU-activation. The Soft function was applied over the S states for each of the D components. When using masking as noising process, the time t is implicitly included in noisy sample I; as the average number of mask tokens in is proportional to t. In agreement with this intuition, we found that it is sufficient to only pass 2, (without requiring to explicitly pass the time) as input to the unconditional denoising model and also to the predictor models discussed in the next paragraph.
We have used two normal likelihoods as predictor models for y E (Nr, LogP) in the form
pa (yl t)
(x))
(36)
for -eneooeee x,, where the mean μ² DxS + R was parameterized by an FCNN with learnable parameters X. with FCNN for y = N, and another for y LogP. Both FCNNs had the same architecture of one hidden layer containing 1,000 units using ReI. U-activvation. The standard
deviation was parameterized by
o²())= = top + (1 (1- (1-t)oğ
1 (unnoised) and (fully noised). We treated of as learnable parameter so that the total set of learnable parameters was given by = (x, ))). For og we used an empirical estimate that we will now briefly motivate. In the fully noised state at f = 0, all tokens of all SMILES strings will be in the masked state so that μ³ will output the same value for all molecules and thus most likely learn to predict the mean of training set's mroperty-distributio.. of can therefore be approximated with the empirical standard deviation of the mroperty-distributie over the entire train corresponding to .N-. 1.24 for the N, predictor
where of and og are the standard deviation time
41

---

Published as a conference paper at ICLR 2025
and J.ogP = 1.66 for the LogP predictor. As N, is ordinal and not continuous quantity, we have also investigated the use of discretized normal distribution for Ny-pprediction finding a comparable performance to the (simpler) continuous normal distribution in Equation 36, and selected the later for our experiments.
We found best performance the holdout set when not using any dropout for the unconditional discrete flow model and a dropout probability of 0.1 for both predictors. All models have been trained with the Adam optimizer (Kingma & Ba, 2015) and learning rate of 0.0001 on RTX 6000A GPU for 100 epochs in case of the unconditional model (corresponding to 263 minutes) and 50 epochs in case of the predictors (corresponding to 8 minutes each).
F.2.3 SMILES STRING GENERATION
During noising (i.e., masking), have fixed the pad tokens meaning that they have not been masked during the noising process as discussed in Appendix D.4. As consequence, the de- noising process also fixed the pad tokens so that pad tokens could be neither added nor removed during denoising. To generate a molecule 21, we started with a fully masked SMILES string Fi (<MASK >; < MASK>> ..... MASK>> >). We then sampled the number of be applied pad-tokens, N<PAD>, from a distribution over the number of pads p(N<PAD>> This distribution <(N><AD>>) ) was obtained empirically from the distribution of SMILES lengths of the molecules in the training set. The fully masked zo is then padded with the sampled number of pads so that
[zola = <MSKK>
de DJI...,DDN<<AAD. <PA>> de (D-NePAD> + +1,..., D).
The padded tokens stayed padded during the entire denoising process, persisting to 21. This approach was inspired by similar procedure that has been employed for diffusion models operating graphs as for example in Hoogeboom et al. (2022) where the number of atoms has been sampled at f 0.
Here, we present the generation settings that were used to generate the molecules shown in Fig. 2 in Section 6.1 and in the following of this Appendix section. We employed Euler integration with step size of 0.001 up to maximal time of 0.98 followed by argmax operation, and used shylor-approximatee guidance for generation with guidance strength of y E {0.2, and a stochasticity value of 1 = 30. For both unconditional and conditional generation, we did not temperature for the unconditional model (corresponding mathematically to setting the temperature of the unconditional model to 1).
F,2.4 SMILES STRING VALIDITY
Only a small fraction of the possible SD SMILES strings are valid and correspond to an actual molecule (i.e., a chemical structure), which a general problem in methods generating SMILES strings (-6mez--Bmmbrree et al., 2018; Krenn al., 2019). Here, verify the validity of generated SMILES string by trying to construct a molecule from it using RDKit. As SMILES string validity is crucial for efficient generation of molecules, we have selected the stochasticity (n 30) that resulted in the highest validity (on average). With the aforementioned generator settings and this optimal stochasticity, we find validity of (12+:3)% for unconditional generation. For conditional generation we find validity values ranging from (4 (for N; = 7) up to (19+:)% (for N; = 0) where values and uncertainties correspond to the means and standard deviations, respectively, of the validity fractions of 100 SMILES string simultancously generated in a batch. Intuitively, this makes sense as one cause for invalidity are non-closing rings. Guiding to zero rings discourages the unmasking of dimensions to tokens related to rings during generation thereby increasing validity, In contrast, guiding to a higher number of rings increases the chance to generate SMILES strings containing non-closing rings thereby potentially decreasing validity. Another direction for future research would be to implement Discrete Guidance for generation of molecular graph-strun -ttuuttruuturess that might naturally increase validity. For molecular generation presented in Section 6.1 and in this Appendix section (Appendix F.2.5 and F.2.6), we sample SMILES strings until we have generated the requested number of valid SMILES strings (i.e., molecules) that was 1,000 here.
42

---

Published as a conference paper at ICLR 2025
N
P'LO p)(x)N)))
Amrcak
My
3.34444 4 7
0.25 0.5 0.75
N,
Tanimoto similarity
=
mnnry
0.5 0.75
N,
Tanimoto similarity
N
7
0.5 0.75
N,
Tanimoto similarity
yeegen
3
7
0.25 0.5 0.75
N,
Tanimoto similarity
N+=4
m
Origge
0ragg-
Jragg
3 4
0.25 0.5 0.75
N,
Tanimoto similarity
N
0.5 0.75
N,
Tanimoto similarity
N
Booger
Jeeget
0.5 0.75 Tanimoto similarity
N,
N!=7
DOUOD
Image-1
3 N,
7
0.25 0.5 0.75 Tanimoto similarity
Figure 8: a-h, Number of rings (N,) histograms of molecules & generated with unconditional flow model px)) and predictor-guided model ([I[N;) for various target Nr values. For both unconditional and guided generation 1,000 molecules (i.e., valid SMILES strings) have been sampled. To obtain p²(nn (1: NN pd (z:) has been guided with the predictor p (NN x:) using guidance strength of y with Discrete Guidance. i-p Distribution of the average Tanimoto similarity (Tanimoto, 1958) of each generated molecule to the others. q-x, First four molecules sampled from p (=) in corresponding row panels a-h, where we have added their N, (=#rings) values as determined by RDKit (Landrum, 2010).
43

---

Published as a conference paper at ICLR 2025
2
p*00 p P'GlLoop"")
Pop-1ta
0.5 0.75
Logp
Tanimato similarity
LogP==0
Log e20
Lag -230
140
0.25 0.5 0.75
LogP
Tanimoto similarity
LogP*=2
+0+0
1og
0 0.25 0.5 0.75
LogP
Tanimata similarity
LogP-=4
Atunch - -odh
gosoo
0.75 Tanimoto similarity
Logl
LogP*
4igh
0.5
LogP
Tanimoto sinilarity
LogP"=8
Log
Jop
Jagh Art
12
0 0.25
0.5 0.75 Tanimato similarity
LogP
LogP*=10
LogP
Tanimoto similarity
Figure 9: a-g, Lipophilicity (LogP) histograms of molecules æ generated with an unconditional flow model p" (xr) and peddictor-guided model y (x:[LogP*) for various target LogP" values. For both unconditional and guided generation 1,000 molecules (i.e., valid SMILES strings) have been sampled. To obtain pd (ax LogP"), ), p" (z) has been guided with the predictor pd (LogP*|22) using a guidance strength of y = with Discrete Guidance. h-n Distribution the average Tanimoto similarity (Tanimoto, 1958) of each generated molecule to the others. o-u, First four molecules sampled from ( [=:[Log in the corresponding row in panels a-g. where we have added their LogP values determined by RDKit (Landrum, 2010).
F.2.5 WIDE RANGE CONDITIONAL GENERATION
In Figure of Section 1. only showed two selected target values for the number of rings (N,) and lipophilicity (LogP). Here, we present the property-histoge histogram of molecules generated using predictor guidance 7 (xrly) for wide range of target values for N, (Figure 8) and for LogP (Figure 9). As
44

---

Published as a conference paper at ICLR 2025
in Figure 2, compared the property- histogram obtained by guidance to the property- property-histogree histogram of molecules generated with the unconditional model p (z). 1,000 valid SMILES strings (i.e., molccules) were generated with guidance strength of y using Discrete Guidance. We observed a clear shift of the distribution according to the demanded target property values (Figures 8 and 9). are sharp for low N; and broadens as Nł is increased (Figure 8). The
The N, property-histogran Logl' distribution is broad for Log!"* values in the tails and sharpens for LogP" in the vicinity of the mode of the unconditional distribution (Figure 9).
We assess the diversity of the generated molecules by determining the Tanimoto similarity (Tanimoto, 1958) of their Morgan fingerprints (Morgan, 1965; Rogers & Hahn, 2010) (with radius 2 and length 1024) constructed with RDKit (Landrum, 2010). Note that a Tanimoto similarity value of 1 is obtained for identical fingerprints, while a value of 0 indicates no similarity between two fingerprints. Figure 8 and 9, we display the distribution of the average Tanimoto similarity of each generated molecule to all the others. The average Tanimoto similarity distributions of molecules obtained by unconditional sampling and guided sampling overlap for most specified target properties. However, we observed a shift towards higher values (i.e., slightly less diverse) for guided generation towards properties in the tails of the property distributions (see Figure Si.o.p and Figure 9h,m,n).
both
In both Figure 8 and 9, we display the first four generated molecules with their ground truth values as extracted from RDKit (Landrum, 2010). In analogy the discussion in Section 6.1, can visually inspect the generated molecules with respect to the target properties. While the majority of the shown molecules contain the specified number of rings, a minority has one ring more or less than requested. Note that this small impurity is already reflected in the -osstryyisstogsrmms shown in Figure 8a-h and could be counteracted by increasing the guidance strength. In Figure we observe a transition from molecules generated with primarily polar bonds (e.g., carbon-oxygen, carbon-nitrogen, or oxygen-hy oxygen-hydrogen hydrogen) to primarily non-polar (e.g., carbon-carbon bonds as we increase LogP", which is indeed what we observed (Figure 2g.h). This observation is in agreement with the intuition that the lipophilicity of a molecule tends to be inversely related to the polarity of its bonds.
F.2.6 COMPARING DISCRETE GUIDANCE TO DIGRESS
As discussed in Appendix E,, DiGress has been developed by Vignac et al. (2023) as framework to guide discrete-time discrete-space diffusion models for graph generation. Here, we compare our method Discrete Guidance to DiGress. For this comparison, we use DiGress to guide a discrete-time discrete-space diffusion model with two discrete-time prediction models with the same architecture (and trained in the same way) as their continuous-timg time counterparts described in Appendix F.2.2. For this comparison, we generated 1,000 molecules guided with the different frameworks DiGress and guidance (TAG)-towardee towards
our method Discrete Guidance with exact as well as specified property values in the number of rings (N₂)) and lipophilicity (LogP"). As metric for the performance of this guided generation, we chose the mean absolute error (MAE) between the specified and RDKit-detrmmieed (Landrum, 2010) property values of the generated molecules and used its standard error as measure of uncertainty. Moreover, we determined the statistical significance of the difference central tendency of the distribution of molecular properties between frameworks with a two-sided Mann- Mann-Whitney U test (Mann & Whitney, 1947) using its implementation in the stats module of the scipy python package." ?
We find that Discrete Guidance achieves statistically significantly better results across wide range of six different specified property values (N₂ E (1, and LogP E {-2, 4, 10)) and for three different guidance strengths 7 E {0.2, 1, 1, (Figure 10). The exact version (DG-exact) of Dis- crete Guidance performed either (statistically significant) better than or equally well as the Taylor- approximated version (DG-TAG) across these specified property and guidance strengths. From these results, we believe that there are two factors at play: (1) sampling with flow models (using Discrete Guidance) allows the unmasked tokens to be corrected later stages of the denoising process, which could be advantageous for guided generation of SMILES strings. (2) the approximation error of the Paylor-approximation might guide generation towards wrong property values in certain scenarios.
45

---

Published as a conference paper at ICLR 2025
=* (y=0.2)
= (F=1)
N (y=2)
1,5
g
MAB
1.0
0.5
0.0
31=3 (y=0.2)
(x=1)
NF (y=2
10 b
MAE
0.5
0.0
5 (y-0.2)
5 (1=1)
2.0
MAE
1.0
0.0
LogP*= (y=0.2)
2ogP*=-2(pe
LogP*=-2 (y=2)
P
4.0
MAE
2.0
D.S.
0.0
LogP*= =4 (y=0.2
LogP*= =4 (y=l)
LogP*=4 =4 (y=2)
1.5
MAB
1.0
0.5
0.0
LogP*=10 (y=0.2
LogP*=10 (y=l)
10g
7.5
MAE
5.0
2.5
0.0
DiGress
DG-TAG
DG-Exart
DiGress
DG-TAG
DG-Exact
DiGress
DG-TAG
DG-Exact
Figure 10: Mean absolute error (MAE) between specified target properties (number of rings N and lipophilicity LogP"), and properties of molecules generated by guiding to these values. DiGress was used to guide a discrete-time discrete diffusion model. DG-Exact and DG-TAG correspond to continuous-time masking discrete flow-matching model guided applying Discrete Guidance (DG) with exact guidance and Taylor approximated guidance (TAG), respectively. Guidance has been performed at a guidance strength of 7 0.2 (a-f), 7 (g-l), and error bars correspond to MAEs and their standard error, respectively, evaluated over 1,000 generated molecules. An asterisk (*) denotes statistical significance difference in MAE between the two models under the start and end point of the lines below it (two-sided Mann-Whitney U test, p < 0.05), while denotes lack of statistical significance.
(m-r). Bar heights and
46

---

Published as a conference paper at ICLR 2025
Cless Conditional rao
Class
Conditional FBD
Class 2
Tlass-Cndittonll FBD
Class
Class: Conditional F&D
Class
100
Mathed
80
DG-FFG
300
200
60
100
200
100
40
100
0.2
0.4
0.6
0.8
0.2
0.4
0.6
0.2
0.4
0.6
0.25
0.50
0.75
Class Probability
Class Probabilitt
Class Probabllity
Class Probability
Class- Class-Cone Coss-Condian Coss-Coniiioaaal tional FBD
Cless
cionalloonll FBD
Class 6
Class-C Class-Cond tinnl FBD
Cless
Class: Cond FBD
Class 0
200
400
500
500
250
100
0.0
0.5 Class Probability
1.0
0.5
1.0
0.2
0.4
0.6
0.1
0.2 Class Probability
0.3
0.4
Class Probsbility
Class Probability
Figure 11: Classifier-free guided cell type conditioned enhancer generation on eight cell type classes. For the conditonn FBD conditioned on the target class, lower is better, while for the average target Class Probability, higher is better. Each point in each panel arises from 1,000 sampled sequences for one guidance strength. For DirFM-CFG, we used the same guidance factors used in that work, namely 7 E {1, 6, 10, 203. DG-PFG used guidance strength y {1, 2, 5, 10, 20). Mean and standard deviation both metries were estimated over five bootstrap replicates (the standard deviations are small and are readily discernible). For each method, guidance strengths increase from the left to the right in each panel.
F.3 ENHANCER DNA DESIGN
In this section, we include the setup and additional results of the enhancer DNA experiment, including description of the usage of Dirichlet FM (Appendix F.3.1), model architectures and training procedures (Appendix F.3.2), sampling procedures (Appendix F.3.3), additional results on predictor guidance (Appendix F.3.4) and results on predictor-free guidance (Appendix F.3.5).
F.3.1 DIRICHLET FM
For Dirichlet FM with both classifier guidance (DirFM-CG) and classifier-free guidance (DirFM- CFG), we used the model checkpoints provided in the official library.* We built on their codebase to evaluate the class-conditional FBD and target class probability, using the same oracle classifier checkpoint provided from the library for evaluation. For each target class, at each guidance strength, we sampled 1,000 sequences for evaluation. We also experimented with sampling 2,000, 5,000 or 10,000 sequences and observed similar results for the class-conditional FBD and the average target class probability. We observed the variances of the class-conditional FBD and the average target class probability between samples produced with different random seeds to be small. We verified with the authors to ensure that the models were used and evaluated correctly. The reproduced results closely match those reported in Stärk al. (2024). The small discrepancies sampling random seeds; different number of generated sequences were used for evaluation (we used 1,000 sequences, they used 10,000); different number of sequences from the training set were used as the reference set for calculating the class-conditions FBD (we used all sequences of the target class from the training set, whereas they first randomly sampled 10,000 sequences from the training set, then subsetted to those from the target class).
potentially due to: different
F.3.2 MODEL ARCHITECTURE AND TRAINING
For both the denoising model and the classifier model for Discrete Guidance, used the archi- tectures as Dirichlet FM. The denoising model consists of 20 layers of ID convolutions interleaved with time embedding layers, with hidden dimension size 128. The classifier model has similar architecture with 5 layers of 1D convolutions, and the final representations are mean-pooled and fed into a 2-layer feed-forward network. For Discrete Guidance, we used similar training hyperparameters as Dirichlet FM. For the unconditional denoising model, we trained for 400 epochs and used FBD on the validation set for early stopping, with learning rate of 0.0005 and 500 linear warmup steps. For
47

---

Published as a conference paper at ICLR 2025
the conditional denoising network used in PFG, trained with a conditioning ratio (the fraction of times the model is trained with a class label as input instead of the no-class token as input) of 0.7 for 300 epochs and used validation loss for early stopping. For DiGress, trained discrete-time, discrete diffusion model using the same training hyperparameters as the flow-matching models used in Discrete Guidance, using 100 discrete time steps.
Since Stärk et al. (2024) perform guidance on the continuous space of the simplex, whereas both Discrete Guidance and DiGress work in the native, discrete DNA sequence space, the classifier models used for guidance for these approaches cannot be identical. Consequently, we used the classifier model of Stärk al. (2024) for guidance of DirFM-CG, and we trained separate classifiers for Discrete Guidance and DiGress, but adopting the same architecture as the classifier model of Stärk et al. (2024) as detailed above. all cases, these classifiers take in a time and correspondingly noised sample, where the noise levels correspond to those used to train the paired unconditional model. Notably, the same oracle classifier was used for all methods for evaluation. In DirFM-CG MGG, the classifier takes in sample from the probability simplex, whereas for Discrete Guidance and DiGress, the classifier takes in a sequence that is partially masked. We initially observed a discrepancy between the noisy classifier and the clean classifier trained on un-noised data. To mitigate this, found it helpful to train the noisy classifier using samples generated by the unconditional model and labeled by the clean classifier. We trained the noisy classifier for 400 epochs, using 1 million sequences sampled from the unconditional model and labeled by the clean classifier. For DiGress, we trained a noisy classifier with the same architecture on the same data under a discrete-ting process. We used a learning rate of 0.001 with the Adam optimizer (Kingma & Ba, 2015) and a batch size of 256 for all models. We trained on one RTX 6000A GPU. Training each model for 400 epochs takes 5 hours.
forward noising
F.3.3 SAMPLING
For sampling from Discrete Guidance, used Fuler integration with step size of 0.01. We used stochasticity level, 77. of 0 in sampling as it leads to the best unconditional FBD. For Dirichlet FM, we used the same number of integration steps (100) as Stärk et al. (2024). For DiGress, sampling uses the same number of discrete time steps as in training, which is 100.
As for guidance strength, for Dirichlet FM, we used the same guidance strength used in Stärk et al. (2024): E {1. 3, 6, 10, 20}. For DirFM-CG, we additionally used stronger guidance strengths, Y E (50, 100, 200, 500, 1000, 2000) in an attempt to improve its performance further from the results presented in Stärk et al. (2024). We increased the guidance strengths until DirFM-CG became unstable and unable to produce samples. For DG-PG, DG-PFG and DiGress, we used guidance strengths 7 E {1, 2, 5, 10, 20).
F.3.4 PREDICTOR GUIDANCE
We evaluated on total of eight cell type class, including the three classes selected for evaluation in Stärk et al. (2024). These classes were randomly sampled among the classes where the oracle classifier has relatively good performances, as measured by AUROC and AUPR on the test set (Figure 13). The classes are labeled as {16.5 5. 4, 33, 68, 9, 12) in the dataset. For predictor guidance, we observed that DX-Exact, DG-TAG and DiGress perform comparably across the cell type classes, with each exhibiting slight advantage over others on specific classes and metries, while outperforming DirFM-CG (Figure 3). We also note that in practice, one metric that might be informative is the proportion of generated samples that has the target class as the most likely predicted class, along with the diversity of these samples. We observed that DG-Exact, DG-TAG and DiGress also perform comparably under these metrics (Figure 12).
F.3.5 PREDICTOR-FREE FREE GUIDANCE
We compared Discrete Guidance with predictor-free guidance (DG-PFG) with Dirichlet FM with classifier-free guidance (DirFM-CFG) on the same eight cell type classes as in the predictor guidance evaluation (Figure 11). On the whole, we observed that both methods perform comparably, with each showing slight advantages for different cell types and metrics. In some cases, we observed both metrics to worsen at high guidance strengths for both DG-PFG and DirFM-CFG. We hypothesize that this behavior may be due the generative models focusing on regions of the sequence space
48

---

Published as a conference paper at ICLR 2025
Class
Class
Class
Class 4
0.8
Successfi)
0.0
Success
0.6
Successt
0.75
Success(%)
0.6
0.50
0.4
DG- Ex-Exxct
0.4
0.2
DiGress
DG TAG
0.25
0.2
30
20
10
70
10
70
10
70
Guidance Strength
Guidance
Guidance Strength
Guicance Strength
Cless 5
Cless
Class
Cless
Successt
0.75
Success95)
0.75
Success(S)
Success(%)
0.5
0.50
0.50
0.50
0.4
0.25
0.25
Guidance Strength
Guidance Strength
Guidance Strength
Guicance Strength
Alternative metrics on classifier-guided cell type conditioned enhancer generation on eight cell type classes. We defined sampled sequence success if the oracle classifier predicts the target class as the most likely class for the sequence. For each method, we sampled 1,000 sequences with increasing guidance strength and calculated the percentage of successful samples. DG-Exact, DG-TAG and DiGress all used guidance strength y E 21, 5, 10, 20). Intensity of color of the circle markers indicate the average pairwise hamming distance of the sampled sequences, where darker is higher diversity. All methods have average pairwise hamming distances between 340 and 380 for all classes and guidance factors.
Figure 12:
train
600
0.20
1800
2400
33
0.15
59
NUPR
20
0.10
19
18
1324
0.05
10
17
77
48
73
35
44
29
14
50
87
3
7
49
30
74
66
7650
58
0.00
79
80
0.55
0.75
AUROC
Test set performance of the oracle classifier used for enhancer generation evaluation. The oracle is the same the one used in Stärk et al. (2024). Each class is colored by the number of samples the training set. Per-class AUROC and AUPR are computed with the one-vs-rest approach, where each class is iteratively treated as the positive class and all other classes are treated as the negative.
Figure 13:
that deviate from the data distribution. Alternatively, this could be due to the model having difficulty sampling from the correct temperature--anealle distributions. We leave investigations of this issue for future research.
49

---

Published as a conference paper at ICLR 2025
Table 3: Recovery the PDB test set provided by Dauparas et al. (2022).
Method
Recovery
ProteinMPNN (T =0.5)
45.37%
ProteinMPNN (T = 0.2)
47.56%
ProteinMPNN (T =0.1)
47.92%
ProteinMPNN (T = -0.01)
47.99%
FMIF (T = 0.1)
49.22%
F.4 STABILITY-CONDITIONN PROTEIN GENERATIVE MODELS
F.4.1 FMIF TRAINING
We trained flow-based inverse folding closely based the ProteinMPPNN architecture (Dauparas et al., 2022). Specifically, we used the ProNeinMPNN architecture with encoder and 4 decoder layers, and we removed the autoregressive mask. We trained with backbone noise of 0.1 using 30 nearest-neighbors to construct the graph and kept all other hyperparameters the same as the ProteinMPNN architecture. FMIF was trained using the sow-matching training objective (Campbell et al., 2024) with a masking noise process. The model was trained using the training set of the PDB dataset proposed Dauparas et al. (2022). The model was trained for 400 epochs with the Adam optimizer and learning rate of 0.001 (Kingma & Ba, 2015). To sample from the trained model we used Euler integration with a step size of 0.01 and stochasticity level, 7/, of 1. To compare our model with ProteinMPNN, their provided training scripts. Table shows the sequence recovery on the PDB test set provided by Dauparas et al. (2022). FMIF shows improved recovery over ProteinMPNN, All training was done on one RTX 6000A GPU.
re-trained ProteinMPNN with the same amount of backbone noise using
F.4.2 STABILITY PREDICTION
The regression model used to predict AAG given protein sequence and structure was built using a similar architecture to FMIF, but with a few modifications. Specifically, the final layer is mean-pooled and then mapped with an MLP consisting of a 128 > 128 linear layer followed by a ReLU activation function before being mapped with linear layer single scalar.
We trained our model using the data provided by Tsuboyama et al. (2023), specifically the file (Tsuboyama2023. 2attmmaa23...aasse2222222 3 2i....2222236sss We pre-processed the data remove any sequences that had a difference greater than 0.5 in the average AG measurement between replicates. We also mapped all sequences with measurements that were outside the dynamic range of the experiment (>> 5 and < 1) to the nearest measurable value (5 or 1). We created a validation set by clustering all of the data based on the wild-type using the WT_cluster column. During training we pass every sequence through our stability prediction model along with their corresponding wild-type sequences. To force the model to learn AAG, a mean-squared error loss is computed from the difference in predicted folding free-energies between a sequence and the wild-type and the true difference in folding free- free-energies between the sequence and the wild-type. Models were trained using Adam with weight-decay of 0.0001 and learning rate of 0.0001. We observed much better generalization on the validation set the subset of the model weights before the mean-pooling was initialized at the corresponding FMIF model weights. During training used the average Spearman's 's correlation among each validation cluster to decide the optimal number epochs. Our best model had an average Spearman's 's correlation of 0.80, demonstrating ability to generalize to novel structures and sequences (Figure 14). The final stability model was then trained on the full dataset. All models trained single RTX 6000A GPU.
F.4.3 STABILITY GUIDANCE
To perform guidance, for each of the evaluated proteins, we created protein-specific noisy classifier to predict p( ((AAG 2 0| xe, c). The classifier was constructed using the same architecture as the stability regression model but with final sigmoid activation function. Model weights were initialized at the weights of the stability regression model. The model was trained for 30 epochs using only the data for the particular protein that wish to perform guidance on. The model was trained using
50

---

Published as a conference paper at ICLR 2025
WT Cluster: 194
WT Cluster: 16
WT Cluster: 202
WT Cluster: 113
True &G
True AG
True
-1
-2
-6
-5
-4
Predicted AG
Predicted AG
Predicted AG
Predicted AG
WT Cluster: 17
WIT Cluster: HHH
WIT Cluster: 170
WT Cluster: 36
True AG
True AG
True AG
Predicted -2
-2
-5.0
-2.5
-4
Predicted 0
-2
Predicted AG
Predicted AG
WT Cluster: 132
WT Cluster: 168
WT Cluster: 157
WT Cluster: 100
True 3
True 6G
True DG
True AG
-2
-2 Predicted &G
-2 Predicted &G
Predicted AG
Predicted AG
Figure 14: True versus predicted AG predictions for 12 clusters from the validation set.
a negative log- ligeliikl loss and the Adam optimizer with a learning rate of 0.0001. We initially observed large discrepancy between the noisy classifier and the actual clean stability regression model. To help mitigate this, we found it helpful to further train the noisy classifier on samples generated from the guided model and labeled with the clean regression model. Specifically, generated 1,000 new sequences by sampling using FMIF-DG-TAG with guide strength of 0.1. Each of these sequences was then labeled with the clean regression model and added the original training set of labeled sequences. The noisy classifier was then trained for an additional 30 epochs. Guidance was performed using the approximate guide-adjusted rates. As with the non-guided FMIF model, we used Euler integration with a step size of 0.01 and stochasticity level of 1.
F.4.4 BASELINES
To evaluate DiGress, we first trained discrete-time discrete diffusion inverse folding model. This model was trained using the same architecture and training hyperparameters as FMIF. Consistent with the number of euler-integration steps used for sampling from FMIF and FMIF-DG, we used 100 discrete time points for training the DiGress diffusson model. The noisy classifier also used the same architecture and training procedure as was used for TMIF-DG-EST and FMIF-DG-TAG.
To generate sequences from ProteinMPNN MPNN GitHub repository." We used the pre-trained weights for the model trained with backbone noise 0.1 (the same noise used in FMIF) provided in the GitHub repository.
used the generation scripts provided in the Protein-
F.4.5 METRICS
All generated sequences were folded using local version of ColabFold (Mirdita al., 2022; Jumper et al., 2021). To mitigate any bias, we use the sequence only mode which does not use structural templates multiple sequence alignments. We defined success sequences that were generated with RMSD < 2 and AAG 2 O. Diversity was computed as the average pairwise Hamming distance among the generated sequences.
51

---

Published as a conference paper at ICLR 2025
F.4.6 DETAILED RESULTS
Below, we show detailed results for each of the eight proteins that we evaluated (Tables 4-11).
Table Inverse-folding guided results for protein 5KPH evaluated by protein stability, folding into correct structure, and diversity. We defined success sequences that were generated with RMSD < 2Á and AAG 2 O. Diversity was computed as the average pairwise Hamming distance among the generated sequences. (x(x c) Temp the temperature of the baseline structure-conditionel model without stability guidance, while parenthetical denotes the guidance strength. ProteinMPNN performs inverse-folding without any stability awareness, whereas FMIF refers to our own unguided inverse folding model without any stability awareness. DiGress preforms (approximate) predictor- guidance on discrete-time diffusion inverse folding model. FMIF-DG-TAG refers to our TAG-
approximated predictor-guidance, whereas FMIF-DG-Exe DG-Exact refers to our exact predictor-guidance both applied to FMIF.
Method
Pa(x |e) Temp
AAG > % (t)
RMSD 2Å % (t)
Diversity (t)
Success (1)
PPONeinMPNN
1.0
0%
47%
$3.07
0%
0.1
100%
27.98
1%
100%
27.42
FMIF
1.0
0%
75%
50.29
0%
0.1
2%
100%
23.13
2%
0.01
4%
100%
21.82
4%
DiGress (n 1)
0.1
0%
100%
18.65
0%
DiGress (7 10)
0.1
0%
100%
16.76
0%
DiGress (7 100)
0.1
0%
100%
22.54
0%
FMIF-DG-TAG (7 1)
0.1
9%
100%
24.15
9%
FMIF-DG-TRR (7 = 10)
0.1
52%
100%
23.26
52%
FMIF-DG-TAG (7 = 100)
0.1
94%
100%
20.82
94%
FMIF-DG-EXxa (y = 1)
0.1
10%
100%
24.66
10%
FMIF-DG-ENa (7 = 10)
0.1
58%
100%
25.78
58%
FMIF-DG-Exact (7 = 100)
0.1
100%
100%
19.72
100%
Table Inverse-folding guided results for protein 1FOM evaluated by protein stability, folding into correct structure, and diversity. We defined success sequences that were generated with RMSD < 2Á and AAG 2 O. Diversity was computed as the average pairwise Hamming distance among the generated sequences. Px(x c) Temp the temperature the baseline structure-conditionee model without stability guidance, while parenthetical 7 denotes the guidance strength. ProteinMPNN performs inverse-folding without any stability awareness, whereas FMIF refers to our own unguided inverse folding model without any stability awareness. DiGress preforms (approximate) predictor- guidance on discrete-time diffusion inverse folding model. FMIF-DG-TA refers to our TAG- approximated wredictor-guddnnee whereas FMIF-DG-Fxaa refers to our exact predictor-gut seafector-guidnce, both applied FMIF.
Method
Pa [e) Temp
AAG > 0% (t)
RMSD 2Å % (t)
Diversity (t)
Suecess (1)
ProNeinMPNN
1.0
0%
15%
45.17
0%
0.1
14%
95%
17.70
16.53
FMIF
1.0
0%
24%
44.95
0%
0.1
77%
100%
12.44
77%
100%
10.30
77%
DiGress (r 1)
0.1
36%
95%
12.40
34%
DiGress (1 10)
0.1
100%
11.11
66%
DiGress (7 100)
0.1
11.81
71%
FMIF-DG-TAL (7 1)
0.1
79%
100%
12.19
79%
FMIF-DG-TE -D-GGG (7 = 10)
0.1
96%
100%
11.91
96%
FMIF-DG-TAG (7 = 100)
0.1
69%
100%
8.98
69%
FMIF-DG-ExacE (y =
0.1
74%
100%
12.53
74%
FMIF-DG- DIFF-DG-Exxlll (7 10)
0.1
97%
100%
12.36
97%
FMIF-DG-Fxac (> 110))
0.1
100%
100%
10.13
100%
52

---

Published as a conference paper at ICLR 2025
Table 6: Inverse-fodding guided results for protein 6M3N evaluated by protein stability, folding into correct structure, and diversity. We defined success sequences that were generated with RMSD) < 2Á and AAG 2 O. Diversity was computed as the average pairwise Hamming distance among the generated sequences. Px(x c) Temp the temperature the baseline structure-conditioned model without stability guidance, while parenthetical denotes the guidance strength. ProteinMPNN performs inverse-folding without any stability awareness, whereas FMIF refers to our own unguided inverse folding model without any stability awareness. DiGress preforms (approximate) predictor- guidance on discrete-time diffusion inverse folding model. FMIF-DG-TAG refers to our TAG-
approximated reedictor-guidance whereas FMIF-DG-Exan refers to our exact predictor-guidanee both applied to FMIF.
Method
Pa xx c) Temp
AAG > % (t)
RMSD 2Á % (1)
Diversity (t)
Success (1)
ProteinMPNN
1.0
0%
9%
41.03
0%
0.1
92%
99%
14.04
91%
0.01
99%
13.66
89%
FMIF
1.0
9%
30%
39,97
7%
0.1
100%
99%
12.16
99%
0.01
100%
99%
12.48
99%
DiGress (n 1)
0.1
97%
94%
8.93
91%
DiGress (7 10)
0.1
100%
100%
8.41
100%
DiGress (7 100)
0.1
100%
99%
9.98
99%
FMIF-DG-TAG (7 1)
0.1
100%
100%
12.43
100%
FMII-DG-IAA (7 = 10)
0.1
100%
99%
13.01
99%
FMIF-DG-TAG. (7 = 100)
0.1
100%
100%
12.11
100%
FMIF-DG-Exac (y = 1)
0.1
100%
97%
12.29
97%
DMII-DDG-Exac (7 10)
0.1
100%
99%
11.96
99%
FMIF-DG-ENae (7 = 100)
0.1
99%
43%
25.48
42%
Table Inverse-folding guided results for protein 106X evaluated by protein stability, folding into correct structure, and diversity. We defined success sequences that were generated with RMSD < 2Á and AAG 2 O. Diversity was computed as the average pairwise Hamming distance among the generated sequences. Px(x c) Temp the temperature the baseline structure-conditionee model without stability guidance, while parenthetical 7 denotes the guidance strength. ProteinMPNN performs inverse-folding without any stability awareness, whereas FMIF refers to our own unguided inverse folding model without any stability awareness. DiGress preforms (approximate) predictor- guidance on discrete-time diffusion inverse folding model. FMIF-DG-TA refers to our TAG- approximated rredictor-uidannee whereas FMIF-DG- refers to our exact predictor-git sedlector-guidacee, both applied to FMIF.
Method
Ps (x [e) Temp
AAG > U % (t)
RMSD 2Å % (t)
Diversity (t)
Success (1)
ProNeinMPNN
1.0
0%
26%
49.47
0%
0.1
90%
24.33
24%
85%
23.96
27%
FMIF
1.0
0%
34%
47.66
0%
0.1
56%
98%
18.60
54%
48%
99%
16.82
47%
DiGress (7 1)
0.1
1%
100%
14.47
1%
DiGress (1 10)
0.1
0%
100%
11.49
0%
DiGress (7 100)
0.1
100%
14.84
FMIF-DG-TAGE (7 1)
0.1
61%
100%
17.58
61%
FMIF-DG-TE DG-TAGG (7 = 10)
0.1
83%
99%
18.47
83%
FMIF-DG-TAG (7 = 100)
0.1
96%
97%
15.34
93%
FMIF-DG-Exae (y = 1)
0.1
66%
98%
19.30
64%
FMIF-DG- DDG-Exacl (7 10)
0.1
81%
100%
16.94
81%
FMIF-DG-Fxac (> = 100)
0.1
99%
98%
20.97
97%
53

---

Published as a conference paper at ICLR 2025
Table 8: Inverse-folding guided results for protein 2JT1 evaluated by protein stability, folding into correct structure, and diversity. We defined success sequences that were generated with RMSD) < 2Á and AAG 2 O. Diversity was computed as the average pairwise Hamming distance among the generated sequences. Px(x c) Temp the temperature the baseline structure-conditioned model without stability guidance, while parenthetical denotes the guidance strength. ProteinMPNN performs inverse-folding without any stability awareness, whereas FMIF refers to our own unguided inverse folding model without any stability awareness. DiGress preforms (approximate) predictor- guidance on discrete-time diffusion inverse folding model. FMIF-DG-TAG refers to our TAG-
approximated rredictor-guidance whereas FMIF-DG-Exan refers to our exact predictor-guidanee both applied to FMIF.
Method
Pa xx c) Temp
AAG > % (t)
RMSD 2Á % (1)
Diversity (t)
Success (1)
ProteinMPNN
1.0
0%
13%
47.15
0%
0.1
8%
88%
17.29
6%
0.01
6%
17.31
2%
FMIF
1.0
2%
14%
45.11
1%
0.1
14%
88%
14.33
0.01
10%
89%
13.27
9%
DiGress (n 1)
0.1
11%
96%
16.23
11%
DiGress (7 10)
0.1
14%
98%
14.17
14%
DiGress (7 100)
0.1
100%
12.58
46%
FMIF-DG-TAG (7 1)
0.1
16%
92%
14.58
16%
FMII-DG-IAA (7 = 10)
0.1
26%
89%
11.98
21%
FMIF-DG-TAG. (7 = 100)
0.1
85%
75%
13.30
63%
FMIF-DG-Exac (y =
0.1
21%
90%
14.26
20%
DMII-DDG-Exac (7 10)
0.1
26%
97%
10.51
26%
FMIF-DG-ENae (7 = 100)
0.1
91%
77%
17.31
68%
Table Inverse-folding guided results for protein 2JN4 evaluated by protein stability, folding into correct structure, and diversity. We defined success sequences that were generated with RMSD < 2Á and AAG 2 O. Diversity was computed as the average pairwise Hamming distance among the generated sequences. Px(x c) Temp the temperature the baseline structure-conditionee model without stability guidance, while parenthetical 7 denotes the guidance strength. ProteinMPNN performs inverse-folding without any stability awareness, whereas FMIF refers to our own unguided inverse folding model without any stability awareness. DiGress preforms (approximate) predictor- guidance on discrete-time diffusion inverse folding model. FMIF-DG-TA refers to our TAG- approximated rredictor-uidannee whereas FMIF-DG-Fxee refers to our exact predictor-gut pedlictor-guidacce, both applied to FMIF.
Method
Ps (x [e) Temp
AAG > % (t)
RMSD 2Å % (t)
Diversity (t)
Success (1)
ProNeinMPNN
1.0
0%
1%
41.87
0%
0.1
0%
32%
15.77
0%
36%
14.76
FMIF
1.0
0%
0%
40.44
0%
0.1
40%
14.06
8%
15%
32%
13.03
DiGress (7 1)
0.1
0%
56%
11.98
0%
DiGress (1 10)
0.1
9%
80%
10.94
8%
DiGress (7 100)
0.1
4%
56%
11.84
4%
FMIF-DG-TACE (7 1)
0.1
20%
29%
13.21
8%
FMIF-DG-TE DG-TAGG (7 = 10)
0.1
45%
26%
10.06
17%
FMIF-DG-TAG (7 = 100)
0.1
20%
1%
10.28
6%
FMIF-DG-Exae (y = 1)
0.1
21%
35%
13.18
10%
FMIF-DG- DDG-Exacl (7 10)
0.1
60%
69%
10.06
50%
FMIF-DG-Fxac (> = 100)
0.1
78%
39%
6.64
28%
54

---

Published as a conference paper at ICLR 2025
Table 10: Inverse-folding guided results for protein 6ACV evaluated by protein stability, folding into correct structure, and diversity. We defined success as sequences that were generated with RMSD < 2Á and AAG O. Diversity
computed as the average pairwise Hamming distance among the generated sequences. Po(x c) Temp the temperature the baseline snnectre-conditionn model without stability guidance, while parenthetical denotes the guidance strength. ProteinMPNN performs inverse-folding without any stability awareness, whereas FMIF refers to our own unguided inverse folding model without any stability awareness. DiGress preforms (approximate) predictor- guidance on a discrete-ting diffusion inverse folding model. FMIF-DG-TAC refers to our TAG- approximated gredictor-guidanee whereas FMIF-DG-EAN refers our exact predictor-guidance both applied to FMIF.
Method
Px ce) Temp
AAG > % (1)
RMSD - 2Á % (1)
Diversity (t)
Success (1)
ProtcinMPNN
1.0
0%
1%
44.73
0%
0.1
2%
12%
15.79
2%
0.01
2%
14%
14.55
1%
FMIF
1.0
0%
0%
45,08
0%
0.1
10%
36%
14.01
6%
0.01
18%
45%
13.67
13%
DiGress (7
0.1
0%
17%
15.74
0%
DiGress (7 10)
0.1
0%
5%
13.18
0%
DiGress (7 = 100)
0.1
45%
30%
14.53
20%
(7
0.1
28%
43%
13.27
15%
FMIF-DG-TAG (7 10)
0.1
84%
59%
9.12
54%
FMIF-DG-TTA (7 100)
0.1
97%
75%
6.66
74%
FMIF-DG-Exan (7
0.1
26%
39%
13.97
15%
FMIF-DG-Exact (y 10)
0.1
71%
55%
9.93
44%
OMIF-DG-EXaa (7 100)
0.1
69%
60%
9.46
46%
Table 11: Inverse-folding guided results for protein 2K5N evaluated by protein stability, folding into correct structure, and diversity. We defined success sequences that were generated with RMSD < 2Á and AAG 2 O. Diversity was computed as the average pairwise Hamming distance among the generated sequences. Po(x Temp the temperature of the baseline cructure-conditiione model without stability guidance, while parenthetical denotes the guidance strength. ProteinMPNN performs inverse-folding without any stability awareness, whereas FMIF refers inverse folding model without any stability awareness. DiGress preforms (approximate) predictor- guidance on discrete-time diffusion inverse folding model. FMIF-DG-TA. refers to our TAG- approximated predicto-guiddnce, whereas FMIF-DG DEFF-DG-Exctttt refers to our exact predictor-guidane both applied FMIF.
own unguided
Method
Polx |c] Temp
AAG
% (t)
RMSD 2Å % (t)
Diversity (t)
Success (1)
ProteinMPNN
1.0
0%
47.98
0%
0.1
0%
63%
25.26
0%
0.01
0%
70%
24.90
0%
FMIF
1.0
0%
6%
45.55
0%
0.1
3%
76%
14.89
2%
0.01
1%
72%
13.64
0%
DiGress
0.1
0%
94%
14.73
0%
DiGress 10)
0.1
0%
99%
12.38
0%
DiGress (7 100)
0.1
0%
47%
14.13
0%
FMIF-DG-TAC (7 1)
0.1
7%
85%
14.84
6%
FMIF-DG-TAG (7 = 10)
0.1
9%
82%
13.31
7%
FMIF-DG-TAG (7 100)
0.1
12%
70%
10.26
8%
FMIF-DG-Exad (7 1)
0.1
77%
14.83
1%
FMIF-DG-Exaa (7 =10)
0.1
9%
82%
13.54
8%
FMIF-DG-Exact (> 1000)
0.1
36%
31%
12.62
13%
55


Reviews:
[{"review_id": "fTPaYQbAVx", "reviewer": "Reviewer_t8PN", "summary": "The author introduces a guidance framework for discrete generation models. This approach relies on utilizing continuous-time Markov processes over discrete state Spaces, which frees up the computationally processability of sampling from the desired lead distribution. More importantly, the authors demonstrate the effects of the proposed discrete guidance framework on a range of applications, including guided generation of small molecules, DNA sequences, and protein sequences.", "questions": "The authors mention that the proposed framework is suitable for a wide range of generation models implemented through  the CTMC, but this guidance framework is only applied to diffusion models and flow matching models. Can you elaborate on how to apply the framework to other generation models?", "limitations": "", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "The authors of this paper propose a guidance framework for generating models (diffusion models, flow matching models) on discrete state Spaces. This guidance strategy is applicable to a wide range of generation models of discrete state Spaces achieved through CTMC, and has been applied to the generation of guidance conditions in many fields such as small molecules, DNA sequences, and protein sequences. In addition, this paper has a reasonable logical structure and clear expression.", "weaknesses": "While the authors have demonstrated that this guiding framework is empirically effective, more precise theoretical guarantees, such as error analysis, are lacking, and further research into potential tradeoffs between efficiency and accuracy will be of interest to the community. In addition, the article is more inclined to show the effect of guidance and ignore the quality of generation, so it is difficult for readers to judge the practicality of this guidance framework. Finally, judging from the process of theoretical derivation, the technical route of this work seems to be weak in innovation.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "QvDWcBjec1", "reviewer": "Reviewer_ty55", "summary": "This paper presents a technique for guiding the generation of samples from discrete state-space diffusion models. The motivation behind this approach is the guidance mechanism employed in continuous state-space diffusion models. The authors derive the explicit form of both the predictor-guided and predictor-free-guided rate matrices for the discrete diffusion model. Subsequently, they propose a Taylor-approximated guidance as a computationally efficient solution. The effectiveness of the proposed method is demonstrated through its application to various applications, including the guided generation of small molecules, DNA sequences, and protein sequences.", "questions": "- It is unclear how the predictor-free-guided rate matrix differs from the predictor-guided rate matrix in Equation (4), which is simply substituting the original expression of the predictor-guided rate matrix in Equation (2) into Equation (4). To the best of my understanding, the classifier-free guidance in the continuous case eliminates the classifier-like likelihood $p_t(y|x_t)$ from the score function, but it needs to be evident how the predictor-free-guidance in the discrete case accomplishes the same objective Could the authors provide further clarification on this matter?\n- Could you elaborate on how the Taylor-approximated guidance operates in practice? Is it that instead of $p^\\phi(y|x,t)$, we only store $\\nabla_x \\log p^\\phi(y|x,t)$? What if there is no discernible order of the discrete states? How can we embed the discrete states into a continuous space for the Taylor approximation?", "limitations": "", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "- The paper proposes a general method for applying guidance on discrete state-space diffusion models, which constitutes a novel contribution to the field.\nThe authors provide a comprehensive derivation of the predictor-guided and predictor-free-guided rate matrices for the discrete diffusion model, accompanied by intuitive explanations of how they compare with the continuous guidance mechanism.\n- The proposed method is demonstrated through its successful application to a diverse range of applications, including the guided generation of small molecules, DNA sequences, and protein sequences.", "weaknesses": "- The paper omits an introduction to the forward and backward processes of the discrete state-space diffusion models. Additionally, the rationale behind the training of the rate matrix $R_t(x,\\tilde x)$ is not explicitly provided. I recommend that the authors commence with a more general introduction to the discrete state-space diffusion models, followed by a detailed explanation of the guidance mechanism in the continuous case, with a clear comparison between the two.\n- Furthermore, it would be beneficial to include more algorithm details of the training of both the predictor-guided and predictor-free-guided rate matrices. This information should be provided in addition to the code available in the supplementary material, as it may be less accessible and understandable.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "NdWba5fPM4", "reviewer": "Reviewer_wQnx", "summary": "The authors propose a methodology to apply conditional guidance to generative models that are discrete and based on Continuous-time Markov Chains.\nWhen assuming single state transitions in the Markov chain, Discrete Guidance is shown to be tractable since it does not necessitate to sum over all the chain states but only on the sparse set of reachable states.\nBesides, a heuristic acceleration called Taylor-approximated guidance is propose to further limit the number of neural evaluations.\nThree different examples are presented demonstrating the feasibility and efficiency of the approach and present comparison with competitive methods.", "questions": "\"Originally, for DirFM-CG we used the same guidance strengths γ ∈ {1, 3, 6, 10, 20} reported by Stark et al. (2024).\" Why use the same guidance ? Is the formalism similar ?\n\nThere exists training-free guidance strategies for solving imaging inverse problems using diffusion models, eg:\n\nDiffusion Posterior Sampling for General Noisy Inverse Problems\nHyungjin Chung, Jeongsol Kim, Michael Thompson Mccann, Marc Louis Klasky, Jong Chul Ye\nICLR 2023\n\nPseudoinverse-Guided Diffusion Models for Inverse Problems\nJiaming Song, Arash Vahdat, Morteza Mardani, Jan Kautz\nICLR 2023\n\nAre training-free guidance achievable for discrete diffusion/flow models?", "limitations": "", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 2, "contribution": 3, "strengths": "The paper introduces a principle mechanism for guidance in a discrete state flow-based generative model.\n\nExperiments demonstrate the feasibility of the approach in three different settings (and small images Appendix F.1).\n\nReproducibility is ensured by providing source code.\n\nOverall I find that the paper is too dense for the ICLR format and would benefit from a more in depth review. Yet the approach is certainly of interest for the community.", "weaknesses": "The term coined \"discrete guidance\" seems too general since there is already another competing approach called DiGress (Vignac et al. ICLR 2023) and also Dirichlet FM, sometimes with similar performance\n(eg 423 \"As predictor-free guidance for DirFM-CFG and DG-PFG behaved comparably (Appendix F.3.5)\")\nIn that respect, the empirical results being relatively close to DiGress, the title of the paper is also a bit problematic  in my opinion.\n\nThe mathematical presentation in the main paper is a too quick summary in my opinion.\nEquation (3) is only valid for tilde x different than x, and flow conservation is used for setting R gamma(x,x) (Equation 25). This should be included in the main text.\nI read Appendix C and was a bit confused by the presentation.\nAt first I was surprised with key differences: In Equation (14) the numerator depends on both x tilde and x while in Equations (2) and (3) it only depends on the state x tilde. The simplification is discussed later in Section C.6, but I would have like to read this just below Equation (14).\n\n216: The text suggests gamma is between 0 and 1, but it is used with very high values (2, 10, 100) later on. I would suggests to discuss the range of gamma right away.\n\nIn the experiments, the value of gamma used for each experiment is not reported clearly.\n\nThe presentation of the experiments is also very dense.\nSomehow the conditioning mechanisms are not very clear.\nOne practical issue with classifier and/or classifier-free guidance is the need to eihter train a classifier on noisy data or to train a conditional generative model.\nHere the effort needed for retraining is not clear, eg\n419 For Discrete Guidance, we trained an unconditional flow-matching model, then used predictor guidance with either exact (DG-Exact) or Taylor-approximated guidance (DG-TAG).\nHow was the predictor trained ? Is there any example that is training-free ? (see question below)\n\n\nMinor corrections / suggestions:\n109 The text suggests that the gradient of the predictor is easily accessible of continuous DM but this is not the case and based on heuristics (eg using a classifier or assuming a Gaussian form for the distribution).\n140 Why \"However\" ?\n145 Say right away that the rate function is positive but can take negative value when x tilde equals x. Also precise the meaning of the Kroenecker delta symbol.\n214: This footnote is already useful for p. 3\n412: *an* conditional flow-matching model\n897 Cl’ement Vignac (accent issue)", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "eWlYTXHWmG", "reviewer": "Reviewer_MZ28", "summary": "The paper presents a method for guiding diffusion models and flow models on discrete spaces. The method is constructed using continuous time Markov chain models to represent the discrete changes with jumps. A guidance scheme can be constructed by guiding the rate of the time-continuous process. The model is evaluated with experiments on small molecules, DNA and protein sequences.", "questions": "- you write that the probability of jumps in two or more dimensions simultaneously is zero. But how does it work in the numerical setting where the continuous time is discretized into finite time intervals, e.g. in the Euler integration? I guess here two dimensions can jump simultaneously. Does this cause problems?\n- can you comment more on the issue with diffusion models? (that you only use flow matching in the experiments) Is this a weakness of the model", "limitations": "", "rating": 8, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "- the paper targets an important and difficult problem\n- the use of time continuous processes to enable guidance seems well-founded\n- the paper is nicely presented\n- the method is evaluated on relevant datasets", "weaknesses": "- while the method is presented as working for both diffusion and flow models, I believe the experiments are only carried out using flow matching (as stated on line 297)", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Poster)