liveBook · Manning

Graph convolutional network

As explained in Fight Fraud with Machine Learning

A graph convolutional network is a neural network that learns node representations by aggregating information from neighboring nodes in graph data.

A graph convolutional network (GCN) is a graph neural network for node classification that learns from both a node’s own features and the features of connected nodes. This matters when relationships carry signals that isolated records miss: a transaction’s payment-flow neighborhood can help distinguish licit from illicit activity, while an MLP treats each transaction independently. section 4.3.3 section 9.5

A GCN expands a node representation layer by layer through its graph neighborhood. In a two-layer illustration, information from second-degree neighbors is aggregated into first-degree-neighbor representations, then those representations are aggregated to classify the target node. Averaging keeps feature-vector length constant regardless of how many neighbors a node has and makes aggregation insensitive to node order. section 9.3.2

Figure 9.16 GCN model architecture, shows the aggregation of features from neighboring nodes at each layer of the model. Layer 1 aggregates information from neighbors of neighbors (2nd-degree neighbors), while layer 2 further aggregates the aggregated features of direct neighbors obtained from layer 1. This ensures that the node in question (A, in this case) gets an enriched feature representation.

This architecture diagram traces how two GCN layers bring second-degree and then direct-neighbor information into a node’s enriched representation. section 9.3.2

A practical GCN workflow for transaction classification is:

  • Start with graph data: node feature vectors, class labels, and edge indices representing payment flows. section 9.3.3
  • Define graph-convolution layers. A shown model maps 165 input features to 8 hidden features, applies ReLU and dropout, then maps to two licit/illicit outputs. section 9.3.2
  • Pass both node features and the graph edge index during forward inference; unlike an MLP, node features alone are insufficient. section 9.3.3
  • Visualize untrained predictions as a baseline, train with validation, then test on unseen transactions using accuracy and F1 score. section 9.3 section 9.3.4

Detecting illicit Bitcoin transactions

For a transaction node A, the model considers its 165 intrinsic features plus first- and second-degree transaction neighbors. Neighbor features are averaged, transformed through fully connected layers, and used to output licit or illicit scores. On the Elliptic Bitcoin dataset, the reported trained GCN reached 94.67% test accuracy and a 94.03% F-score, exceeding the cited MLP F-score of 93.77%; the added neighborhood information is offered as the reason for the improvement. section 9.3.2 section 9.3.4

GCNs use equal-weight neighborhood aggregation in the described setup. Graph attention networks instead use attention-weighted neighbor information, allowing nodes with the same neighbors to be treated differently based on their connections. For graphs with millions of nodes, GraphSAGE is identified as a scalable alternative that samples neighbor subsets during training. section 9.5

How Fight Fraud with Machine Learning covers it

How deep it goes
Works through a two-layer architecture, averaging aggregation, forward inputs, baseline visualization, training, and test evaluation.
Examples
Uses a social-network gender classifier and Elliptic Bitcoin transactions, including untrained t-SNE predictions and learning curves.
What it assumes
Builds from contrasts with CNNs, RNNs, and MLPs while using node features, graph edges, and neural-network layers.
What you can do after
Build it from scratch as a two-layer PyTorch GCN and evaluate illicit-transaction predictions with accuracy and F1.
How it connects
Connects graph neural networks with node classification, multi-layer perceptrons, graph attention networks, GraphSAGE, and F1 score.

Also explained in

Compare how 6 books explain graph convolutional network →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fight Fraud with Machine Learning. The section links point to the parts of the book it draws on.