liveBook · Manning

Graph neural network

As explained in Fight Fraud with Machine Learning

A graph neural network is a neural-network model that learns patterns from graph-structured data by combining node features with graph connectivity.

A graph neural network (GNN) is a deep-learning model for graph-structured data. Rather than treating each record independently, it combines a node’s attributes with information from connected neighbors, so relationships become part of the prediction signal. GNNs suit networks such as social graphs, transaction graphs, protein interactions, citation networks, and the web. section 4.3.3 section 9.5

This relational view differs from a fully connected model or multilayer perceptron (MLP), which treats nodes as separate instances. For fraud work, that distinction matters when suspicious behavior is distributed across a mesh of connected accounts or payments instead of being visible in one transaction alone. section 9.5 section 9.0

Figure 4.17 Toy GCN model used to predict genders of people represented as nodes in a social network.

A toy graph convolutional network (GCN) classifies people in a social network by using each person’s features together with features aggregated from their connections. section 4.3.3

Common modeling progression for graph-based fraud detection:

  • Start with a fully connected deep-learning baseline on transaction features to establish how well independent records can be classified. section 9.0 section 9.5
  • Train a GCN to aggregate neighborhood features during training and learn patterns in the transaction graph. section 9.5
  • Use a graph attention network (GAT) when attention-weighted neighbor aggregation is needed instead of assigning every neighbor equal weight. section 9.5

Bitcoin anti-money-laundering detection

Layering can obscure a sender and receiver through a complex mesh of Bitcoin transactions. A workflow downloads and analyzes labeled transactions, trains a traditional deep-learning detector, then uses the graph structure to train GNNs. A GCN is used for improved accuracy, followed by a GAT to improve performance further. The Elliptic Bitcoin dataset contains more than 200,000 licit and illicit transactions and supplies graph structure for this task. section 9.0 section 9.5

GNNs are one specialized model family among deep-learning architectures selected by data shape: feed-forward networks handle one-dimensional numeric arrays, CNNs target visual data, RNNs suit time series or text, and GNNs target graphs. In social-network fraud detection, neighborhood context can enrich node features for identifying bot accounts. section 4.3 section 4.3.3

Figure 9.2 Steps performed in this chapter to train AI models to fight money laundering, starting with downloading a representative dataset containing Bitcoin transactions, training a traditional deep learning model to detect illicit transactions, followed by training graph neural networks to extract further insights from the mesh of transactions in detecting money laundering.

The workflow diagram makes the baseline-to-GNN progression concrete: inspect Bitcoin transactions, detect illicit activity with a conventional model, then exploit the transaction mesh with graph learning. section 9.0

How Fight Fraud with Machine Learning covers it

How deep it goes
Defines GNN neighbor aggregation and contrasts GCN and GAT, while deferring detailed implementation internals.
Examples
Uses social-network node classification and labeled Bitcoin transaction graphs for bot and money-laundering detection.
What you can do after
Evaluate/understand when graph relationships can improve illicit-transaction detection beyond an MLP baseline.
How it connects
Connects graph neural networks with MLPs, graph convolutional networks, graph attention networks, and attention mechanisms.

Also explained in

Compare how 8 books explain graph neural 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.