Analysis of Discovering Fraud in Master Card Based On Bidirectional GRU and CNN Based Model
Analysis of Discovering Fraud in Master Card Based On Bidirectional GRU and CNN Based Model
[email protected]
Engineering, Graphic Era Deemed to be Department of Computer Science and
4. Subharun Pal, Department of University, Dehradun, Uttarakhand, India, Engineering, School of Engineering, Babu
Computer Science and Engineering, [email protected] Banarasi Das University, Lucknow, India,
Indian Institute of Technology Jammu, [email protected], Orcid id : 0009-
Jagti, Jammu, Jammu & Kashmir, 0002-6696-6943.
India, [email protected]
Abstract –Detecting and confirming MasterCard fraud make up the money they lost, it's possible that they
(also known as "master card frau d detection") is a popular increased prices somewhat or reduced sales and discounts.
course topic amongst students due to the usefulness of data Therefore, a well-defined fraud detection model is
processing and machine learning strategies in combating
implemented to prevent fraud cases, but doing so is
cybercrime. The three main parts of the proposed method
are preprocessing, feature extraction, and model training. discretionary for loss mitigation purposes. Multiple
Preprocessing techniques are used to mine crucial references are given on the issue of credit card fraud
information for identifying MasterCard fraud. Only by prevention. These days, digital statistics are available
using the most advanced and efficient algorithms, the future pretty much anywhere in the world because to the
transactions can be predicted with any degree of certainty. proliferation of the internet. Because of its accessibility
By employing these techniques, the proposed approach may and scalability, the cloud has become the preferred s torage
confirm a variety of facts, including the correctness of method for enterprises of all sizes. All of this informat ion,
authentication and the regularity of dealings. To accomplish such as customer shares, likes, and order h istories, may be
feature extraction, the proposed approach used the PCA and
accessed from a variety of different places. The
S KM algorithms. In order to train the models following
feature extraction, the proposed approach uses CNN, repercussions of white-collar crime on industry, society,
BiGRU, an d BiGRU-CNN. Both the CNN and the BiGRU and law enforcement are widespread and increasing.
models are outperformed by the proposed model. With an Fraud occurs when someone uses dishonest ways to get
approximate 98.87 percent accuracy, the proposed method is material gain. Already, there has been a lot of focus on
superior to other methods such as CNN and BiGRU. communicat ion technology for better card transactions.
Card fraud is expected to rise as credit card pay ments
Keywords—Convolutional Neural Network (CNN), replace cash and checks as the standard mode of payment
Bidirectional Gated Recurrent Unit (BiGRU), Principal for both in-store and online purchases. Machine learning
Component Analysis (PCA).
is a major technological advancement of the twenty -first
I. INT RODUCT ION century since it eliminates the need for human labor and
can analyze massive databases that humans would have
Fraud can be defined as an act of malice and problems obtaining on their own. Supervised learning and
criminality performed for financial or personal benefit. unsupervised learning are the t wo primary categories of
The occurrence of fraud can be reduced through the mach ine learn ing methods. Both can be utilized for
emp loyment of two strategies: prevention and detection. spotting fraudulent activity, but picking the right one will
The basic goal of any fraud prevention strategy should be rely on the information banks at your d isposal. Cred it
to eliminate fraud entirely. Second, detecting fraud during cards come with perks like convenience and ease of
an illegal transaction is crucial. One widespread financial purchase, but they also come with risks like identity theft
crime is identity theft, which frequently involves credit and fraud. Every bank has serious problems with customer
card fraud. On line and in-store credit card purchases are confidence and credit card transaction security. There
equally possible. The increased use of credit cards has have been increasing effo rts to detect credit card fraud,
helped a variety of illicit enterprises. The research is according to multiple sources . Credit card fraud is a
complicated by the fact that certain hoax operations are serious issue for financial institutions like banks because
still active despite the large quantity of legitimate models. of this. In the financial industry, machine learn ing is
The identities and whereabouts of online criminals are commonly emp loyed by banks and other institutions to
often hidden. The effects of fraudulent use of credit cards improve their ab ility to spot fraudulent actions. However,
on the economy are substantial. When a business loses its due to a number of difficult ies, machine learn ing may be
credit card data, it can cause major inaccuracies in b illing, unable to detect fraudulent behavior: Data distribution is
customer service, and other areas . Since stores have to skewed because of the low volume o f fraudulent
transactions, and there aren't many real-wo rld datasets informat ion. The rate of fraud detection in the experiment
available due to privacy issues. The manual method is was 84.79%. [8]used ANN to investigate what happens
estimated by different fraud investigators who check each when you train a model with symbolic and/or analog
transaction independently and provide b inary feedback. features. Others have used the ANN in conjunction with
The widespread occurrence of fraud cases not only wastes other methods to refine and improve the detection
money but also greatly harms the economy, making it findings. To reduce the misclassification rate, it was then
difficult to expand e-commerce. Therefore, it is essential proposed to use a feed forward back propagation
to take precautions against fraud when shopping onlin e. (FFNNBP) neural network in conjunction with fu zzy logic
Patterns in a cardholder's purchases can be examined for [9].Cred it card fraud is only one example of an anomaly
signs of fraudulent activity or to validate an otherwise that has been studied extensively in the hopes that
questionable transaction. When someone makes a artificial neural netwo rks may be used to detect it. To
purchase using a stolen credit card number, it 's called name just a few examp les, consider the work of[10], who
credit card fraud. Cred it cards are accepted in both online use a Genetic A lgorith m (GA ) trained ANN to train a
and in-person transactions, but there are a few different standard mult ilayered ANN on synthetic data, [11], who
ways to obtain the necessary information, such as the use a Particle Swarm Opt imizer (PSO) technique to train
verification number, card number, and expiration date. an auto-associative neural network, [12], who use a Whale
Optimization (W O) trained ANN to train a denoising
II. LIT ERAT URE SURVEY auto-en In 2010, [13], analyzed these findings in great
Cred it card fraud detection is a well-studied issue detail. To overcome the difficulty of spotting Temporal
that has been studied for quite some time. Based on our CCFs, a novel neural approach called HTM-CLA emp loys
previous studies[1], it is clear that the vast majority of a distinct artificial neural network. The HTM-CLA
anti-crime init iatives target online fraud because of the algorith m is an attempt to model the neocortex in a
widespread consensus that this is the most urgent and physiologically reasonable way. Machine learning
ubiquitous kind of cybercrime. However, the vast majority algorith ms with an AI bent can be quite helpful in this
of them rely on a single, often skewed statistic to reach situation. These algorithms have found broad use across a
their conclusion. In this context, "credit card fraud" refers range of industries to enhance the classification accuracy
to "any unauthorized use of a credit or debit card by a of existing or more trad itional statistical classifiers like the
customer or other person for that person's own benefit basic regressors, and are now being put to use by
while both the cardholder and the issuer of the card are professionals in the financial fraud detection
unaware at the time of the transaction" [2].FL is used to industry[14].Support vector mach ine and rando m forest
estimate the importance of truth-values for so-called were co mpared extensively to logistic regression in a 2011
probabilistic measurements that range fro m 0 to 1. work by [15]. Random Forest performed best in
Sanchez first proposed using FAR as a un ique technique experiments, followed by Logistic Regression and then
for identifying credit card fraud in 2009. The authors Support Vector Machine. [9]fro m 2015 proposed a hybrid
proposed a new method for the detection of credit card approach to identifying credit card fraud using fuzzy
frauds [3], a hybrid of the two well-known techniques, clustering and a neural network. This procedure has two
namely GA and SS, with the aim of minimizing the costs phases. In order to determine whether or not a transaction
of misclassification by taking into consideration the was fraudulent, first a suspicious score was established
available limit of the card itself. Applying this idea to a using a c-means clustering technique, and then the data
real-world dataset proved its efficacy in rooting out was sent into a neural network. Authors [16] proposed a
fraudulent activities. For early fraud detection, [4] method for detecting cred it card fraud via outlier mining
proposed in an ANN-M PL mult i-layered perception based based on distance sum. Although data min ing covers a lot
on a co mbination of well-established artificial learning of ground, the areas of finance and the internet have seen
algorith ms. The effectiveness of a model that is the most success with outlier mining. Credit card services,
automatically modified when new transactions are added which allow people to shop online, also make customers'
to the dataset [5]; also known as incremental learn ing. life easier in other ways. Financial firms give their
Issues with skewed data, shifting concepts, and sluggish customers credit cards so they can make purchases and
verification and feedback have been tackled in a number accrue debt without paying interest. Customers can avoid
of ways. Credit card fraud detection is an ongoing field of carrying around as much cash thanks to credit cards.
study with plenty of space for improvement as a result of Cred it card pay ments have been replaced by cash
the rapid evolution of both consumer p ractices and transactions. Logistic regression, support vector machines,
fraudster techniques (concept drift). On ly a handful of and random forests are just a few of the methods put to
articles have attempted to solve this enigma by presenting use. The area under the ROC curve (AUC) and average
a real-t ime framework based on SOMs [6].As an ANN is precision (AP) are used to evaluate the results, alongside
important to the approach proposed in this research, we the static and incremental learning methodologies. To
will also use this opportunity to learn more about other solve the issue of class imbalance, the SMOTE method is
ANNs that have been used for fraud detection. Card used on the dataset. When comparing approaches using
Watch was proposed as an early approach of identifying AP scores as a metric, random forest achieves 85% in
credit card fraud by[7].To aid in the detection of static learning, and logistic regression achieves 84% in
fraudulent activity, a feed forward neural network incremental learn ing [17].Random forest is a method that
architecture was developed and trained with p revious user can be used to solve both classification and regression
problems. While the random forest as a whole is mo re
CNNs fo r processing time series. When applied to time An ordinary sig moid activation function is represented by,
series analytic tasks, using a convolutional neural network a vector splice by, and the forward h idden state vector of
( )
with residual connections outperforms recurrent neural the BiGRU at t ime by . If you have a BiGRU
networks like LSTM . Layers for convolution, pooling, and network, you can use this formu la to determine the
a fully connected top layer are currently considered output.
conventional for building a convolutional neural network. ( ) ( )
( )
Figure 5 shows the whole network layout. The pooling
layer is often placed after the convolution layers. To ( ) ( )
improve network performance and prevent over fitting,
the maximu m pooling layer can retain the relevant data
BiGRU is a prediction model based on a convolutional
features while d iscarding the irrelevant ones following a
neural network. Since CNN excels in ext racting actionable
convolution operation.
features from images and sequences and BiGRU excels at
3) Bidirectional GRU
processing time series, the proposed approach has
combined the two to produce the CNN-BiGRU model.
Using bidirectional long short-term memo ry
This model is co mposed of several layers, including an
networks35, researchers have had success in the past
input layer, a convolution layer, a BiGRU network layer, a
predicting tidal levels. In later testing, however, the
dropout layer, a fu lly connected layer, and an output layer.
BiGRU network proved superior to the BiLSTM, so the
The model's CNN and BiGRU layers serve as its
proposed approach has been utilizing it exclusively for all
backbone. To avoid oversimplification, a dropout layer
prediction work going forward.
has been added to the model. The Convolutional Neural
The GRU network36 incorporates a gating mechanism
Network (CNN) layer is made up of two Conv1D layers
into a recurrent neural network to manage the updating of
and a MaxPooling1D layer. The sequence produced by the
data. GRU, in contrast to the LSTM mechanism,
CNN layer is fed into the BiGRU network's single hidden
comprises of both the Main Gate and the Update Gate
layer.
and replacing the hinges .
4) Variable Weight Combination Model
Here is how the proposed approach determine one
Light GBM is effective in evaluating and fo recasting
GRU:
tidal level time series when the data is sufficiently steady.
( ) ( )
However, most sequences of tidal level readings are not
always stationary because of the weather, the wind, and
( ) ( ) the terrain. This necessitates that our model for p redicting
( ( ) ) future tide levels be able to "extrapolate" (i.e., produce)
̃ ( )
values that are not in the sample observations to a
reasonable degree of accuracy. Our pro jected sequence
( ) ̃ ( )
values are in the center since LightGBM is a tree-based
model. The event or trend in tidal shifts that has not been
The update gate, denoted by in the preceding formula, observed before cannot be accurately predicted using
determines how much data fro m the prev ious state LightGBM.
(without nonlinear processing) is used in the However, there is a neural network model called a CNN-
determination of the current state . At the same time, it BiGRU that theoretically faces no such difficulty in
determines the extent to which will accept data from uncovering latent trend information in the tide level series.
the candidate states ̃ . rt is the reset gate that checks if the That's why the proposed approach think it's crucial to
candidate state ht can be calculated independently of . properly weight individual base models when building a
Hadamard product denoted by the symbol, standard combination model to forecast tides.
sigmoid act ivation function denoted by symbol, and Models with better variab le weight co mbinations based on
hyperbolic tangent activation function denoted by symbol the principle of residual weight comb inations. One easy
( ) .The update gate weight matrix , reset gate and effective way to increase the co mbination model's
weight mat rix , and ̃ co mputation layer weight forecast accuracy is to adjust the weights of error fro m the
matrix are all represented as matrices respectively; their actual value in the co mposite model's core models [24].
respective coefficient mat rices are written as , , and The following formu las are needed to calculate the
; and their respective ofset vectors are written as , , weights when employing this strategy, common ly known
and . as the residual weight method:
IV. RESULT AND DISCUSSION testing. It shows the Epoch-by-epoch loss plot for a
Due to the rise of online shopping and banking, stacked GRU model.
MasterCard’s popularity has risen in recent years. The
card can be used as a handy hardware device for making
purchases in cyberspace. A strict and ever-increasing rate
like this likewise causes substantial in jury and aggravation
in fraud cases. Since illicit transactions negatively impact
financial circu mstances over time, anomaly detection has
significant implications in fraud detection.
Table I is classifying the data, despite the classifiers' Fig. 3. Root Mean Square Error
mixed performance, demonstrated the validity of the
dummy data used to evaluate credit card fraud detection. Root mean square error (RMSE) is used in Figure 3 to
See Table 3 for details, although BiGRU-CNN perfo rmed display the overall error rate across all approaches. Based
best in terms of recall, precision, F-Measure, and on this chart, BiGRU with two hidden layers perfo rmed
accuracy. the best.
V. CONCLUSION
ATM cards, online banking, gold loans, student loans,
debit cards, and credit cards are only few of the services
offered by the banking industry to persuade more
customers to open bank accounts. This paper's goal is to
introduce a method for detecting credit card fraud using a
mach ine learn ing algorith m. Credit cards are frequently
Fig. 2. Loss of BiGRU-CNN Model used at any time of day or night, and the bank server can
emp loy machine learning algorith ms to keep track of
Figure 2 shows a time -loss curve for the model, which customers' purchases at any given time. Either fraudulent
begins at 0.59 during training and decreases to 0.32 during behavior will be detected by the system or it will be ab le
to predict it. Each and every transaction is accounted for [15] S. Bhattacharyya, S. Jha, K. Tharakunnel, and J. C. pistland,
“Data mining for credit card fraud: A comparative study,”
in the data set, and the proposed approach must examine it
Decis. Support Syst., vol. 50, no. 3, pp. 602–613, 2011, doi:
to ascertain whether or not it was undertaken lawfu lly. 10.1016/j.dss.2010.08.008.
Preprocessing, feature extract ion, and model train ing are [16] W. F. Yu and N. Wang, “Research on credit card fraud
the three steps that make up the proposed technique. detection model based on distance sum,” IJCAI Int. Jt. Conf.
Artif. Intell., pp. 353–356, 2009, doi: 10.1109/JCAI.2009.146.
BiGRU-CNN was used to train models in the proposed [17] L. Brkic, “Detecting credit card fraud using selected machine
approach. The proposed method outperforms both BiGRU learning algorithms,” 2019 42nd Int. Conv. Inf. Commun.
and CNN in terms of accuracy, coming in at roughly Technol. Electron. Microelectron. MIPRO 2019 - Proc., no.
98.87%. February, pp. 1250–1255, 2019, doi:
10.23919/MIPRO.2019.8757212.
[18] K. R. Seeja and M. Zareapoor, “FraudMiner: A novel credit
REFERENCES
card fraud detection model based on frequent itemset mining,”
Sci. World J., 2014, doi: 10.1155/2014/252797.
[1] I. Sadgali, N. Sael, and F. Benabbou, “Detection and [19] A. C. Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten,
prevention of credit card fraud: State of art,” MCCSIS 2018 - “Cost sensitive credit card fraud detection using bayes
Multi Conf. Comput. Sci. Inf. Syst. Proc. Int. Conf. Big Data minimum risk,” Proc. - 2013 12th Int. Conf. Mach. Learn.
Anal. Data Min. Comput. Intell. 2018, Theory Pract. Mod. Appl. ICMLA 2013, vol. 1, pp. 333–338, 2013, doi:
Comput. 2018 Connect. Sma, no. March 2019, pp. 129–136, 10.1109/ICMLA.2013.68.
2018. [20] S. Xuan, G. Liu, Z. Li, L. Zheng, S. Wang, and C. Jiang,
[2] S. M. S. Askari and M. A. Hussain, “Credit card fraud “Random forest for credit card fraud detection,” ICNSC 2018 -
detection using fuzzy ID3,” Proceeding - IEEE Int. Conf. 15th IEEE Int. Conf. Networking, Sens. Control, pp. 1–6, 2018,
Comput. Commun. Autom. ICCCA 2017, pp. 446–452, 2017, doi: 10.1109/ICNSC.2018.8361343.
doi: 10.1109/CCAA.2017.8229897. [21] D. Varmedja, M. Karanovic, S. Sladojevic, M. Arsenovic, and
[3] E. Duman and M. H. Ozcelik, “Detecting credit card fraud by A. Anderla, “Credit Card Fraud Detection - Machine Learning
genetic algorithm and scatter search,” Expert Syst. Appl., vol. methods,” 2019 18th Int. Symp. INFOTEH-JAHORINA,
38, no. 10, pp. 13057–13063, 2011, doi: INFOTEH 2019 - Proc., no. March, pp. 1–5, 2019, doi:
10.1016/j.eswa.2011.04.110. 10.1109/INFOTEH.2019.8717766.
[4] A. Mubalaike and E. Adali, “Multilayer perceptron neural [22] N. Prabhakaran and R. Nedunchelian, “Oppositional Cat
network technique for fraud detection,” 2nd Int. Conf. Comput. Swarm Optimization-Based Feature Selection Approach for
Sci. Eng. UBMK 2017, no. October 2017, pp. 383–387, 2017, Credit Card Fraud Detection,” Comput. Intell. Neurosci., vol.
doi: 10.1109/UBMK.2017.8093417. 2023, no. Dl, pp. 1–13, 2023, doi: 10.1155/2023/2693022.
[5] A. Dal Pozzolo, O. Caelen, Y. A. Le Borgne, S. Waterschoot, [23] M. R. Lepoivre, C. O. Avanzini, G. Bignon, L. Legendre, and
and G. Bontempi, “Learned lessons in credit card fraud A. K. Piwele, “Credit Card Fraud Detection with Unsupervised
detection from a practitioner perspective,” Expert Syst. Appl., Algorithms,” J. Adv. Inf. Technol., vol. 7, no. 1, pp. 34–38,
vol. 41, no. 10, pp. 4915–4928, 2014, doi: 2016, doi: 10.12720/jait.7.1.34-38.
10.1016/j.eswa.2014.02.026. [24] Y. Su and X. Jiang, “Prediction of tide level based on variable
[6] J. T . S. Quah and M. Sriganesh, “Real-time credit card fraud weight combination of LightGBM and CNN-BiGRU model,”
detection using computational intelligence,” Expert Syst. Appl., Sci. Rep., vol. 13, no. 1, pp. 1–13, 2023, doi: 10.1038/s41598-
vol. 35, no. 4, pp. 1721–1732, 2008, doi: 022-26213-y.
10.1016/j.eswa.2007.08.093.
[7] E. Aleskerov, B. Freisleben, and B. Rao, “CARDWAT CH: A
neural network based database mining system for credit card
fraud detection,” IEEE/IAFE Conf. Comput. Intell. Financ.
Eng. Proc., pp. 220–226, 1997, doi:
10.1109/cifer.1997.618940.
[8] T. Guo and G. Y. Li, “Neural data mining for credit card fraud
detection,” Proc. 7th Int. Conf. Mach. Learn. Cybern. ICMLC,
vol. 7, pp. 3630–3634, 2008, doi:
10.1109/ICMLC.2008.4621035.
[9] T. K. Behera and S. Panigrahi, “Credit Card Fraud Detection:
A Hybrid Approach Using Fuzzy Clustering & Neural
Network,” Proc. - 2015 2nd IEEE Int. Conf. Adv. Comput.
Commun. Eng. ICACCE 2015, no. December, pp. 494–499,
2015, doi: 10.1109/ICACCE.2015.33.
[10] L. Patidar, R., & Sharma, “Credit card fraud detection using
neural network,” Int. J. Soft Comput. Eng., pp. 32–38, 2011,
doi: 10.1007/BF02351854.
[11] S. K. Kamaruddin and V. Ravi, “Credit card fraud detection
using big data analytics: Use of PSOAANN based one-class
classification,” ACM Int. Conf. Proceeding Ser., vol. 25-26-
Augu, 2016, doi: 10.1145/2980258.2980319.
[12] C. Wang, Y. Wang, Z. Ye, L. Yan, W. Cai, and S. Pan, “Credit
card fraud detection based on whale algorithm optimized BP
neural network,” 13th Int. Conf. Comput. Sci. Educ. ICCSE
2018, no. May, pp. 614–617, 2018, doi:
10.1109/ICCSE.2018.8468855.
[13] and W. O. I. Falaki, S. O., B. K. Alese, “An Update Research
on Credit Card on-Line Transactions,” Int. J. Econ. Dev. Res.
Invest., vol. 1, no. 2, pp. 34–35, 2010.
[14] N. M. Reddy, K. A. Sharada, D. Pilli, R. N. Paranthaman, K.
S. Reddy, and A. Chauhan, “CNN-Bidirectional LST M based
Approach for Financial Fraud Detection and Prevention
System,” in 2023 International Conference on Sustainable
Computing and Smart Systems (ICSCSS), Jun. 2023, no. Icscss,
pp. 541–546. doi: 10.1109/ICSCSS57650.2023.10169800.