Flexible Flows for Biological Sequence Design

Yogesh Verma, Dani Korpela, Harri Lähdesmäki, Vikas GargarXiv 2026

TL;DR

FlexFlow is a novel generative framework for biological sequence design that moves beyond standard "noise-to-data" models by incorporating biologically informed priors. By combining structured couplings, latent-space guidance, and a flexible edit-based architecture, it achieves state-of-the-art performance in designing functional DNA and peptide sequences while offering researchers fine-grained control over the generation process.

What Problem Does This Paper Address?

Designing functional biological sequences—like DNA promoters or therapeutic peptides—is a "needle in a haystack" problem. The space of possible sequences is discrete, astronomically large, and governed by complex evolutionary and biophysical rules.

Current generative models, such as Discrete Flow Matching (DFM) or diffusion models, often struggle with three main issues:

  1. Uninformative Starting Points: Most models start from "white noise" or random masks that ignore known biological relationships (e.g., the fact that certain amino acids are more likely to substitute for one another).
  2. Fixed-Length Constraints: Many architectures are rigid, making it difficult to naturally generate sequences of varying lengths.
  3. Lack of Global Coherence: When guiding a model to produce a specific function (like binding to a target), standard methods often adjust tokens independently, which can break the global structure or long-range motifs essential for biological activity.

Methods

The authors introduce FlexFlow, which enhances the DFM framework through several key innovations:

  • Structured Coupling: Instead of starting from uniform noise, FlexFlow uses a "mutation-tilted" source distribution. It incorporates domain-specific substitution matrices (like BLOSUM for proteins) as a prior. This biases the model to explore "biologically plausible" neighborhoods from the very beginning of the generative flow.
  • Latent Edit-based Rates: To handle variable-length sequences, the model uses a set of edit operations—insertion, deletion, and substitution. Crucially, these operations are conditioned on a shared global latent representation ($r$), which ensures that local edits are coordinated to maintain global sequence integrity.
  • Latent Guidance: The paper proposes a new form of classifier-free guidance (CFG). Instead of interpolating between conditional and unconditional outputs at the token level, FlexFlow interpolates in the continuous latent space. This "Latent Guidance" steers the entire sequence generation coherently.
  • Dirichlet-prior Control: At test time, researchers can use Dirichlet-prior temperature scaling to adjust the "budget" of edit operations (e.g., forcing more substitutions and fewer insertions) without needing to retrain the model.
Figure 1: Comparison of different couplings. Description of different couplings used in discrete flow matching and comparison with our proposed structured coupling.

Datasets

The model was evaluated across a diverse set of tasks:

  • Toy Datasets: Canonical 2D patterns (Spiral, Rings, Checkerboard) to test basic density estimation.
  • DNA Enhancers: Sequences from fly brain and human melanoma cells (length 500).
  • DNA Promoters: 100,000 human sequences (length 1024) annotated with transcription initiation signals.
  • Peptide-MHC II Benchmark: The authors introduced a new, rigorous benchmark for generating peptides that bind to Major Histocompatibility Complex (MHC) class II molecules, using a strict sequence-based split to prevent data leakage.

Key Insights and Ideas

  • Biological Inductive Bias is Powerful: By simply changing the "noise" the model starts from to something biologically informed (Structured Coupling), the authors saw significant gains in the fidelity of generated sequences.
  • Global Latents Solve Local Problems: Coordinating edits through a global latent prevents the "compounding error" problem common in autoregressive models and the "incoherence" problem in token-wise diffusion models.
  • Latent Guidance as Gradient Ascent: The authors mathematically demonstrate that their Latent Guidance mechanism is equivalent to performing gradient ascent on an implicit latent classifier, providing a principled way to steer generation.
Figure 2: Model pipeline with Latent Guidance. Given a noised sequence xt with external conditioning c, encoder Ψ produces an unconditional latent r∅, and a conditional latent rc, which are interpolated into a guided latent rLG using a guidance scale w.This guided latent is then passed into the MLPs to output the edit rates and distributions with auxiliary outputs.

Key Results

FlexFlow consistently outperformed existing diffusion and flow-based baselines:

  • DNA Generation: On enhancer datasets, FlexFlow achieved the lowest Fréchet Biological Distance (FBD), indicating its samples were most similar to real biological data. For promoter design, it reached a state-of-the-art Mean Squared Error (MSE) of 0.022 for regulatory activity.
  • Peptide Design: In the new MHC II benchmark, FlexFlow with Latent Guidance achieved a discriminator score of 0.66, more than doubling the performance of strong baselines like Dirichlet FDM (0.31).
  • Toy Data: As shown in Figure 3, FlexFlow accurately reconstructed complex topological features that other flow models missed.
Figure 3: (left) Evolution of edit operations during generation as the Dirichlet concentration α is shifted between insertion and substitution vertices (with fixed αdel = 0.05), showing model’s ability to act as a global budget controller, (right) Representative generated distributions on toy datasets.

Limitations and Future Work

  • Sampling Efficiency: While FlexFlow is non-autoregressive, it still requires approximately 100 integration steps for high-quality generation. The authors suggest that future work could involve distillation techniques to reduce this to just a handful of steps.
  • Diversity-Quality Trade-off: Like many guided models, there is a trade-off where very high guidance scales improve the "quality" (e.g., binding probability) but can reduce the "diversity" of the generated library. Finding the optimal balance for specific therapeutic applications remains an open area of exploration.

Summary updated

BibTeX
@misc{verma2026flexible,
  author = {Yogesh Verma and Dani Korpela and Harri Lähdesmäki and Vikas Garg},
  title = {{Flexible Flows for Biological Sequence Design}},
  year = {2026},
  eprint = {2606.10543},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.10543},
}
Figure