Source-linked AI summary
DGL-LifeSci: An Open-Source Toolkit for Deep Learning on Graphs in Life Science
Mufei Li, Jinjing Zhou, Jiajing Hu, Wenxuan Fan, Yangkang Zhang, Yaxin Gu, George Karypis
TL;DR
GNN-based life-science modeling is difficult because it combines graph preprocessing, programming, and deep-learning expertise. DGL-LifeSci packages this workflow into an open-source toolkit with command-line interfaces, modular components, and pre-trained models, and reports up to 6x speedup over previous implementations. It supports molecular property prediction, molecule generation, and reaction prediction, while its current focus remains small molecules.
Problem
GNN modeling in life science requires programming, machine learning, and graph-modeling skills, creating a need for ready-to-run tools for custom datasets.
Method
DGL-LifeSci is an open-source toolkit providing scripts, programming APIs, pre-trained models, and datasets for three graph-learning tasks.
Results
Up to 6x speedup is reported versus previous implementations, with comparable WLN reaction-prediction performance and 76.4% JTVAE reconstruction accuracy.
Takeaways & Limitations
Users can model custom datasets without programming, while advanced users can adapt modular building blocks for development.
Takeaways & Limitations
The current implementations primarily focus on small molecules, with broader support for proteins and biological networks left for future work.
Abstract
from arXiv · showhide
Graph neural networks (GNNs) constitute a class of deep learning methods for graph data. They have wide applications in chemistry and biology, such as molecular property prediction, reaction prediction and drug-target interaction prediction. Despite the interest, GNN-based modeling is challenging as it requires graph data pre-processing and modeling in addition to programming and deep learning. Here we present DGL-LifeSci, an open-source package for deep learning on graphs in life science. DGL-LifeSci is a python toolkit based on RDKit, PyTorch and Deep Graph Library (DGL). DGL-LifeSci allows GNN-based modeling on custom datasets for molecular property prediction, reaction prediction and molecule generation. With its command-line interfaces, users can perform modeling without any background in programming and deep learning. We test the command-line interfaces using standard benchmarks MoleculeNet, USPTO, and ZINC. Compared with previous implementations, DGL-LifeSci achieves a speed up by up to 6x. For modeling flexibility, DGL-LifeSci provides well-optimized modules for various stages of the modeling pipeline. In addition, DGL-LifeSci provides pre-trained models for reproducing the test experiment results and applying models without training. The code is distributed under an Apache-2.0 License and is freely accessible at https://github.com/awslabs/dgl-lifesci.
1 INTRODUCTION
Life-science data often forms attributed graphs, making GNNs useful across molecular and biological tasks, but applying them requires programming, machine-learning, and graph-modeling expertise. DGL-LifeSci addresses this gap with ready-to-run tools, custom-dataset support, and pre-trained models.
- Motivation: Chemical and biological tasks can be formulated as graph learning problems, including property prediction, molecule generation, and reaction prediction.These tasks map graphs to values, distributions, or product graphs.
- Motivation: GNN-based modeling is challenging because users must build clean data-processing and modeling pipelines requiring programming, machine learning, and GNN expertise.The paper identifies this combined skill set as time-consuming to obtain.
- Prior work: Prior packages lower the barrier but still require programming for some or all life-science modeling tasks.DeepChem, Chainer Chemistry, and PiNN are cited as examples with remaining coding requirements.
- Contribution: DGL-LifeSci provides implementations and command-line scripts for molecular property prediction, molecule generation, and chemical reaction prediction on custom datasets.It also supplies pre-trained models for the experiments.
- Contribution: Up to 6x speedup is reported relative to previous implementations.The result is stated as a comparison with previous implementations without specifying a single benchmark in this passage.
2 GRAPH NEURAL NETWORKS OVER MOLECULES
Molecular GNNs use iterative message passing to update atom representations, then read out a whole-molecule representation for prediction. Increasing message-passing rounds expands the local molecular context available to each node.
- Graph neural networks: GNNs combine graph topology with node and edge features by iteratively aggregating neighboring representations.More iterations allow nodes to incorporate information from increasingly larger local subgraphs.
- Molecular GNN pipeline: Molecular GNNs have separate message-passing and readout phases.The message-passing phase updates node representations, while readout produces a graph representation.
- Message passing: Each message-passing round updates nodes using learnable functions of their own, neighboring-node, and incident-edge representations.After k rounds, each node aggregates information from nodes and edges within k hops.
- Readout: The readout phase applies a function to all node representations to form a graph representation, which can then feed an MLP for prediction.Summation is given as one example of the readout function.
3 PACKAGE FEATURES
DGL-LifeSci combines ready-to-run scripts, programmable modules, pre-trained models, and built-in datasets for three major molecular and reaction tasks. Its command-line workflows support custom datasets after users provide standardized input files.
- Package components: DGL-LifeSci has four components: scripts, programming APIs, pre-trained models, and built-in datasets.Pre-trained models can be fine-tuned or used directly for inference.
- Supported tasks: The toolkit supports molecular property prediction, molecule generation, and chemical reaction prediction.Property prediction includes regression and classification for single molecules.
- Usage: Command-line scripts invoke training and evaluation pipelines for each task using standardized user-provided data.For molecular property prediction, users supply SMILES strings and target properties in a CSV file.
- Usage: Regression and classification training scripts expose command-line workflows for molecular property prediction.The supplied command examples are formatted as Python training-script invocations.
- Usage: Optional hyperparameter search uses Bayesian optimization through hyperopt instead of only default settings.This feature is presented as an alternative to using defaults.
4 IMPLEMENTATION
DGL-LifeSci provides modular GNN tooling for molecular datasets, including graph construction, featurization, model implementations, and pre-trained representations. Its interfaces support multiple molecular learning tasks and custom dataset workflows.
- Implementation: DGL-LifeSci uses PyTorch, DGL, and RDKit to provide a toolkit for graph-based modeling in life science.DGL supplies GNN functionality, PyTorch provides deep learning infrastructure, and RDKit supports cheminformatics utilities.
- Modeling Pipeline and Modules: Its modeling pipeline modularizes dataset preparation, model initialization, and training into reusable stage components.Dataset preparation includes loading, graph construction, featurization, and dataset interfaces; training includes updates, metrics, and early stopping.
- Dataset Preparation: Dataset interfaces support built-in and custom datasets, while graph construction includes molecular, distance-based, and complete molecular graphs.Distance-based graphs require molecular conformations and connect atoms within a cutoff; complete graphs connect every atom pair.
- Dataset Preparation: DGL-LifeSci supports node and edge feature initialization from atom and bond descriptors, including raw numeric or one-hot representations.Non-numeric discrete descriptors use one-hot encoding, while numeric discrete descriptors can use raw values or one-hot encoding.
- Models Included: The toolkit implements GCN, GAT, NF, Weave, MPNN, AttentiveFP, JTVAE, and WLN for molecular prediction, generation, and reaction prediction.JTVAE uses junction-tree and molecular-graph representations, while WLN identifies bond changes before ranking candidate products.
- Pre-trained Models: Four pre-trained GIN models address limited molecular-property labels through context prediction, deep graph infomax, edge prediction, and attribute masking.The models were pre-trained using millions of unlabeled molecules and can be fine-tuned for particular properties.
5 MODELING PERFORMANCE
DGL-LifeSci was evaluated on molecular property prediction, reaction prediction, and molecule generation benchmarks. It achieved comparable WLN reaction-prediction performance and improved JTVAE reconstruction accuracy over the authors’ released code.
- Molecular Property Prediction: Molecular property prediction uses six MoleculeNet binary classification datasets, scaffold splits, and ROC-AUC averaged across tasks.Models are trained with 80% training, 10% validation, and 10% test data to assess performance on unseen molecular structures.
- Evaluation Procedure: The evaluation selects test performance after 32-trial hyperparameter searches with validation-based early stopping.Each trial trains a randomly initialized model and stops when validation performance fails to improve for 30 epochs.
- Reaction Prediction: WLN achieves comparable performance to the original work on both reaction-center identification and candidate-product ranking on USPTO.The two stages identify candidate bond changes, then enumerate and rank products.
- Molecule Generation: 76.4% reconstruction accuracy is achieved by JTVAE on a ZINC subset, compared with 74.4% from the authors’ released code.The evaluation reconstructs input molecules.
6 TRAINING SPEED
DGL-LifeSci’s modeling efficiency is compared with prior implementations, including original implementations and DeepChem. Training time is measured per epoch on a fixed V100-based AWS EC2 testbed.
- Training Speed: Training efficiency is compared using averaged training time for one epoch across DGL-LifeSci, original implementations, and DeepChem.The comparison uses one AWS EC2 p3.2xlarge instance with one NVIDIA V100 GPU and 8 VCPUs.
7 CONCLUSIONS
DGL-LifeSci supports GNN-based modeling for three life-science tasks and enables no-code modeling on custom datasets. Its current implementations primarily focus on small molecules, while broader graph support remains future work.
- DGL-LifeSci supports GNN-based modeling for molecular property prediction, reaction prediction, and molecule generation.
- Command-line interfaces enable efficient modeling on custom datasets without programming, while advanced users can adapt modular building blocks.
- Current implementations primarily focus on small molecules, with proteins and biological networks identified as future extensions.
- Table 6 reports epoch training time in seconds.
8 DATA AND SOFTWARE AVAILABILITY
DGL-LifeSci’s datasets, models, and experiment-reproduction scripts are publicly available through the project repository. Examples cover molecular property prediction, reaction prediction, and molecule generation.
- The datasets and models are publicly available through the DGL-LifeSci GitHub repository.
- Scripts for reproducing experiments are provided in the project examples.
- Examples cover molecular property prediction, reaction prediction, and molecule generation.