Graph neural network: Difference between revisions

From David's Wiki
No edit summary
No edit summary
Line 1: Line 1:
If you can represent your data as a graph, you can use a graph neural network to perform inference on the data and output a new graph or predictions on the graph.
If you can represent your data as a graph, you can use a graph neural network to perform inference on it.<br>
GNN operate on global graph embeddings or local embeddings in each node or edge in the graph.<br>
Hence, a GNN allows you to output predictions on each node, each edge, or the entire graph.  


==Introduction==
==Introduction==
===Structure===
===Structure===
A graph neural network consists of layers which operate on graphs.
A graph neural network consists of layers which operate on graphs.<br>
Typically, this means one or more GNN layers to get new embeddings along the graph.<br>
Then a standard MLP can be used to parse each embedding into logits or values.


At each layer, you get the following features during inference:
At each layer, you get the following features during inference:

Revision as of 21:29, 10 June 2022

If you can represent your data as a graph, you can use a graph neural network to perform inference on it.
GNN operate on global graph embeddings or local embeddings in each node or edge in the graph.
Hence, a GNN allows you to output predictions on each node, each edge, or the entire graph.

Introduction

Structure

A graph neural network consists of layers which operate on graphs.
Typically, this means one or more GNN layers to get new embeddings along the graph.
Then a standard MLP can be used to parse each embedding into logits or values.

At each layer, you get the following features during inference:

  • The graph structure
  • Node embeddings
  • Edge embeddings
  • Graph embeddings

Message Passing Layer

A standard GNN layer consists of pooling functions followed by update functions.

Pooling

There are many types of pooling to choose from:

  • For nodes, you can add the node embedding to connected node embedding or connected edge embeddings.
  • Similarly for edges, you can add its embedding to connected node embeddings.
  • For the entire graph, you can add all node embeddings together.

After pooling, you can use update function (e.g. MLP) to update the embeddings/state at each node, edge, and for the entire graph.

Resources