GraphSAGE is a graph neural network encoder that generates node representations by aggregating neighborhood features. It supports downstream node classification and link prediction through an encoder–decoder pipeline. section 12.0
A practical GraphSAGE pipeline follows these steps:
- Represent a domain as a graph, such as transactions connected by Bitcoin flows or users connected to movies through ratings. section 12.0
- Apply two SAGEConv layers: transform input features, apply ReLU, and produce output node representations. section 12.1.4
- Pass representations to a task-specific decoder, such as log_softmax with CrossEntropyLoss for node classification. section 12.1.4
- Evaluate predictions with precision, recall, F1-score, and confusion matrices, while comparing parameter counts and training time. section 12.1.5 section 12.2.5
AML node classification
A two-layer SAGE encoder processes a homogeneous transaction graph and produces representations used to classify each transaction as licit or illicit. In the reported comparison, SAGE used 5,427 parameters and trained in 36.71 seconds after 400 epochs, between GCN and GAT in efficiency.

