Mastering Graph Neural Networks: From Fundamentals to Applications
A Talk by Giuseppe Futia (Consultant / Fellow, Nexa Center for Internet & Society)
About this Talk
The goal of this masterclass is to guide participants through hands-on examples on Graph Neural Networks (GNNs) using Python and the PyTorch Geometric (PyG) library.
We will start by building a strong understanding of popular architectures such as Graph Convolutional Networks (GCNs), GraphSAGE, and Graph Attention Networks (GATs). We will then apply these models to real-world tasks like Node Classification and Link Prediction. We will conclude with an initial exploration of how GNNs can be integrated with large language models (LLMs).
Description
Graphs offer a universal framework for modeling interactions between elements, and Graph Neural Networks (GNNs) have become a crucial tool for applying machine learning algorithms to
graph-structured data. However, due to the inherent complexity arising from the combination of neural networks and graph structures, the practical implementation of GNNs can be challenging.
The goal of this masterclass is to guide participants through hands-on examples using Python and the PyTorch Geometric (PyG) library. We will start by building a strong understanding of popular architectures such as Graph Convolutional Networks (GCNs), GraphSAGE, and Graph Attention Networks (GATs). We will then apply these models to real-world tasks like Node Classification and Link Prediction. We will conclude with an initial exploration of how GNNs can be integrated with large language models (LLMs).
This masterclass is tailored for data scientists and machine learning engineers who are proficient in Python and have a high-level understanding of deep learning fundamentals. Participants will gain experience in building a complete, end-to-end workflow for working with GNNs, covering everything from data preparation to model training and evaluation. Additionally, the course will introduce participants to advanced techniques that combine GNNs with LLMs and RAG, enabling the creation of a versatile "chat-with-your-graph" framework for enhanced interaction with graph data.
By the end of the masterclass, participants will have the knowledge and tools needed to incorporate GNNs into their own projects effectively.
Key Topics
- Graph Neural Networks basic principles.
- GNN architectures: Graph Convolutional Networks, GraphSage, Graph Attention Networks.
- GNN applications: Node classification and Link Prediction.
- Introduction to GNNs, LLMs, and RAG integration.
Target Audience
- Data Scientists
- Data Engineers
- Machine Learning Engineers
Goals
Get hands-on experience using GNN frameworks such as PyG to perform tasks such as Node Classification and Link Prediction and to start exploring opportunities in integrating GNNs and LLMs.
Session outline:
- Introduction to GNN key principles.
- Message Passing Neural Network (MPNN) from illustrative sketches to Python examples.
- Implementation of the main GNN architectures with Python. Understanding characteristics and differences with code examples.
- Graph Convolutional Networks (GCNs).
- GraphSage.
- Graph Attention Networks (GATs).
- Node Classification and Link Prediction with GNNs using PyG.
- Exploratory Data Analysis (EDA).
- Models training, evaluation, and performance comparison.
- GNNs and LLMs for a "chat-with-your-graph" framework (an introduction).
- Exploration of the key principles of the G-Retriever model.
Format
This class emphasizes a hands-on approach.
Unlike traditional methods, which begin with complex mathematical theory and gradually introduce coding, this class will take a different approach. We will start with intuitive visual explanations, move directly into coding, and then use mathematical concepts to solidify understanding.
The majority of our work will be done using Colab notebooks and common Python libraries for data preparation and analysis. Afterward, we will explore PyG to build GNN models, setting up and executing training and evaluation pipelines.
Level
Intermediate
Prerequisite Knowledge
Good understanding of Python language. High-level understanding of deep learning models (a basic knowledge of PyTorch can be useful but it is not mandatory). Familiarity with LLMs and RAG principles.