Skip to main content

MACHINE LEARNING-BASED APPROACHES FOR FRAUD DETECTION IN CREDIT CARD TRANSACTIONS: A COMPARATIVE STU

Page 1

International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 10 Issue: 10 | Oct 2023

p-ISSN: 2395-0072

www.irjet.net

MACHINE LEARNING-BASED APPROACHES FOR FRAUD DETECTION IN CREDIT CARD TRANSACTIONS: A COMPARATIVE STUDY VAANATHI S 1, PRAGADEESH S 2, SUDHARSANAN S R 3, SURIYA S 4 1 Professor, Dept. of Artificial Intelligence and Data Science, Bannari Amman Institute of Technology, Tamil Nadu, India 2 Student, Dept. of Information Technology, Bannari Amman Institute of Technology, Tamil Nadu, India

3 Student, Dept. of Information Technology, Bannari Amman Institute of Technology, Tamil Nadu, India 4 Student, Dept. of Information Technology, Bannari Amman Institute of Technology, Tamil Nadu, India

---------------------------------------------------------------------***--------------------------------------------------------------------other financial institutions must deal with. The need for Abstract - Credit card fraud detection is an increasingly

reliable and adaptable fraud detection techniques has never been more pressing since fraudsters are always coming up with new strategies to take advantage of weaknesses in the payment ecosystem. The detection of fraud in bank payments has undergone a substantial revolution with the advent of machine learning. The subject of identifying patterns in vast amounts of data using advanced analytical techniques and identifying criminal activities among the sea of lawful transactions has been transformed by machine learning algorithms. By enabling systems to recognize and respond to changing fraud patterns, machine learning has been used to produce proactive, accurate fraud detection. Understanding the subtleties of machine payments is increasingly necessary rather than just a technological advantage. This project involves a thorough research of numerous fraud types, challenges with detection, and the application of cutting-edge machine learning methods. It discusses the art of preparing and engineering data, the science of selecting and optimizing algorithms, and the realworld impacts of accurate fraud detection on financial institutions and their clients. This journey begins with an examination of the many sorts of payment fraud, such as identity theft, unauthorized credit card use, and account takeovers. The dynamic fraud environment is explored, as criminals quickly adjust to avoid detection by established controls.

critical challenge in today's digital age, where online financial transactions are the norm. This paper presents an in-depth exploration of machine learning-based approaches for tackling credit card fraud with a focus on effectiveness, efficiency, and adaptability. The initial phase of our research involves the meticulous collection of a comprehensive dataset, encompassing legitimate and fraudulent transactions. This dataset forms the cornerstone of our investigation, enabling the subsequent development and evaluation of machine learning models. In our quest to combat credit card fraud, we leverage the capabilities of three distinct machine learning algorithms: Isolation Forest, Local Outlier Factor, and OneClass Support Vector Machine (SVM). Each algorithm undergoes a systematic implementation and evaluation process, assessing their ability to accurately identify fraudulent transactions while minimizing false positives. Through rigorous testing and analysis, we offer a comparative study of these models, shedding light on their individual strengths and limitations. Additionally, this paper delves into the crucial aspect of model optimization. We explore hyper parameter tuning and fine-tuning techniques, unearthing the configurations that maximize the models' effectiveness in realworld scenarios. These optimization strategies not only bolster detection rates but also enhance the models' adaptability to evolving fraud techniques. The results and discussion section of this paper dissects the performance metrics of the machine learning models, providing insights into precision, recall, accuracy, F1-score, and area under the Receiver Operating Characteristic curve (AUC-ROC). These metrics offer a comprehensive view of the models' prowess in combatting credit card fraud.

2. LITERATURE SURVEY Dario et al. [1] emphasize the significance of machine learning-based anomaly detection in identifying post-silicon bugs. Their work underscores the applicability of machine learning in detecting irregularities, which is pivotal in fraud detection.

