This is the code repository for Graph Machine Learning, Second Edition, published by Packt.
Aldo Marzullo, Enrico Deusebio, Claudio Stamile
Graph Machine Learning, Second Edition builds on its predecessor’s success, delivering the latest tools and techniques for this rapidly evolving field. From basic graph theory to advanced ML models, you’ll learn how to represent data as graphs to uncover hidden patterns and relationships, with practical implementation emphasized through refreshed code examples. This thoroughly updated edition replaces outdated examples with modern alternatives such as PyTorch and DGL, available on GitHub to support enhanced learning. The book also introduces new chapters on large language models and temporal graph learning, along with deeper insights into modern graph ML frameworks. Rather than serving as a step-by-step tutorial, it focuses on equipping you with fundamental problem-solving approaches that remain valuable even as specific technologies evolve. You will have a clear framework for assessing and selecting the right tools. By the end of this book, you’ll gain both a solid understanding of graph machine learning theory and the skills to apply it to real-world challenges.
- Implement graph ML algorithms with examples in StellarGraph, PyTorch Geometric, and DGL
- Apply graph analysis to dynamic datasets using temporal graph ML
- Enhance NLP and text analytics with graph-based techniques
- Solve complex real-world problems with graph machine learning
- Build and scale graph-powered ML applications effectively
- Deploy and scale your application seamlessly
We recommend that you use Docker to have a reproducible environment and stable dependency sets. The provided Docker images – one for each chapter – ship with a Jupyter installation and a Python kernel with the dependencies pre-installed, which you can use to run all the examples. For some chapters, Neo4j, JanusGraph, and Gephi are also needed.
| Software/Hardware | OS Requirements |
|---|---|
| Python | Windows, macOS, and Linux (any) |
| Neo4j | Windows, macOS, and Linux (any) |
| Gephi | Windows, macOS, and Linux (any) |
| Docker | Windows, macOS, and Linux (any) |
A beginner-level understanding of graph databases and graph data is required. Intermediate-level working knowledge of Python programming and machine learning is also expected to make the most of this book.
The authors acknowledge the use of cutting-edge AI, such as ChatGPT, with the sole aim of enhancing the language and clarity within the book, thereby ensuring a smooth reading experience for readers. It’s important to note that the content itself has been crafted by the authors and edited by a professional publishing team.
Aldo Marzullo received an M.Sc. degree in computer science from the University of Calabria (Cosenza, Italy) in September 2016. During his studies, he developed a solid background in several areas, including algorithm design, graph theory, and machine learning. In January 2020, he received his joint Ph.D. from the University of Calabria and Université Claude Bernard Lyon 1 (Lyon, France), with a thesis titled Deep Learning and Graph Theory for Brain Connectivity Analysis in Multiple Sclerosis. He is currently a postdoctoral researcher and collaborates with several international institutions.
Enrico Deusebio is currently working as engineering manager at Canonical, the publisher of Ubuntu, to promote open source technologies in the data and AI space and to make them more accessible to everyone. He has been working with data and distributed computing for over 15 years, both in an academic and industrial context, helping organizations implement data-driven strategies and build AI-powered solutions. He has collaborated and worked with top-tier universities, such as the University of Cambridge, University of Turin, and the Royal Institute of Technology (KTH) in Stockholm, where he obtained a Ph.D. in 2014. He holds a B.Sc. and an M.Sc. degree in aerospace engineering from Politecnico di Torino.
Claudio Stamile received an M.Sc. degree in computer science from the University of Calabria (Cosenza, Italy) in September 2013 and, in September 2017, he received his joint Ph.D. from KU Leuven (Leuven, Belgium) and Université Claude Bernard Lyon 1 (Lyon, France). During his career, he developed a solid background in AI, graph theory and machine learning with a focus on the biomedical field.
