Source-linked AI summary
SMILES Enumeration as Data Augmentation for Neural Network Modeling of Molecules
Esben Jannik Bjerrum
TL;DR
Limited labeled datasets constrain neural-network QSAR modeling, while molecules can have multiple valid SMILES representations. This paper uses SMILES enumeration as augmentation for LSTM-based QSAR modeling and reports improved test performance, with further gains from averaging predictions across enumerated strings.
Problem
Limited labeled datasets constrain neural-network QSAR modeling, while individual molecules can have multiple valid SMILES representations.
Method
The study generates unique noncanonical SMILES by repeatedly scrambling atom order and uses them to augment an LSTM-based QSAR dataset.
Results
0.68 correlation coefficient and 0.52 RMS were obtained by averaging enumerated-model predictions for each molecule.
Takeaways & Limitations
SMILES enumeration shows promise as a data augmentation technique for neural-network QSAR models and can improve robustness when predictions are averaged across enumerated SMILES.
Takeaways & Limitations
The study lacks a separate validation set because hyperparameters were tuned on the test set.
Abstract
from arXiv · showhide
Simplified Molecular Input Line Entry System (SMILES) is a single line text representation of a unique molecule. One molecule can however have multiple SMILES strings, which is a reason that canonical SMILES have been defined, which ensures a one to one correspondence between SMILES string and molecule. Here the fact that multiple SMILES represent the same molecule is explored as a technique for data augmentation of a molecular QSAR dataset modeled by a long short term memory (LSTM) cell based neural network. The augmented dataset was 130 times bigger than the original. The network trained with the augmented dataset shows better performance on a test set when compared to a model built with only one canonical SMILES string per molecule. The correlation coefficient R2 on the test set was improved from 0.56 to 0.66 when using SMILES enumeration, and the root mean square error (RMS) likewise fell from 0.62 to 0.55. The technique also works in the prediction phase. By taking the average per molecule of the predictions for the enumerated SMILES a further improvement to a correlation coefficient of 0.68 and a RMS of 0.52 was found.
Introduction
SMILES-based molecular QSAR modeling faces limited labeled datasets, while individual molecules can have multiple valid SMILES representations. The paper investigates SMILES enumeration as data augmentation for LSTM neural networks.
- Motivation: Limited labeled datasets constrain the applicability of neural networks in QSAR modeling.Such limitations can necessitate harsh regularization or shallow and narrow architectures.
- SMILES representation: SMILES is a single-line molecular notation, and one molecule can correspond to multiple SMILES strings.Canonical SMILES select one string for each molecule.
- SMILES enumeration: The number of possible SMILES strings grows with molecular size and branching complexity.Toluene has seven possible SMILES strings.
- Study aim: The study investigates SMILES enumeration for QSAR data augmentation using LSTM cell neural networks.The approach treats alternative SMILES for the same molecule as additional molecular-data representations.
Methods
SMILES enumeration generates alternative molecular strings by scrambling atom order and repeatedly producing noncanonical SMILES. The study then prepares the strings for neural-network modeling through fixed-length padding and one-hot encoding.
- SMILES enumeration: RDKit-based enumeration scrambles atom ordering and generates noncanonical SMILES repeatedly.Unique generated strings are retained in a growing set after comparison.
- Dataset: The dataset contains 756 dihydrofolate inhibitors with P. carinii DHFR inhibition data.The data were split into training and test sets in a 9:1 ratio.
- Data preparation: Enumerated SMILES were padded to length 74 and one-hot encoded into character bit matrices.A generated character-to-integer dictionary mapped the molecular strings for encoding.
LSTM neural network
The models use LSTM layers whose final states feed a feed-forward network with one linear output neuron. Architecture and hyperparameters were optimized with Bayesian optimization using Gaussian processes.
- Network architecture: LSTM layers process the input in batch mode, and their final state feeds a feed-forward neural network.The feed-forward network ends with a single linear output neuron.
- Optimization: Bayesian optimization with Gaussian processes selected the network layout and hyperparameters.The optimization used GP_MCMC and EI_MCMC acquisition functions after 10 initial trainings.
- Computational setup: Training and computations were performed on a Linux workstation with an Nvidia Geforce GTX1060 graphics card.The workstation had 4 GB of system memory and 6 GB of graphics memory.
Results
SMILES enumeration expanded the dataset by approximately 130 times and produced better test performance than canonical-only modeling. Averaging predictions across enumerated SMILES yielded a further improvement.
- Dataset expansion: Approximately 130-fold augmentation produced 79,143 training rows and 9,412 test rows from 602 and 71 canonical molecules.Each molecule had an average of 130 alternative SMILES representations.
- Training history: 0.30 test mean square error was obtained with the enumerated dataset, compared with 0.41 for the canonical dataset.The enumerated model also had a lower training loss and a less noisy training curve.
- Test prediction: 0.66 correlation coefficient and 0.55 RMS were achieved when the enumerated model predicted enumerated test SMILES.This was the best performance among the single-SMILES prediction combinations reported for the test set.
- Averaged prediction: 0.68 correlation coefficient and 0.52 RMS resulted from averaging enumerated-model predictions for each molecule.The averaged predictions are shown as a scatter plot in Figure 4.
Discussion
SMILES enumeration improved training behavior and predictive performance relative to canonical-only representations, with further gains from averaging predictions across enumerated SMILES. The discussion also notes a test-set tuning limitation and contrasts this approach with other SMILES-based or graph-based methods.
- Training behavior: The enumerated-SMILES model had lower loss and mean square error than the canonical-SMILES model, with less noisy training curves.The canonical model had test mean square error 0.41, while the enumerated model had 0.30.
- Prediction aggregation: Averaging predictions for each molecule produced a test-set correlation coefficient of 0.68 and RMS of 0.52.This averaging used predictions from the enumerated model for enumerated SMILES.
- Training cost: The enumerated dataset supplied approximately 360 weight updates per epoch versus three for the canonical dataset, although both trainings took approximately the same wall-clock time.The canonical dataset contained 130 times fewer examples, requiring more epochs.
- Limitations: The study tuned hyperparameters on the test set rather than using a separate validation set, so reported predictive performance is likely overestimated to some degree.The authors frame the study as evaluating gains from SMILES enumeration rather than producing an optimal DHFR QSAR model.
- Relation to other methods: The approach differs from CORAL's manually extracted SMILES features and from graph-convolution methods that read molecular topology more directly.The paper also identifies possible future use of enumeration for autoencoder training and comparison of representations for equivalent molecules.
Conclusion
The study reports that SMILES enumeration shows promise as data augmentation for neural-network QSAR models using SMILES data. It associates enumeration with more robust predictions, especially when predictions for multiple representations are averaged.
- SMILES enumeration showed promise as a data augmentation technique for neural-network QSAR models based on SMILES data.
- Enumeration enabled more robust QSAR models for single-SMILES prediction and especially for averaged predictions across enumerated SMILES.
Conflicts of Interest
The paper states that E. J. Bjerrum owns Wildcard Pharmaceutical Consulting, which provides third-party services to biotechnology and pharmaceutical companies.
- E. J. Bjerrum owns Wildcard Pharmaceutical Consulting, which is contracted by biotechnology and pharmaceutical companies for third-party services.