Real-Time UPI Fraud Detection Using a Hybrid XG Boost-LSTM Ensemble with Integrated Explainability
Abstract
Each month, more than 12billion payments flow through India’s UPI system. This digital network now stands at the center of everyday money transfers across the country.. However, the instantaneous settlement characteristic of UPI shrinks the fraud-intervention window to under two seconds, rendering conventional rule-based filters insufficient. This paper presents a production-oriented fraud detection framework that fuses gradient-boosted decision trees (GradientBoosting/XGBoost-equivalent) for static tabular feature analysis with a custom LSTM network for sequential behavioural pattern modelling. Fewer examples of one class get balanced by a tailored method lifting its share from 5% to about 39% during training. One part leans heavier when merging results - set at 0.6 - to shape the final fraud likelihood. Messages flow through a Flask setup built like Kafka, answering most requests under 25 milliseconds even with over a thousand each second.Integrate SHAP global explanations and LIME per-case explanations satisfy emerging regulatory requirements for transparent automated financial decisions. A test using 20,000 made-up UPI transactions across five types of attacks shows the mixed model works best. It hits an F1-score of 0.958 and a ROC-AUC of 0.9985. Better results than each of the four comparison models when looking at both spotting threats and real-world use. Security for data transfer relies on HTTPS/TLS plus identity checks through tokens. Each request must carry a valid access key to proceed.