skillfed

torch-geometric

Graph Neural Network Library for PyTorch

torch-geometric v2.8.0.post1 1.5M downloads/30d#3,821 on PyPI24,008
Permissive license MIT Active released

What it is and what it does

PyTorch Geometric is a framework for implementing Graph Neural Networks on top of PyTorch. It provides a collection of pre-built GNN layers (GCNConv, GraphSAGE, GAT, etc.), a message-passing API for custom architectures, mini-batch loaders for both small and large graphs, and benchmark datasets. The library is designed to feel like native PyTorch—if you know PyTorch, the API is straightforward.

You use it to solve problems on graph-structured data: node classification, link prediction, graph classification, and other geometric deep learning tasks. It handles diverse graph types including static graphs, dynamic graphs, heterogeneous graphs with multiple node and edge types, and 3D point clouds. The library supports multi-GPU training and torch.compile for performance optimization.

Use it for:

  • Classify nodes in citation networks or social graphs using pre-built GCN or GraphSAGE layers.
  • Build custom GNN architectures by extending the MessagePassing base class for research or domain-specific problems.
  • Train on large-scale graphs with millions of nodes using mini-batch loaders and scalable GNN models.
  • Perform link prediction or graph-level classification on benchmark datasets (OGB, Cora, Citeseer, etc.).
  • Process 3D point cloud data or mesh structures using geometric transformations and specialized layers.
  • Prototype heterogeneous graph models with multiple node and edge types for knowledge graphs or recommendation systems.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PyTorch Geometric is a library for building and training Graph Neural Networks (GNNs) on structured data, providing pre-built GNN layers, datasets, data loaders, and utilities for geometric deep learning.

Yes. PyTorch Geometric is production-stable (Development Status 5), actively maintained, has no known vulnerabilities, and is in the top 5000 PyPI packages by download volume. Install friction is low and the MIT license is permissive. It is the standard library for GNN work in PyTorch—install it if you need to build or train graph neural networks.

Install

torch-geometric on PyPI

pip

pip install torch-geometric

uv

uv add torch-geometric

poetry

poetry add torch-geometric

Installing torch-geometric

Before you install

Low friction install with a pure Python wheel. Active maintenance—last commit 2026-07-31, release 25 days ago. Supports Python 3.10 through 3.14. Nine runtime dependencies are all well-established packages (numpy, torch, aiohttp, requests, tqdm, etc.), so no unusual compatibility risks.

License in practice

MIT license (permissive). You can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions—just include the license notice.

Quickstart

pip install torch-geometric

import torch
from torch_geometric.nn import GCNConv
from torch_geometric.datasets import Planetoid

dataset = Planetoid(root='.', name='Cora')
model = GCNConv(dataset.num_features, dataset.num_classes)

PyTorch must be installed separately (not listed as a direct dependency in the fact sheet, but is the core runtime requirement). Requires Python >=3.10.

Verify before relying

  • Whether PyTorch is declared as a dependency in the actual package metadata (not shown in the runtime list).
  • GPU/CUDA support requirements and whether optional compiled extensions (pyg-lib) are automatically built or require system libraries.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 9 — aiohttp, fsspec, jinja2, numpy, psutil, pyparsing, requests, tqdm, xxhash
Maintenance actively maintained — 25 days since the last release
Last repo commit
First released
Downloads 1,517,719/month — #3,821 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: torch_geometric-2.8.0.post1-py3-none-any.whl

Keywords: deep-learning, pytorch, geometric-deep-learning, graph-neural-networks, graph-convolutional-networks

Development Status :: 5 - Production/StableProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

graph neural networksGNN library pytorchgeometric deep learninggraph convolutional networksmessage passing neural networksgraph machine learningnode classification on graphsgraph representation learning
graph-neural-networksgeometric-deep-learningpytorch-extension

More Artificial Intelligence packages