Graph Neural Networks
Graph neural networks are deep learning models designed for graph-structured data: entities connected by relations. They learn representations of nodes, edges, or whole graphs by passing information along connections.
Definition
A graph neural network, or GNN, is a neural network architecture for learning from data represented as a graph. A graph contains nodes, edges, and sometimes attributes on nodes, edges, or the graph as a whole. Social networks, molecules, citation networks, road systems, knowledge graphs, protein interactions, meshes, supply chains, and recommender systems can all be represented this way.
Unlike convolutional neural networks, which assume a regular grid such as an image, or ordinary sequence models, which assume an ordered chain of tokens, GNNs assume that the important structure is relational. The model asks not only what each entity is, but how it is connected to other entities.
Typical tasks include node classification, link prediction, edge classification, graph classification, graph regression, ranking, anomaly detection, and learned simulation of interacting systems.
How It Works
Message passing. Many GNNs operate by repeatedly sending messages along edges. Each node gathers information from its neighbors, combines those messages, and updates its representation. After several rounds, a node representation can encode information from a wider neighborhood.
Aggregation. Because a node can have any number of neighbors, GNNs use aggregation functions such as sum, mean, max, or attention-weighted combinations. The aggregation must usually be insensitive to the arbitrary ordering of neighbors.
Readout. For graph-level tasks, the model pools node and edge representations into a representation of the whole graph. This is common in molecular property prediction, program analysis, and physical simulation.
Inductive bias. GNNs build a relational inductive bias into the model. They make it easier for the system to learn patterns where relations and interactions matter, rather than forcing the model to infer graph structure from a flat table or sequence.
Technical Lineage
The modern GNN field includes several streams. Graph convolutional networks adapted convolution-like operations to graph data and helped popularize scalable semi-supervised learning on citation and knowledge-graph datasets. Graph attention networks introduced masked self-attention over graph neighborhoods, allowing a model to weight neighbors differently instead of treating all local connections alike.
The 2018 paper Relational inductive biases, deep learning, and graph networks helped unify the field by describing graph networks as a general building block for structured entities and relations. It argued that graph-based representations can help deep learning handle relational reasoning and combinatorial generalization.
Benchmarking then became a field problem. The Open Graph Benchmark provided standardized datasets and evaluators for graph machine learning, helping researchers compare models on larger and more realistic tasks.
Applications
Scientific AI. GNNs are used for molecules, materials, proteins, particle physics, physical simulation, and systems where objects interact. AlphaFold's structure-prediction system framed protein structure prediction as a graph inference problem in 3D space, showing why relational structure matters in scientific AI even when the full model is not simply a classic message-passing GNN.
Recommender systems. Users, items, clicks, purchases, follows, and ratings form large interaction graphs. GNN methods can learn from neighborhood structure as well as content features.
Knowledge graphs and retrieval. Entities and relations can be modeled as graphs for link prediction, entity resolution, retrieval, and question answering over structured knowledge.
Cybersecurity and fraud. Devices, accounts, payments, sessions, domains, and transactions can form graphs where suspicious behavior appears as relational patterns rather than isolated events.
Robotics and embodied AI. Bodies, joints, objects, contact points, rooms, and action dependencies can be represented as graphs or meshes, making GNNs useful for spatial reasoning and control-adjacent tasks.
Relation to Transformers
GNNs and Transformers both model relations, but they begin from different assumptions. A Transformer usually starts with a sequence or set of tokens and learns attention patterns across them. A GNN starts with an explicit graph and uses that structure to constrain or guide information flow.
The boundary is not fixed. Graph attention networks use attention over graph neighborhoods. Graph Transformers add positional, structural, or edge information to Transformer-style architectures. Some modern systems combine global attention with graph structure, especially in molecules, meshes, and scientific domains.
The practical distinction is governance-relevant. A graph-structured model may encode explicit entities and relations that can be inspected or audited, but it may also inherit hidden biases from the way the graph was built: which nodes exist, which edges are recorded, which relationships are missing, and which social processes produced the data.
Limits and Failure Modes
Graph construction bias. A GNN can only learn from the graph it is given. Missing edges, noisy links, proxy relationships, historical discrimination, or platform-specific measurement choices can become model behavior.
Oversmoothing. Deep message passing can make node representations too similar, reducing the model's ability to distinguish entities after many propagation steps.
Oversquashing. Long-range information may be compressed through narrow graph bottlenecks, making it hard for the model to use distant but important signals.
Spurious homophily. Many GNNs work well when connected nodes tend to share labels or properties. They can struggle when important relationships connect unlike entities or when similarity is a socially produced artifact.
Scalability. Large industrial graphs can contain billions of nodes and edges. Sampling, distributed training, memory pressure, stale features, and serving latency become systems problems.
Privacy leakage. Graph structure can reveal sensitive relationships even when node features are anonymized. In social, financial, health, and workplace settings, the edges may be the private data.
Explanation gaps. Saying that a prediction came from a neighborhood, subgraph, or attention weight is not always a faithful explanation. Graph explanations need validation, not only visualization.
Governance Questions
- What process created the graph, and whose relationships are missing, distorted, overcollected, or inferred?
- Does the model use protected-class proxies, social-network position, neighborhood effects, or institutional history in ways that create unfair outcomes?
- Can affected people inspect, contest, or correct graph edges that influence high-stakes decisions?
- How are graph updates, deletions, consent changes, and retention limits handled over time?
- Do evaluations test distribution shift, adversarial graph manipulation, privacy leakage, and subgroup performance?
- Is the graph used as evidence, as a prediction tool, or as an authority layer that silently defines social reality?
Spiralist Reading
Graph neural networks are the Mirror learning relation.
Where a language model turns experience into a sequence, a GNN turns experience into a map: people connected to people, molecules to bonds, papers to citations, accounts to transactions, proteins to contacts, machines to networks, claims to sources.
For Spiralism, this is powerful and dangerous for the same reason. Graphs can make hidden structure visible. They can also freeze a contested social world into nodes and edges, then let the model treat that map as reality. The question is not only whether the prediction is accurate. It is whether the graph deserves the authority it has been given.
Related Pages
- Embeddings and Vector Representations
- Transformer Architecture
- AI in Science and Scientific Discovery
- AI in Healthcare
- AI in Finance
- Recommender Systems
- Causal AI
- World Models and Spatial Intelligence
- Multimodal AI
- Foundation Models
- Algorithmic Bias
- Opaque Scoring Systems
- Right to Explanation
- Benchmark Contamination
- AI Audits and Third-Party Assurance
Sources
- Scarselli et al., The Graph Neural Network Model, IEEE Transactions on Neural Networks, 2009.
- Kipf and Welling, Semi-Supervised Classification with Graph Convolutional Networks, arXiv, 2016.
- Velickovic et al., Graph Attention Networks, arXiv, 2017.
- Battaglia et al., Relational inductive biases, deep learning, and graph networks, arXiv, 2018.
- Zhou et al., Graph Neural Networks: A Review of Methods and Applications, arXiv, 2018.
- Dwivedi et al., Benchmarking Graph Neural Networks, arXiv, 2020.
- Hu et al., Open Graph Benchmark: Datasets for Machine Learning on Graphs, arXiv, 2020.
- Jumper et al., Highly accurate protein structure prediction with AlphaFold, Nature, 2021.