Paper 29
Paper 29
Abstract—Fraudulent transactions and how to detect them is bank-related fraud [2], which translates into bank account
remain a significant problem for financial institutions around fraud on which this research is based.
the world. The need for advanced fraud detection systems to Bank account fraud differs from other financial deceptions
safeguard assets and maintain customer trust is paramount for
financial institutions, but some factors make the development of in its methods, impacts, and detection challenges. Unlike credit
effective and efficient fraud detection systems a challenge. One of card fraud, where unauthorized transactions can be quickly
such factors is the fact that fraudulent transactions are rare and detected due to unusual spending patterns, bank account fraud
that many transaction datasets are imbalanced; that is, there can manifest itself in subtler ways, such as unauthorized funds
are fewer significant samples of fraudulent transactions than transfers, account takeovers, or even identity theft leading to
legitimate ones. This data imbalance can affect the performance
or reliability of the fraud detection model. Moreover, due to the the creation of new accounts [3]. The consequences for the
data privacy laws that all financial institutions are subject to victim can be long-lasting, both financially and emotionally.
follow, sharing customer data to facilitate a higher-performing Understanding and mitigating these threats requires thorough
centralized model is impossible. Furthermore, the fraud detection research, underpinned by rich and diverse datasets.
technique should be transparent so that it does not affect the user In the quest to develop systems that can detect bank account
experience. Hence, this research introduces a novel approach
using Federated Learning (FL) and Explainable AI (XAI) to fraud, Machine Learning (ML) is frequently adopted because
address these challenges. FL enables financial institutions to it effectively trains systems to deliver precise predictions based
collaboratively train a model to detect fraudulent transactions on data inputs. The choice of a specific machine learning
without directly sharing customer data, thereby preserving data algorithm is contingent upon the nature of the data and the
privacy and confidentiality. Meanwhile, the integration of XAI specific type of fraud that the target is trying to identify. Data
ensures that the predictions made by the model can be understood
and interpreted by human experts, adding a layer of transparency sets of bank account transactions not only hold confidential
and trust to the system. Experimental results, based on realistic data but also display an imbalance, with fraudulent transac-
transaction datasets, reveal that the FL-based fraud detection tions less frequent than legitimate ones. Such characteristics
system consistently demonstrates high performance metrics. present obstacles in devising a robust fraud detection system.
This study grounds FL’s potential as an effective and privacy- Banks employ their proprietary data to train different ML
preserving tool in the fight against fraud.
models to recognize potentially fraudulent activities, reflecting
Index Terms—Fraud Detection, Explainable AI, Federated a centralized ML methodology. This centralized approach is
Learning, Machine Learning
predominant in the financial sector today, credited largely to
its proficiency in processing vast data volumes and discerning
I. I NTRODUCTION underlying patterns [4]. However, one challenge with the
In the era of digital banking, ensuring the security and centralized model is that different banks often face diverse
integrity of financial activities has become paramount. While fraudulent patterns, which could hinder their ability to spot
this transformation offers unparalleled convenience, it also ex- new fraudulent behaviors. This is where Federated Learning
poses users to the vulnerabilities of cyber threats, a significant comes into the picture.
one being bank account fraud. Financial frauds, particularly Federated Learning (FL) is a novel privacy-preserving ap-
in online banking and credit card transactions, pose serious proach to decentralized machine learning, [5], [6]. It presents
threats to the global economy, the trustworthiness of finan- a potential solution to this predicament by enabling model
cial institutions, and the financial well-being of individuals. training on local devices and only sharing aggregated updates.
According to the UK Finance 2022 report, billions are lost The core difference between the centralized method is in the
annually due to fraudulent activities, highlighting the need for realm of collaboration and data protection. While the former
more robust detection mechanisms [1]. remains confined within the walls of one bank, the latter is a
With this, financial institutions have conducted and continue collective effort that spans multiple banks.
to undertake rigorous research to combat and identify fraud, In the context of fraud detection, FL stands out as more
irrespective of its nature. Nevertheless, fraud remains compli- than just a novel technological approach; it is identified as the
cated due to its ever-evolving tactics and diverse behaviors. indicator of a collaborative and confidential countermeasure
A prevalent domain that is the subject of extensive research against fraudulent schemes. This growing significance arises
2
from its capacity to combine insights from different institu- factors that lead an individual to commit fraud. The authors
tions without the need for direct data exchange. Moreover, emphasize three key elements: the incentive or pressure driving
FL focuses on sharing model updates rather than heavy data, the fraudulent act, the presence of an opportunity, and the
which is both faster and more efficient and ensures that rationalization or justification by the perpetrator. Expanding
customer data is not compromised. on this classic model, [9] added depth by introducing three
Additionally, the AI-based fraud detection techniques are more elements: the actual act of fraud, the methods employed
black-box in nature and not transparent. For critical appli- to conceal it, and the subsequent ‘conversion’, where the
cations, like bank fraud detection, it is imperative that the fraudsters benefit from their deceptive actions.
AI system is accurate as well as trustworthy. To address the As financial institutions grapple with a staggering volume of
problem, we integrate Explainable AI (XAI) methods in the fraudulent transactions, innovative solutions rooted in machine
given FL-based banking fraud detection. In this regard, the learning and deep learning have emerged at the forefront to
proposed method not only preserves user privacy and provides identify and mitigate these risks. At its core, machine learning
a collaborative infrastructure to train AI models, but is also is a subset of artificial intelligence that blends computer
trustworthy. Thus, in this research, a fraud detection technique algorithms with statistical modeling [10]. This synthesis allows
is proposed that uses the combined strengths of FL and XAI computers to perform tasks without explicit programming.
is proposed. The standout benefits of this methodology are Instead, the system learns from the training data and uses
numerous, with a central emphasis on user privacy preser- the experiential knowledge stored to make predictions or take
vation and transparency. The following is a summary of the actions. Within machine learning’s orbit is deep learning,
contributions of this study. which harnesses artificial neural networks to decipher more
1) Incorporate an FL approach for an advanced fraud de- intricate relationships in data. The depth and intricacy of
tection system to ensure that individual data remains these networks, like Convolutional Neural Networks (CNN)
localized allowing only model updates to be centralized or Restricted Boltzmann Machines (RBM), enable them to
thus enhancing the privacy of banking datasets. This capture unique relationships across large datasets.
design inherently bolsters the privacy of banking datasets, A variety of machine learning and deep learning methods
a crucial advantage in our data-sensitive age. have been explored in the academic sphere for fraud detection.
2) Develop a Deep Neural Network (DNN) model tailored For instance, a study by [11] delved into the efficacy of k-
to recognize patterns associated with fraudulent activities Nearest Neighbors (KNN), Support Vector Machines (SVM),
across federated databases, ensuring high accuracy. and ensemble classifiers in detecting fraud. Their research
3) Integration of the XAI technique to provide transparency emphasized the challenges, like the highly unbalanced data
in the model’s decisions, ensuring a novel approach to where fraudulent transactions are less than legitimate ones,
fraud detection systems. and the dynamic nature of fraud, which necessitates regu-
4) Integrating the proposed FL-based system into a web- larly updated machine learning algorithms. Meanwhile, other
based application to visualize the practicability of the researchers like [12] explored the application of machine
proposed approach. learning algorithms like Random Forest and ensemble models
The following are the remaining sections of this paper. like AdaBoost. Sharma et al. in [13] discussed the application
Section II covers the relevant literature review and related of Auto-Encoders in the fraud detection framework. Auto-
work. In Section III, we present our methodology. We explain Encoders are specialized neural networks designed for data
our detailed implementation in Section IV. In Section V, we encoding. They operate by compressing input data into a
discuss our results. The research is concluded in section VI. compact representation and subsequently reconstructing it.
Any significant reconstruction error, especially in a model
trained on legitimate transactions, can flag potential anomalies.
II. R ELATED W ORK Parallelly, the Restricted Boltzmann Machine (RBM) can learn
Fraud detection, a very old challenge, has seen immense a probability distribution over its set of inputs. The RBM’s
evolution over the years in response to the development ability to detect intricate patterns in unlabeled data makes it
of technology and the schemes and strategies employed by apt for identifying unauthorized transactions in vast, imbal-
fraudsters [7]. While fraud has been a disturbing menace anced datasets where fraudulent activities are but a minuscule
from ancient times, the advancement of new technology has fraction [14].
amplified the avenues for fraudulent behavior. Technological Historically, many ML-based approaches to fraud detec-
advancements, such as communication platforms and digital tion have been centralized. In a centralized learning system,
finance tools, that are meant to benefit us can unintentionally individual assets or clients transmit their data to a central
also give an advantage to malicious individuals whose main hub or server, where data management and training occur
goal is to cause harm. This has resulted in the rise of new [15]. However, this centralized approach presents challenges,
types of fraud, such as mobile telecommunications scams and especially in industries. The transfer of confidential data poses
computer breaches. risks related to latency, data security, and privacy issues.
Understanding the nature and underpinnings of fraudulent In many cases, data owners might be unwilling or legally
behavior has been a subject of significant scholarly atten- restricted from sharing sensitive information, complicating the
tion [8]. A foundational approach to this study has been process.
the ‘fraud triangle’, a conceptual model that demystifies the In response to these challenges, the focus has shifted to
3
B. Proposed Federated Learning-based model to form the global model update. This aggregation in Federated
Utilizing FL for fraud detection not only leverages the averaging is typically a weighted sum of the local updates:
power of collective data without compromising individual data
X ηk
privacy but also promotes more collaborative efforts among W t +1 = Wtk +1
institutions to combat fraud in an ever-evolving landscape. η
k
A typical ML model update in a centralized setting, using
Stochastic Gradient Descent (SGD), can be represented as: Where nk is the number of data points on client k, and n
is the total number of data points across all clients.
Wt +1 = Wt − η∇L(Wt ) This process repeats for several rounds until convergence.
A key advantage is that only the model updates (and not the
where W represents the model parameters, η is the learning raw data) are communicated, which helps in maintaining data
rate, and ∇L(Wt ) is the gradient of the loss function L with privacy. In essence, Federated averaging offers a compromise
respect to the model parameters at iteration t. between local and centralized learning, allowing models to
In FL, this update is not done centrally. Instead, each benefit from diverse local data sources without compromising
client (device or server) computes its update, and these are user privacy.
aggregated in some way to update the global model. The
core idea behind the Federated averaging algorithm proposed
by McMahan et al. [16] is to modify the standard SGD by C. Explainable AI integration
computing several updates on each client and then averaging In the sphere of finance, interpretability is a necessity. The
these updates on the server. decisions and predictions made by models have profound
For a given global model w, each client k computes its
real-world implications, so understanding these decisions is
update from its local data:
paramount. XAI has emerged to bridge this gap between
the opaque nature of certain models and the requirement for
Wtk +1 = Wt − η∇Lk (Wt )
transparency. These XAI techniques, when integrated into the
Where Lk is the local loss on client k. After each client has FL model, empower stakeholders with insights, enhancing
computed its local update, the server aggregates these updates confidence in the model’s decisions. Moreover, understanding
5
where:
• N is the set of all features.
• S is a subset of N without feature j. Fig. 5: Imbalanced distribution of the proposed dataset
• f (S) is the prediction of the model for the input features
in set S.
6) days since request: A continuous variable that represents
IV. I MPLEMENTATION DETAILS the number of days since a particular request (maybe a
This section presents the details of the implementation of credit request) was made.
the proposed technique as shown in Fig. 2. The steps involve 7) intended balcon amount: The amount on the balcony or
preliminary checks, data processing, FL development, and a credit amount.
XAI integration techniques. 8) payment type, employment status, housing status,
source, device os: These are categorical features
indicating the method of payment, the employment
A. Dataset
status of the customer, their housing situation, where the
The data set referenced in this paper is sourced from data came from, and the operating system of the device
[24], encompassing realistic data based on a present-day real- used, respectively.
world dataset for fraud detection. The dataset contains 29,042 9) credit risk score: A continuous variable possibly indicat-
entries, spread across 32 distinctive features. This rich dataset ing the riskiness of providing credit to the individual or
incorporates various data types: 17 columns of integer type, 10 entity.
columns representing floating-point numbers, and 5 columns 10) email is free: A binary variable indicating whether the
containing categorical or string data. email provider is free (like Gmail, Yahoo) or not.
Some of the dataset features are as follows: 11) phone home valid, phone mobile valid: Binary or
1) fraud bool: This is a binary feature and target variable score-based indicators denoting the validity of home and
for predictive models. It is an indicator of whether the mobile phone numbers.
record was fraudulent (1) or not (0). 12) month: This is probably indicating the month when the
2) income: Represents the income of the user and is a data was recorded or the transaction occurred.
continuous variable of type float. The distribution of the dataset’s features is shown in Fig. 3
3) name email similarity: A continuous variable, capturing and Fig. 4.
the similarity score between the name and email.
4) prev address months count, current address months-
count: Indicators of the duration (in months) at the B. Data balancing
previous and current addresses. Since the data was highly imbalance as depicted in Fig. 5,
5) customer age: Age of the customer. balancing was performed using the Synthetic Minority Over-
6
(a) Federated Learning Dashboard (b) Federated Learning Dashboard (training process)
(c) Federated Learning Dashboard (performance metrics) (d) Federated Learning Dashboard (Weights)
Fig. 7: The FL dashboard description of different pages
C. Explainable AI Insights
We have used the SHAP plots for the model explainability
[23].In the SHAP plots, the color coding (red and blue)
represents the positive and negative impact of feature values
(a) Accuracy of the Federated (b) Precision of the Federated
Learning Model Learning Model on the prediction of the output, relative to the baseline value.
The baseline value is the average of all model output values
over the dataset and serves as a reference point. In the SHAP
plots, the red indicates that a particular feature value repre-
sented with numbers increased the prediction value. While
the blue indicates that a particular feature value decreased
the prediction value. The feature 2.086 on the red side of the
two client plots indicates the feature has a positive impact on
the prediction of the FL model. The magnitude (that is, the
(c) Recall of the Federated (d) F1-score of the Federated distance from the baseline) of the SHAP values can indicate
Learning Model Learning Model the strength of the influence of a feature. Higher magnitudes,
Fig. 8: Performance meterices whether positive or negative, signify that the feature has a
strong impact on the prediction. For example, the features
2.15, 0.418, and 0.517 in the second SHAP plot (Fig. 9b)
have more impact on the model prediction than 1.15 and -0.8.
9