[N] Deep Graph Library new release (v0.3.1)
Though only a minor release, this new release includes a bunch of very useful Graph Neural Network modules and model examples that can be directly used in your project. Here is a list of new modules:
New NN Modules
- GATConv from “Graph Attention Network”
- RelGraphConv from “Modeling Relational Data with Graph Convolutional Networks”
- TAGConv from “Topology Adaptive Graph Convolutional Networks”
- EdgeConv from “Dynamic Graph CNN for Learning on Point Clouds”
- SAGEConv from “Inductive Representation Learning on Large Graphs”
- GatedGraphConv from “Gated Graph Sequence Neural Networks”
- GMMConv from “Geometric Deep Learning on Graphs and Manifolds using Mixture Model CNNs”
- GINConv from “How Powerful are Graph Neural Networks?”
- ChebConv from “Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering”
- SGConv from “Simplifying Graph Convolutional Networks”
- NNConv from “Neural Message Passing for Quantum Chemistry”
- APPNPConv from “Predict then Propagate: Graph Neural Networks meet Personalized PageRank”
- AGNNConv from “Attention-based Graph Neural Network for Semi-Supervised Learning”
- DenseGraphConv (Dense implementation of GraphConv)
- DenseSAGEConv (Dense implementation of SAGEConv)
- DenseChebConv (Dense implementation of ChebConv)
New global pooling module
- Sum/Avg/MaxPooling
- SortPooling
- GlobalAttentionPooling from GGNN model
- Set2Set from “Order Matters: Sequence to sequence for sets”
- SetTransformerEncoder and SetTransformerDecoder from “Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networks”
New graph transformation routines
- dgl.transform.khop_adj
- dgl.transform.khop_graph
- dgl.transform.laplacian_lambda_max
- dgl.transform.knn_graph
- dgl.transform.segmented_knn_graph
This DGL release also includes a model zoo for chemistry applications such as using GNNs to predict molecular property or generate new molecule structures that is valuable for drug discovery. Pre-trained models are also available for download in simply two lines of codes:
“`python from dgl.data import Tox21 from dgl import model_zoo
dataset = Tox21() model = model_zoo.chem.load_pretrained(‘GCN_Tox21’) # Pretrained model loaded model.eval()
smiles, g, label, mask = dataset[0] feats = g.ndata.pop(‘h’) label_pred = model(g, feats) print(smiles) # CCOc1ccc2nc(S(N)(=O)=O)sc2c1 print(label_pred[:, mask != 0]) # Mask non-existing labels
tensor([[-0.7956, 0.4054, 0.4288, -0.5565, -0.0911,
0.9981, -0.1663, 0.2311, -0.2376, 0.9196]])
“`
Check it out if you are using GNNs, working with molecules or just interested in this whole new field.
See full release note here: https://www.dgl.ai/release/2019/08/28/release.html.
submitted by /u/jermainewang
[link] [comments]