Graph Neural Networks - a perspective from the ground up

Graph Neural Networks - a perspective from the ground up

Machine Learning Discovers New Antibiotic

Introduction to Halicine

  • A machine has discovered an antibiotic named halicine, effective against previously untreatable bacterial strains.
  • The discovery was made using a machine learning approach called graph neural networks (GNNs).
  • GNNs can also be applied to various fields such as drug discovery for cancer, transportation improvements, and social network problem-solving.

Understanding Graph Neural Networks

What is a Graph Neural Network?

  • GNNs differ from traditional neural networks; they are designed to work with data structured as graphs.
  • In the context of matchmaking, features about an individual (e.g., age, interests) can be represented as nodes in a graph.

Structure of Graph Data

  • A graph consists of nodes (entities like people) and edges (relationships between them).
  • Nodes have features that describe them; edges can be directed or undirected.

Challenges with Traditional Neural Networks

Limitations of Conventional Approaches

  • Traditional neural networks excel with structured data but struggle with complex structures like graphs.
  • They typically process data in fixed formats (e.g., grids for images), making it difficult to reason over unstructured data.

Mechanism of Message Passing in GNNs

How GNN Processes Information

  • GNN uses message passing where nodes aggregate information from their neighbors iteratively.
  • Each round of message passing updates node representations based on received messages.

Node Representation and Similarity

  • Nodes that share similar characteristics will have closer numerical representations known as node embeddings.
  • The embedding space organizes these representations based on similarity, guiding the matchmaking process.

Training the Graph Neural Network

Objective Function and Loss Calculation

  • To train the network effectively, an objective function quantifies how well it performs matchmaking tasks.
  • The network adjusts its computations through backpropagation based on loss feedback until satisfactory embeddings are achieved.

Applications Beyond Matchmaking

Various Tasks Using GNN

  • Link prediction is one application where new potential connections between nodes are recommended.
  • Other tasks include node classification, clustering into groups, and overall graph classification by aggregating node representations.

Deep Dive into Message Passing Mechanics

Mathematical Functions in Message Passing

  • Message passing involves mathematical functions that update receiver nodes using messages from neighboring sender nodes.

Importance Weights and Feature Learning

  • Different importance values may be assigned to each neighbor based on their connections or features relevant to specific tasks.

Types of Graph Neural Network Layers

Variants of GNN Layers Explained

  • Three main flavors exist: convolutional layers with fixed weights based on structure; attentional layers where weights are learned from feature interactions; and general forms allowing collaboration between pairs for message production.

Efficient Computation Techniques

Leveraging Linear Algebra for Performance

  • Utilizing linear algebra allows efficient computation across all nodes simultaneously via adjacency matrices instead of sequential processing.

Conclusion and Call to Action

  • The video concludes by encouraging viewers to engage further if they found the content helpful.
Video description

What is a graph, why Graph Neural Networks (GNNs), and what is the underlying math? Highly recommended videos that I watched many times while making this: Petar Veličković's GNN video → https://youtu.be/8owQBFAHw7E Michael Bronstein's Geometric Deep Learning keynote speech (beautiful!) → https://youtu.be/w6Pw4MOzMuo Xavier Bresson's Graph Convolutional Networks lecture → https://youtu.be/Iiv9R6BjxH 3Blue1Brown’s series on Neural Networks → https://youtu.be/aircAruvnKk If you'd like to go further with GNNs, do get started with Petar's wonderfully compiled list of resources to continue → https://goo.gle/3cO7gvb Here's also another awesome compilation, to go further with research → https://github.com/GRAND-Lab/Awesome-Graph-Neural-Networks Also, the GNN literature is growing so quickly so subscribe to this Telegram channel by Sergey Ivanov to help you keep up → https://t.me/graphML Reference blog posts about GNNs: Michael Bronstein → https://towardsdatascience.com/geometric-foundations-of-deep-learning-94cdd45b451d (a must-read), https://towardsdatascience.com/do-we-need-deep-graph-neural-networks-be62d3ec5c59 Amal Menzli → https://neptune.ai/blog/graph-neural-network-and-some-of-gnn-applications Eric J. Ma → https://ericmjl.github.io/essays-on-data-science/machine-learning/graph-nets/ Rishabh Anand → https://medium.com/dair-ai/an-illustrated-guide-to-graph-neural-networks-d5564a551783 (More recent) Distill → https://distill.pub/2021/gnn-intro/, https://distill.pub/2021/understanding-gnns/ Special thanks to: Seb, Rish and Jet for reading drafts of this and giving such amazing feedback. Serene for helping enhance production decisions like design, color, animation flow, time-management for my editing and recording (hahaha), and others. Jay and Malcolm for being there and encouraging the decision to do this video. Literature References: Recommended survey → Wu et al. 2020 Convolutional GNN layers → Defferard et al. 2016; Kipf & Welling 2016 Attentional GNN layers → Monti et B 2017; Veličković et al. 2018 General Message Passing GNN layers → Gilmer et al.2017; Battaglia et al 2018; Wang et B 2018 Halicin → Stokes et al., Cell 2020 ----------------- Timeline: 0:00 - Graph Neural Networks and Halicin - graphs are everywhere 0:53 - Introduction example 1:43 - What is a graph? 2:34 - Why Graph Neural Networks? 3:44 - Convolutional Neural Network example 4:33 - Message passing 6:17 - Introducing node embeddings 7:20 - Learning and loss functions 8:04 - Link prediction example 9:08 - Other graph learning tasks 9:49 - Message passing details 12:10 - 3 'flavors' of GNN layers 12:57 - Notation and linear algebra 14:05 - Final words ------------------ Music by Vincent Rubinetti Download the music on Bandcamp: https://vincerubinetti.bandcamp.com/album/the-music-of-3blue1brown Stream the music on Spotify: https://open.spotify.com/album/1dVyjwS8FBqXhRunaG5W5u ------------------ Thanks for watching this, and I really hope it was helpful! A quick introduction - I'm Alex from Singapore, a PhD student at NUS working on machine learning, computer vision and (I guess of course) GNNs for medical imaging and healthcare applications. I've recently been thinking about doing explainer videos about machine learning or tech, and have always found great value in visual animations of math concepts. So, thanks Grant Sanderson, James Schloss and the 3b1b team for organizing SoME1 which pushed me to pick up After Effects, research, script and put this together over the past month. If you have questions or want to connect (please do!), you can: Find me on Twitter → https://twitter.com/alexfoo_dw Find me on LinkedIn → https://www.linkedin.com/in/alex-foo/