Graph Neural Network (GNN)
Last Updated: July 29, 2026 | By Mihail Sebastian | AI Dictionary
A neural network that operates on graph-structured data, passing messages between connected nodes so predictions reflect relationships, not just features.
What is a Graph Neural Network (GNN)?
A Graph Neural Network (GNN) is a neural network that operates on graph-structured data, where entities are nodes and their relationships are edges, and learns from the connections as well as the features.
Much real data has no grid or sequence to it: social networks, molecules, road maps, a knowledge graph. Standard architectures force such data into tables and lose the structure; a GNN consumes the structure directly.
How a GNN Works
- Nodes and edges: Each node starts with a feature vector describing the entity, such as an atom’s element type. Edges define who exchanges information with whom.
- Message passing: In each layer, every node gathers the feature vectors of its neighbors, combines them, and updates its own representation.
- Stacked layers: One layer lets a node see its direct neighbors; stacking layers widens the view to neighbors-of-neighbors. The final representations feed a prediction about a node, an edge, or the whole graph.
Applications of GNNs
- Molecular property prediction: A molecule is a graph of atoms and bonds, and a GNN predicts properties like solubility or toxicity from that graph.
- Fraud detection: Fraudulent accounts betray themselves through their connections. A GNN scores an account using the transaction network around it, not just its own attributes.
- Recommendation systems: Users and items form a graph linked by purchases and ratings; message passing surfaces items favored by similarly connected users.
Example of a Graph Neural Network
Consider screening drug candidates. A chemist encodes each molecule as a graph: atoms become nodes carrying element and charge features, chemical bonds become edges.
The GNN trains on molecules whose toxicity is already measured. During message passing, each atom’s representation absorbs its bonded neighbors, so after a few layers a carbon atom “knows” it sits inside a particular ring structure associated with toxic outcomes.
Given a new, untested molecule, the model outputs a toxicity score in milliseconds. The lab still runs physical assays, but only on the candidates the GNN ranks as promising, which cuts the search space from thousands of compounds to dozens.
Related AI terms: Neural Network · Model Architecture · Knowledge Graph · Convolutional Neural Network
Did you like the Graph Neural Network (GNN) gist?
Learn about 250+ need-to-know artificial intelligence terms in the AI Dictionary.
Mihail Sebastian — Writes about AI governance, regulation, and the technology behind them. Placeholder bio — replace with a real credential line. About