Graph Neural Networks

Source

What is GNN

What

  • A graph is represented as:
    • Nodes (vertices): Represent entities or objects.
    • Edges: Represent relationships between nodes. Edges can be directed or undirected, weighted or unweighted.
    • Features: Both nodes and edges can have associated feature vectors. For example, in a social network graph, a node may have features like user age, and an edge could represent friendship with a weight indicating connection strength.
  • Graphs are useful for representing complex relationships like social networks, molecular structures, or transportation systems. Traditional neural networks, which are designed for grid-like data (e.g., images, sequences), cannot directly handle such irregular structures.

How GNN works

GNN learns a representation for each node by aggregating information from its neighbors.

  1. Message Passing: Each node gathers information from its neighbors
  2. Aggregation: The messages from neighboring nodes are combined (summed, averaged, or through more complex operations)
  3. Update: The node’s feature is updated using the aggregated message, often by applying a neural network

Common GNN Variants

Graph Convolutional Networks (GCNs)

Graph Attention Networks (GATs)

GraphSAGE