PyTorch Geometric
PyTorch Geometric is an open-source Python library that extends PyTorch with data structures and operators for graph and geometric machine learning.
Graph Neural Networks in Action
PyTorch Geometric is an open-source Python library for developing and training graph neural networks with PyTorch.
- How it is used
- Supports preparing graph data and implementing graph neural networks with PyTorch.
- How deep it goes
- Works through graph conversion, tensors, layers, masks, and aggregation choices; leaves larger-than-single-machine handling to separate strategies.
- Examples
- Uses a converted NetworkX graph, a two-layer embedding model, aggregation comparisons, and masked node classification.
- What you can do after
- Apply it via PyTorch Geometric to prepare graph tensors and train graph neural networks.
Read how Graph Neural Networks in Action explains PyTorch Geometric →
Build AI Drug Discovery Pipelines
PyTorch Geometric is an open-source extension library for PyTorch that provides data structures and operators for geometric deep learning on graphs and related domains.
- How it is used
- Supports drug-target affinity models by representing and batching molecule and protein graphs for efficient GPU computation.
- How deep it goes
- Explains Data objects, COO edges, custom datasets, disconnected-graph batching, and dual-stream processing, without detailing library internals.
- Examples
- Uses molecular and protein Data objects, atom and residue features, paired graph batches, and affinity targets.
- What you can do after
- Apply it via PyTorch Geometric to construct, collate, and process variable-sized molecular and protein graphs.
Read how Build AI Drug Discovery Pipelines explains PyTorch Geometric →
Knowledge Graphs and LLMs in Action
PyTorch Geometric is an open-source library that provides data structures and neural-network layers for geometric and graph machine learning with PyTorch.
- How it is used
- Builds PyTorch-based GNN pipelines for node classification and link prediction on homogeneous and heterogeneous graphs.
- How deep it goes
- Explains Data construction, masking, dataset partitioning, embeddings, heterogeneous conversion, and encoder–decoder implementation.
- Examples
- Uses an Elliptic financial transaction graph and a MovieLens user–movie rating graph as implementation examples.
- What you can do after
- Build it from scratch by preparing PyG graph objects, defining masks, and assembling homogeneous or heterogeneous GNN models.
Read how Knowledge Graphs and LLMs in Action explains PyTorch Geometric →
Also covered in
- Fight Fraud with Machine LearningIn early access (MEAP)
What to know first
- graph neural networkA graph neural network is a neural-network model that learns representations or predictions from graph-structured data by combining information from connected entities.
- accuracyAccuracy is the degree to which a result agrees with a specified truth, reference, or criterion, commonly measured as the proportion of evaluated predictions that are correct.
- f-scoreAn F-score is a classification metric that combines precision and recall through a weighted harmonic mean; F1 weights them equally.
- graph convolutional networkA graph convolutional network is a graph neural network that computes representations by transforming and aggregating information from graph neighborhoods.
Related concepts
- graph neural networkuses · A graph neural network is a neural-network model that learns representations or predictions from graph-structured data by combining information from connected entities.
- PyTorchuses · PyTorch is an open-source machine-learning framework that provides tensor computation, automatic differentiation, and tools for developing and training neural networks.
- preprocessinguses · Preprocessing is the preparation or transformation of data or other inputs into a form suitable for subsequent processing, analysis, or execution.
- edge indexuses · An edge index is a tensor-based representation that records graph edges as pairs of source and destination node indices.
- remote backenduses · A remote backend is a graph-data storage and retrieval mechanism that keeps data in an external backend and fetches computational subsets as needed.
Questions about PyTorch Geometric
What is PyTorch Geometric?
PyTorch Geometric is an open-source Python library that extends PyTorch with data structures and operators for graph and geometric machine learning.
Which Manning books explain PyTorch Geometric?
Graph Neural Networks in Action, Build AI Drug Discovery Pipelines and Knowledge Graphs and LLMs in Action.
What should I know before learning PyTorch Geometric?
Manning books that teach PyTorch Geometric usually introduce graph neural network, accuracy, f-score and graph convolutional network first.
What is PyTorch Geometric also called?
PyTorch Geometric is also called PyG.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


