What is a graph? A set of nodes (entities) connected by edges (relationships). Graphs appear everywhere: molecules (atoms + bonds), social networks (people + friendships), citation networks (papers + references), and knowledge bases (concepts + relations).
Message passing: the core GNN operation. In each layer, every node gathers feature vectors from its direct neighbors and passes them as "messages." The node then aggregates these messages and updates its own representation. After k layers, each node knows about its k-hop neighborhood.
Aggregation: messages from all neighbors are combined using a permutation-invariant function — mean, sum, or max pooling — so the result doesn't depend on the arbitrary order in which neighbors are listed. This is what makes GNNs well-defined on graphs.
Graph Convolution (GCN): extends convolution to irregular graphs. The GCN update rule is h_v^(l+1) = σ(Σ_{u∈N(v)} W·h_u^(l) / √(deg(v)·deg(u))). The normalization by degree prevents high-degree nodes from dominating and keeps gradients stable.
Why graphs matter: molecules are naturally graphs — the same atom arrangement in different shapes has completely different chemical properties. GNNs achieve state-of-the-art in drug discovery, protein folding (AlphaFold uses graph attention), and traffic prediction (Google Maps) because they respect graph structure.