Key Words: Credit Card Fraud Detection, Machine Learning, Anomaly Detection, Isolation Forest, Local Outlier Factor, Support Vector Machine

Buck and given [2] present a comprehensive survey of data mining and machine learning methods for cyber security intrusion detection. Their insights provide a broader perspective on the relevance of these techniques in security domains, a context closely related to fraud detection in financial transactions. In the study by Argali et al. [3], the authors evaluate the performance of machine learning techniques in detecting financial fraud. Their findings offer valuable insights into the practicality and effectiveness of

1. INTRODUCTION Using Machine Learning to Spot Fraud in Bank Payments the measures guaranteeing the integrity of these transactions are crucial in the digital era, when financial transactions may happen instantly across the world. The constant danger of fraud, which has developed into a highly sophisticated opponent, is one of the most important issues that banks and

© 2023, IRJET

|

Impact Factor value: 8.226

|

ISO 9001:2008 Certified Journal

|

Page 264


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 10 Issue: 10 | Oct 2023

p-ISSN: 2395-0072

www.irjet.net

these methods in real-world fraud detection scenarios. Liu et al. [4] introduce the Isolation Forest algorithm, a fundamental technique for anomaly detection. This work serves as a foundational piece for understanding the key algorithm employed in our research for fraud detection. Tanoak et al. [5] delve specifically into credit card fraud detection using machine learning, providing practical insights into the implementation of these methods in the context of financial transactions, a focal point of our study. Ahmed et al. [6] conduct a survey of network anomaly detection techniques, drawing attention to the relevance of anomaly detection across diverse domains, including financial transactions. Their work underscores the importance of adapting these techniques to different application areas. Brewing et al. [7] propose the LOF (Local Outlier Factor) algorithm, emphasizing its ability to identify local outliers within datasets. This algorithm plays a crucial role in detecting anomalies within our credit card transaction dataset. Schölkopf et al. [8] introduce methods for estimating the support of high-dimensional distributions, which contribute to the theoretical foundation of anomaly detection techniques.

deftness and technologies like deep learning-based auto-encoders. 

Our evaluation focuses on the model’s capacity to spot anomalies—even the subtlest and most complex ones. We realize that anomalies are not always obvious; they might appear as soft humming in the data, and our models must be sensitive enough to detect them.

3.2 FLOW DIAGRAM

3. OBJECTIVE AND METHODOLOGY 3.1 OBJECTIVES OF THE PROPOSED WORK The objectives of this project are the result of a comprehensive literature survey that we conducted. These objectives serve as guiding principles for our research and influence all aspects of our project work. We identified two main objectives for this project. These play an important role in shaping the direction and outcome of this project. 

Detecting Anomalies: Anomaly detection is a helpful ally in the high-stakes area of credit card fraud detection, where adversaries are continually evolving their tactics. In this scenario, the purpose of anomaly detection is to apply sophisticated algorithms to find minute anomalies in credit card transactions.

The distribution of fraud cases in the actual world is reflected in imbalanced datasets, which are characterized by a sharp disparity between the vast majority of honest transactions and the few occurrences of dishonest ones. The basic foundation for detecting fraud in credit card transactions, is crucial for protecting the digital economy, which is at stake.

Figure 1: Flow Diagram Explanation of Flow Diagram: • Data Collection: In the initial stage, we undertook the crucial task of gathering a comprehensive dataset encompassing a multitude of credit card transactions. This dataset was an essential foundation for our fraud detection model and contained records of both legitimate and fraudulent transactions.

3.1.1 ANOMALY DETECTION 

Finding anomalies are the elusive ghosts that haunt the data in the area of fraud detection. This goal necessitates the use of sophisticated anomaly detection methods, utilizing time-series analysis's

© 2023, IRJET

|

Impact Factor value: 8.226

• Preprocessing: The subsequent phase involved extensive data preprocessing. We meticulously cleaned the dataset,

|

ISO 9001:2008 Certified Journal

|

Page 265


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 10 Issue: 10 | Oct 2023

