BetterBodies: Reinforcement Learning guided Diffusion for Antibody Sequence Design

Yannick Vogt, Mehdi Naouar, Maria Kalweit, Christoph Cornelius Miething, Justus Duyster, Joschka Boedecker, Gabriel Kalweit

Abstract

Antibodies offer great potential for the treatment of various diseases. However, the discovery of therapeutic antibodies through traditional wet lab methods is expensive and time-consuming. The use of generative models in designing antibodies therefore holds great promise, as it can reduce the time and resources required. Recently, the class of diffusion models has gained considerable traction for their ability to synthesize diverse and high-quality samples. In their basic form, however, they lack mechanisms to optimize for specific properties, such as binding affinity to an antigen. In contrast, the class of offline Reinforcement Learning (RL) methods has demonstrated strong performance in navigating large search spaces, including scenarios where frequent real-world interaction, such as interaction with a wet lab, is impractical. Our novel method, BetterBodies, which combines Variational Autoencoders (VAEs) with RL guided latent diffusion, is able to generate novel sets of antibody CDRH3 sequences from different data distributions. Using the Absolut! simulator, we demonstrate the improved affinity of our novel sequences to the SARS-CoV spike receptor-binding domain. Furthermore, we reflect biophysical properties in the VAE latent space using a contrastive loss and add a novel Q-function based filtering to enhance the affinity of generated sequences. In conclusion, methods such as ours have the potential to have great implications for real-world biological sequence design, where the generation of novel high-affinity binders is a cost-intensive endeavor.

Introduction

Designing therapeutic antibodies is a high-stakes challenge characterized by an immense search space; for instance, a single CDRH3 loop can manifest in roughly 205 trillion possible sequences. Traditional discovery methods are prohibitively slow and expensive, necessitating the development of generative AI frameworks. However, existing models often face a "Goldilocks" problem: diffusion models generate diverse sequences but lack optimization for specific goals like binding affinity, while Reinforcement Learning (RL) excels at optimization but struggles with the discrete nature of biological data. BetterBodies bridges this gap by combining the creative diversity of diffusion with the optimization power of offline RL.

Methodology

The BetterBodies architecture integrates three primary components to "stitch" together high-performing antibody fragments from offline data:

  1. Stepwise Latent Representation: The model utilizes a Variational Autoencoder (VAE) to map discrete amino acids into a continuous 2D latent space. Amino acids are placed one by one, allowing the diffusion process to operate in a smooth mathematical space.
  2. RL-Guided Diffusion: A learned Q-function—an RL tool predicting future sequence affinity—guides the diffusion policy. The loss function balances Behavior Cloning (staying near known distributions) with Q-guidance (optimizing for affinity).
  3. Biophysical Regularization: A supervised contrastive loss is applied to the VAE, forcing the model to cluster amino acids by physical properties like charge or hydrophobicity, making the search space biologically meaningful.
  4. Q-Filtering: The internal Q-function acts as a critic to filter out the bottom 50% of generated sequences, ensuring only high-affinity candidates are proposed.
The BetterBodies workflow: from data preparation to agent training in latent space and sequence generation.

Experiments and Results

The framework was evaluated using the Absolut! simulator to predict binding energy (free energy) against targets like the SARS-CoV spike receptor-binding domain. Testing across Random, Natural, and Expert data distributions revealed that BetterBodies consistently outperformed baseline datasets and competitive methods like GFlowNets.

The Diversity-Affinity Trade-off

A critical insight from the study is the role of the guidance hyperparameter ($\eta$). While increasing RL guidance significantly improves binding affinity (lowering free energy), it eventually leads to "mode collapse," where the diversity of generated sequences decreases. Finding the optimal balance is essential for effective drug discovery.

The trade-off between sequence diversity/novelty and the guidance strength parameter (η).

Performance Highlights

  • Expert Dataset: BetterBodies-CF (Contrastive + Filtering) achieved a mean free energy of -128.20, significantly outperforming the training data mean (-110.53) and GFlowNets (-103.85).
  • Random Dataset: Even when trained on low-quality random data, the model improved mean affinity from -86.21 to -103.56, demonstrating its ability to "stitch" together the best fragments from sub-optimal sequences.

Conclusion

BetterBodies demonstrates that combining latent diffusion with offline RL can effectively navigate the complex landscape of antibody design. By leveraging biophysically-informed latent spaces and Q-guidance, the model generates novel sequences with superior binding affinities compared to its training data. Future work will focus on reducing computational costs during inference and validating these generated sequences through real-world wet-lab experiments.

Summary updated

BibTeX
@misc{vogt2024betterbodies,
  author = {Yannick Vogt and Mehdi Naouar and Maria Kalweit and Christoph Cornelius Miething and Justus Duyster and Joschka Boedecker and Gabriel Kalweit},
  title = {{BetterBodies: Reinforcement Learning guided Diffusion for Antibody Sequence Design}},
  year = {2024},
  eprint = {2409.16298},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.16298},
}
Figure