← all repositories
pyg-team/pytorch_geometric

PyTorch-on-the-rocks for graph data

Because graph data shouldn't force you to abandon PyTorch for a bespoke framework.

23.9k stars Python ML Frameworks
pytorch_geometric
Not currently ranked — collecting fresh signals.
star history

What it does

PyTorch Geometric is a PyTorch extension for building and training Graph Neural Networks. It bundles implementations of popular graph convolution layers, mini-batch loaders for everything from small molecules to million-node graphs, and transforms for 3D meshes and point clouds. The library treats graph data as first-class citizens while keeping the API close to vanilla PyTorch.

The interesting bit

PyG calls itself “PyTorch-on-the-rocks” for a reason: you subclass torch.nn.Module and swap standard layers for graph operators like GCNConv without learning a new DSL. If you need something custom, the MessagePassing base class lets you define novel aggregation rules by overriding a single message function—an elegant compression of what is usually boilerplate-heavy graph code.

Key highlights

  • Ships with most major GNN architectures (GCN, GAT, ChebConv, etc.) implemented by library developers or paper authors
  • Handles both batched small graphs and single giant graphs via sampling loaders and multi-GPU support
  • Supports heterogeneous graphs, dynamic temporal graphs, and point-cloud learning through a unified storage and operator stack
  • Integrates with modern PyTorch tooling including torch.compile, TorchScript, and DataPipe
  • Includes common benchmark datasets and preprocessing transforms out of the box

Verdict

Grab this if you are already in the PyTorch ecosystem and need to experiment with structured or relational data. If your work is strictly images or tabular, it is simply not your scene.

Frequently asked

What is pyg-team/pytorch_geometric?
Because graph data shouldn't force you to abandon PyTorch for a bespoke framework.
Is pytorch_geometric open source?
Yes — pyg-team/pytorch_geometric is open source, released under the MIT license.
What language is pytorch_geometric written in?
pyg-team/pytorch_geometric is primarily written in Python.
How popular is pytorch_geometric?
pyg-team/pytorch_geometric has 23.9k stars on GitHub.
Where can I find pytorch_geometric?
pyg-team/pytorch_geometric is on GitHub at https://github.com/pyg-team/pytorch_geometric.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.