International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 09 Issue: 12 | Dec - 2025 SJIF Rating: 8.586 ISSN: 2582-3930
UPI Fraud Detection Using Machine Learning
Dr. Raja Meyyan1, Deekshitha N2, Bindu K3, Guru Murthy R4
1
Professor & HOD, Dept of ISE, East West Institute of Technology, Bengaluru
2,3,4
Student, Dept of ISE, East West Institute of Technology, Bengaluru
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract – The project “UPI Fraud Detection Using decisions, helping both end users and administrators
Machine Learning” aims to provide an intelligent, real- understand why a transaction was flagged. This
time security layer for UPI-based digital payments by combination of robust machine learning, real-time
automatically identifying suspicious transactions before deployment, and interpretability provides a comprehensive
they are completed. An ensemble of machine learning framework for enhancing security and trust in UPI-based
models (including Random Forest, XG Boost, Light GBM digital payments.
and Gradient Boosting) is trained on a balanced fraud-non- 1.1 PROBLEM STATEMENT
fraud dataset, with standardized features and careful
handling of class imbalance to improve recall on rare The problem statement for “Fraud Detection in UPI
fraudulent cases while maintaining high precision. The Transactions Using Ensemble Learning” centers on the
system is deployed as a Flask-based UPI transaction critical need to overcome the inefficiencies and
portal, where users can register, log in, initiate payments, inaccuracies of traditional rule-based fraud detection
and receive instant feedback on the fraud risk for each systems in the financial technology sector. UPI
transaction. For every payment request, the model outputs Transactions, which are a cornerstone of the digital
a fraud probability; high-risk transactions are economy, require immediate and precise fraud analysis to
automatically blocked, logged into the user’s history, and protect user assets and ensure system reliability. However,
accompanied by email alerts and downloadable CSV/PDF current processes, which often rely on static thresholds and
reports for audit and analysis. predefined rules, are not only reactive but also incapable of
adapting to new fraud tactics, leading to undetected
breaches and false alarms. These shortcomings result in
Key Words: Blockchain Technology, Cybersecurity, Web direct financial losses, eroded customer trust, and increased
Development, Machine Learning. operational costs for the financial institutions. Therefore,
there is a pressing need for an intelligent, ensemble-based
machine learning system that can learn from complex,
imbalanced data, provide real-time and explainable
[Link] predictions, and dynamically adapt to the evolving
landscape of financial cybercrime.
The project “UPI Fraud Detection Using Machine
Learning” addresses this need by designing and
implementing a predictive model that can distinguish 1.2 KEY OBJECTIVES
between legitimate and fraudulent UPI-style transactions
based on historical data. The system preprocesses This study aims to achieve the following objectives:
transaction records, engineers’ relevant features such as
amount behavior, balance changes, and transaction
To design a robust machine learning model that can
frequency, and applies mutual-information-based feature
selection to retain the most informative attributes for accurately classify UPI-style transactions as legitimate or
classification. Multiple machine learning algorithms- fraudulent using historical transaction data.
including ensemble models like Random Forest, XG To perform effective data preprocessing and feature
Boost, Light GBM, and Gradient Boosting—are trained engineering, including handling missing values, encoding
and evaluated to handle the highly imbalanced nature of categorical attributes, computing derived features, and
fraud data, with a focus on maximizing recall for fraudulent addressing severe class imbalance between normal and
cases while maintaining acceptable precision and overall fraudulent transactions.
accuracy. Users can register, log in, and initiate payments,
while the backend model evaluates each transaction in real To evaluate and compare multiple ML algorithms (such as
time and predicts whether it is safe or potentially Random Forest, XG Boost, Light GBM, Gradient
fraudulent. Suspicious transactions are blocked and logged, Boosting, etc.) using metrics like accuracy, precision,
with options to generate downloadable reports and trigger recall, F1-score and ROC-AUC and to select the best
email alerts to the user. Additionally, SHAP-based model for deployment with a focus on high recall for fraud
explainable AI techniques are used to visualize and cases.
interpret the most influential features behind the model’s
© 2025, IJSREM | [Link] DOI: 10.55041/IJSREM54766 | Page 1
International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 09 Issue: 12 | Dec - 2025 SJIF Rating: 8.586 ISSN: 2582-3930
To develop a user-friendly web interface (UPI transaction amount, time, device details, and user frequency to predict
portal) using Flask, where users can register, log in, initiate whether a transaction is safe or fraudulent. The final system
transactions, and obtain instant feedback on whether a includes analytics to show the distribution of detected
transaction is safe or suspicious. frauds and model performance, positioning the solution as
a smarter alternative to rule-based detection in UPI
To implement real-time fraud prediction by integrating the
applications.
trained ML model with the transaction flow so that high-
risk UPI transactions can be blocked or flagged before they
are completed.
2.4 UPI Fraud Detection Using Machine Learning
To provide transaction history and reporting features,
enabling users and administrators to view past transactions, This open-access chapter provides a complete ML pipeline
filter suspicious transactions, and download detailed for detecting UPI fraud. It describes UPI’s role in India’s
reports for audit and analysis. digital economy, and lists common fraud patterns, and
constructs a dataset with transaction amounts, timestamps,
sender/receiver behavior, and device indicators. Several
2. RELATED WORK AND LITERATURE SURVEY supervised algorithms, including Logistic Regression,
SVM and Random Forest, were evaluated for fraud
2.1 UPI Fraud Detection Using Machine Learning classification. The study reports that Random Forest
outperforms the other models, especially on imbalanced
This study focuses specifically on UPI transactions and data, and is recommended as a strong baseline for UPI
proposes a fraud detection system that combines traditional fraud-detection deployments.
machine learning and deep learning to handle large-scale
digital payment data. The authors highlight how UPI’s
explosive growth in India has led to sophisticated fraud 2.5 Real-Time Fraud Detection Using Machine
attempts and argue that static rule engines cannot cope with
Learning
evolving patterns. Their proposed system uses supervised
models such as Random Forest and XG Boost, along with
This study is centered on credit card data rather than UPI
LSTM-based deep networks and anomaly detection, to flag and contributes important ideas for real-time financial
suspicious transactions in real time. The study emphasizes fraud detection. Using a publicly available Kaggle dataset,
the importance of capturing temporal behavior, transaction the author compared several ML algorithms—Logistic
context, and user habits and reports that the hybrid design Regression, KNN, Naïve Bayes, SVM, Random Forest,
improves accuracy and robustness over single-model XG Boost and Light GBM—to classify transactions as
baselines. genuine or fraudulent. Class imbalance was handled with
SMOTE, and extensive metrics such as AUC, precision-
recall AUC, F1, KS statistic and recall were reported. The
2.2 Unified Payment Interface Fraud Detection Using Random Forest emerged as the best performer. This study
also integrates SHAP-based explainability to show which
Machine Learning
features drive each prediction, bridging the gap between
accuracy and interpretability.
This study provides an application-oriented overview of
how ML can be integrated into UPI fraud detection
workflows. It starts with a review of existing ML-based 3. METHODOLOGY
financial fraud studies, then narrows down to UPI, and The proposed system, “UPI Fraud Detection Using
discusses dataset imbalance, feature engineering, and Machine Learning,” provides a data-driven fraud detection
model evaluation. The proposed methodology uses layer on top of the UPI payment workflow. Historical UPI-
supervised learning to classify transactions as fraudulent or style transaction data were collected and preprocessed to
legitimate, focusing on algorithms such as Random Forest derive meaningful features, such as transaction amount
and SVM. This study stresses the handling of class behavior, balance changes, transaction type, frequency,
imbalance and explains how ML models can classify, time patterns, and user behavior indicators. Using these
predict patterns, and work with highly skewed datasets. features, multiple machine learning models (e.g., Random
Forest, XG Boost, Light GBM, Gradient Boosting) are
trained to distinguish between genuine and fraudulent
2.3 UPI Fraud Detection Using Machine Learning transactions, with special handling for class imbalance so
that rare fraud cases are not ignored.
This study is similar to an implementation-centric project
report. It begins with a discussion of UPI growth and The trained model was integrated into a Flask-based web
common attack vectors such as fake ID’s, phishing links, application that simulated a UPI portal. When a user
and unauthorized access. The authors built a machine- initiates a transaction, the system extracts the relevant
learning model that analyses transaction attributes such as features, passes them to the ML model, and obtains a fraud
© 2025, IJSREM | [Link] DOI: 10.55041/IJSREM54766 | Page 2
International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 09 Issue: 12 | Dec - 2025 SJIF Rating: 8.586 ISSN: 2582-3930
probability score in real-time. If the transaction is Typical flow (High Level):
predicted to be safe, it is allowed; if it is flagged as 1. User opens portal →Flask serves UI.
suspicious, it is blocked or marked as high risk, and the 2. User logs in →Flask validates credentials
details are logged in the user history. The system also with DB.
supports generating reports (CSV/PDF) and visual 3. User initiates transaction →Flask
analytics, and can incorporate SHAP-based explainable AI validates input and sends to Fraud Detection
to show which features contribute most to the decision, Engine.
thereby increasing transparency for both users and 4. Fraud Detection Engine engineer’s
administrators. features → ML model predicts fraud risk.
5. Flask records transaction + prediction in
4. SYSTEM ARCHITECTURE DB → returns result page:
o If safe →“Transaction Successful
/ Safe”.
o If suspicious →“Transaction
Blocked / Suspected Fraud”.
[Link]/Admin Module
o Admin dashboard to view all users and all
transactions.
o Monitor suspicious / fraudulent activities.
o Basic system statistics (total transactions,
fraud percentage).
[Link] Module
Fig: Architecture Design o Send email alerts for flagged fraudulent
transactions.
4.1 MAIN COMPONENTS o Can send periodic summary reports to
1. Client (Web Browser) admin.
o User/Admin accesses the UPI Fraud
Detection portal using a browser.
o Sends HTTP requests (login, new 5. RESULTS
transaction, view history) and receives HTML The project “UPI Fraud Detection Using Machine
pages. Learning” was developed to address the growing problem
2. Web Application Layer (Flask App) of fraudulent transactions in UPI-based digital payments.
o Handles routing, forms, validation, and The work started with a detailed study of UPI, existing
session management. fraud patterns and traditional rule-based detection
o Contains modules for: mechanisms. A suitable dataset of UPI-style transactions
• User Authentication was collected/assumed, preprocessed, and enriched
&Authorization through feature engineering. Multiple machine learning
• Transaction Management models were then trained and evaluated to classify
• Fraud Detection Integration transactions as legitimate or fraudulent, with special
• Reporting & Admin Dashboard attention to handling class imbalance. The best-
3. Fraud Detection Engine (ML Model Service) performing model was integrated into a Flask-based web
o Pre-loaded trained ML model (Random application that simulates a UPI portal. The system allows
Forest / XG Boost / etc.). users to register, log in, initiate transactions, and receive
o Feature-engineering logic that converts real-time fraud predictions. Each transaction and its
raw transaction input into model-ready features. prediction result are stored in a database, and users/admins
o Returns prediction: Fraud / Non-Fraud. can view transaction history and generate reports. Overall,
4. Database Layer (SQLite / RDBMS) the project successfully demonstrates how ML-based
o Stores user details, hashed passwords, techniques can enhance security and trust in UPI
roles. transactions compared to static rule-based approaches.
o Stores transaction records with prediction
label (safe / fraud).
o Stores logs and optionally model [Link]
metadata / statistics.
5. Reporting & Analysis Module (Inside Flask) The UPI Fraud Detection Using Machine Learning project
o Generates summary views, graphs and successfully demonstrates how data-driven models can
downloaded reports. strengthen security in digital payment platforms. By
o Allows admin to monitor suspicious combining machine learning, web technologies, and
transactions. database management, the system is capable of providing
© 2025, IJSREM | [Link] DOI: 10.55041/IJSREM54766 | Page 3
International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 09 Issue: 12 | Dec - 2025 SJIF Rating: 8.586 ISSN: 2582-3930
real-time risk assessment for UPI-style transactions and
blocking suspicious activities before they cause financial
loss. Although this project operates on a simplified dataset
and a laboratory-scale deployment, the architecture,
design, and implementation approach can be extended to
real-world environments with larger datasets and more
advanced models.
In future, the system can be enhanced by incorporating
richer behavioral features, graph-based analysis of payer-
payee networks, integration with real banking APIs,
explainable AI visualizations, and deployment on a
scalable cloud platform. Overall, the project meet its stated
objectives and serves as a strong foundation for further
research and development in the area of secure, intelligent
digital payment systems.
ACKNOWLEDGEMENT
We wish to express our profound gratitude to our project
guide, * Dr Raja Meyyan *, Professor and HOD,
Department of Information Science and Engineering, East
West Institute of Technology (EWIT), for his invaluable
expertise, persistent encouragement, and meticulous
guidance throughout this project. We also extend our
sincere thanks to the Head of the Department, **Dr Raja
Meyyan **, for providing the necessary facilities and
support.
REFERENCES
1. S. Munirathinam and B. Ramadoss, “Predictive
models for equipment fault detection in the
semiconductor manufacturing process,” IACSIT
International Journal of Engineering and Technology,
vol. 8, no. 4, pp. 273-285, 2025.
2. A. Kaveri Sharma, “A study on effects of intrinsic
characteristics of datasets on classification
performance,” International Journal of Advanced
Research in Computer Science and Software
Engineering, vol. 6, no. 1, pp. 198-204, 2025.
3. J. Wang, Z. Yang, J. Zhang, Q. Zhang, and W.-T.-K.
Chien, “AdaBalGAN: An improved generative
adversarial network with imbalance learning for wafer
defective pattern recognition,” IEEE Trans.
Semiconductor Manuf., vol. 32, no. 3, pp. 310-319,
Aug. 2025.
4. K.-J. Kim, K.-J. Kim, C.-H. Jun, L.-G. Chong, and
G.-Y. Song, “Variable selection under missing values
and unlabeled data in semiconductor processes,” IEEE
Trans. Semiconductor Manuf., vol. 32, no. 1, pp. 121-
128, Feb. 2024.
5. J.-S. Kim, S.-J. Jang, T.-W. Kim, H.-J. Lee, and J.-B.
Lee, “A productivity-oriented wafer map optimization
using yield model based on machine learning,” IEEE
Trans. Semiconductor Manuf., vol. 32, no. 1, pp. 39-47,
Feb. 2023.
© 2025, IJSREM | [Link] DOI: 10.55041/IJSREM54766 | Page 4