Temporal Graph Networks (TGN) from scratch | Modeling dynamic graph neural network | For beginners
Vizuara Vizuara
16.8K subscribers
1,475 views
64

 Published On Premiered Aug 9, 2024

“Let us build a TGN (from scratch) to predict social media user interaction”

Consider two of your Facebook friends. You are the mutual connection between them. If their political interests, age, gender, city, etc. are all the same, how likely are they to form a connection and interact?

A research team at Twitter (now X) proposed a beautiful solution to this problem (for Twitter of course). The framework they developed called Temporal Graph Network (TGN) allows you to implement deep learning on dynamic graphs.

Graphs Neural Networks (GNN) have the incredible ability to represent many complex, real-life systems such as roads, railway networks, e-commerce data, social media data, and even protein molecules.

On social media, you can imagine a graph to be consisting of nodes and edges, where nodes are the users and edges are their interactions. When a new user signs up a new node forms. When a new interaction happens between two users a new edge forms. The morphology of the graph is a function of time. They are not static graphs but are dynamic.

The various social media actions can be represented as operations on graphs such as node creation, edge creation, classification, etc. These operations form a sequence of time-series events. Hence, the term “temporal” in TGN.

On Vizuara’s YouTube channel, we have collaborated for the first time to create this 80-minute lecture to explain and build a very simple TGN from scratch.

The lecture is split into two halves.

The first half will teach you the following.
1) What are dynamic graphs?
2) What is a Temporal Graph Network? (TGN)
3) Theory behind TGN
4) Various modules and operations involved in TGN

In the second half, we will build an extremely simple TGN from scratch.
1) We will assume a tiny social media with only 3 users - these are the nodes
2) We will define edges as the messaging interaction between them
3) Based on the first 3 interactions between these users, we will hand-calculate a future interaction probability
4) You will understand how is message function, aggregation, and node update done in real graph networks using this simple numerical example.

To the best of our knowledge, a lecture like this does not exist on the internet. If you are a complete beginner, this lecture will give you a great overview of TGN.

If you are already familiar with TGN, you will understand and appreciate some nuances. Either way, we are sure you will enjoy this lecture a lot.

show more

Share/Embed