--- id: torch-geometric version: "2.8.0.post1" license: MIT license_treatment: permissive maintenance: active --- # torch-geometric — Graph Neural Network Library for PyTorch License: permissive · Maintenance: active · Downloads: 1.5M/mo ## 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 above — 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 pip install torch-geometric uv add torch-geometric 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_current - Install friction: low - Maintenance: active - Downloads: 1.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags graph neural networks, GNN library pytorch, geometric deep learning, graph convolutional networks, message passing neural networks, graph machine learning, node classification on graphs, graph representation learning, graph-neural-networks, geometric-deep-learning, pytorch-extension [View on SkillFed](https://skillfed.io/packages/torch-geometric) · [View on PyPI](https://pypi.org/project/torch-geometric/)