Federated Learning to detect credit card fraud

Problem statement

An effective Fraud Detection system is required to minimize the loss for banks and cardholders. Can Federated Learning increase accuracy in identifying fraudulent transactions?

Current Solution

With the rapidly growing eCommerce industry, more purchases are happening over the internet, causing credit card fraud. Credit card fraud is a recurring problem for banks and consumers, costing banks billions of dollars every year.

So, various machine learning algorithms have been used to detect fraud in the financial industry due to their efficiency in managing massive data and extracting patterns. But in traditional centralized machine learning, data and models are kept locally as data from banks has sensitive user information. So, each bank utilizes its own data to train various machine learning models to detect fraudulent behaviors.

Challenges with the existing solution

Due to the data security and privacy rules, banks are usually not permitted to share their transaction datasets. As each bank might have dissimilar fraudulent transactions, it can limit their ability to detect new types of fraudulent transactions. So, with traditional machine learning, we can only learn patterns within the bank.

Credit card transaction data is imbalanced in most banks, where a few transactions are fraudulent while the majority of them are legitimate. It is difficult for machine learning algorithms to discover the patterns in the minority class data.

Also, in some online credit card payment applications, the delay in time can lead to insufferable loss or possible exploitation by fraudsters.

So, with data insufficiency, concept drift, skewed distribution, and limitation of detection time, Ml models will be inefficient with low accuracy and false positives.

Recent improvements in privacy-preserving AI algorithms play an essential role in solving this. They encourage researchers and institutions to train their networks on diverse data from numerous banks while ensuring that data is held locally, thus avoiding many issues concerned with building and maintaining an extensive central database.

Federated Learning is one such advancement that enables banks to collaboratively learn a shared model while keeping data on their own private database.

Federated Learning

Federated Learning is a distributed machine learning approach that enables model training on a large corpus of decentralized data.

In Federated Learning, there will be a global server and multiple local clients(banks). At each round, banks train a neural network on their local data and are allowed to share the updated model weights with the central server. The server gathers all the updated model weights from all the available banks and aggregates them. In the next round, the aggregated global model weights are sent back to the banks. Then the local banks will train on the updated weights and the process repeats. This way of training enables the researchers to use the data from multiple clients while ensuring that the sensitive data are kept locally.

Diversified data minimize skew and enable the bank’s models to better prepare to identify edge cases.

Users tested using this federated learning on the credit card transaction dataset achieved an average test AUC of 95.5%, which is about 10% higher than traditional ML.

How Switch ML can help

SwitchML is a friendly federated learning framework that allows you to federate any Deep Learning project. All you have to do is install the Switch ML library, rest will be taken care of by SwitchML. With very few lines of code, you should be able to fetch parameters from the server and send parameters to the server.

In Switch ML, there will be a model running at the server and the server sends the initial global model parameters to the clients, and clients update the local model with the parameters received from the server. Each client then trains the model on the local data and generates weights for the model, then these clients send the updated model parameters back to the server. A complete cycle of weight updates is called a round. We do this process for multiple rounds.

Download this Use Case for free