Optimal Design of Stochastic DNA Synthesis Protocols based on Generative Sequence Models

Eli N. Weinstein, Alan N. Amin, Will Grathwohl, Daniel Kassler, Jean Disset, Debora S. Marks

Abstract

Generative probabilistic models of biological sequences have widespread existing and potential applications in analyzing, predicting and designing proteins, RNA and genomes. To test the predictions of such a model experimentally, the standard approach is to draw samples, and then synthesize each sample individually in the laboratory. However, often orders of magnitude more sequences can be experimentally assayed than can affordably be synthesized individually. In this article, we propose instead to use stochastic synthesis methods, such as mixed nucleotides or trimers. We describe a black-box algorithm for optimizing stochastic synthesis protocols to produce approximate samples from any target generative model. We establish theoretical bounds on the method’s performance, and validate it in simulation using held-out sequence-to-function predictors trained on real experimental data. We show that using optimized stochastic synthesis protocols in place of individual synthesis can increase the number of hits in protein engineering efforts by orders of magnitude, e.g. from zero to a thousand.

Introduction: The Synthesis Bottleneck

Generative probabilistic models are now excellent at predicting functional biological sequences. However, researchers face a massive synthesis bottleneck. While modern high-throughput assays can screen up to $10^{13}$ sequences, building those sequences individually in a lab is prohibitively expensive. Standard "Monte Carlo (MC) synthesis"—where specific sequences are chosen from a model and synthesized one by one—is typically limited to approximately $10^4$ unique sequences. This limitation means we are only testing a tiny fraction of what our models predict.

Variational Synthesis: Scale Over Precision

The authors propose Variational Synthesis, a framework that treats the laboratory synthesis protocol as a tunable probabilistic model $q_\theta(x)$. Instead of synthesizing individual sequences, the goal is to optimize the experimental parameters $\theta$ (e.g., nucleotide concentrations or PCR rounds) to minimize the Kullback-Leibler (KL) divergence between the lab's stochastic output $q_\theta$ and the target model's ideal distribution $p$.

Conceptual comparison of Monte Carlo synthesis (sampling) and Variational synthesis (optimizing a synthesis model).

This approach leverages a fundamental bias-variance tradeoff. While stochastic synthesis introduces "bias" (the library isn't a perfect match for the model), the massive increase in the number of sequences ($N_1 \gg N_0$) more than compensates for this, leading to a much higher expected number of functional "hits."

Modeling and Optimizing Stochastic Synthesis

The researchers mathematically formalize common laboratory techniques—such as enzymatic mutagenesis, mixed nucleotides, and combinatorial assembly—as generative processes. They developed a black-box algorithm using Stochastic Expectation-Maximization (EM) to optimize these protocols.

The hierarchical process of a stochastic synthesis model, involving template sampling, concatenation, and codon sampling.

For example, in combinatorial assembly (visualized above), templates are sampled from pools and concatenated. The optimization ensures that the resulting physical library statistically approximates the target distribution, even when the target contains complex correlations.

Key Results and Biological Validation

The method was validated using three primary biological targets: Dihydrofolate Reductase (DHFR), Green Fluorescent Protein (GFP), and T-cell receptors (TCR). Key findings include:

  • Orders of Magnitude More Hits: In GFP simulations, optimized stochastic protocols yielded an estimated 3,600 unique functional sequences, compared to only 10 hits using standard individual synthesis for the same cost.
  • TCR Discovery: For T-cell receptors, the method predicted finding ~2,400 unique hits versus roughly 6 hits for the standard approach.
  • Technology Expressivity: "Arbitrary codon mixtures" (e.g., from Twist Bioscience) were found to be the most capable of matching complex target models, even with a small number of templates.

Conclusion

Variational Synthesis represents a physical manifestation of Variational Inference. Instead of finding a distribution that approximates a posterior for computation, it finds a distribution that can be physically manufactured in a test tube. By prioritizing scale over individual precision, this framework enables the discovery of functional proteins at rates orders of magnitude higher than traditional methods.

Summary updated

Abstract

Abstract Generative probabilistic models of biological sequences have widespread existing and potential applications in analyzing, predicting and designing proteins, RNA and genomes. To test the predictions of such a model experimentally, the standard approach is to draw samples, and then synthesize each sample individually in the laboratory. However, often orders of magnitude more sequences can be experimentally assayed than can affordably be synthesized individually. In this article, we propose instead to use stochastic synthesis methods, such as mixed nucleotides or trimers. We describe a black-box algorithm for optimizing stochastic synthesis protocols to produce approximate samples from any target generative model. We establish theoretical bounds on the method’s performance, and validate it in simulation using held-out sequence-to-function predictors trained on real experimental data. We show that using optimized stochastic synthesis protocols in place of individual synthesis can increase the number of hits in protein engineering efforts by orders of magnitude, e.g. from zero to a thousand.
BibTeX
@inproceedings{weinstein2022optimal,
  author = {Eli N. Weinstein and Alan N. Amin and Will Grathwohl and Daniel Kassler and Jean Disset and Debora S. Marks},
  title = {{Optimal Design of Stochastic DNA Synthesis Protocols based on Generative Sequence Models}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2022},
  url = {https://openreview.net/forum?id=SRq27RNGYgR},
}
Figure