p-ISSN: 2395-0072

www.irjet.net

addressing issues like missing values, outliers, and data format discrepancies. • Feature Extraction: Feature extraction played a pivotal role in dimensionality reduction and model performance enhancement. We carefully selected relevant attributes for fraud detection from the dataset to serve as inputs for our fraud detection models, • Model Selection: In this phase, I made informed decisions about the machine learning models to be employed. The selection included renowned models such as Isolation Forest, Local Outlier Factor, and One-Class SVM, each chosen based on their suitability for credit card fraud detection.

Figure 2: Dataset Class Distribution

• Code Implementation: The objective was to ensure that the models could seamlessly process the dataset and provide meaningful results. Rigorous testing and fine-tuning were performed during this phase to guarantee the reliability and efficiency of the implemented code.

Figure 2 encapsulates a mosaic of financial transactions, drawn from historical records and spanning both legitimate and fraudulent incidents. Our commitment to data quality and diversity ensures that our models are robust and capable of navigating the complex landscape of credit card transactions.

• Model Testing: The working of the machine learning models was rigorously assessed during this phase, relying on crucial metrics such as accuracy, precision, recall, and F1score.

The next phase of our journey involves the critical task of model selection. Here, we carefully evaluate a spectrum of machine learning models to identify the most suitable candidates for tackling the multifaceted challenge of credit card fraud detection. We investigate tried-and-true methods for classification challenges, like Random Forest and Logistic Regression. To identify the intricate patterns of fraudulent activity, we also investigate cutting-edge techniques including the Local Outlier Factor (LOF), Isolation Forest, and One-Class Support Vector Machine (SVM).

• Model Validation: In the final phase, model validation, we ensured that the selected models were not only accurate but also robust and capable of performing well in real-world scenarios. The structured approach followed, encompassing data collection, preprocessing, feature extraction, model selection, code implementation, model testing, and model validation, has resulted in a comprehensive credit card fraud detection system that is both effective and reliable. This project represents a testament to the meticulous planning and execution required in the field of machine learningbased fraud detection.

The phases of data exploration, performance evaluation, adaptability analysis, trade-off exploration, anomaly identification, model optimization, ensemble techniques, and useful recommendations are all included in the project as we proceed. Each of these stages helps us achieve our overarching objective of creating a reliable and moral method for detecting credit card fraud.

4. PROPOSED WORK

4. 1 MODEL COMPARISON

In the initial phase, we lay the foundation for our credit card fraud detection project by diligently collecting a comprehensive dataset. This dataset as shown in Figure 2 encapsulates a mosaic of financial transactions, drawn from historical records and spanning both legitimate and fraudulent incidents. Our commitment to data quality and diversity ensures that our models are robust and capable of navigating the complex landscape of credit card transactions.

© 2023, IRJET

|

Impact Factor value: 8.226

The objective is to thoroughly assess each model’s performance and determine which ones are best at spotting fraudulent credit card transactions. Two crucial elements make up the model comparison. • Statistical Analysis: We use statistical tests to acquire better understanding of the five models' relative performance. To determine whether there are statistically significant variations in their performance characteristics, tests like Wilcoxon signed-rank tests or paired t-tests must be used. With the use of these tests, we may establish if one model outperforms another in a statistically significant manner. The objective layer that statistical analysis brings to

|

ISO 9001:2008 Certified Journal

|

Page 266


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 10 Issue: 10 | Oct 2023

p-ISSN: 2395-0072

www.irjet.net

our review process enables us to make solid judgments regarding the relative efficacy of the models.

The gap between model performance and actual application is filled up during the Anomaly Detection and Interpretability phase. It enables us to not only evaluate how effectively the models detect abnormalities but also to comprehend the reasoning behind some of their predictions. This level of comprehension is crucial for fostering confidence and trust in the models and directs their use in practical situations.

