dgl.nn (PyTorch)¶
Conv Layers¶
Graph convolutional layer from Semi-Supervised Classification with Graph Convolutional Networks |
|
This module normalizes positive scalar edge weights on a graph following the form in GCN. |
|
Relational graph convolution layer from Modeling Relational Data with Graph Convolutional Networks |
|
An accelerated relational graph convolution layer from Modeling Relational Data with Graph Convolutional Networks that leverages the highly-optimized aggregation primitives in cugraph-ops. |
|
Topology Adaptive Graph Convolutional layer from Topology Adaptive Graph Convolutional Networks |
|
Graph attention layer from Graph Attention Network |
|
GATv2 from How Attentive are Graph Attention Networks? |
|
Graph attention layer that handles edge features from Rossmann-Toolbox (see supplementary data) |
|
EdgeConv layer from Dynamic Graph CNN for Learning on Point Clouds |
|
GraphSAGE layer from Inductive Representation Learning on Large Graphs |
|
SGC layer from Simplifying Graph Convolutional Networks |
|
Approximate Personalized Propagation of Neural Predictions layer from Predict then Propagate: Graph Neural Networks meet Personalized PageRank |
|
Graph Isomorphism Network layer from How Powerful are Graph Neural Networks? |
|
Graph Isomorphism Network with Edge Features, introduced by Strategies for Pre-training Graph Neural Networks |
|
Gated Graph Convolution layer from Gated Graph Sequence Neural Networks |
|
Gaussian Mixture Model Convolution layer from Geometric Deep Learning on Graphs and Manifolds using Mixture Model CNNs |
|
Chebyshev Spectral Graph Convolution layer from Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering |
|
Attention-based Graph Neural Network layer from Attention-based Graph Neural Network for Semi-Supervised Learning |
|
Graph Convolution layer from Neural Message Passing for Quantum Chemistry |
|
Atomic Convolution Layer from Atomic Convolutional Networks for Predicting Protein-Ligand Binding Affinity |
|
CFConv from SchNet: A continuous-filter convolutional neural network for modeling quantum interactions |
|
Apply dot product version of self attention in Graph Attention Network |
|
Convolution together with iteratively reweighting least squre from Graph Neural Networks Inspired by Classical Iterative Algorithms |
|
Description |
|
Graph Convolutional Network via Initial residual and Identity mapping (GCNII) from Simple and Deep Graph Convolutional Networks |
|
Heterogeneous graph transformer convolution from Heterogeneous Graph Transformer |
|
Grouped reversible residual connections for GNNs, as introduced in Training Graph Neural Networks with 1000 Layers |
|
Equivariant Graph Convolutional Layer from E(n) Equivariant Graph Neural Networks |
|
Principal Neighbourhood Aggregation Layer from Principal Neighbourhood Aggregation for Graph Nets |
|
Directional Graph Network Layer from Directional Graph Networks |
Dense Conv Layers¶
Graph Convolutional layer from Semi-Supervised Classification with Graph Convolutional Networks |
|
GraphSAGE layer from Inductive Representation Learning on Large Graphs |
|
Chebyshev Spectral Graph Convolution layer from Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering |
Global Pooling Layers¶
Apply sum pooling over the nodes in a graph. |
|
Apply average pooling over the nodes in a graph. |
|
Apply max pooling over the nodes in a graph. |
|
Sort Pooling from An End-to-End Deep Learning Architecture for Graph Classification |
|
Compute importance weights for atoms and perform a weighted sum. |
|
Global Attention Pooling from Gated Graph Sequence Neural Networks |
|
Set2Set operator from Order Matters: Sequence to sequence for sets |
|
The Encoder module from Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networks |
|
The Decoder module from Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networks |
Score Modules for Link Prediction and Knowledge Graph Completion¶
Predictor/score function for pairs of node representations |
|
Similarity measure from Translating Embeddings for Modeling Multi-relational Data |
|
Similarity measure from Learning entity and relation embeddings for knowledge graph completion |
Heterogeneous Learning Modules¶
A generic module for computing convolution on heterogeneous graphs. |
|
Apply linear transformations on heterogeneous inputs. |
|
Create a heterogeneous embedding table. |
|
Linear transformation according to types. |
Utility Modules¶
A sequential container for stacking graph neural network modules |
|
Basis decomposition from Modeling Relational Data with Graph Convolutional Networks |
|
Layer that transforms one point set into a graph, or a batch of point sets with the same number of points into a batched union of those graphs. |
|
Layer that transforms one point set into a graph, or a batch of point sets with different number of points into a batched union of those graphs. |
|
Layer that transforms one point set into a bidirected graph with neighbors within given distance. |
|
The Jumping Knowledge aggregation module from Representation Learning on Graphs with Jumping Knowledge Networks |
|
Class for storing node embeddings. |
|
GNNExplainer model from GNNExplainer: Generating Explanations for Graph Neural Networks |
|
GNNExplainer model from GNNExplainer: Generating Explanations for Graph Neural Networks, adapted for heterogeneous graphs |
|
Label Propagation from Learning from Labeled and Unlabeled Data with Label Propagation |
|
Degree Encoder, as introduced in Do Transformers Really Perform Bad for Graph Representation? This module is a learnable degree embedding module. |
|
Laplacian Positional Encoder (LPE), as introduced in GraphGPS: General Powerful Scalable Graph Transformers This module is a learned laplacian positional encoding module using Transformer or DeepSet. |
|
Dense Multi-Head Attention Module with Graph Attention Bias. |
|
Graphormer Layer with Dense Multi-Head Attention, as introduced in Do Transformers Really Perform Bad for Graph Representation? |
|
Path Encoder, as introduced in Edge Encoding of Do Transformers Really Perform Bad for Graph Representation? This module is a learnable path embedding module and encodes the shortest path between each pair of nodes as attention bias. |
|
Spatial Encoder, as introduced in Do Transformers Really Perform Bad for Graph Representation? This module is a learnable spatial embedding module which encodes the shortest distance between each node pair for attention bias. |
|
3D Spatial Encoder, as introduced in One Transformer Can Understand Both 2D & 3D Molecular Data This module encodes pair-wise relation between atom pair \((i,j)\) in the 3D geometric space, according to the Gaussian Basis Kernel function: |
Network Embedding Modules¶
DeepWalk module from DeepWalk: Online Learning of Social Representations |
|
metapath2vec module from metapath2vec: Scalable Representation Learning for Heterogeneous Networks |