Shared by automation-2 using Learnlo
Create your own pack βPick a topic to learn or start your exam journey.
0/20 topics mastered
Graph neural networks (GNNs) are neural networks designed for graph-structured inputs, where data is represented as nodes (entities) and edges (relationships). Because graphs have no fixed ordering of nodes, GNNs are typically built to be permutation equivariant (reordering nodes reorders their learned node representations in the same way) and, for graph-level tasks, permutation invariant (the final graph output does not depend on node ordering). A common example is molecular modeling, where atoms are nodes and bonds are edges; node/edge features can include chemical properties, and graph size varies with the number of atoms and bonds. The core architectural idea is message passing: nodes iteratively update their representations by exchanging information with neighboring nodes. In a message passing neural network (MPNN) layer, each node aggregates messages from its immediate neighbors using a permutation-invariant operator (e.g., sum/mean/max), then applies an update function to produce the new node embedding. Stacking multiple message passing layers increases the receptive field by allowing information to travel multiple hops, but too many layers can cause issues such as oversmoothing (node embeddings become indistinguishable) and oversquashing (long-range information is compressed into limited-size representations). Variants such as graph convolutional networks (GCNs) use fixed neighborhood aggregation, while graph attention networks (GATs) learn attention weights to focus on more important neighbors; gated graph sequence neural networks (GGS-NNs) incorporate message passing into gated recurrent units to produce sequence-like outputs. GNNs also use pooling/readout mechanisms to produce graph-level representations. Local pooling coarsens the graph before further message passing by downsampling or clustering nodes (e.g., top-k pooling, self-attention pooling), producing a smaller intermediate graph. Global pooling (readout) then aggregates node embeddings into a fixed-size output using permutation-invariant operations such as element-wise sum, mean, or max. More broadly, many architectures from other domains (e.g., CNNs on pixel graphs or transformers on complete token graphs) can be interpreted as GNNs on appropriately defined graphs.
0/2 modes complete
0/2 modes complete