• Visualization: Visualizations are a powerful tool for comprehending complex information quickly. To demonstrate how well the models function, we provide graphics like Receiver Operating Characteristic (ROC) curves and Precision-Recall curves. ROC curves demonstrate the trade-off between true positive rate (sensitivity) and false positive rate (1-specificity), while Precision-Recall curves represent the trade-off between precision and recall. By displaying these curves for each model, we provide a transparent and understandable picture of each model's discriminative abilities. These visualizations are useful tools for understanding how each model behaves in various operating scenarios and provide insights into each model's overall performance.

5. RESULTS AND DISCUSSION In order to create a system that could dynamically pick the best anomaly detection method for each transaction depending on its attributes, we pursued adaptive model selection. The findings show a considerable improvement in fraud detection accuracy and optimal use of computing resources. An investigation of the dynamic model selection method sets the stage for our discussion. Transactions with diverse features could be more suited for Isolation Forest, but transactions with exceptionally high quantities might benefit from the precision of Local Outlier Factor (LOF).

4.4 DETECTION AND INTERPRETABILITY OF ANOMALIES We focus on Anomaly Detection and Feature Interpretability at this important stage of our credit card fraud detection project. These components are essential for both comprehending the behavior of the models and improving their applicability. Anomaly Detection: Our initial goal is to examine and look for abnormalities in the predictions made by the models, which in this case are fraudulent transactions. In this stage, the predictions made by the models are contrasted with the actual labels. We learn more about how each model detects abnormalities and separates them from regular transactions by building visualizations and analysis reports. Through this method, we are able to identify particular areas where the models may perform well or poorly in terms of spotting fraudulent actions, in addition to gauging the performance overall. Making educated judgments regarding their deployment requires an understanding of the advantages and disadvantages of each model in terms of anomaly detection.

Figure 3: Support Vector Machine (SVM) The Figure 3 shows the accuracy score of a support vector machine (SVM) classifier for fraud detection. The accuracy score of 0.7009936448860644 indicates that the classifier is able to correctly identify fraudulent and non-fraudulent transactions with an accuracy of 70.09%.

Importance of Feature: Interpretability is essential to machine learning models, especially in delicate situations like detecting credit card fraud. We evaluate the significance of features in both the Logistic Regression and Random Forest models to improve interpretability. The features or factors that have the greatest influence on the predictions of the models are identified via feature importance analysis. This knowledge is crucial for comprehending the factors that influence a model's choice of actions. We may obtain insight into the characteristics of fraudulent transactions as well as the reasons why a model categorized a transaction as fraudulent by highlighting key elements. This information may be utilized to improve detection methods and give financial institutions useful data.

© 2023, IRJET

|

Impact Factor value: 8.226

This iterative process makes sure that our fraud detection technology is reliable going forward. Overall, the classification report shows that the SVM classifier is able to perform well on the fraud detection task, even though the dataset is imbalanced.

|

ISO 9001:2008 Certified Journal

|

Page 267


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 10 Issue: 10 | Oct 2023

p-ISSN: 2395-0072

www.irjet.net

data point. The anomaly score is based on the depth of the tree required to isolate the data point. Data points with higher anomaly scores are more likely to be fraudulent. Isolation forest model has an accuracy score of 0.9974368877497279. This shows that the model can distinguish between fraudulent and legitimate transactions with an accuracy of 99.74%. For every class, the F1 score. The proportion of accurate positive forecasts is known as precision. Recall is the proportion of real positive cases that the model properly detected. A harmonic mean of memory and precision is the F1 score. Precision, recall, and F1 score for the fraud class are all at a perfect 1.00. In other words, the model can accurately identify every fraudulent transaction. The precision, recall, and F1 score for the non-fraud class are 0.26, 0.27, and 0.26 respectively. As a result, the model is still quite effective at recognizing fraudulent transactions even though it is not particularly excellent at identifying nonfraudulent transactions. The isolation forest model is a highly successful fraud detection model overall. It has a very high degree of accuracy in identifying fraudulent transactions.

