Temporal Motif Features for Anti-Money Laundering on Transaction Graphs: A Leakage-Audited Benchmark (motif-gnn-am v0.2.0)
Abstract
My first PaySim runs looked almost too clean until I checked what the model actually read. Keeping oldbalanceOrg and newbalanceOrig lets a classifier read post-transfer balances that trivially encode fraud. I dropped all four balance columns, rebuilt the chronological splits, and the intrinsic MLP fell to 0.0026 PR-AUC. That collapse is why this repo exists. motif-gnn-am v0.2.0 mines six causal temporal motifs from transaction logs (fan-out, fan-in, pass-through via bisect_right, bounded cycles, and VF2 template matches), adds label-free Louvain community and causal behavioral features, and ships an 8-check leakage audit plus 22 pytest tests. I benchmark Elliptic Bitcoin (203,769 nodes; 234,355 causal edges), PaySim (453,957 TRANSFER/CASH_OUT transactions; ~0.11% fraud), and a synthetic banking set (420 accounts; 1,576 transactions) across seeds 42, 123, and 2026 on CPU. GraphSAGE with causal motifs reaches 0.4411 PR-AUC on Elliptic and 0.0180 PR-AUC on PaySim (Recall@5% 0.5153 vs 0.1738 for intrinsic MLP); the hybrid reaches 1.0000 on synthetic, where patterns are planted by construction. Source code (commit 71628e4, MIT License): https://github.com/dvapu/motif-gnn-am. Companion software record: DOI 10.5281/zenodo.24844400.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.