AI Model Wiki

    Skip to main content
    Back to Glossary

    Graph Neural Networks

    Graph Neural Networks (GNNs) are a class of neural networks designed to operate directly on graph-structured data, where entities are represented as nodes and relationships between them are represented as edges. At each layer, a GNN aggregates information from a node's neighbours and combines it with the node's own representation, updating embeddings iteratively so that each node ultimately encodes information about its local subgraph. This message-passing mechanism allows GNNs to learn structural patterns that standard feed-forward networks cannot capture.

    Think of it like a rumour spreading through a social network. Each person updates their belief based on what their immediate contacts say, and after several rounds of updates everyone in a connected component has synthesised information from across the graph.

    GNNs are widely used for molecular property prediction in drug discovery, where atoms are nodes and chemical bonds are edges. A typical pipeline computes node embeddings using several GNN layers, then pools them into a single graph-level embedding used for classification. They also appear in recommendation systems, knowledge graph completion, and fraud detection on transaction networks.

    GNNs share conceptual ground with the Attention mechanism: graph attention networks replace uniform neighbour aggregation with learned, query-key attention weights over edges, making them closely related to Transformer Self-Attention. Like Embedding layers in LLMs, GNN node embeddings are dense vector representations learned from data. Unlike the sequential token processing of a Transformer, GNNs operate on irregular, non-Euclidean structures. Fine-tuning pretrained GNNs on downstream tasks mirrors how BERT-style Foundation Models are adapted via fine-tuning, and LoRA-style parameter-efficient methods are beginning to appear for large GNN models as well.

    You will encounter GNNs in scientific machine learning, graph database enrichment, and any domain where entity relationships are first-class features.

    AI Terminology
    Glossary