Figure 4: Local Outlier Factor (LOF) • Precision: The percentage of transactions that the classifier predicted to be fraudulent that are actually fraudulent. • Recall: The percentage of fraudulent transactions that the classifier correctly predicted. • F1-score: A harmonic mean of precision and recall. • Support: The total number of transactions in each class. The classification report shows that the LOF has a precision of 1.00, a recall of 0.51, and an F1-score of 0.71. This means that the classifier is able to correctly identify all of the fraudulent transactions, but it only identifies 51% of the total fraudulent transactions. The low recall is likely due to the fact that the dataset is imbalanced, with fewer fraudulent transactions than normal transactions. This can make it difficult for machine learning models to identify all of the fraudulent transactions. Overall, the classification report shows that the LOF classifier is able to perform well on the fraud detection task, even though the dataset is imbalanced.

Figure 6: Time of Transaction vs. Amount by Class From Figure 6, we are able to learn that • Fraudulent transactions are more likely to occur at unusual times, such as late at night or early in the morning. • Fraudulent transactions are also more likely to be for large amounts. • There is a cluster of fraudulent transactions in the top left corner of the plot, representing large transactions that occurred at unusual times.

Figure 5: Isolation Forest (IF) The Figure 5 shows the results of an isolation forest model for fraud detection. The isolation forest model is an unsupervised anomaly detection algorithm that can be used to identify fraudulent transactions without the need for labelled data. The isolation forest model works by creating a forest of trees and then assigning an anomaly score to each

© 2023, IRJET

|

Impact Factor value: 8.226

• There are also some fraudulent transactions that overlap with normal transactions in the bottom right corner of the plot. These transactions may be more difficult to detect, but they can still be identified by machine learning models.

|

ISO 9001:2008 Certified Journal

|

Page 268


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 10 Issue: 10 | Oct 2023

p-ISSN: 2395-0072

www.irjet.net

strategically expand the scope of our fraud detection system to include other transaction channels. It promotes a comprehensive strategy for fraud prevention by guaranteeing consistent fraud protection across all channels. Both fraud and our defense should have no geographical limitations. We have been successful in Identifying fraud using an Omni channel strategy across different types of transaction methods. A uniform fraud detection method is maintained while taking into account the particularities of each channel using channel-specific anomaly detection rules and models. The initiative should also continue to look ahead, investigating potential improvements and cuttingedge technology. The fraud detection system can continue to be efficient and adaptable in a constantly shifting environment by doing ongoing research and staying ahead of developing risks.

REFERENCES [1]

Figure 7: Correlation Heatmap

https://dl.acm.org/doi/10.5555/2485288.2485411.

The Figure 7 is scatter plot of the time of transaction and amount, by class (fraudulent or normal). The plot shows that there is a clear separation between the fraudulent and normal transactions, with the fraudulent transactions typically being of lower amounts and occurring at off-peak times.

[2]

[3]

• Identifying transactions that are outside of the normal range of time and amount. • Developing models that are specifically designed to detect fraudulent transactions that occur at off-peak times. [4]

6. CONCLUSION

F. T. Liu, K. M. Ting and Z. -H. Zhou, "Isolation Forest," 2008 Eighth IEEE International Conference on Data Mining https://ieeexplore.ieee.org/document/4781136

By effectively adjusting to shifting fraud tendencies, we have established our system as a steadfast protector against new dangers. Our project's main tenet has been continuous learning. The feedback loop with fraud analysts and investigators has been quite beneficial. We have successfully adjusted and retrained our models by routinely gathering information on new fraud practices. Our technology continues to be a leader in fraud prevention because to the iterative model update process. The principle of continuous learning will continue to direct our work in the future, not simply as a component of our initiative. Our decision to

Impact Factor value: 8.226

Sadgali, Imane & Sael, Nawal & Benabbou, Faouzia. (2019). Performance of machine learning techniques in the detection of financial frauds. Procedia Computer Science. https://sci-hub.ru/10.1016/j.procs.2019.01.007

