Graph Feature Preprocessor: Real-time Subgraph-based Feature Extraction for Financial Crime Detection

Jovan Blanuša, Maximo Cravero Baraja, Andreea Anghel, Luc von Niederhäusern, Erik Altman, Haris Pozidis, Kubilay AtasuarXiv 2024 · DOI

TL;DR

The Graph Feature Preprocessor (GFP) is an open-source software library that extracts graph-based structural features from financial transaction streams in real time. When paired with standard gradient-boosting models (like XGBoost or LightGBM), this approach outperforms state-of-the-art Graph Neural Networks (GNNs) in fraud detection accuracy while achieving higher throughput on a standard multicore CPU than GNNs can manage on a powerful NVIDIA V100 GPU.

What Problem Does This Paper Address?

Detecting financial crimes like money laundering or phishing requires analyzing the relationships between accounts. While traditional machine learning models excel at processing tabular transaction data (timestamps, amounts) quickly, they are blind to the underlying network structure.

Graph Neural Networks (GNNs) can capture this network structure, but they come with heavy operational costs: they typically operate offline, require the entire graph to be held in memory, and are notoriously difficult to deploy in low-latency, streaming production environments. The authors bridge this gap by creating a tool that extracts rich graph features on the fly, allowing fast, explainable, tabular models to leverage network topology in real time.

Methods

The authors introduce the Graph Feature Preprocessor (GFP), designed as a standard scikit-learn compatible preprocessor (fit/transform interface).

Overview of the graph ML pipeline.

Its architecture rests on two main pillars:

  1. Dynamic Graph Management: GFP maintains a temporal multigraph in memory using a transaction log (a double-ended queue) and an index (a vector of hash maps). It utilizes a sliding time window to automatically discard outdated transactions in $O(1)$ time, keeping the memory footprint constrained.
  2. Parallel Graph Pattern Mining: Instead of learning embeddings via deep learning, GFP explicitly searches for known financial crime topologies, such as circular money laundering, "pump and dump" structures, and "smurfing" (scatter-gather patterns). It uses fine-grained parallel algorithms to distribute the search workload evenly across multiple CPU cores, even when processing very small transaction batches.

The extracted structural counts (e.g., cycle lengths) and incremental vertex statistics (moving statistical moments up to the 4th order) are appended as new columns to the tabular data, which is then fed into a gradient-boosting model.

Datasets

The library was evaluated using two primary benchmarks:

  • AMLworld Datasets: Publicly available, synthetic Anti-Money Laundering (AML) datasets featuring both high-illicit-rate (AML HI) and low-illicit-rate (AML LI) variants across small, medium, and large scales.
  • ETH Phishing Dataset: A real-world Ethereum transaction dataset containing over 13 million edges, where transactions are flagged if they interact with known phishing accounts.

Key Insights and Ideas

  • Domain-Specific Topologies Beat Generic Embeddings: Financial crimes often manifest as highly specific geometric recipes (e.g., a funds-dispersal pattern followed by a consolidation pattern). Explicitly counting these subgraphs provides a stronger signal to tree-based classifiers than the generalized representations learned by GNNs.
  • CPUs Can Outpace GPUs for Streaming Graphs: Because graph traversal involves irregular memory access patterns, clever in-memory data structures combined with multicore CPU parallelism can achieve higher streaming throughput than massive parallel GPU architectures running deep neural networks.
  • Inherent Explainability: GNN predictions are notoriously difficult to interpret. By using engineered graph features within gradient-boosting frameworks, compliance analysts can use tools like SHAP to see exactly why a transaction was flagged (e.g., because it was part of a 2-hop temporal cycle).
Figure 1: Crime patterns in financial transaction graphs.

Key Results

  • Accuracy Boost: Incorporating GFP features improved the minority-class F1 score of baseline tabular models by up to 46%. GFP combined with XGBoost outperformed the best GNN baseline (Principal Neighbourhood Aggregation) by up to 8% on AML HI datasets and up to 11.8% on AML LI datasets.
  • Throughput & Latency: Running on a 32-core Intel Xeon processor, the GFP pipeline achieved higher transaction throughput than GNN baselines running on an NVIDIA Tesla V100 GPU.
  • Real-Time Viability: For a standard batch size of 128 transactions, the average processing latency was just 30 milliseconds, making it highly suitable for real-time transaction screening.

Limitations and Future Work

The primary limitation of the current GFP library is its reliance on hardcoded, pre-defined subgraph patterns (like simple cycles and scatter-gather structures). If criminals adopt a novel transaction topology not covered by these definitions, the preprocessor will miss it.

To address this, the authors plan to introduce support for user-defined subgraph matching, allowing analysts to dynamically define and search for custom transaction patterns. They also intend to expand the built-in library to support more complex structures like cliques and bicliques.

Summary updated

BibTeX
@misc{blanusa2024graph,
  author = {Jovan Blanuša and Maximo Cravero Baraja and Andreea Anghel and Luc von Niederhäusern and Erik Altman and Haris Pozidis and Kubilay Atasu},
  title = {{Graph Feature Preprocessor: Real-time Subgraph-based Feature Extraction for Financial Crime Detection}},
  year = {2024},
  eprint = {2402.08593},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.08593},
}

Loading related content...

Figure