Abstract
Graph Deep Learning has emerged as a powerful paradigm for modeling non-Euclidean data, yet the gap between low-level operations and high-level research workflows remains significant. We present DIG (Dive into Graphs), an open-source Python library designed to provide a unified and extensible testbed for advanced graph research. DIG integrates standardized data interfaces, state-of-the-art algorithms, and rigorous evaluation metrics across four key pillars: graph generation, self-supervised learning, explainability, and 3D graph modeling. By reducing the "boilerplate" code required for complex research tasks, DIG enables researchers to focus on algorithmic innovation and fair benchmarking.
Introduction
While libraries such as PyTorch Geometric (PyG) and Deep Graph Library (DGL) have successfully standardized the "bricks" of graph neural networks (GNNs)—such as message-passing layers—they often lack the "blueprints" for high-level research workflows. Researchers developing new models for tasks like molecular generation or GNN explainability frequently must implement custom data loaders, evaluation scripts, and baseline comparisons from scratch. This fragmentation hinders reproducibility and slows the pace of innovation. DIG addresses these challenges by providing a "turnkey" solution that standardizes research directions into a cohesive ecosystem.
System Architecture and Research Pillars
DIG is built upon the robust foundations of PyTorch and PyG, adhering to a philosophy of unified implementation. The library organizes graph research into four primary pillars, each equipped with standardized APIs for data handling and performance assessment.
1. Graph Generation
This pillar focuses on the creation of novel molecular graphs. It includes implementations of advanced generative models such as JT-VAE, GraphAF, and GraphEBM. Standardized metrics for random generation and property optimization (both constrained and unconstrained) are built-in to ensure rigorous evaluation.
2. Self-supervised Learning on Graphs
To address the scarcity of labeled graph data, DIG provides a framework for contrastive and self-supervised learning. It incorporates established models like InfoGraph, GRACE, and GraphCL, allowing for easy benchmarking of representation learning techniques.
3. Explainability of GNNs
Understanding the decision-making process of GNNs is critical for high-stakes applications. DIG offers tools for both instance-level explanations (e.g., GNNExplainer, SubgraphX) and model-level explanations (e.g., XGNN). It introduces standardized metrics like Fidelity and Sparsity to quantify the quality of explanations.
4. Deep Learning on 3D Graphs
Recognizing the importance of spatial coordinates in chemistry and physics, DIG treats 3D graphs as a first-class citizen. It features a unified 3D Graph Network (3DGN) framework that supports models like SchNet, DimeNet++, and SphereNet, facilitating the development of models for molecular dynamics and materials science.
Standardized Benchmarks
DIG integrates a wide array of molecular and general-purpose datasets, including QM9, ZINC250k, MOSES, and the TUDataset collection. Notably, the library introduces new human-understandable datasets derived from text, such as Graph-SST2 and Graph-SST5, specifically designed to evaluate the interpretability of GNN explainers.
Conclusion and Future Work
DIG currently supports over 18 advanced algorithms and provides a mature software ecosystem maintained via continuous integration. By standardizing the evaluation of complex graph tasks, DIG serves as a catalyst for more rigorous research. As the field evolves, the authors plan to incorporate emerging research directions and newer algorithms through community-driven open-source contributions.
Source Code: https://github.com/divelab/DIG
Documentation: https://diveintographs.readthedocs.io
Summary updated