• Using the information about the time and amount of transactions to develop more accurate fraud detection rules.

|

Buczak, Anna & Guven, Erhan. (2015). A Survey of Data Mining and Machine Learning Methods for Cyber Security Intrusion Detection. IEEE Communications Surveys & Tutorials. https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber =7307098

This information can be used to improve fraud detection models by:

© 2023, IRJET

Andrew DeOrio, Qingkun Li, Matthew Burgess, and Valeria Bertacco. 2013.T Machine learning-based anomaly detection for post-silicon bug diagnosis. In Proceedings of the Conference on Design, Automation and Test in Europe (DATE '13)

[5]

D. Tanouz, R. R. Subramanian, D. Eswar, G. V. P. Reddy, A. R. Kumar and C. V. N. M. Praneeth, "Credit Card Fraud Detection Using Machine Learning," 2021 https://ieeexplore.ieee.org/abstract/document/943230 8

[6]

|

Mohiuddin Ahmed, Abdun Naser Mahmood, Jiankun Hu, A survey of network anomaly detection techniques, Journal of Network and Computer Applications, Volume 60, 2021

ISO 9001:2008 Certified Journal

|

Page 269


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 10 Issue: 10 | Oct 2023

p-ISSN: 2395-0072

www.irjet.net

https://doi.org/10.1016/j.jnca.2015.11.016 [7]

https://doi.org/10.48550/arXiv.2101.03064

Markus M. Breunig, Hans-Peter Kriegel, Raymond T. Ng, and Jörg Sander. 2000. LOF: identifying density-based local outliers.

[16] Felix,

Ebubeogu Amarachukwu and Lee, Sai Peck, Systematic literature review of preprocessing techniques for imbalanced data, 2019

https://doi.org/10.1145/335191.335388 [8]

https://doi.org/10.1049/iet-sen.2018.5193

Schölkopf, B et al. “Estimating the support of a highdimensional distribution.” Neural computation vol. 13, 7 (2001): 1443-71. https://dl.acm.org/doi/10.1162/08997660175026496 5

[9]

Pooja Tiwari and Simran Mehta and Nishtha Sakhuja and Jitendra Kumar and Ashutosh Kumar Singh, Credit Card Fraud Detection using Machine Learning: A Study, 2021 https://doi.org/10.48550/arXiv.2108.10005

[10] Waleed

Hilal, S. Andrew Gadsden, John Yawney, Financial Fraud: A Review of Anomaly Detection Techniques and Recent Advances, Expert Systems with Applications, Volume 193, 2022 https://doi.org/10.1016/j.eswa.2021.116429

[11] Vasilios

Plakandaras, Periklis Gogas, Theophilos Papadimitriou & Ioannis Tsamardinos (2022) Credit Card Fraud Detection with Automated Machine Learning Systems, Applied Artificial Intelligence, 36:1, 2086354 https://doi.org/10.1080/08839514.2022.2086354

[12] Delena

D. Spann, Fraud Analytics: Strategies and Methods for Detection and Prevention, Wiley, 2014. Fraud Analytics: Strategies and Methods for Detection and Prevention | Wiley

[13] Rongfang Gao and Tiantian Zhang and Shaohua Sun and

Zhanyu Liu, Research and Improvement of Isolation Forest in Detection of Local Anomaly Points, Journal of Physics: Conference Series, 2019 https://dx.doi.org/10.1088/17426596/1237/5/052023

[14] Hongzuo Xu and Guansong Pang and Yijie Wang and

Yongjun Wang, Deep Isolation Forest for Anomaly Detection https://doi.org/10.48550/arXiv.2206.06602 [15] Pramuditha Perera and Poojan Oza and Vishal M. Patel,

One-Class Classification: A Survey, 2021

© 2023, IRJET

|

Impact Factor value: 8.226

|

ISO 9001:2008 Certified Journal

|

Page 270


Turn static files into dynamic content formats.

Create a flipbook