A PyTorch library for building and training Graph Neural Networks (GNNs) on structured and irregular data.
PyTorch Geometric (PyG) is a comprehensive library built upon PyTorch for deep learning on graphs and other irregular structures, a field known as geometric deep learning. It provides a unified framework to easily implement, train, and scale Graph Neural Networks (GNNs) for a wide range of applications involving structured data, from citation networks to 3D point clouds. The library solves the problem of applying neural networks to non-Euclidean data like graphs, meshes, and point clouds.
Machine learning researchers and practitioners, particularly those in fields like computational chemistry, social network analysis, recommendation systems, and computer vision, who need to work with graph-structured or 3D geometric data. It is also suitable for first-time users of GNN toolkits who are already familiar with PyTorch.
Developers choose PyG for its easy-to-use, PyTorch-like API that allows building GNN models in just 10-20 lines of code, its comprehensive collection of state-of-the-art GNN architectures, and its great flexibility for both rapid prototyping and creating custom models. Its unique selling point is being 'PyTorch-on-the-rocks,' offering a familiar experience with extensive support for scalability, heterogeneous graphs, and real-world applications.
Graph Neural Network Library for PyTorch
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers a tensor-centric interface that allows building GNN models in 10-20 lines of code, as demonstrated in the quick tour with a simple GCN implementation for the Cora dataset.
Implements a vast collection of state-of-the-art GNN layers, models, and operators from published research, comprehensively listed in the 'Implemented GNN Models' section with examples.
Includes tools for large-scale graph learning such as mini-batch loaders, sampling methods, and multi-GPU training, enabling handling of graphs with millions of nodes as highlighted under 'Scalable GNNs'.
Features an extensible message-passing API and utilities, making it simple to modify existing models or create custom architectures, shown in the 'Create your own GNN layer' example with EdgeConv.
Full feature set requires installing optional external libraries like pyg-lib, torch-scatter, and torch-sparse, which can be challenging on some systems and is noted in the installation guide.
Tightly coupled with PyTorch, making it unsuitable for projects using other deep learning frameworks like TensorFlow or JAX, limiting ecosystem flexibility.
Some operations, especially on large or sparse graphs, may have memory overheads or slower performance without optimized external libraries, impacting real-time or resource-constrained applications.