---
title: "Generative Flows on Discrete State-Spaces: Enabling Multimodal"
description: "Discrete Flow Models use continuous-time jumps to generate categorical data and pair these jumps with continuous flows for protein co-design."
canonical: "https://research.elamur.ai/free/en/papers/andrew-2024-generative-flows-discrete-state-spaces/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/andrew-2024-generative-flows-discrete-state-spaces/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / Generative Flows on Discrete State-Spaces: Enabling Multimodal Flows with Applications to Protein Co-Design

# Generative Flows on Discrete State-Spaces: Enabling Multimodal Flows with Applications to Protein Co-Design

Paper · 2024 · Andrew Campbell, Jason Yim, Regina Barzilay et al.

**Authors:** Campbell, Andrew, Jason Yim, [Regina Barzilay](https://md.research.elamur.ai/free/en/authors/regina-barzilay/), [Tom Rainforth](https://md.research.elamur.ai/free/en/authors/tom-rainforth/) and [Tommi Jaakkola](https://md.research.elamur.ai/free/en/authors/tommi-jaakkola/) · **Year:** 2024 · **Venue:** PubMed · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**11** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W4391673418) · [Cited by **18** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/andrew-2024-generative-flows-discrete-state-spaces/cited-by/) · [PubMed](https://openalex.org/S4306525036) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/2402.04997)
- [arXiv 2402.04997](https://arxiv.org/abs/2402.04997)
- [OpenAlex](https://openalex.org/W4391673418)

Citations: OpenAlex, 2026-10-14.

## Summary

A protein design has to specify both a sequence of amino acids and a structure compatible with that sequence. The sequence consists of categorical choices, while the structure contains positions and orientations that can change continuously. Flow matching already offered a way to generate continuous objects by moving samples from noise toward data. The authors develop a counterpart for discrete objects, called Discrete Flow Models, and show how to put the two kinds of flow into a single generator. Their protein system, Multiflow, can generate a backbone and its sequence together, propose a sequence for a given backbone, or predict a backbone from a given sequence.

The discrete method starts by specifying what partly corrupted data should look like at each point between noise and clean data. A network learns to infer the clean example from one of those intermediate states. At generation time, a continuous-time Markov chain changes individual symbols by jumps, using the network's predictions to decide where to jump. Many chains can produce the same intended distributions at individual times. The authors use that freedom to vary how often a sample revises its symbols after training. On the character-level text8 benchmark, an intermediate amount of revision improved the tradeoff between how probable the generated text looked to an external scorer and how closely its token entropy matched the data. The held-out likelihood comparison tells a different story. An absorbing-state diffusion baseline reported the lowest bits-per-character bound in that comparison.

Multiflow uses the discrete method for amino acids and FrameFlow for backbone geometry. Its denoiser sees both parts of a partly corrupted protein, and training exposes it to different amounts of corruption in each. This makes it possible to supply either part as a clean input, or start both parts from noise. In the co-design experiments, the authors report better agreement between their jointly generated backbones and sequences than for the co-design baselines. They assess agreement by predicting a backbone from the proposed sequence and measuring how closely it matches the generated backbone. A training-data intervention involving computationally selected sequences and structures improved this measure with both folding predictors tested. The same Multiflow weights also gave inverse-folding results close to ProteinMPNN's on a held-out test set, while forward-folding errors were substantially higher than ESMFold's. These results establish the practical flexibility of the joint generator and show where that flexibility still falls short of specialist prediction.

## Deep dive: Generative Flows on Discrete State-Spaces: Enabling Multimodal Flows with Applications to Protein Co-Design

Discrete Flow Models use continuous-time jumps to generate categorical data and pair these jumps with continuous flows for protein co-design. · about 36 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### One object can contain different kinds of variables

A categorical variable has a set of allowed states. For a character in a text string, these states might include a letter, a space, and a mask indicating that the character is hidden. A position in space behaves differently. It can move incrementally through nearby coordinates, and a velocity gives a direction and speed for that movement. For categories, a change takes the variable directly from one valid state to another. There is no intermediate letter that must be visited on the way from one character to the next.

Both kinds of variable can belong to the same object. In the paper's motivating application, a protein has an amino acid identity at each residue and a geometric configuration along its backbone. The backbone coordinates and the residue orientations describe aspects of the same chain as the sequence. A generative procedure must account for their relationship. A plausible backbone and a plausible amino acid string can each look reasonable on their own, while the sequence may be incompatible with that particular backbone. The paper takes the pair as the object to be learned.

The authors use *multimodal* for this combination of continuous and discrete data. The term refers here to different representations within one example. It matters because each representation suggests a different way to move from a noisy state towards a plausible sample. Backbone geometry admits continuous changes to positions and rotations. A sequence calls for events that replace categorical values. The technical question is how to make a coupled procedure out of those two operations.

The authors also want a joint generator to work when some of the information is already available. Co-design starts with neither the sequence nor the backbone supplied. Inverse folding starts with the backbone and asks for a sequence consistent with it. Forward folding starts with the sequence and asks for its structure. All three tasks concern the same relationship, but the input changes. A single generator that learns the relationship across different corruption levels could support the three tasks through different ways of sampling.

#### Diffusion and the direction of construction

The paper places the work in the line of [discrete denoising diffusion](https://md.research.elamur.ai/free/en/papers/austin-2021-structured-denoising-diffusion-models-discrete/). The usual construction begins with a process that corrupts clean examples. The learner then approximates the reverse direction so it can start from noise and move towards data. With categorical variables, corruption can involve randomly replacing a symbol or sending it into an absorbing mask state. Once a symbol enters that state during corruption, subsequent corruption steps leave it there.

In the continuous-time discrete diffusion construction discussed by the authors, the corruption rates come first. Training requires the probabilities of observing a noisy state at a specified time given the original clean state. Those probabilities follow from the corruption process. The paper emphasizes the resulting tractability constraint. One wants rates that make the calculation of these probabilities manageable, and classical constructions use forms that make a matrix exponential tractable. The standard sampler then follows the time reversal associated with that choice.

The paper acknowledges that earlier work made adjustments at inference time, including adding correction steps to a reverse process. Its objection concerns which process the framework treats as central. If the objective is built around the likelihood of a particular time reversal, there is already a reference set of sampling dynamics before training begins. This arrangement can be appropriate when those dynamics are part of what the researcher wants to learn. The authors' goal is to retain more freedom over those dynamics once the denoiser has been trained.

[Flow matching](https://md.research.elamur.ai/free/en/papers/lipman-2022-flow-matching-generative-modeling/) offers a different starting point. In its continuous form, the researcher can describe a path of distributions from noise to data and then find a velocity field that moves samples along the path. A tractable path conditional on a known clean endpoint helps construct a more complicated path that represents the whole dataset. The discrete proposal preserves that order of decisions. It specifies the intermediate distributions first and derives rates of movement between states afterward.

Earlier work discussed in the paper had already used the Kolmogorov equation to construct alternative discrete dynamics with fewer transitions. Other work had used explicit mixtures of noise and data to derive faster discrete sampling. The authors draw on this perspective to treat the transition rates themselves as a choice. They want a framework that can use a small number of jumps when useful and can also benefit from permitting many jumps.

#### Why a joint protein generator was a separate problem

The paper describes several ways earlier protein generators handled the relationship between sequence and structure. RFdiffusion is a backbone generator whose structures can be passed to a separate sequence designer. ProteinGenerator carries out diffusion over a continuous representation of amino acid identities and predicts a structure along the way. Protpardelle evolves structure while using sequence predictions during generation. The paper also discusses co-design work focused on antibody loops, a narrower structural region than the full backbones examined here.

A separate predictor can make a generation pipeline flexible in familiar ways. It can be paired with different backbone generators, and its predictions can serve as a common basis for evaluating them. The authors' aim concerns a different capability. They want both sequence and structure to take part in the same generative process, with each update able to use information about the other part of the developing sample. The proposed discrete flow is the component that lets them keep amino acid identity categorical inside that process.

### The method, step by step

#### Start with the distribution at a particular time

Consider a collection of character strings whose clean versions are known. Choose a clean string and imagine hiding characters with a mask. At the noise end of the process, the string is entirely hidden. At the data end, the clean string is fully visible. At an intermediate time, a character drawn from the conditional distribution is either the original character or a mask. The time controls how much probability belongs to each possibility.

This construction answers a question about a snapshot. Given the clean string and the time, what might the partly hidden string look like? It does not require the researcher to generate every earlier state of that string. A training example can be corrupted directly at the chosen time. That simplicity matters because the clean endpoint is available during training, as is the corruption rule used to hide it.

The authors also study uniform corruption. Under that rule, some of the mass comes from the original character and the rest comes from a uniform draw over the categories. A uniform draw can happen to return the clean character. An observed character therefore has a different interpretation under the two rules. Under masking, a visible character is known to be correct for the clean training example. Under uniform corruption, the observation might have come from either source.

At generation time there is no known clean string. The network sees the current noisy string and estimates which clean characters could account for it. Its predictions supply weights for the different ways the current state might change. A sampler can then advance through time, looking again at the entire string after some characters have changed. The choices made at one step become context for predictions at later steps.

From a discrete corruption rule to generation The steps in order.

#### Describe jumps with a continuous-time Markov chain

The paper first presents the mathematics for a single categorical position. A continuous-time Markov chain assigns a process to that position. Time can advance by any amount, although the position itself changes by discrete jumps. Between jumps the state stays put. The Markov property means that the rates at the current time use the current state, with no separate need to supply its complete history.

```
Rₜ(i, i) = −Σⱼ≠ᵢ Rₜ(i, j)
```

Here t is time, i is the current category, and j ranges over other categories. Rₜ(i, j) is the rate of jumping from i to j at time t. An off-diagonal rate is non-negative. The diagonal entry Rₜ(i, i) is the negative sum of the outgoing rates, so each row of the rate matrix sums to zero. The diagonal accounts for the probability that leaves the state through jumps.

```
pₜ₊dₜ|ₜ(j | i) = δ(i, j) + Rₜ(i, j) dₜ
```

Here pₜ₊dₜ|ₜ(j | i) is the infinitesimal transition probability to state j given state i at time t. The symbol dₜ denotes an infinitesimal time interval. The Kronecker delta δ(i, j) equals one when i and j agree and zero otherwise. The equation gives the first-order transition law. For a change of state, the chance of that change is the rate times the interval. For the same state, the expression begins with one and subtracts the probability leaving through the available jumps.

A trajectory records the actual sequence of states along one run. The marginal distribution at a time describes what would be observed across trajectories inspected at that time. A process that changes categories often can have the same marginals as a process that changes them more sparingly. That distinction is central to the paper. A statement about the proportion of samples occupying a category at a given time gives only partial information about how often any particular sample has entered or left it.

```
∂ₜ pₜ(i) = Σⱼ≠ᵢ pₜ(j) Rₜ(j, i) − Σⱼ≠ᵢ pₜ(i) Rₜ(i, j)
```

Here pₜ(i) and pₜ(j) are the marginal probabilities of occupying i and j. The operator ∂ₜ takes the derivative with respect to time. The first sum collects incoming probability flux from states j, and the second collects outgoing flux. A flux is the probability of occupying a source state multiplied by the rate of taking a particular transition from it. This is the Kolmogorov equation in the form used for discrete states.

```
∂ₜ pₜ = Rₜᵀ pₜ
```

Here pₜ without a category argument is a column vector of all category probabilities. Rₜᵀ is the transpose of the rate matrix. The transpose puts the rates in the orientation appropriate for collecting arrivals into each destination. This ordinary differential equation describes the evolution of a vector of probabilities. An individual sample from the chain still jumps between categories.

#### Write down a path with a known destination

Let x₁ be a clean example and let i stand for a possible intermediate state. The authors construct the full probability path by defining a simpler path for each possible clean example and mixing those paths according to the data distribution.

```
pₜ(i) = 𝔼ₓ₁∼p_data [pₜ|₁(i | x₁)]
```

The expectation 𝔼 averages over a clean example x₁ drawn from p_data, the distribution of clean data. The conditional probability pₜ|₁(i | x₁) describes the state i at time t given that particular example. The result pₜ(i) averages away the identity of the endpoint. Every conditional path starts from the same noise distribution at time zero and reaches its own clean example at time one. Consequently, their mixture starts at noise and ends at the data distribution.

```
pₜ|₁ᵐᵃˢᵏ(i | x₁) = t δ(i, x₁) + (1 − t) δ(i, M)
```

The superscript “mask” identifies the masking path. The special category M denotes a mask, and δ tests equality of its two arguments. Time t ranges from zero to one. The clean category x₁ receives mass t, while the mask receives the remaining mass. The formula specifies the probability of category i, so categories other than those named by the two deltas receive zero mass for this endpoint.

```
pₜ|₁ᵘⁿⁱᶠ(i | x₁) = t δ(i, x₁) + (1 − t) / S
```

The superscript “unif” identifies the uniform path, and S is the number of categories in its state space. The uniform component assigns the same probability to every category i. The clean category receives its share of that component in addition to the mass supplied by the first term. Both choices can be evaluated or sampled at a specified time directly.

The clean endpoint in these formulas is an aid to the construction. During generation the chain cannot consult it, because the endpoint is the very thing the chain is trying to generate. To get usable rates, the authors take a conditional rate for each possible endpoint and combine those rates using the probability of that endpoint given the state already reached.

```
p₁|ₜ(x₁ | i) = pₜ|₁(i | x₁) p_data(x₁) / pₜ(i)
```

Here p₁|ₜ(x₁ | i) is the posterior distribution over clean endpoints given current category i at time t, and the vertical bar denotes conditioning. The numerator multiplies the probability of seeing i along the conditional path by the probability of its clean endpoint. The denominator is the total probability of observing i at that time. The expression applies at states with positive marginal probability.

```
Rₜ(i, j) = 𝔼ₓ₁∼p₁|ₜ(· | i) [Rₜ(i, j | x₁)]
```

The conditional rate Rₜ(i, j | x₁) would move from i to j if the clean endpoint x₁ were known. The rate Rₜ(i, j) averages those conditional rates using the posterior at source state i. The dot inside the posterior denotes the endpoint variable being averaged over. The paper proves that this averaged rate generates the mixture path if each conditional rate generates its own conditional path. The proof averages the conditional Kolmogorov equations over the data and uses Bayes' rule to write the resulting flux in terms of the current marginal and the posterior.

This averaging is more informative than giving every possible endpoint the same weight. If a noisy observation makes an endpoint unlikely, its conditional dynamics should have little influence on the next update. For sequences, the posterior at a position can use visible characters elsewhere in the string. An update rule expressed as a local change can therefore use evidence distributed across the sample.

#### Learn to recover clean categories

Training draws a clean example from the dataset, samples a time uniformly, and draws a corrupted state from the conditional path. The denoiser receives the corrupted sample and its time. The loss rewards assigning high probability to the actual clean value. The discrete training objective can be written as a negative log probability to minimize.

```
L_CE(θ) = −𝔼 [log p₁|ₜᶿ(x₁ | xₜ)]
```

Here L_CE is cross-entropy, θ denotes the learned parameters, and p₁|ₜᶿ is the network's approximation to the clean-endpoint posterior. The symbols x₁ and xₜ denote the clean and corrupted values. The logarithm is applied to the probability assigned to the known clean target. The expectation draws x₁ from the data, t uniformly between zero and one, and xₜ from the conditional path for x₁ and t. For a sequence, the predictions and loss terms are indexed by position.

With masking, the clean target at a visible position is already revealed by the observation. The paper's masking implementation computes the denoising loss for hidden positions. With uniform corruption, every observed category could have been supplied by the noise component, so the paper's uniform example uses the clean targets across positions. The corruption path determines which of these prediction problems the network sees.

This objective needs sampled intermediate states and clean labels. It contains no conditional jump matrix. That is why the authors can train the network before choosing how often it will revise a sample during generation. Changing the corruption path itself is a different intervention. The path determines the training input distribution, so the uniform and masking ablations train separate versions.

The appendix relates cross-entropy to likelihood. Its evidence lower bound treats the intermediate trajectory as latent and the final state as observed. In the general decomposition, rate-dependent weights accompany the cross-entropy term, and other terms depend on the chosen conditional process. The paper uses unweighted cross-entropy for its main training formulation, keeping the rate choice out of that objective. For masking with the base jump rates, the appendix derives a more direct relationship.

```
L_ELBO = 𝔼 [Σ_d δ(xₜᵈ, M) log p₁|ₜᶿ(x₁ᵈ | xₜ) / (1 − t)] + C
```

Here L_ELBO is the evidence lower bound in the masking case, up to the parameter-independent constant C. The index d runs over sequence positions. The symbols xₜᵈ and x₁ᵈ refer to the current and clean categories at that position, while xₜ in the predictor's input is the whole current sequence. The delta includes only masked positions. The expectation uses the same draws of clean data, time, and intermediate states as the denoising objective. The factor involving t makes this a time-weighted log prediction score. The identity concerns this particular masking process and is distinct from the equally weighted training objective.

#### Choose rates that move probability as required

The authors give a construction for a base conditional rate. Its starting point is the rate at which each state's scheduled probability should rise or fall. Comparing the derivatives for a pair of states suggests a direction for sending probability mass. The positive part of that comparison gives an off-diagonal rate after normalization.

```
Rₜ*(i, j | x₁) = max(∂ₜ pₜ|₁(j | x₁) − ∂ₜ pₜ|₁(i | x₁), 0)
                 / (Zₜ pₜ|₁(i | x₁))
```

Here Rₜ* is the base conditional rate from source i to destination j for clean endpoint x₁. The formula is for distinct states with positive conditional mass. The derivatives measure the change in each state's prescribed mass, and max keeps the positive part by comparing the derivative difference with zero. The factor Zₜ counts the categories with positive conditional mass for this endpoint at time t. The remaining denominator is the current mass at the source. Rates involving states outside the support are set to zero in this construction, and the diagonal follows the zero row-sum convention.

It is possible for both states in a pair to have increasing mass, with one increasing faster than the other. The comparison is relative. What makes the construction work is the balance across all pairs. In the Kolmogorov equation, a positive-part term in one direction minus the corresponding term in the other direction recovers the signed difference between derivatives. The derivatives of all state probabilities sum to zero, since the total mass stays at one. With the support assumptions in the paper, the net flux at a state therefore equals the derivative prescribed for it.

```
Rₜ*ᵐᵃˢᵏ(i, j | x₁) = δ(i, M) δ(j, x₁) / (1 − t)
```

Here Rₜ*ᵐᵃˢᵏ is the off-diagonal base rate for masking. The first delta requires the source i to be the mask M. The second requires the destination j to be the clean category x₁. Time t determines how much of the original mask probability remains. On a conditional trajectory, a position starts masked, makes a jump to the clean category, and stays there. With the endpoint hidden at inference, the choice among clean destinations comes from the denoiser.

```
Rₜ*ᵘⁿⁱᶠ(i, j | x₁) = δ(j, x₁) [1 − δ(i, x₁)] / (1 − t)
```

Here Rₜ*ᵘⁿⁱᶠ is the corresponding off-diagonal rate for uniform corruption. A jump can go to the clean category x₁ when the source i differs from it. A position whose initial draw happens to match x₁ can stay there throughout the conditional trajectory. For independently corrupted coordinates and a chain in which each jump changes one coordinate, these paths attain the minimum expected number of jumps for the stated conditional problems. With uniform corruption, each coordinate on which the start and end differ needs a change. With masking, every coordinate needs a change.

#### Add revisions while preserving the intended flow

A base rate gives one chain consistent with the intermediate distributions. The paper creates alternatives by adding rates whose probability flux is balanced in both directions for every pair of states. This *detailed balance* is a property of the added rates with respect to the conditional distribution at the time in question.

```
pₜ|₁(i | x₁) Rₜᴰᴮ(i, j | x₁) = pₜ|₁(j | x₁) Rₜᴰᴮ(j, i | x₁)
```

Here Rₜᴰᴮ is a rate matrix in detailed balance with pₜ|₁. The left side is the probability flux from i to j under those rates, and the right side is the flux from j to i. Both are conditional on the same endpoint x₁ at the same time t. The rates themselves can differ. A state that is visited less frequently can have a higher rate out of it while supplying the same total flux as the reverse direction.

```
Rₜᶯ = Rₜ* + η Rₜᴰᴮ
```

Here Rₜᶯ denotes the combined rate matrix at stochasticity η, with η a non-negative multiplier. Rₜ* supplies the net flux that produces the intended change over time. The detailed-balance term adds equal opposing fluxes, contributing zero to that derivative. Thus the combined matrix produces the same prescribed conditional path for every allowed η. Larger values give the added transitions more influence over individual trajectories.

For masking, the extra dynamics can send a visible category back to the mask and increase the rate of revealing a category to compensate. The network will see a new context when a position is revealed again, so it can propose a different value. In the endpoint-conditioned calculation, the clean destination is known. In a generated sequence, the denoiser supplies the probabilities of the destinations that might plausibly be clean. This difference helps explain why the exact marginal identity and the empirical benefits of choosing η are compatible. An approximate denoiser used repeatedly, together with finite simulation steps and other sampling choices, can yield different final results under different rates.

#### Apply the chain to a full sequence

For a string, the authors factor the corruption of the clean example over positions. Each coordinate's conditional rate can then be calculated using its own current and candidate clean categories. The theoretical rate on full strings allows a jump to affect one position at a time. The posterior required for that coordinate still conditions on the whole noisy string. Independent corruption given the clean example leaves room for strong dependence in the clean data and in the denoiser's predictions.

```
pₜ|₁(xₜ | x₁) = ∏_d pₜ|₁(xₜᵈ | x₁ᵈ)
```

In this equation xₜ and x₁ are entire sequences. The superscript d picks out a coordinate, and ∏ multiplies over all positions indexed by d. The expression specifies conditional independence of the corrupted coordinates when the clean string is given. Once the endpoint has been averaged out, the marginal over noisy strings can retain dependencies inherited from the data.

An Euler step approximates simulation over a short but finite interval. From the current state, the sampler evaluates the denoiser, uses its predictions to form a learned rate, and samples the next category. It repeats this operation with the time and state advanced.

```
xₜ₊Δₜ ∼ Catⱼ[δ(xₜ, j) + Δₜ Rₜᶿ(xₜ, j)]
```

Here xₜ is the current value and xₜ₊Δₜ is the sampled next value. The symbol Δₜ denotes the finite step size. The distribution Catⱼ is categorical over destinations j, with the displayed expression giving each destination's probability. The learned rate Rₜᶿ uses the network posterior in place of the true posterior. The delta supplies the initial stay probability before outgoing mass is subtracted through the diagonal. The approximation requires step probabilities that define a valid categorical distribution.

The implementation can take such steps for multiple coordinates in parallel, using a product of their finite-step transition probabilities. This allows several coordinates to change in one update even though the underlying infinitesimal chain uses single-coordinate jumps. The paper shows that the product has the same first-order expansion as the full Euler step. It also notes that the rate average and the categorical step can be combined by drawing a candidate endpoint first and then drawing the next state conditional on that candidate. The marginal step law follows from averaging the conditional step over the denoiser's predictions.

#### Add geometry to the same construction

In Multiflow, a residue combines an amino acid category with a translation and an orientation. The translation locates its carbon alpha atom, and the rotation specifies the orientation of a local backbone frame. The continuous part of the representation describes the backbone. The discrete part keeps amino acid labels in their original categorical space.

```
pₜ,ₛ|₁(Tₜ,ₛ | T₁) = ∏_d pₜ|₁(xₜᵈ | x₁ᵈ) pₜ|₁(rₜᵈ | r₁ᵈ) pₛ|₁(aₛᵈ | a₁ᵈ)
```

Here T₁ is the clean protein and Tₜ,ₛ is its corrupted counterpart. The index d ranges over residues. The symbols x, r, and a represent translation, rotation, and amino acid identity. The subscript t is the structural time shared by translations and rotations, and s is the sequence time, written as t with a tilde in the paper. The factors describe coordinate and rotation densities and amino acid probability masses. As with strings, the product is conditional on a known clean example.

The translation path is a linear interpolation from Gaussian noise towards the target. The rotation path starts at a uniformly drawn orientation and interpolates on the space of rotations. The amino acid path uses masking in the main system. Conditional on a clean endpoint, each continuous component is moved by a velocity, while the categorical component is moved by a jump rate.

```
xₜᵈ = t x₁ᵈ + (1 − t) x₀ᵈ
```

Here x₁ᵈ is the clean translation for residue d, x₀ᵈ is its initial Gaussian translation, and xₜᵈ lies between them at time t. This formula specifies samples from the translation path. Moving through it changes coordinates in ordinary Euclidean space.

```
rₜᵈ = Expᵣ₀ᵈ[t Logᵣ₀ᵈ(r₁ᵈ)]
```

Here r₀ᵈ is the initial orientation, r₁ᵈ the clean orientation, and rₜᵈ the intermediate orientation. The subscript on Log and Exp specifies the starting orientation for those maps. Log expresses the displacement toward the clean rotation as a tangent vector, and Exp maps the intermediate displacement back to an orientation. The construction keeps the interpolated state on the space of valid rotations.

```
vₓᵈ(xₜᵈ | x₁ᵈ) = (x₁ᵈ − xₜᵈ) / (1 − t)
```

Here vₓᵈ is the conditional translation velocity. The current location xₜᵈ is subtracted from the clean location x₁ᵈ, and the result is scaled by the remaining structural time. The update moves along this direction. The analogous rotation expression uses a tangent vector in place of a Euclidean difference.

```
vᵣᵈ(rₜᵈ | r₁ᵈ) = Logᵣₜᵈ(r₁ᵈ) / (1 − t)
```

Here vᵣᵈ is the conditional angular velocity in the tangent space at rₜᵈ. The logarithm map converts the target r₁ᵈ into a displacement based at the current rotation. The denominator again uses the remaining structural time. A finite update maps the corresponding tangent displacement back to a rotation.

The paper proves that the individual motion rules generate the joint conditional path. Its continuity equation combines the probability flux from continuous motion with the probability flux from jumps. Averaging over clean proteins gives the generative counterpart. Each residue's velocity or jump rate becomes an expectation over its clean value given the current corrupted protein. This is the same construction as the discrete posterior average, with an analogous role for continuous velocities.

In practice, the network predicts clean translations, clean rotations and amino acid probabilities from the full corrupted input. Structural loss terms compare the predicted and target directions of motion, while the categorical term uses cross-entropy. The rotation comparison is made in the tangent space at the noisy rotation. Predictions for both parts share information through the network, which adapts the earlier backbone architecture and adds an amino acid prediction head. Factorizing how the training example is corrupted still leaves the denoiser free to use both modalities when producing any of its outputs.

Training typically draws the structural and sequence times independently. It also explicitly includes examples in which one modality is clean and the other is corrupted. The appendix gives the proportions as 80% for independent draws, 10% with structure clean, and 10% with sequence clean. Those boundary examples matter for conditioning. A continuous time draw alone almost surely gives an interior point, while conditional generation uses the edge of the time domain where a supplied input is clean.

Co-design advances both times from noise to the clean endpoint. Inverse folding keeps the structural time at the clean endpoint while advancing the sequence time. Forward folding keeps the sequence clean and advances the structural time. The authors also describe sampling adjustments for rotations and confidence-based ordering of mask removal. The latter uses the strongest predicted category probability at a position to rank how confidently the denoiser can fill it. The paper identifies separate code releases for the discrete experiments and Multiflow.

### Experiments and results

#### Character generation on text8

The text experiment tests the discrete contribution away from the protein application. text8 contains 100MB of processed English Wikipedia text. The authors work with chunks of length 256. The categorical vocabulary has 28 entries, including 26 lower-case letters, a space, and the mask category. The [Transformer and attention](https://md.research.elamur.ai/free/en/concepts/transformer/) architecture used for the denoiser has 86M non-embedding parameters. It predicts characters across the noisy input. The paper also uses self-conditioning, in which a previous prediction can enter a subsequent denoising pass.

The principal diffusion comparison is D3PM with absorbing-state corruption, which makes the mask treatment directly relevant. The authors also compare with uniform and absorbing variants of Score Entropy Discrete Diffusion, called SEDD. An autoregressive result gives a separate point of reference for generating a string sequentially. The paper qualifies that comparison because the autoregressive run begins to overfit much earlier. The DFM and D3PM runs are evaluated at 750k training iterations, while the autoregressive run's validation loss begins to rise after 3500 iterations.

The D3PM comparison includes an adjustment to its training loss. The weighting normally used for its absorbing-state objective converged poorly in this setup, so the authors used equal weighting over time to align it more closely with DFM training. They use 1000 timesteps for D3PM and a step size of 0.001 for DFM. In DFM text sampling, simulation stops at t = 0.98, and any remaining masks are filled using the denoiser's most likely categories. That endpoint treatment is part of the generation procedure being evaluated.

The generated text is scored in two ways. GPT-J-6B assigns a negative log-likelihood to the sampled strings, with lower values indicating text to which it assigns higher probability. The second measure is entropy over the empirical frequencies of tokens, using byte-pair [tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/) for evaluation. The generation categories are characters, so the measurement vocabulary differs from the training vocabulary. The authors calculate entropy from the pooled evaluation tokens, which describes how spread out their frequency distribution is.

Negative log-likelihood alone can favor text that repeatedly uses highly predictable material. The entropy measurement helps reveal that behavior. A desirable setting gives a low negative log-likelihood while keeping token entropy near the dataset's. For reference, the dataset itself receives a negative log-likelihood of 4.2 under GPT-J-6B. That value is an external score for the data and serves a different role from a likelihood bound computed for a generator on the text8 test set.

At each applicable temperature setting the authors sample 512 strings, each of length 256. Temperature changes the concentration of probabilities produced from the denoiser's or autoregressive predictor's logits. Varying temperature produces a set of operating points. The authors compare the resulting frontiers in the space of negative log-likelihood and entropy. SEDD has no corresponding logits to rescale in this experiment, so each of its corruption choices is represented by a single point.

The paper reports that DFM with η = 15 reaches a better tradeoff on these generated samples than the discrete diffusion alternatives. At η = 0, DFM behaves similarly to D3PM, in line with the appendix's comparison of their masking dynamics. The favorable sample result belongs to an inference setting of the DFM denoiser. It does not establish a corresponding lead in the separate likelihood test.

On the text8 test set, the DFM result at η = 0 is reported as ≤ 1.41 bits per character. D3PM Absorb is reported at ≤ 1.45 and D3PM Uniform at ≤ 1.61. SEDD Uniform is reported at ≤ 1.41 and SEDD Absorb at ≤ 1.32, the lowest bound in the table. These are reported bounds with their inequality signs. They measure the probability assigned to held-out text by the generative systems. The frontier instead measures properties of sampled text using an external scorer and empirical token counts. A comparison can favor a system in one evaluation while favoring another in the other evaluation.

#### What counts as a successful protein sample

The protein experiments start from a curated Protein Data Bank training collection of 18,684 proteins in the length range 60-384. The authors compare versions trained on the original data and on distilled data. The distillation changes the supervision by substituting computationally selected sequences for the original ones and adds a filtered set of generated structures. The paper reports 4179 additional examples. The resulting comparison tests the effect of a package of changes to the training set.

For the main generation benchmark, the study samples 100 proteins at each of lengths 70, 100, 200, and 300. Prior co-design systems in the comparison are Protpardelle and ProteinGenerator. RFdiffusion is the structure generation reference. The authors run the published implementations and apply a common evaluation procedure. Metrics in the main comparison are averaged over three seeds, with standard errors in the appendix.

The primary test is self-consistency. A folding predictor takes the proposed sequence and predicts a backbone. The authors calculate the root mean squared deviation between that prediction and the generated backbone, using backbone atoms. They call this measurement scRMSD. In this definition, a sample passes the designability test if scRMSD is below 2 Å. The designability result is the proportion that passes under the stated sequence protocol and folding predictor. ESMFold is the main folding predictor, with an additional check using [AlphaFold2](https://md.research.elamur.ai/free/en/papers/jumper-2021-highly-accurate-protein-structure-prediction/).

Which sequence is folded matters. Co-design 1 folds the sequence supplied by the generator with its sampled backbone. PMPNN 1 instead takes one sequence proposed for the backbone by ProteinMPNN. PMPNN 8 gives that sequence designer 8 tries and retains the sequence with the lowest scRMSD. The first protocol tests the pair supplied by the co-design procedure. The other protocols ask whether a generated backbone can be supported by sequences from a common external designer. Results under PMPNN 8 include the benefit of selecting the best attempt by the evaluation metric.

The study also reports diversity and novelty for designable samples. Diversity is the count of structural clusters identified with FoldSeek. Novelty uses the average TM-score to the closest match for each sample in the Protein Data Bank. A cluster count and a nearest-match score answer different questions. A set may cover many structural groups while being relatively close to existing entries, or contain a few groups that lie farther from their nearest matches. Since both measurements concern the passing samples, differences in how many samples pass can also affect how many distinct clusters are available to count.

#### Co-design and backbone generation

The authors report that joint Multiflow gives the strongest direct co-design performance among the systems evaluated. They also find that its paired sequences give designability close to the result of asking ProteinMPNN for one sequence on its generated structures. The two tests have different inputs. The paired result checks whether the generator accompanies a backbone with a compatible sequence. The ProteinMPNN result checks whether an external sequence designer can supply one on demand. The paper treats Protpardelle's co-design entry as a pipeline result involving ProteinMPNN.

The common PMPNN 8 protocol permits comparison across structure generators and co-design systems. In the appendix's standard-error table, the mean designability result is 0.99 for distilled joint Multiflow. The joint version without distillation has 0.89, and the structure-only version trained on distilled data has 0.99. RFdiffusion gives 0.87, Protpardelle 0.9, and ProteinGenerator 0.89. The values are designability proportions under PMPNN 8 in the benchmark with the four specified lengths.

PMPNN 8 designability on the protein generation benchmark Distilled joint Multiflow ties its structure-only counterpart on the backbone test.

**The numbers**

| System or setting | designability proportion |
| --- | --- |
| RFdiffusion | 0.87 |
| Protpardelle | 0.9 |
| ProteinGenerator | 0.89 |
| Joint Multiflow without distillation | 0.89 |
| Distilled structure-only Multiflow | 0.99 |
| Distilled joint Multiflow (this paper) | 0.99 |

The diversity results help distinguish versions that tie on that test. The distilled joint version gives 156 clusters under PMPNN 8, while the distilled structure-only version gives 116. RFdiffusion gives 158. The reported nearest-PDB novelty scores under the same protocol are 0.61 for distilled joint Multiflow and 0.63 for both distilled structure-only Multiflow and RFdiffusion. Thus the strongest result for the joint approach depends on the question asked. The paper reports a lead in co-design and high backbone designability, alongside diversity and novelty measurements on which the rankings differ.

On a wider length sweep, the authors generate 8 samples at each length across the range from 50 to 400. The displayed PMPNN 8 designability curve uses a sliding window of size 11. The paper describes designability as close to perfect up to around length 350, with a decline becoming apparent at larger lengths. The sweep extends above the largest training length of 384, giving some evidence of generation beyond the training range. The authors also show high- and low-error examples among samples above length 370. These illustrate that a trend over lengths leaves substantial room for differences between individual cases.

#### Conditional prediction using the co-design weights

To evaluate forward and inverse folding, the authors use the same Multiflow weights used for co-design, without task-specific retraining. The test set contains 449 monomeric proteins from a time-based Protein Data Bank split. Its shortest protein has length 51 and its longest has length 398. The construction takes one representative per cluster after applying eligibility filters. This evaluation is based on given examples with known structures, as distinct from the benchmark that begins by generating new sequence–backbone pairs.

In inverse folding, the input is the known backbone. Both Multiflow and ProteinMPNN provide sequences, which ESMFold then folds for comparison with that input backbone. ProteinMPNN's mean scRMSD is 1.9 ± 2.7 and Multiflow's is 2.2 ± 2.6, with the values reported as mean and standard deviation. The paper observes examples favoring each method. The aggregate supports the claim that inverse folding with the joint system is relatively close to the specialized comparison under this protocol.

For forward folding, the input is the known sequence. The error is the aligned backbone RMSD of the predicted structure relative to the recorded structure. ESMFold records 2.7 ± 3.9, and Multiflow records 15.3 ± 4.5 on the held-out test set. The large gap limits the strength of the general-purpose claim. The system can perform the requested task, while accurate recovery of the recorded fold remains substantially harder for it than for the specialist.

Mean forward-folding backbone RMSD on the held-out PDB test set ESMFold predicts backbones closer to the recorded structures.

**The numbers**

| System or setting | backbone RMSD, Å |
| --- | --- |
| ESMFold | 2.7 |
| Multiflow (this paper) | 15.3 |

The detailed error plots show a tendency for Multiflow to fare better on shorter proteins. Some predictions resemble the true structures in the amount of helix or strand content while differing considerably in exact shape. The paper plots the predicted proportion of these secondary structure elements against the observed proportion and finds positive correspondence. The sequence is therefore informing some coarse structural characteristics, even where the aligned backbone comparison shows an inaccurate fold. Agreement about the kind of local structure and agreement about the global configuration are separate accomplishments.

### What the ablations show

#### Sampling stochasticity can help, then hurt

The text stochasticity sweep is a direct test of the distinction between the learned denoiser and the sampling process. The authors reuse the text denoiser and vary η. They examine temperature-dependent frontiers at η values of 0, 1, 2, 5, 10, 15, 20, 30, and 50. This comparison can attribute changes in the reported sample metrics to the inference procedure, because the denoising weights stay fixed across the sweep.

Starting from η = 0, increasing stochasticity tends to improve the external negative log-likelihood. The preferred setting on the reported frontier is η = 15. At η = 50 and high logit temperatures, the authors observe worsening negative log-likelihood and entropy moving away from the data. They also describe incoherence in inspected samples from this regime. The extra transitions give the generator opportunities to revisit earlier decisions. Their benefit depends on what the denoiser does with those opportunities and how concentrated its predictions are at the chosen temperature.

The paper includes qualitative samples chosen at roughly similar entropies across methods. This makes it easier to compare coherence when the sampled vocabulary distributions have similar spread. It also illustrates the limited information contained in token entropy. A token count discards much of the organization that makes a string read as connected text. The qualitative examples accompany a comparison built from external likelihood and pooled token frequencies, so differences in readability can be considered alongside those measurements.

#### Distillation improves the reported pair consistency

The distillation ablation compares Multiflow trained with the original data against the version trained with relabeled and augmented data. The authors motivate the change by observing that the sequences originally associated with training structures performed worse under their designability evaluation than sequences proposed by ProteinMPNN. Their distillation uses that computational designer to improve the pairing targets and adds generated backbones that pass a computational consistency check. The paper describes the process as related to [Reinforced Self-Training](https://md.research.elamur.ai/free/en/papers/gulcehre-2023-reinforced-self-training-rest-language/).

ESMFold helps select the examples during distillation and also supplies the main evaluation. That overlap creates an alternative explanation for the apparent gain. The distilled system could give answers that are especially successful under ESMFold's predictions. To examine this, the authors also evaluate generated pairs using AlphaFold2. The oracle comparison reports Co-design 1 designability improving from 0.41 to 0.88 with ESMFold, and from 0.38 to 0.83 with AlphaFold2. The result is specific to the pair protocol in the oracle comparison.

Co-design 1 designability with AlphaFold2 on the protein oracle comparison The distillation gain persists with an alternative evaluator.

**The numbers**

| System or setting | designability proportion |
| --- | --- |
| Multiflow without distillation | 0.38 |
| Multiflow with distillation (this paper) | 0.83 |

The change of evaluator supports a stronger interpretation than the ESMFold comparison by itself. The gain transfers to the other folding predictor examined. The lower absolute scores with AlphaFold2 also show that designability depends on the evaluator. Since the intervention changes both labels and the pool of examples, this ablation cannot assign a separate contribution to relabeling and to filtered augmentation.

#### Joint generation changes the diversity result

The authors also train the architecture on distilled data with the sequence component removed from the generation task. This comparison asks whether the addition of sequence generation changes the backbones, even if the backbones are later evaluated using ProteinMPNN in both cases. Under PMPNN 8, both versions give a designability proportion of 0.99. The jointly trained version gives 156 clusters, compared with 116 for the structure-only version.

The observed difference concerns diversity within this setup. The two systems are trained on the same distilled dataset, and the backbone check uses the same external sequence designer. Training and generating with a sequence therefore appears to affect which backbones the system produces. The comparison changes the training objective and the generation procedure together. It does not establish whether the diversity difference would already result from sequence supervision, or whether it also requires the sequence state to participate during sampling.

#### Sequence sampling can change backbone properties

Another analysis changes the stochasticity of the amino acid process and measures structural outputs. The paper reports shifts in the proportions of residues assigned to alpha helices and beta strands as η changes. The evaluation examines the backbone, while the adjustment acts on the sequence jumps. This is an empirical consequence of the coupling. The continuous update uses a denoiser whose predictions depend in part on the current sequence state.

The authors separately train a version that uses uniform corruption for the amino acids. They then vary stochasticity at inference and measure direct co-design designability, structural cluster counts, and secondary structure composition. This analysis uses a mean over 400 samples at each setting, with 100 samples at each of lengths 70, 100, 200, and 300. In the uniform version, increasing stochasticity generally improves the co-design designability measurement while reducing structural diversity. At high stochasticity the sampled backbones favor alpha helices more heavily and contain fewer beta strands.

The authors propose that repeated revisions interact with denoiser errors. In their account, predictions may repeatedly steer an uncertain trajectory towards configurations that the system already assigns high confidence, making it harder to produce more varied outcomes. The observed structural proportions and cluster counts support the existence of a tradeoff. The proposed explanation about local optima is a hypothesis about the cause. The masking version offered the better overall balance for the authors' main experiments, while the uniform ablation shows that noise choice and stochasticity choice can have different effects on the resulting samples.

### Limitations

#### Limits identified by the authors

The paper describes forward and inverse folding as initial demonstrations of conditional use. Multiflow's forward-folding errors fall far short of ESMFold's on the reported test. Its inverse-folding results are closer to ProteinMPNN's, with a higher mean scRMSD. The authors also note that the specialist systems have their own training and evaluation sets. The time-based split is designed to hold out the evaluated proteins, but the experiment does not retrain the specialist systems on the same dataset as Multiflow or make the training regimes equivalent.

The structural representation covers the backbone. The authors leave explicit side-chain modeling for future work. As a consequence, good backbone self-consistency does not establish the accuracy of an all-atom design. The paper also leaves faster chain simulation for future work. Its sampling experiments demonstrate the benefits of rate flexibility under the tested procedures. They do not establish an improvement in computational cost from that flexibility.

The discrete construction itself has qualifications. The general base rate in the paper assumes that a state with zero conditional probability has zero derivative at the time where the formula is used. The masking and uniform examples require care at endpoints, and the appendix explains their interior-time treatment. The minimum-jump property is proved for the named conditional paths under the factorization and single-coordinate jump assumptions. The authors explicitly distinguish that result from optimality of the posterior-averaged chain on the unconditional distribution. Another chain could require fewer jumps there.

#### Limits of the evidence

Protein designability in this study is a computational consistency test. It records agreement between a generated backbone and the output of a folding predictor prompted with a proposed sequence. Switching from ESMFold to AlphaFold2 strengthens the evidence for a distillation gain across those evaluators. Both tests still depend on predicted structures. Experimental folding, stability, and biological function would require evidence beyond the measured scRMSD, cluster counts, and database similarities.

The distinction between the sequence protocols also limits how broadly individual results can be read. PMPNN 8 gives the backbone several chances to receive a sequence that scores well, then selects using the same criterion that determines whether it passes. It offers a common test of backbone generation. The resulting designability figure cannot be carried over to jointly generated sequences unless the direct pair test supports it. Similarly, a strong direct pair score leaves open how the proteins would perform under criteria that measure something other than structural agreement.

The text experiment supports a narrower conclusion than a general claim about language generation. It uses short character chunks from a single processed encyclopedia corpus. The external score and token entropy can identify a better operating point within that setting, but they do not directly measure factual accuracy or coherence over longer passages. The study selects η by inspecting performance in its experiments. The theoretical construction leaves open how to choose it in advance for another dataset or task.

Finally, the equality of probability paths for different exact rate choices does not imply identical empirical outputs from approximate samplers. The implementation relies on estimated denoising probabilities and discrete simulation steps. Some evaluations also incorporate temperature changes, confidence-based ordering, or endpoint-specific processing. Those choices are part of the tested system. The theory establishes a family of valid dynamics under its assumptions, while the experiments establish how particular learned and discretized versions behave.

### What came after

[Simple and Effective Masked Diffusion Language Models](https://md.research.elamur.ai/free/en/papers/sahoo-2024-simple-effective-masked-diffusion-language/) cites the paper and takes masked diffusion into language generation. Its title identifies masking as the shared construction. In the DFM paper, a mask gives a way to specify intermediate categorical states and train predictions of missing content directly. The relationship established by the citation and title is between two treatments of generation with masked discrete variables. They leave open whether the later work adopts the same jump-rate family or uses its own sampling dynamics.

[Simplified and Generalized Masked Diffusion for Discrete Data](https://md.research.elamur.ai/free/en/papers/shi-2024-simplified-generalized-masked-diffusion-discrete/) also cites the paper and takes masked diffusion for discrete data as its subject. Its stated scope connects to the general discrete framework, where the corruption path, the denoising objective, and the transition dynamics play distinct roles. The citation places it in that line of work. The title establishes simplification and generalization as its aims, while leaving the specific technical use of the DFM construction open.

## Cite

Cite as Andrew Campbell, Jason Yim, Regina Barzilay, Tom Rainforth and Tommi Jaakkola. 2024. Generative Flows on Discrete State-Spaces: Enabling Multimodal Flows with Applications to Protein Co-Design. PubMed.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2402.04997](https://doi.org/10.48550/arxiv.2402.04997) · [arXiv 2402.04997](https://arxiv.org/abs/2402.04997)

```bibtex
@inproceedings{andrew2024generative,
  title = {{Generative Flows on Discrete State-Spaces: Enabling Multimodal Flows with Applications to Protein Co-Design}},
  author = {Andrew Campbell, Jason Yim, Regina Barzilay, Tom Rainforth and Tommi Jaakkola},
  booktitle = {PubMed},
  year = {2024},
  doi = {10.48550/arxiv.2402.04997},
  eprint = {2402.04997},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2402.04997}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
