Latent Diffusion Models for Controllable RNA Sequence Generation

Kaixuan Huang, Yukang Yang, Kaidi Fu, Yanyi Chu, Le Cong, Mengdi Wang · DOI

TL;DR

This paper introduces RNAdiffusion, a novel latent diffusion model for generating and optimizing RNA sequences. By leveraging a sequence auto-encoder and a diffusion model in a compressed latent space, RNAdiffusion can generate biologically plausible RNA sequences and, crucially, optimize them for specific functional properties like translation efficiency, outperforming existing methods.

What Problem Does This Paper Address?

RNA molecules are central to biological processes, with diverse sequences and complex structures enabling a wide range of functions. Generating novel RNA sequences with desired properties is crucial for advancing RNA-based therapeutics and understanding gene regulation. However, the discrete nature of RNA sequences and the intricate relationship between sequence and function pose significant challenges for generative models. Existing methods often struggle with variable sequence lengths, capturing complex structural motifs, and achieving fine-grained control over functional outcomes. This work aims to bridge this gap by developing a controllable generative model for RNA sequences that can both mimic natural distributions and be optimized for specific biological objectives.

Methods

The core of RNAdiffusion is a latent diffusion model. Instead of directly operating on discrete RNA sequences, it first maps them into a continuous, fixed-dimensional latent space. This is achieved through a sequence auto-encoder composed of:

  1. Pretrained RNA-FM Encoder: A BERT-type model that converts raw RNA sequences into token-level, biologically meaningful representations. This encoder is kept fixed during training.
  2. Querying Transformer (Q-Former): This component takes the rich representations from RNA-FM and compresses them into a set of fixed-length latent vectors. This is key to handling variable-length RNA sequences and creating a consistent input for the diffusion model.
  3. Autoregressive Decoder: Trained to reconstruct the original RNA sequence from the latent vectors, ensuring the latent space captures sufficient information.

Once the latent space is established, a continuous diffusion model is trained to learn the distribution of these latent vectors. The novelty lies in guided generation:

  • Latent Reward Model: A separate model is trained in the latent space to predict functional properties of RNA (e.g., translation efficiency).
  • Gradient-Based Guidance: The gradients from this reward model are integrated into the backward diffusion process. This allows the model to steer the generation towards sequences with higher predicted functional scores, effectively optimizing for desired properties without retraining the entire diffusion model.

Datasets

  • Non-coding RNA (ncRNA) subset of Ensembl database: Used for pre-training the RNA sequence auto-encoder. Approximately 1.1 million sequences were curated.
  • Five-species 5'-UTR dataset from UTR-LM: Used for fine-tuning the diffusion model for 5'-UTR generation. Approximately 205,000 sequences were used.
  • Human 5'-UTR datasets: Used for training latent reward models for Mean Ribosome Loading (MRL) and Translation Efficiency (TE). Three datasets were combined, totaling over 70,000 sequences.

Key Insights and Ideas

  • Latent Space for RNA Generation: Compressing RNA sequences into a fixed-size latent space simplifies the diffusion process, making it more stable and efficient than directly modeling discrete sequences.
  • Q-Former for Variable Lengths: The Q-Former is a crucial component that effectively handles the variable lengths of RNA sequences, creating a consistent representation for the diffusion model.
  • Plug-and-Play Guidance: Integrating reward model gradients into the diffusion process allows for controllable generation and optimization of specific RNA functions without extensive retraining. This is a powerful paradigm for designing functional RNA molecules.
  • Transferability of Latent Representations: The latent embeddings learned by the auto-encoder are shown to be useful for downstream tasks like reward modeling, indicating they capture biologically meaningful information.

Key Results

  • ncRNA Generation: RNAdiffusion generates novel ncRNAs that align well with natural distributions across various biological metrics (Levenshtein distance, 4-mer distance, G/C content, minimum free energy, secondary structure similarity).
  • 5'-UTR Optimization: Fine-tuned RNAdiffusion can generate 5'-UTRs with significantly improved functional properties. Specifically, it achieved up to 166.7% improvement in Translation Efficiency (TE) and 52.6% improvement in Mean Ribosome Loading (MRL) compared to unguided generation.
  • Reward-Structural Stability Trade-off: The guided diffusion model demonstrates a better trade-off between achieving high functional rewards and maintaining structural stability compared to baselines like Random generation and UTRGAN.

Limitations and Future Work

  • Hyperparameter Sensitivity: The performance of latent diffusion models depends on the total dimension of the latent space (K × D), requiring hyperparameter tuning.
  • Reward Model Dependence: The effectiveness of guided diffusion relies on the quality and accuracy of the trained reward network. For non-differentiable rewards, additional fine-tuning with reinforcement learning might be necessary.
  • Experimental Validation: The paper acknowledges that the generated 5'-UTRs were not synthesized and tested in wet lab experiments, which is left as future work.
  • Reward Hacking: The authors note that excessive guidance strength can lead to "reward hacking," where sequences are optimized for the reward model but may exhibit shifts in other biological properties (like G/C content and MFE), potentially affecting stability. This highlights the importance of finding a moderate guidance balance.

Summary updated

BibTeX
@misc{huang2024latent,
  author = {Kaixuan Huang and Yukang Yang and Kaidi Fu and Yanyi Chu and Le Cong and Mengdi Wang},
  title = {{Latent Diffusion Models for Controllable RNA Sequence Generation}},
  year = {2024},
  eprint = {2409.09828},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.09828},
}
Figure