Implement GraphSAINT with DGL
masterdgl.dataloading.SAINTSampler.repository·master·Indexed 12 days ago
https://github.com/dmlc/dglA high-performance, scalable Python package for deep learning on graphs. DGL is framework-agnostic, supporting PyTorch, MXNet, and TensorFlow, and is optimized for single-GPU and distributed multi-machine training. The ecosystem includes DGL-Go, a command-line tool for training, using, and studying Graph Neural Networks (GNNs) via a workflow of configuration, training, and exporting.
dgl.dataloading.SAINTSampler.DGL provides several common GNN layers and utility functions. While the library is extensible, the core includes:
SAGEConv and other graph convolution implementations.Several specialized libraries and tools are built on top of DGL for specific domains and tasks:
DGL-LifeSci: GNN applications in life sciences.RNAGlib: Construction, analysis, and ML on RNA 2.5D Graphs.DGL-KE: Scalable package for large-scale knowledge graph embeddings.JAKET: Joint pre-training of Knowledge Graph and Language Understanding.OGB (Open Graph Benchmark): Large-scale, diverse benchmark datasets.Benchmarking GNN: A framework for benchmarking GNNs.Graph4NLP: Intersection of Deep Learning on Graphs and NLP.GNNLens2: Visualization tool for GNNs.GNNLens: Visual analytics for prediction error diagnosis.TGL: Framework for large-scale temporal graphs.DGLD: Deep Graph Anomaly Detection.ArangoDB-DGL Adapter: Import/export graphs between ArangoDB and DGL.Amazon Neptune ML: AWS capability using GNNs for graph data predictions.The dgl.transforms module provides a collection of tools to transform graph structures and node/edge features. These transforms can be used to modify the topology of a graph (e.g., adding self-loops, creating line graphs, or computing k-hop graphs) or to apply mathematical normalization and feature engineering (e.g., GCN normalization, PageRank, or Laplacian Positional Encodings).
Most transforms follow a consistent interface where they can be applied to a DGL graph to produce a modified version or a new graph. For complex pipelines, you can use Compose to chain multiple transformations together.
The examples/ directory contains PyTorch implementations of selected research papers related to Graph Neural Networks (GNNs). You can find examples categorized by their publication year and tagged with specific tasks such as:
To find a specific implementation, you can search the repository for the paper title or use the search tool on dgl.ai.
dgl.nn.gt module provides a set of utility modules designed for building and training graph transformer models. This module is intended for researchers and practitioners working with graph transformer architectures within the DGL ecosystem.DGL provides a variety of pre-implemented modules to accelerate GNN development. These include categories such as:
SAGEConv)Users can extend DGL by contributing new modules to these categories.
DGL provides a collection of integrated building blocks for GNN models. Depending on your backend, these include:
SAGEConv.For PyTorch users, these are located in the dgl.nn.pytorch namespace.
For massive graphs that exceed a single machine's RAM, DGL uses a parallel data preparation pipeline consisting of two main steps:
The pipeline is modular; you can replace Step 1 with a custom partitioning algorithm as long as it produces valid partition assignment files.
GraphBolt is a high-flexibility, scalable data loading framework for Graph Neural Networks (GNNs) built on top of DGL and PyTorch.
It integrates with PyTorch datapipe by using a unified MiniBatch data structure to connect different processing stages. This allows GraphBolt to streamline data loading and preprocessing for training, validation, and testing through a pipelined architecture. Because the process is exposed as a pipeline, users can substitute any stage with custom implementations while still benefiting from GraphBolt's optimized scheduling strategy.