What it does
Some data is best shown as a network, or "graph": dots connected by lines. Examples include friends in a social network, papers that cite each other, or atoms in a molecule. PyG is a library for building AI models, called graph neural networks, that learn from this kind of data.
It's built on PyTorch, a popular AI library, and includes many ready-made models from published research. Its makers say a first model takes only 10 to 20 lines of code, and that it can handle very large graphs.
Who it's for
Researchers and data scientists working with connected data.
Can I use it without coding?
Developers only. It's a Python library for programmers. New to this? Start here.
Can I run it?
- Cost
- FreeNothing to pay or sign up for.
- API key
- Not needed
Try it
Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?
Before you install
- Only download from the official GitHub page. Copies with similar names exist for many popular projects.
- License (MIT): Very permissive: free to use, change and share, including for business.
- More on staying safe
Where people are talking about it
- PyG 2.0 paperResearch paper · Jul 2025
- PyG 1.0 paperResearch paper · Mar 2019