Node classification predicts one or more labels for each node using a small labeled subset, node information, and graph structure. It is useful when connected data violates the independent-and-identically-distributed assumption of conventional classification. section 9.1 section 9.2.1
The task is commonly semi-supervised: labeled nodes provide training targets, while unlabeled nodes remain part of the graph and contribute structural context. Relationships can carry predictive signal, such as homophily in social networks. section 9.2 section 9.4
A practical node-classification pipeline proceeds as follows:
- Represent entities as nodes and their relationships as edges. section 12.1
- Prepare node features, edge indices, encoded labels, and masks that separate training, validation, and testing nodes. section 12.1.3
- Featurize nodes with manually designed attributes, degree-based vectors, or learned embeddings such as Node2Vec. section 9.3.1
- Train a classifier or GNN encoder-decoder on labeled nodes, then apply the same feature process during inference. section 9.3.1 section 12.0
- Evaluate predictions with precision, recall, F1-score, and a confusion matrix, while checking class balance across splits. section 9.3.1 section 12.1.3
Karate Club affiliation
The Zachary Karate Club graph labels each member by the faction joined after a dispute. Degree-only embeddings produce weak results, Node2Vec improves them, and vectors combining total degree with neighbor types achieve substantially stronger classification. section 9.3.1
Anti-money-laundering detection
A transaction graph represents accounts or entities as nodes and transactions as edges. A homogeneous GNN learns local-structure embeddings, while a decoder classifies nodes as licit or illicit using log softmax and cross-entropy loss. section 12.1
Figure 12.1 End-to-end framework to develop a GNN-based system that can be adopted for multiple tasks and application domains. The input data is usually a collection of semistructured sources describing different objects and interactions between them. The goal is to process the data and produce a graph that becomes the input for an encoder–decoder architecture. In our scenarios, the encoder uses a GNN model, and the decoder is based on a function that allows us to optimize the model for a specific downstream task. The output of this framework is a trained model that can be adopted for the inference phase.
Trace the reusable graph-learning architecture from semistructured inputs through graph construction, GNN encoding, task-specific decoding, and inference. section 12.0

