0% found this document useful (0 votes)
30 views4 pages

UPI Fraud Detection with Machine Learning

The document presents a project titled 'UPI Fraud Detection Using Machine Learning,' which aims to enhance security for UPI-based digital payments by employing an ensemble of machine learning models to identify and block fraudulent transactions in real-time. The system utilizes various algorithms, including Random Forest and XG Boost, to analyze transaction data and provide instant feedback to users, while also offering reporting features for administrators. The project demonstrates the effectiveness of machine learning in improving fraud detection compared to traditional rule-based systems, with potential for future enhancements and real-world applications.

Uploaded by

sandusireesha0
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views4 pages

UPI Fraud Detection with Machine Learning

The document presents a project titled 'UPI Fraud Detection Using Machine Learning,' which aims to enhance security for UPI-based digital payments by employing an ensemble of machine learning models to identify and block fraudulent transactions in real-time. The system utilizes various algorithms, including Random Forest and XG Boost, to analyze transaction data and provide instant feedback to users, while also offering reporting features for administrators. The project demonstrates the effectiveness of machine learning in improving fraud detection compared to traditional rule-based systems, with potential for future enhancements and real-world applications.

Uploaded by

sandusireesha0
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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

Common questions

Powered by AI

Data preprocessing and feature engineering are critical for preparing a dataset that accurately reflects the underlying patterns associated with fraudulent and legitimate transactions. Preprocessing involves cleaning the data, handling missing values, and encoding categorical attributes, while feature engineering extracts new features that might hold critical predictive power, such as transaction amount behavior, balance changes, and frequency patterns . These steps ensure that the machine learning models receive a dataset with reduced noise and enhanced signals of fraud, improving the models' accuracy and generalization capability in fraud detection .

Feature selection has a significant impact on the effectiveness of machine learning models used in UPI fraud detection. By using techniques such as mutual-information-based feature selection, the system can identify and retain only the most informative features, reducing the dimensionality of the data and enhancing model performance by eliminating irrelevant or redundant data. This focused approach helps improve precision and recall, particularly in an imbalanced fraud detection dataset, where irrelevant features might otherwise obscure important signals and reduce the ability of the model to correctly identify fraudulent transactions .

Future enhancements to the UPI fraud detection system could focus on incorporating richer behavioral features, such as geolocation data and device fingerprinting, to improve the identification of fraudulent patterns. Graph-based analysis of payer-payee networks and the integration with real banking APIs could facilitate more comprehensive and real-time analysis. Additionally, deploying the system on a scalable cloud platform will enable it to handle larger volumes of transactions effectively. Incorporating advanced explainable AI visualizations will enhance transparency and trust, while continuous model training with updated data can ensure the system adapts to new fraud tactics swiftly .

Handling class imbalance is crucial for machine learning models in fraud detection applications, particularly for UPI fraud detection, as fraudulent transactions typically represent a very small fraction of the total transactions. Without addressing this imbalance, models may end up being biased towards non-fraudulent predictions due to the overwhelming number of legitimate transactions. Techniques such as oversampling, undersampling, and the use of advanced algorithms like SMOTE help in balancing the classes, ensuring that models can learn to identify rare fraud cases effectively. This results in improved recall rates, ensuring that fewer fraudulent transactions go unnoticed while maintaining a balance with precision to avoid false alarms .

Traditional rule-based fraud detection systems are often reactive and rely on static thresholds and predefined rules, making them ineffective against evolving fraud tactics. These systems struggle with undetected breaches and high false alarm rates, which lead to financial losses, eroded customer trust, and increased operational costs . A machine learning approach, on the other hand, can dynamically learn from complex and imbalanced data, adapt to new fraud patterns, and provide real-time, explainable predictions that improve detection accuracy and reduce false positives .

Ensemble machine learning models, such as Random Forest, XG Boost, and Gradient Boosting, enhance the reliability of detecting fraudulent transactions by combining multiple models to improve prediction accuracy and robustness. Each model learns slightly different aspects of the fraud patterns from the data, and their aggregated output enhances the system's ability to adapt to new and evolving fraud tactics. This approach helps in addressing the class imbalance present in fraud detection datasets and improves the system's recall for rare fraud cases without a significant loss of precision, delivering a higher overall detection rate .

SHAP-based explainable AI techniques are used in the machine learning model to provide insights into the decision-making process by identifying which features contribute most to the model's predictions about transaction safety. These techniques generate explanations for each transaction prediction, allowing users and administrators to understand the rationale behind flagging a transaction as fraudulent. This transparency is vital for building trust in the system by ensuring stakeholders can verify model behavior and decisions, which is particularly important for applications involving sensitive financial data .

The proposed UPI fraud detection system uses machine learning models, including Random Forest, XG Boost, Light GBM, and Gradient Boosting, to analyze transaction data and distinguish between legitimate and fraudulent activities. The system preprocesses data to derive informative features and handles class imbalances effectively, ensuring rare fraud cases are not overlooked. It is deployed as a real-time web application that provides instant fraud risk feedback for transactions. The use of explainable AI techniques like SHAP also helps users understand why certain transactions are flagged, maintaining transparency and trust .

Deploying the UPI fraud detection system as a Flask-based web application provides significant benefits to both end users and system administrators by facilitating a seamless and interactive user experience. For end users, the web application allows easy registration, login, and transaction initiation with real-time fraud prediction feedback, enhancing the ease of use and security of UPI transactions . For system administrators, the application supports monitoring and reporting capabilities, enabling them to oversee transaction histories, review suspicious activities, and generate detailed reports for audit. This centralized and interactive platform also allows administrators to perform real-time updates and maintenance, ensuring the system remains up-to-date and effective .

ML-based fraud detection systems offer significant advantages over rule-based systems as they are inherently more scalable and adaptable. Machine learning models can be trained on large and evolving datasets, enabling the system to learn complex patterns of fraud and adapt to new types of fraud without the need for manual updates to rules. This adaptability ensures that the system remains effective as fraud tactics change over time. Additionally, ML systems can be deployed in scalable environments, such as cloud platforms, that automatically handle increased loads and more complex computations, maintaining high performance even with a high volume of transactions .

You might also like