PyTorch Geometric (abbreviated as PyG) is a graph neural network (GNN) library built on PyTorch, specifically designed for deep learning tasks involving structured data. It implements various methods of Geometric Deep Learning, allowing researchers and developers to easily write and train graph neural network models.
Graph data is ubiquitous in the real world: user relationships in social networks, atomic connections in molecular structures, entity associations in knowledge graphs, road links in transportation networks, etc. Traditional deep learning models (such as CNN, RNN) excel at handling regularly structured data (images, text sequences), but for irregularly structured data like graphs, specially designed graph neural networks are needed. PyG was created precisely to address this need.