I built a real-time UPI fraud-detection project that takes synthetic transaction generation through model comparison, an API, and a live dashboard. It is a demonstration using patterns I created, not evidence of real-world accuracy.
I generated 10,000 synthetic UPI transactions for 500 users, with approximately 2% fraud, using patterns including big amounts, 2-4 AM payments, new devices, new cities, and rapid bursts.
I compared 3 anomaly detection methods plus an ensemble, without using fraud labels for training.
Isolation Forest reached an F1 of 0.92 in my reported results.
My reported IQR result was 0.28.
My reported rolling z-score result was 0.26.
My 2-of-3 voting ensemble reached 0.41.
IQR and rolling z-score struggled because they only look at the amount and miss fraud that shows up in device, city or time.
My 2-of-3 voting ensemble was even worse than the best single model; I concluded that voting only helps when the methods see different things.
I cautioned that the data is synthetic, and that I created the fraud patterns myself, so these numbers are optimistic.
I said that a real system needs labelled data, a time-based split and a feedback loop, and that this is my next step.
I serve the best model through a FastAPI service with LOW / MEDIUM / HIGH risk levels and plain-language reasons.
I show the results in a live Streamlit dashboard with filters, trend charts and instant alerts.
I shared these project resources: Live demo: https://lnkd.in/dMwmKxqT; Code: https://lnkd.in/dQi6U3Kf.