Hands-On Graph Neural Networks Using Python: Practical techniques and architectures

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Design robust graph neural networks with PyTorch Geometric by combining graph theory and neural networks with the latest developments and apps Purchase of the print or Kindle book includes a free PDF eBook Key Features Implement state-of-the-art graph neural network architectures in Python Create your own graph datasets from tabular data Build powerful traffic forecasting, recommender systems, and anomaly detection applications Book Description Graph neural networks are a highly effective tool for analyzing data that can be represented as a graph, such as social 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. 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 Who this book is 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.

Author(s): Maxime Labonne
Edition: 1
Publisher: Packt
Year: 2023

Language: English
Pages: 354

Cover
Title Page
Copyright
Contributors
Table of Contents
Preface
Part 1: Introduction to Graph Learning
Chapter 1: Getting Started with Graph Learning
Why graphs?
Why graph learning?
Why graph neural networks?
Summary
Further reading
Chapter 2: Graph Theory for Graph Neural Networks
Technical requirements
Introducing graph properties
Directed graphs
Weighted graphs
Connected graphs
Types of graphs
Discovering graph concepts
Fundamental objects
Graph measures
Adjacency matrix representation
Exploring graph algorithms
Breadth-first search
Depth-first search
Summary
Chapter 3: Creating Node Representations with DeepWalk
Technical requirements
Introducing Word2Vec
CBOW versus skip-gram
Creating skip-grams
The skip-gram model
DeepWalk and random walks
Implementing DeepWalk
Summary
Further reading
Part 2: Fundamentals
Chapter 4: Improving Embeddings with Biased Random Walks in Node2Vec
Technical requirements
Introducing Node2Vec
Defining a neighborhood
Introducing biases in random walks
Implementing Node2Vec
Building a movie RecSys
Summary
Further reading
Chapter 5: Including Node Features with Vanilla Neural Networks
Technical requirements
Introducing graph datasets
The Cora dataset
The Facebook Page-Page dataset
Classifying nodes with Vanilla Neural Networks
Classifying nodes with Vanilla Graph Neural Networks
Summary
Further reading
Chapter 6: Introducing Graph Convolutional Networks
Technical requirements
Designing the graph convolutional layer
Comparing graph convolutional and graph linear layers
Predicting web traffic with node regression
Summary
Further reading
Chapter 7: Graph Attention Networks
Technical requirements
Introducing the graph attention layer
Linear transformation
Activation function
Softmax normalization
Multi-head attention
Improved graph attention layer
Implementing the graph attention layer in NumPy
Implementing a GAT in PyTorch Geometric
Summary
Part 3: Advanced Techniques
Chapter 8: Scaling Up Graph Neural Networks with GraphSAGE
Technical requirements
Introducing GraphSAGE
Neighbor sampling
Aggregation
Classifying nodes on PubMed
Inductive learning on protein-protein interactions
Summary
Further reading
Chapter 9: Defining Expressiveness for Graph Classification
Technical requirements
Defining expressiveness
Introducing the GIN
Classifying graphs using GIN
Graph classification
Implementing the GIN
Summary
Further reading
Chapter 10: Predicting Links with Graph Neural Networks
Technical requirements
Predicting links with traditional methods
Heuristic techniques
Matrix factorization
Predicting links with node embeddings
Introducing Graph Autoencoders
Introducing VGAEs
Implementing a VGAE
Predicting links with SEAL
Introducing the SEAL framework
Implementing the SEAL framework
Summary
Further reading
Chapter 11: Generating Graphs Using Graph Neural Networks
Technical requirements
Generating graphs with traditional techniques
The Erdős–Rényi model
The small-world model
Generating graphs with graph neural networks
Graph variational autoencoders
Autoregressive models
Generative adversarial networks
Generating molecules with MolGAN
Summary
Further reading
Chapter 12: Learning from Heterogeneous Graphs
Technical requirements
The message passing neural network framework
Introducing heterogeneous graphs
Transforming homogeneous GNNs to heterogeneous GNNs
Implementing a hierarchical self-attention network
Summary
Further reading
Chapter 13: Temporal Graph Neural Networks
Technical requirements
Introducing dynamic graphs
Forecasting web traffic
Introducing EvolveGCN
Implementing EvolveGCN
Predicting cases of COVID-19
Introducing MPNN-LSTM
Implementing MPNN-LSTM
Summary
Further reading
Chapter 14: Explaining Graph Neural Networks
Technical requirements
Introducing explanation techniques
Explaining GNNs with GNNExplainer
Introducing GNNExplainer
Implementing GNNExplainer
Explaining GNNs with Captum
Introducing Captum and integrated gradients
Implementing integrated gradients
Summary
Further reading
Part 4: Applications
Chapter 15: Forecasting Traffic Using A3T-GCN
Technical requirements
Exploring the PeMS-M dataset
Processing the dataset
Implementing the A3T-GCN architecture
Summary
Further reading
Chapter 16: Detecting Anomalies Using Heterogeneous GNNs
Technical requirements
Exploring the CIDDS-001 dataset
Preprocessing the CIDDS-001 dataset
Implementing a heterogeneous GNN
Summary
Further reading
Chapter 17: Building a Recommender System Using LightGCN
Technical requirements
Exploring the Book-Crossing dataset
Preprocessing the Book-Crossing dataset
Implementing the LightGCN architecture
Summary
Further reading
Chapter 18: Unlocking the Potential of Graph Neural Networks for Real-World Applications
Index
About Packt
Other Books You May Enjoy