Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Hands-On Graph Neural Networks Using Python
Hands-On Graph Neural Networks Using Python

Hands-On Graph Neural Networks Using Python: Practical techniques and architectures for building powerful graph and deep learning apps with PyTorch

eBook
$35.98 $39.99
Paperback
$49.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Hands-On Graph Neural Networks Using Python

Getting Started with Graph Learning

Welcome to the first chapter of our journey into the world of graph neural networks (GNNs). In this chapter, we will delve into the foundations of GNNs and understand why they are crucial tools in modern data analysis and machine learning. To that end, we will answer three essential questions that will provide us with a comprehensive understanding of GNNs.

First, we will explore the significance of graphs as a representation of data, and why they are widely used in various domains such as computer science, biology, and finance. Next, we will delve into the importance of graph learning, where we will understand the different applications of graph learning and the different families of graph learning techniques. Finally, we will focus on the GNN family, highlighting its unique features, performance, and how it stands out compared to other methods.

By the end of this chapter, you will have a clear understanding of why GNNs are important and how they can be used to solve real-world problems. You will also be equipped with the knowledge and skills you need to dive deeper into more advanced topics. So, let’s get started!

In this chapter, we will cover the following main topics:

  • Why graphs?
  • Why graph learning?
  • Why graph neural networks?

Why graphs?

The first question we need to address is: why are we interested in graphs in the first place? Graph theory, the mathematical study of graphs, has emerged as a fundamental tool for understanding complex systems and relationships. A graph is a visual representation of a collection of nodes (also called vertices) and edges that connect these nodes, providing a structure to represent entities and their relationships (see Figure 1.1).

Figure 1.1 – Example of a graph with six nodes and five edges

Figure 1.1 – Example of a graph with six nodes and five edges

By representing a complex system as a network of entities with interactions, we can analyze their relationships, allowing us to gain a deeper understanding of their underlying structures and patterns. The versatility of graphs makes them a popular choice in various domains, including the following:

  • Computer science, where graphs can be used to model the structure of computer programs, making it easier to understand how different components of a system interact with each other
  • Physics, where graphs can be used to model physical systems and their interactions, such as the relationship between particles and their properties
  • Biology, where graphs can be used to model biological systems, such as metabolic pathways, as a network of interconnected entities
  • Social sciences, where graphs can be used to study and understand complex social networks, including the relationships between individuals in a community
  • Finance, where graphs can be used to analyze stock market trends and relationships between different financial instruments
  • Engineering, where graphs can be used to model and analyze complex systems, such as transportation networks and electrical power grids

These domains naturally exhibit a relational structure. For instance, graphs are a natural representation of social networks: nodes are users, and edges represent friendships. But graphs are so versatile they can also be applied to domains where the relational structure is less natural, unlocking new insights and understanding.

For example, images can be represented as a graph, as in Figure 1.2. Each pixel is a node, and edges represent relationships between neighboring pixels. This allows for the application of graph-based algorithms to image processing and computer vision tasks.

Figure 1.2 – Left: original image; right: graph representation of this image

Figure 1.2 – Left: original image; right: graph representation of this image

Similarly, a sentence can be transformed into a graph, where nodes are words and edges represent relationships between adjacent words. This approach is useful in natural language processing and information retrieval tasks, where the context and meaning of words are critical factors.

Unlike text and images, graphs do not have a fixed structure. However, this flexibility also makes graphs more challenging to handle. The absence of a fixed structure means they can have an arbitrary number of nodes and edges, with no specific ordering. In addition, graphs can represent dynamic data, where the connections between entities can change over time. For example, the relationships between users and products can change as they interact with each other. In this scenario, nodes and edges are updated to reflect changes in the real world, such as new users, new products, and new relationships.

In the next section, we will delve deeper into how to use graphs with machine learning to create valuable applications.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Implement -of-the-art graph neural architectures in Python
  • Create your own graph datasets from tabular data
  • Build powerful traffic forecasting, recommender systems, and anomaly detection applications

Description

Graph neural networks are a highly effective tool for analyzing data that can be represented as a graph, such as networks, chemical compounds, or transportation networks. The past few years have seen an explosion in the use of graph neural networks, with their application ranging from natural language processing and computer vision to recommendation systems and drug discovery. Hands-On Graph Neural Networks Using Python begins with the fundamentals of graph theory and shows you how to create graph datasets from tabular data. As you advance, you’ll explore major graph neural network architectures and learn essential concepts such as graph convolution, self-attention, link prediction, and heterogeneous graphs. Finally, the book proposes applications to solve real-life problems, enabling you to build a professional portfolio. The code is readily available online and can be easily adapted to other datasets and apps. By the end of this book, you’ll have learned to create graph datasets, implement graph neural networks using Python and PyTorch Geometric, and apply them to solve real-world problems, along with building and training graph neural network models for node and graph classification, link prediction, and much more.

Who is this book for?

This book is for machine learning practitioners and data scientists interested in learning about graph neural networks and their applications, as well as students looking for a comprehensive reference on this rapidly growing field. Whether you’re new to graph neural networks or looking to take your knowledge to the next level, this book has something for you. Basic knowledge of machine learning and Python programming will help you get the most out of this book.

