PyTorch Geometric — Graph Neural Networks PyTorch Geometric (PyG) is the standard library for deep learning on graphs. Where networkx handles graph algorithms (shortest path, centrality, community detection), PyG handles learning on graphs : training neural networks that operate directly on graph structure. The core insight: a GNN layer aggregates information from a node's neighbors, learns which neighbors matter, and produces new node representations — all differentiable, all trainable. Core Mental Model edge index — The Key Format Reference Documentation PyG docs : https://pytorch-geometric…