Reference:
A Gentle Introduction to Graph Neural Networks
Understanding Convolutions on Graphs
A graph represents the relations (edges) between a collection of entities (nodes).
we can store information in each of these pieces of the graph.
Images as graphs
Text as graphs
Graph-level task
predict the property of an entire graph
Node-level task
Node-level tasks are concerned with predicting the identity or role of each node within a graph.
Edge-level task
The remaining prediction problem in graphs is edge prediction.
nodes, edges, global-context and connectivity
nodes, edges, global-context:向量表示
connectivity:连接矩阵(非常大)/稀疏矩阵(不能放GPU)表示都有弊端
Graph Neural Networks
graph-in, graph-out
The simplest GNN
GNN Predictions by Pooling Information
Pooling proceeds in two steps:
- For each item to be pooled, gather each of their embeddings and concatenate them into a matrix.
- The gathered embeddings are then aggregated, usually via a sum operation.
If we only have edge-level features, and are trying to predict binary node information:
If we only have node-level features,and are trying to predict binary edge-level information:
If we only have node-level features, and need to predict a binary global property:
An end-to-end prediction task with a GNN model:
Passing messages between parts of the graph
Other types of graphs:
Sampling Graphs and Batching in GNNs