Inspiration
Money laundering is a massive global issue, but the traditional software used by banks to catch it is outdated. Older systems usually just look at simple red flags—like someone sending a lot of money very quickly. But smart criminals don't work alone; they use complex, hidden networks (like shadow groups and circular money trails) to cover their tracks. We wanted to build a system that acts like a detective with a bird's-eye view, capable of actually seeing these hidden criminal shapes inside millions of daily transactions, to stop financial crime more effectively while saving analysts from drowning in false alarms.
What it does
Our project is a machine learning pipeline that catches complex money laundering networks. Instead of looking at isolated transactions, it maps out the entire financial system as a giant "web" or graph. It instantly scans through millions of payments to find specific criminal "shapes"—like money traveling in a circle or fanning out to 50 different accounts at once. By highlighting these suspicious shapes, it helps bank compliance teams catch 35% more hidden fraud. Best of all, it dramatically cuts down on false alarms, saving human investigators from having to manually review 25,000 completely innocent transactions every single day.
How we built it
We built the system in a multi-stage pipeline using Python.
- Graph Construction: We take daily financial data and turn the millions of accounts and transactions into a massive network of nodes and edges.
- Speeding it up: Processing a 500,000-node network usually takes hours and crashes computers. We used a math trick called "sparse linear algebra" (converting the graph into specialized matrices) to find our criminal shapes in just seconds. For example, computing the diagonal of \( A^3 \) instantly reveals 3-hop circular money trails.
- Machine Learning: We generated 86 unique "features" based on these shapes and fed them into a powerful AI model called LightGBM. We chose LightGBM because it's incredibly fast, handles missing data perfectly, and—unlike black-box neural networks—can easily explain its decisions to bank auditors.
Challenges we ran into
The biggest challenge was avoiding data leakage—which is when an AI accidentally peeks into the future to make a prediction. In the real world, you can't use tomorrow's data to predict today's fraud! To fix this, we created a strict timeline rule. We took 10 daily snapshots of the network. If we were trying to predict if a transaction on Friday was fraud, the model was mathematically locked out of seeing anything that happened on Friday. It was forced to rely entirely on the network's shape as it existed on Thursday night.
Accomplishments that we're proud of
We are incredibly proud of the real-world business impact this model creates. It's one thing to build a cool AI, but it's another to make it actually useful for human workers. By feeding our graph shapes into the model, we boosted our fraud-catching capability by a massive 35%. More importantly, we achieved a 44% reduction in false positives. In practical terms, we gave 25,000 daily alerts back to fraud analysts who normally waste their day chasing innocent transactions.
What we learned
We learned that sometimes, clever math and engineering beat throwing massive neural networks at a problem. By representing our network as "compressed sparse matrices," we learned how to scale up complex algorithms to handle millions of rows in seconds without needing an expensive supercomputer. We also learned how vital it is to tie machine learning metrics back to human business value—realizing that reducing "alert fatigue" for tired workers is just as important as the AI's raw accuracy.
What's next for the project
Next, we want to make our graph processing even closer to real-time. We plan to explore streaming graph databases that can update the network structure the exact millisecond a transaction occurs, rather than relying on daily snapshots. We also want to build an interactive dashboard so compliance analysts can visually click, drag, and explore the criminal networks our model finds, making their investigations even faster.
Built With
- joblib
- lightgbm
- matplotlib
- networkx
- numpy
- pandas
- pyarrow
- pytest
- python
- python-igraph
- pyyaml
- scikit-learn
- scipy
- seaborn
- shap
- tqdm
- uvvenv
Log in or sign up for Devpost to join the conversation.