3 Graph convolutional networks and GraphSAGE

 

This chapter covers

  • Introducing GraphSAGE and graph convolutional networks
  • Applying convolutional graph neural networks to generate product bundles from Amazon
  • Key parameters and settings for graph convolutional networks and GraphSAGE
  • More theoretical insights, including convolution and message passing

In the first two chapters of this book, we explored fundamental concepts related to graphs and graph representation learning. All of this served to set us up for part 2, where we’ll explore distinct types of graph neural network (GNN) architectures, including convolutional GNNs, graph attention networks (GATs), and graph autoencoders (GAEs).

In this chapter, our goal is to understand and apply graph convolutional networks (GCNs) and GraphSAGE [1, 2]. These two architectures are part of a larger class of GNNs that approach deep learning by applying convolutions to graph data.

Convolutional operations are relatively common in deep learning models, particularly for image-based tasks that rely heavily on convolutional neural networks (CNNs). To learn more about CNNs and their application to computer vision, we recommend checking out Deep Learning with Python (Manning, 2024) or Deep Learning with PyTorch (Manning, 2023).

3.1 Predicting consumer product categories

3.1.1 Loading and processing the data

3.1.2 Creating our model classes

3.1.3 Model training

3.1.4 Model performance analysis

3.1.5 Our first product bundle

3.2 Aggregation methods

3.2.1 Neighborhood aggregation

3.2.2 Advanced aggregation tools

3.2.3 Practical considerations in applying aggregation

3.3 Further optimizations and refinements

3.3.1 Dropout

3.3.2 Model depth

3.3.3 Improving the baseline model’s performance

3.3.4 Revisiting the Marcelina product bundle

3.4 Under the hood

3.4.1 Convolution methods