DGL, the Deep Graph Library, is an open-source Python package that makes deep learning on graph data easy, fast, and scalable. Maintained by the DMLC community behind projects like XGBoost, it has become a standard toolkit for graph neural network research and applications. The repository has collected more than 14,000 stars on GitHub, with development continuing into 2025.
DGL’s central idea is a powerful graph object that can live on CPU or GPU, bundling structure and node and edge features together. On top of it, DGL provides efficient, customizable message-passing primitives, the core operation of graph neural networks, so implementing models like GCN, GAT, GraphSAGE, or relational GNNs takes a few lines instead of pages of sparse-matrix code. The library is deliberately framework-agnostic: the same graph code works with PyTorch, TensorFlow, or Apache MXNet backends, so DGL slots into an existing stack rather than replacing it. The project ships a rich zoo of example implementations covering node classification, link prediction, graph generation, recommender systems, and molecular modeling, plus DGL-Go, a command-line tool for training and studying popular GNN models quickly. Documentation, tutorials, and an active forum round out the ecosystem.
DGL is free and open source under the Apache 2.0 license. There are no commercial editions or hosted tiers; the library, examples, and documentation are all available at no cost for research and production use.
DGL is for researchers and engineers working with graph-structured data: social and transaction networks, chemistry and drug discovery, recommender systems, and knowledge graphs. Beginners get working examples of every major GNN family, while experienced teams get a performant, backend-flexible foundation for production graph models.