
Hands-On Graph Neural Networks Using Python: Build, train, and optimize graph-based deep learning models with PyTorch Geometric and Python 2nd Edition
Author(s): Giuseppe Futia (Author), Maxime Labonne (Author)
- Publisher Finelybook 出版社: Packt Publishing
- Publication Date 出版日期: November 20, 2026
- Edition 版本: 2nd
- Language 语言: English
- Print length 页数: 490 pages
- ISBN-10: 1806382717
- ISBN-13: 9781806382712
Book Description
Master Graph Neural Networks from fundamentals to production. Learn DeepWalk, GCN, GAT, GraphSAGE, Graph Transformers, and more with hands-on Python implementations. New chapters on graph databases, LLMs, and Graph Foundation Models.
Key Features
- Understand and implement core GNN architectures including GCN, GAT, GraphSAGE, and Graph Transformers
- Apply GNNs to real-world tasks like traffic forecasting, anomaly detection, recommender systems, and GraphRAG
- Explore new coverage of graph databases, Graph Transformers, LLM–GNN integration, and Graph Foundation Models
Book Description
Graph Neural Networks (GNNs) have become essential tools for learning from relational and structured data. This second edition provides a comprehensive, hands-on guide to implementing GNNs using Python and PyTorch Geometric.
The book begins with graph theory fundamentals and data manipulation using NetworkX and PyTorch Geometric. You then explore shallow embedding methods—DeepWalk and Node2Vec—before progressing to core GNN architectures: Graph Convolutional Networks (GCN), Graph Attention Networks (GAT), and GraphSAGE.
This edition introduces several new chapters reflecting the latest advances: Graph Transformers, integration of graph databases with GNNs, the convergence of LLMs and GNNs through GraphRAG, and the emerging paradigm of Graph Foundation Models. Existing chapters on expressiveness, link prediction, heterogeneous graphs, temporal GNNs, and explainability have been updated with current best practices.
The final part puts theory into practice with end-to-end projects: traffic forecasting with A3T-GCN, anomaly detection with heterogeneous GNNs, and building a recommender system with LightGCN.
By the end of this book, you will have the knowledge and practical skills to apply GNNs to your own graph-structured data problems.
What you will learn
- Master graph theory and manipulate graph data with NetworkX and PyG
- Create node embeddings using DeepWalk and Node2Vec
- Implement GCN, GAT, and GraphSAGE architectures with PyG
- Build and train Graph Transformers on molecular datasets
- Connect graph databases to PyG for scalable GNN pipelines
- Apply GNNs to traffic forecasting, anomaly detection, and recommender systems
- Integrate GNNs with LLMs for graph-based retrieval-augmented generation (GraphRAG)
- Understand the emerging landscape of Graph Foundation Models
Who this book is for
This book is for machine learning practitioners, data scientists, and researchers who want to learn how to apply graph neural networks and deep learning to graph-structured data. Software engineers working with network data, knowledge graphs, or recommender systems will also benefit. A working knowledge of Python and familiarity with basic machine learning concepts (neural networks, training loops, loss functions) is expected. Prior experience with PyTorch is helpful but not required, as key concepts are introduced progressively.
Table of Contents
- Getting Started with Graph Learning
- Graph Theory for Graph Neural Networks
- Creating Node Representations with DeepWalk
- Improving Embeddings with Biased Random Walks in Node2Vec
- Including Node Features with Vanilla Neural Networks
- Introducing Graph Convolutional Networks
- Graph Attention Networks
- Scaling Up Graph Neural Networks with GraphSAGE
- Bridging Graph Databases and GNNs for Scalability
- Graph Transformers: Attention Beyond Local Neighborhoods
- Defining Expressiveness for Graph Classification
- Predicting Links with Graph Neural Networks
(N.B. Please use the Read Sample option to see further chapters)
Editorial Reviews
Editorial Reviews
Review
“For developers and machine learning practitioners looking to extend their technical repertoire beyond conventional tabular and sequential learning, this title addresses a highly relevant area of modern deep learning.
The emphasis on implementation rather than terminology alone is a welcome direction for technical education.”
Paulo Leocadio, Researcher I Author I Digital Transformation Expert
About the Author
Giuseppe Futia, PhD, is a Senior Data Engineer at CSI-Piemonte (Italy). He has deep expertise in Knowledge Graphs, Large Language Models, and Graph Neural Networks, with a strong focus on applying these technologies to real-world, large-scale systems. Giuseppe is also a Fellow at the Nexa Center for Internet & Society at Politecnico di Torino, where his interests extend to the geopolitics and societal impact of artificial intelligence. With over a decade of multidisciplinary experience spanning both industry and academia, he works at the intersection of research, engineering, and technology communication. Passionate about integrating human knowledge into intelligent systems, Giuseppe continually explores emerging advances to enhance the transparency, robustness, and capabilities of knowledge-driven solutions.
Maxime Labonne is Head of Post-Training at Liquid AI. He holds a Ph.D. in Machine Learning from the Polytechnic Institute of Paris and is a Google Developer Expert in AI/ML. He has made significant contributions to the open-source community, including the LLM Course, tutorials on fine-tuning, tools such as LLM AutoEval, and best-in-class models such as NeuralDaredevil. He is the author of the best-selling books LLM Engineer’s Handbook and Hands-On Graph Neural Networks Using Python.
finelybook
