A blog focused on understanding graph neural networks. Building and testing a Relational Graph Neural Network model to predict edges at a given point in time.

Team: Bhargav Dindukurthi, Amod Hegde, Janani Balasubramanian

December, 2021

Back to 🏠

Introduction:

We see graphs all around us. The friends and family we have around form a graph, the maps we use for navigation relies on graphs and the web browser you surfed to get to this page is also a graph of web pages. Due to its wide set of applications, analysing and predicting different aspects of the graph can be extremely useful, which has made graph neural networks one of the most researched topics in Machine Learning today.

While most analysis is done on static graphs, dynamic graphs are becoming increasingly important for social networks, financial transactions and recommendation systems. Graphs that change over time are called temporal graphs. There are many situations like your friends graph on a social networking platform or the items you interact with on an E-commerce website are constantly changing over time. Thus, algorithms focused on accounting for the time component when predicting interactions can be useful across multiple domains.

This blog focuses on understanding temporal edge predictions. The question being asked here is, given a pair of nodes (source and destination) in a graph, the timestamp, and an edge type, can a model predict if an edge will exist?

Dataset Description:

Data is essential for any machine learning model. For the purpose of this blog, we use the dataset provided for the Web Search and Data Mining (WSDM) 2022 Challenge — Temporal Link Prediction Dataset. This dataset has been sponsored by Intel/Amazon. We are considering dataset A where entities are represented as nodes and events are represented by the edges.

image.jpeg

Source: https://memegenerator.net/instance/57304991/buddy-the-elf-kryptik-i-just-love-data-datas-my-favorite

<aside>

The graph we have is a directed heterogeneous dynamic graph.

</aside>

Well that was a lot of jargon thrown at you. Let’s understand this better using an example from Schitts Creek!

Directed Graph: A directed graph is a graph where there is a source and destination. An example of a directed relationship is when Moira is the source node and David and Alexis are the destination for the relationship MotherOf.

image (1).png

An example of a directed graph.

However, as David and Alexis are siblings, this relationship can be represented as an undirected edge.

image (2).png

An example of undirected graph