Cloud-Based Real-Time Molecular Screening Platform with MolFormer

Brian Belgodere, Vijil Chenthamarakshan, Payel Das, Pierre L. Dognin, Toby Kurien, Igor Melnyk, Youssef Mroueh, Inkit Padhi, Mattia Rigotti, Jarret Ross, Yair Schiff, Richard A. Young

Abstract

In the pursuit of accelerated drug discovery and material science, the ability to screen vast chemical libraries in real-time is paramount. This paper presents a cloud-based platform leveraging MolFormer, a large-scale chemical language model trained on 1.1 billion SMILES strings. By representing molecular structures as high-dimensional embeddings and utilizing efficient indexing techniques, the platform enables similarity searches, property predictions, and chemical space visualizations with sub-10 millisecond latency. Our results demonstrate high fidelity in property regression ($R^2 = 0.926$) and classification tasks, providing a scalable, interactive tool for chemical exploration.

1. Introduction

Identifying novel molecules with specific biological or physical properties—such as low toxicity or high solubility—traditionally requires computationally expensive quantum chemical simulations or labor-intensive laboratory experiments. While machine learning (ML) has emerged as a powerful alternative, many existing models are specialized for narrow tasks and struggle to scale to the billions of compounds found in modern chemical libraries.

There is a critical need for a general-purpose, high-speed platform that can handle massive datasets while remaining accessible via intuitive web interfaces. This work addresses this gap by combining a foundation model for chemistry with high-performance cloud indexing, allowing researchers to navigate chemical space with the speed and ease of a modern search engine.

2. Methodology

2.1 MolFormer Architecture

The core of the platform is MolFormer, a large-scale Transformer model. Similar to the architectures used in natural language processing, MolFormer treats chemistry as a language. It was pre-trained on over 1.1 billion SMILES (Simplified Molecular Input Line Entry System) strings, learning the underlying "grammar" of chemical bonding and molecular structure.

2.2 Embedding and Compression

To facilitate rapid processing, the platform follows a multi-stage pipeline:

  1. Embedding Generation: MolFormer converts each SMILES string into a 768-dimensional vector (embedding) that captures the structural essence of the molecule.
  2. Dimensionality Reduction: To optimize storage and search speed, the authors apply Discrete Cosine Transform (DCT) to compress these embeddings from 768 dimensions down to 128 dimensions.
  3. Fast Retrieval: The system utilizes HNSWlib (Hierarchical Navigable Small World graphs) for approximate nearest neighbor searches. This allows for nearly instantaneous identification of similar molecules within massive databases.

2.3 Visualization

To assist researchers in understanding data distribution, the platform employs t-SNE (t-distributed Stochastic Neighbor Embedding) to project high-dimensional data into a 2D map. This allows for the visual identification of clusters based on shared chemical properties.

3. Experimental Setup

The platform was validated using three primary chemical databases:

  • PubChem: Over 100 million molecules were indexed to test large-scale similarity search performance.
  • FlavorDB: Approximately 25,000 molecules were used to evaluate the model's ability to distinguish sensory profiles (e.g., bitter vs. sweet).
  • ChEMBL: Roughly 2 million molecules were utilized to test "drug-likeness" and property prediction accuracy.

4. Results and Discussion

4.1 Search and Latency

The platform achieved a recall of 0.99 for nearest neighbor searches, ensuring that the most relevant molecules are consistently retrieved. Crucially, the system maintained a retrieval time of less than 10 milliseconds per query, enabling a truly interactive user experience.

4.2 Property Prediction and Regression

The model demonstrated robust predictive capabilities across several benchmarks:

  • Lipinski’s Rule of Five: The platform predicted violations of these standard drug-likeness criteria with 90% accuracy.
  • Chemical Regression: For predicting Hydrogen Bond Acceptors (HBA) and Donors (HBD), the model achieved a coefficient of determination ($R^2 = 0.926$), indicating a high degree of correlation between predicted and actual values.
  • Zero-Shot Clustering: In tests with FlavorDB, the t-SNE visualization successfully separated molecules into distinct flavor clusters (bitter, sweet, sour, savory) without explicit training on those labels, highlighting the strength of the learned latent space.

5. Conclusion and Future Work

This platform demonstrates that foundation models like MolFormer can bridge the gap between massive chemical datasets and real-time research applications. By treating chemistry as a language and optimizing for cloud-based retrieval, the system provides a scalable solution for molecular screening.

Future work will focus on integrating the platform into automated chemical engineering workflows and improving model interpretability. While the current GUI provides visual context through "maximal common subgraph" features, further research is required to fully decode the decision-making process of deep learning models in chemical space.

Summary updated

BibTeX
@inproceedings{belgodere2022cloud,
  author = {Brian Belgodere and Vijil Chenthamarakshan and Payel Das and Pierre L. Dognin and Toby Kurien and Igor Melnyk and Youssef Mroueh and Inkit Padhi and Mattia Rigotti and Jarret Ross and Yair Schiff and Richard A. Young},
  title = {{Cloud-Based Real-Time Molecular Screening Platform with MolFormer}},
  booktitle = {ECML/PKDD},
  year = {2022},
  url = {https://openreview.net/forum?id=-TDYj0VdQ3},
}
Figure