What it watched
Interbank transfers between 35 of Peru's leading financial institutions, in real time. The feature engineering encoded what fraud tends to look like: account age, deviation from a person's normal transfer amounts, transfers between someone's own accounts across different banks, activity at unusual hours, unusual bank-to-bank combinations. The model then decided what was anomalous in that feature space.
Why Isolation Forest
The client could not provide fraud labels, which rules out supervised learning, so the model is unsupervised anomaly detection. The first MVP flagged around 9% of transactions, far more than the analysts could review. I redesigned the features and the model and brought flags down to the client's ~2% operating threshold. Once confirmed cases accumulate, a semi-supervised model trained on them is the natural next step.
What real time required
A fast, concurrent API (FastAPI), hosted on-premise with no cloud services allowed, which meant working hand in hand with the infrastructure team on latency and concurrency budgets.
What comes next
The client's analysts worked the alerts downstream. The next layer is a precision-recall view built from their confirmed cases, so the threshold can move from review capacity to the cost of a missed fraud.