Phantom AI
Graph neural networks to find money laundering that traditional rules miss. A proof of concept on synthetic data.

GraphSAGE PR-AUC, versus 0.882 for XGBoost
Of fraud detected with 9 in 10 alerts real
Undetected fraud: graph versus best tabular model
Context
Banks' anti-money-laundering systems run on rules: amounts, frequencies, thresholds. They work for the isolated transaction, but modern laundering is designed to dodge them, splitting large sums into small movements across accounts that each look normal on their own.
The Challenge
Detect the pattern in the network rather than in the transaction: cycles, structuring, fund aggregation, flow-through accounts, shell companies, reactivated dormant accounts, mule networks and round-tripping — in a way a compliance officer can use and explain to a regulator.
My Role
Personal project end to end: synthetic data generator, exploratory graph analysis, tabular and graph models, explainability, calibration, source tracing, the FastAPI backend and the Next.js compliance application.
Approach
A simulated bank with 75,000 accounts and 11.2 million synthetic transactions covering eight FATF-aligned laundering typologies. On that graph I compared logistic regression, XGBoost, Node2Vec, GAT and GraphSAGE on the same metrics. The best model was calibrated, explained account by account with GNNExplainer, and complemented with backward tracing that follows the money to its source.
Stack — why each technology
Key Decisions
Synthetic data, and say so everywhere
There's no public laundering data with reliable labels. I built a reproducible generator with the eight FATF typologies and state it in the app, the README and here: it's a proof of concept, not a model validated on a real bank's data.
Measure what the graph adds, don't assume it
Before using graph neural networks I compared them with tabular models on the same metrics. GraphSAGE reaches 0.943 PR-AUC versus 0.882 for XGBoost, and lets 13% of fraud slip through versus 21%: the graph helps, by a concrete margin.
An ablation to understand where the signal comes from
Node2Vec learns only from the shape of the network, without each account's behaviour, and drops to 0.235. The signal isn't pure topology: it takes structure plus behaviour, which is exactly what GraphSAGE combines.
Calibrate before prioritising
51% of the raw scores were saturated at 1.0, and the thousand riskiest accounts shared only four distinct values: the case queue couldn't be ranked. Isotonic calibration cut the calibration error from 0.043 to 0.003.
Results
GraphSAGE detects 90% of fraud while requiring 9 in 10 alerts to be real, with a PR-AUC of 0.943. Mule accounts look normal from a credit standpoint and give themselves away through their connections: a fraudulent account's neighbour is 2.9 times more likely to be fraudulent too. Backward tracing found 149 source accounts, 98 of them invisible to the main model.
What I Learned
A good score isn't enough: it has to be rankable, explainable and defensible before a regulator. And in fraud, the hardest part isn't finding the mule but whoever uses it — something a node classifier misses without a second look at the network.
A project like this for your organization?
Tell me the problem and we'll work out how to solve it with data.
Next case
Atlas Analytics →