What you will learn

  • Understand the fundamental concepts of graph neural networks
  • Implement graph neural networks using Python and PyTorch Geometric
  • Classify nodes, graphs, and edges using millions of samples
  • Predict and generate realistic graph topologies
  • Combine heterogeneous sources to improve performance
  • Forecast future events using topological information
  • Apply graph neural networks to solve real-world problems

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 14, 2023
Length: 354 pages
Edition : 1st
Language : English
ISBN-13 : 9781804610701
Category :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 14, 2023
Length: 354 pages
Edition : 1st
Language : English
ISBN-13 : 9781804610701
Category :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 139.97
Causal Inference and Discovery in Python
$39.99
Interpretable Machine Learning with Python
$49.99
Hands-On Graph Neural Networks Using Python
$49.99
Total $ 139.97 Stars icon

Table of Contents

24 Chapters
Part 1: Introduction to Graph Learning Chevron down icon Chevron up icon
Chapter 1: Getting Started with Graph Learning Chevron down icon Chevron up icon
Chapter 2: Graph Theory for Graph Neural Networks Chevron down icon Chevron up icon
Chapter 3: Creating Node Representations with DeepWalk Chevron down icon Chevron up icon
Part 2: Fundamentals Chevron down icon Chevron up icon
Chapter 4: Improving Embeddings with Biased Random Walks in Node2Vec Chevron down icon Chevron up icon
Chapter 5: Including Node Features with Vanilla Neural Networks Chevron down icon Chevron up icon
Chapter 6: Introducing Graph Convolutional Networks Chevron down icon Chevron up icon
Chapter 7: Graph Attention Networks Chevron down icon Chevron up icon
Part 3: Advanced Techniques Chevron down icon Chevron up icon
Chapter 8: Scaling Up Graph Neural Networks with GraphSAGE Chevron down icon Chevron up icon
Chapter 9: Defining Expressiveness for Graph Classification Chevron down icon Chevron up icon
Chapter 10: Predicting Links with Graph Neural Networks Chevron down icon Chevron up icon
Chapter 11: Generating Graphs Using Graph Neural Networks Chevron down icon Chevron up icon
Chapter 12: Learning from Heterogeneous Graphs Chevron down icon Chevron up icon
Chapter 13: Temporal Graph Neural Networks Chevron down icon Chevron up icon
Chapter 14: Explaining Graph Neural Networks Chevron down icon Chevron up icon
Part 4: Applications Chevron down icon Chevron up icon
Chapter 15: Forecasting Traffic Using A3T-GCN Chevron down icon Chevron up icon
Chapter 16: Detecting Anomalies Using Heterogeneous GNNs Chevron down icon Chevron up icon
Chapter 17: Building a Recommender System Using LightGCN Chevron down icon Chevron up icon
Chapter 18: Unlocking the Potential of Graph Neural Networks for Real-World Applications Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(23 Ratings)
5 star 56.5%
4 star 21.7%
3 star 4.3%
2 star 8.7%
1 star 8.7%
Filter icon Filter
Top Reviews

Filter reviews by




SEAN W. GRANT Jun 19, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Trying to understand what graph neural networks (GNN's) are, let alone how to use them can be difficult and intimidating. In recent times, GNN's have become a hot topic and this book does a great job of introducing them and showing use cases of how they can be helpful to provide deeper insights. It is geared towards folks with a technical background and are comfortable with python (hence the "Hands On" part). I found the illustrations to be very helpful in explaining the technical concepts more and the links to further reading were good to reference if I wanted to go deeper on some topics. One part I really enjoyed was the spatio-temporal GNN on dynamic graphs. This has a lot of real-world applications, and the author did a fantastic job of explaining the problem, describing the GNN and its limitations then walking through the code to get a prediction.Overall this is a must have book to have on the shelf if you want to start to dive into the world of deep learning on graphs!
Amazon Verified review Amazon
H2N Oct 05, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The book stands as a guiding light for those exploring the realm of GNN. Effortlessly merging basic graph theory with advanced methods, it provides a hands-on exploration of its applications, enriched by real-world instances. The inclusion of interactive Jupyter Notebooks on GitHub enhances the reader's journey, facilitating hands-on experiments on platforms such as Google Colab. Harmonizing theoretical insights with practical demonstrations, it's a must-have for anyone, whether new or experienced in GNN. A top recommendation!
Amazon Verified review Amazon
Steven Fernandes Jul 04, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book comprehensively introduces graph neural networks, effectively demystifying complex concepts. Its practical approach to implementation using Python and PyTorch Geometric is commendable. Readers will master classifying nodes, graphs, and edges with millions of samples, and predicting realistic graph topologies. Particularly noteworthy is the book's focus on performance improvement via heterogeneous sources and applying topological information for future event forecasting. The real-world problem-solving focus of the book adds a pragmatic edge, making it an invaluable resource for both novice and experienced practitioners in the field. It's a must-read for anyone interested in graph neural networks.
Amazon Verified review Amazon
Manu Jun 16, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is one of the best books to pick up Graph Neural Networks today. The book takes the reader from basics of Graphs to modern techniques like Graph Attention Networks. the the special focus on applications shows the reader how GNNs can be used in a wide variety of highly relevant use cases like forecasting, recommendation systems, etc.The book is well-written and is a pleasure to read. Would definitely recommend this book to others.
Amazon Verified review Amazon
Amazon Customer Aug 15, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
All and all a very nice book about GNNs. This is a practice-oriented book with well-chosen examples. It's an ideal complement to practice and get the code right. There are a few typos here and there, but they're minor and the code works!
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.