Abstract
In recent years, machine learning has profoundly reshaped the field of chemistry, facilitating significant advancements across various applications, including the prediction of molecular properties and the generation of molecular structures. Language models and graph-based models are extensively utilized within this domain, consistently achieving state-of-the-art results across an array of tasks. However, the prevailing practice of representing chemical compounds in the SMILES format -- used by most datasets and many language models -- presents notable limitations as a training data format. In contrast, chemical fingerprints offer a more physically informed representation of compounds, thereby enhancing their suitability for model training. This study aims to develop a language model that is specifically trained on fingerprints. Furthermore, we introduce a bimodal architecture that integrates this language model with a graph model. Our proposed methodology synthesizes these approaches, utilizing RoBERTa as the language model and employing Graph Isomorphism Networks (GIN), Graph Convolutional Networks (GCN) and Graphormer as graph models. This integration results in a significant improvement in predictive performance compared to conventional strategies for tasks such as Quantitative Structure-Activity Relationship (QSAR) and the prediction of nuclear magnetic resonance (NMR) spectra, among others.
Introduction
In the field of AI-driven chemistry, the representation of molecular structures is a fundamental challenge. The industry standard, the SMILES (Simplified Molecular Input Line Entry System) format, represents molecules as character strings. While convenient for storage, SMILES strings are essentially "flat" and lack inherent information regarding a molecule's physical or chemical properties, such as electronic charge or solubility.
Conversely, Graph Neural Networks (GNNs) excel at capturing the three-dimensional connectivity of atoms but often struggle to model the nuanced, localized chemical environments that dictate biological behavior. This research addresses the gap between "structure-blind" language models and "property-blind" graph models by introducing a hybrid system that understands both the global architecture and the localized "personality" of molecular fragments.
Methodology
The proposed framework utilizes a bimodal architecture that processes molecules through two distinct lenses: a language model trained on physicochemical descriptors and a graph neural network.
Substructure Decomposition and Tokenization
Instead of processing SMILES strings character-by-character, the model employs the BRICS (Breaking of Retrosynthetically Interesting Chemical Substructures) algorithm. This method decomposes molecules into 16 types of synthetically relevant fragments, mimicking the way medicinal chemists approach drug design by swapping functional groups.
For each fragment, a 23-dimensional vector of physicochemical descriptors is calculated, including atomic counts, bonding patterns, the Wiener index for branching, and logP for hydrophobicity. These vectors are then converted into tokens for a RoBERTa-based language model, referred to as SubD-BERT.
Bimodal Integration
The framework integrates two parallel branches:
- SubD-BERT: A language model processing the sequence of substructure descriptors.
- GNN Branch: A graph model (GCN, GIN, or Graphormer) processing the raw molecular graph.
These models are trained using a combined loss function and contrastive learning. This alignment ensures that the embeddings from both the language and graph models converge into a shared latent space, providing a unified representation of the molecule.
Results and Discussion
The bimodal framework was pre-trained on 10 million molecules from the PubChem dataset and evaluated on the MoleculeNet benchmark. The results demonstrate significant improvements over traditional unimodal methods.
Performance in Classification and Regression
In classification tasks, the BERT+GIN variant achieved state-of-the-art results on the BBBP (0.937 ROC-AUC) and Tox21 (0.852 ROC-AUC) datasets, outperforming established models like MolCLR and ChemBERTa. In regression tasks, specifically on the QM7 dataset for atomization energy, the BERT+Graphormer model achieved a Mean Absolute Error (MAE) of 40.6, a substantial improvement over the 85.4 achieved by standard GCN-based models.
Synergy of Modalities
A key insight from this study is the synergy between the two branches. While SubD-BERT is powerful on its own, the GNN branch provides the structural "glue" necessary to understand long-range interactions in complex biochemical molecules. Furthermore, the method avoids common pitfalls in graph augmentation by masking attributes rather than physical connectivity, preventing the accidental transformation of one valid molecule into another during training.
Conclusion
By combining local physicochemical descriptors with global structural graphs, this bimodal approach offers a more robust and interpretable model for chemical property prediction. While the framework currently excels with organic, drug-like molecules, future work will focus on adapting the model for inorganic compounds and scaling the pre-training dataset to over 100 million molecules to create a true foundation model for chemistry.
Summary updated