What is a graph neural network?

A graph neural network is a type of neural network that works on graph data of nodes and edges, updating each node's representation layer by layer with information from its neighbours to make predictions at node, edge or whole-graph level.

It is also called a GNN. It differs from a knowledge graph in role: a knowledge graph is a data structure holding entities and relations, while a GNN is a model that learns over such a structure. Unlike a convolutional network on a pixel grid, it handles irregularly connected data.

Topic
Machine learning, models and training
Also known as
GNN
Origin
2009, Scarselli et al., The Graph Neural Network Model

How a graph neural network works

  1. Each node starts with its own feature vector, such as an account's balance, transaction count and opening date.
  2. At each layer a node combines representations from its neighbours by summing, averaging or applying attention weights and updates its own; this is message passing.
  3. Layer count sets how many hops a node gathers information from.
  4. Final representations serve node classification, link prediction or whole-graph classification.

In more detail

Over-smoothing and over-squashing

Unlike deep CNNs or Transformers with dozens of layers, standard message-passing GNNs are typically kept shallow (2 to 4 layers). Stacking too many layers causes over-smoothing (where all node embeddings converge toward indistinguishable values) and over-squashing (where exponentially growing neighbourhood information is compressed into a fixed-size vector bottleneck).

Heterogeneous, temporal and inductive graphs

Real enterprise graphs are rarely static or single-typed: they are heterogeneous (combining users, accounts, merchants and devices) and dynamic or temporal (with timestamped edges). Production systems also rely on inductive architectures like GraphSAGE so newly arriving nodes can be scored in real time without retraining on the full graph.

Graph Transformers and integration with LLMs

Graph Transformers (which use global attention with structural or positional encodings to overcome local message-passing bottlenecks) and hybrid GNN-plus-LLM or GraphRAG pipelines are increasingly used for combining structured relational signals with unstructured text in enterprise reasoning.

Commonly confused terms

TermHow it differs
Graph convolutional network (GCN)Graph Convolutional Network (GCN) is one specific early architecture within the broader GNN family that uses normalised adjacency averaging, alongside other GNN variants like GAT (attention-based), GraphSAGE (inductive sampling) and Graph Transformers.
Classical graph algorithmsTraditional graph algorithms (like PageRank, shortest path or Louvain community detection) compute fixed topological metrics from graph structure alone, whereas GNNs learn task-specific parameters combining both node and edge features and topology.

Why a graph neural network matters for on-premises AI

Relationship patterns invisible to row-by-row models decide many enterprise problems: fraud rings, money laundering chains, spreading network faults and recommender systems. GNNs learn this structure directly. On large enterprise graphs processing all neighbours fills GPU memory fast, so techniques such as neighbour sampling and subgraph training are used. Graph data often holds the most sensitive relationships, so it stays in-house.

ON-PREMISES EXAMPLE

A bank trains a graph neural network on a graph of accounts and the transfers between them, flagging to its compliance team accounts that each look normal but together form a transfer ring.

Common questions

Are graph neural networks only used for social networks?

No. They are also used for molecular structures, recommender systems, telecom networks, supply chains and financial transaction graphs.

How does a graph neural network differ from a knowledge graph?

A knowledge graph is a data structure storing entities and their relations. A GNN is a model that learns to predict over such a structure; the two can be used together.

Sources

In the glossary: Glossary, E to L

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.