PaySafe India — Real-Time UPI Fraud Detection with Open-Source ML (No Cloud Required)
Description and use
PaySafe India delivers real‑time UPI fraud detection using a fully local, open‑source ML stack, offering precise risk scores and counterfactual explanations without cloud data exposure.
Problem
Detect fraudulent UPI transactions in real time without relying on cloud services or external APIs, ensuring data stays local and costs are minimal.
Outcome
Random Forest model achieved 0.983 precision, 0.879 recall, 0.928 F1, and 0.969 ROC‑AUC on a held‑out test set of 5,279 transactions, outperforming other classifiers and a dummy baseline.
Workflow
- Select and audit dataset for leakage
- Clean and engineer behavioral features
- Apply K‑Means clustering for anomaly pre‑check
- Train four supervised classifiers with cross‑validation
- Choose best model based on CV F1
- Serialize model with joblib
- Deploy Flask app with REST API and counterfactual explainability
Evidence
Random Forest (deployed ✅) 0.983 precision, 0.879 recall, 0.928 F1, 0.969 ROC‑AUC
The Flask web app runs locally at http://127.0.0.1:5000 after a one‑time training run.
No LLM. No cloud ML service. No API keys. Just classical ML running at full speed on a laptop.
- Record date: 2026-10-27T04:11:45.610Z