Molecular Generation with State Space Sequence Models

Anri Lombard, Shane Acton, Ulrich Armel Mbou Sob, Jan BuysAIDrugX @ NeurIPS 2024

TL;DR

This paper explores the use of State Space Models (SSMs), specifically the MAMBA architecture, for molecular generation, aiming to overcome the efficiency and scalability limitations of current Transformer-based models. The study finds that MAMBA models achieve comparable generation quality to Transformers while offering significant computational efficiency gains, particularly for larger models and longer sequences, paving the way for more efficient AI-driven drug discovery.

What Problem Does This Paper Address?

Generating novel molecules is a cornerstone of drug discovery, but current AI methods often struggle with the complexity and sheer scale of chemical space. Transformer architectures, while powerful, face computational bottlenecks due to their quadratic complexity with sequence length. This limits their ability to efficiently process large datasets or generate very complex molecular structures. The authors aim to address this by investigating State Space Models (SSMs), a class of models known for their linear time complexity, as a more scalable and efficient alternative for molecular generation.

Methods

The core of this research involves training and evaluating two types of autoregressive sequence models for molecular generation: Transformer-based models (SAFE-GPT) and State Space Models (MAMBA). They implemented both small (20M parameters) and large (90M parameters) versions of each architecture. A key aspect of their methodology is the use of the Sequential Attachment-based Fragment Embedding (SAFE) representation for molecules, which is designed to maintain chemical validity and capture structural information. The models were trained and evaluated using standard metrics for molecular generation, including validity, uniqueness, and diversity, as well as perplexity and computational efficiency (GPU utilization and power consumption).

Datasets

The study utilized two primary datasets:

  • MOSES Dataset: Approximately 1.6 million drug-like molecules, used as the primary benchmark.
  • ZINC Dataset: A canonicalized subset of 23 million molecules, used to assess scalability.

The authors used the original train-validation split for MOSES and a 90/10 train/validation split for the ZINC subset.

Key Insights and Ideas

  • SSMs as a Viable Alternative: MAMBA models demonstrate that State Space Models can achieve generation quality comparable to established Transformer architectures in molecular generation.
  • Efficiency Gains are Significant: MAMBA models consistently show lower GPU power consumption and improved training times, especially for larger models, suggesting a more scalable approach.
  • Perplexity Advantage: MAMBA models exhibit consistently lower perplexity, indicating a better learned probability distribution over molecular structures.
  • SAFE Representation Nuances: The SAFE representation, while designed for robustness, showed some initial SAFE-to-SMILES conversion failures with MAMBA models under default sampling, suggesting a potential architectural bias or optimization for Transformers. This necessitated a retry mechanism for full validity.
  • Scalability Potential: The efficiency gains of MAMBA become more pronounced with longer sequences, hinting at its suitability for modeling more complex molecules.

Key Results

  • Generation Quality: Both MAMBA and SAFE-GPT models achieved near-perfect validity and uniqueness scores after accounting for regeneration steps. Diversity scores were also comparable, with SAFE-GPT_Large slightly outperforming MAMBA_Large.
  • Computational Efficiency:
    • MAMBA_Small consumed ~32% less GPU power than SAFE-GPT_Small.
  • MAMBA_Large consumed ~22% less GPU power than SAFE-GPT_Large.
  • Large MAMBA models trained significantly faster (64 hours vs. 90 hours for SAFE-GPT_Large).
  • Perplexity: MAMBA models consistently showed lower perplexity on validation sets for both small and large model sizes.
  • Molecular Properties: Generated molecules from both architectures closely matched the distributions of key physicochemical properties (e.g., molecular weight, LogP, TPSA) of their respective training datasets.

Limitations and Future Work

  • Model Size: The study was limited to models with 20M and 90M parameters. Further research is needed to explore the performance of larger-scale architectures.
  • SAFE Representation Interaction: The observed differences in SAFE-to-SMILES conversion success between MAMBA and Transformer models warrant further investigation into the interaction between the representation and model architectures.
  • Sampling Parameters: MAMBA models required more conservative sampling parameters or regeneration steps to achieve high validity, which seems to contrast with their lower perplexity. This trade-off needs further exploration.
  • Future Directions: The authors suggest extending the comparison to larger models and more diverse datasets, investigating the scalability of efficiency gains with longer sequences, and exploring the application of these architectures to more complex tasks like targeted molecule design or property optimization.

Summary updated

BibTeX
@inproceedings{lombard2024molecular,
  author = {Anri Lombard and Shane Acton and Ulrich Armel Mbou Sob and Jan Buys},
  title = {{Molecular Generation with State Space Sequence Models}},
  booktitle = {AIDrugX @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=1ib5oyTQIb},
}
Figure