Fraud Detection

Only a small percentage of financial transactions are fraudulent, but they can add up over time to substantial losses. See how you can use Akkio to easily build and deploy accurate fraud detection using AI - no data science experience needed.
Start with this flow ->
Category
Operations
Finance
Customer Support
Components
API

Background

In the United States alone, billions of dollars are lost annually to credit card fraud. In fact, credit card fraud is now the number one type of identity theft, and credit card new account fraud rose an astonishing 88% in 2019. The biggest credit card scams have led to losses of hundreds of millions of dollars.

That said, the vast majority of credit card transactions are not fraudulent—they’re perfectly normal. That makes fraudulent transactions like veritable needles in the haystack. Using traditional methods, they’re extremely difficult to detect and prevent.

Artificial intelligence, or more precisely machine learning, is the perfect answer. Machine learning finds statistical patterns in vast amounts of historical data, to uncover what humans would miss. In this case, machine learning can be used to find patterns in fraudulent transactions, and create a model for predicting fraud.

With Akkio’s no-code machine learning technology, it’s fast and easy to build a model to predict credit card fraud.

Detecting Fraud With Machine Learning

To get started, sign up to Akkio for free. As with any machine learning task, the first step is getting historical data and selecting a column to predict.

Historical Data

In this case, our historical data is a file called “creditcard.csv,” sourced from Kaggle Datasets. This file has nearly 285,000 rows of real credit card transactions from the EU. Because this credit card information is sensitive, the information in each one of the columns has been encoded using a mechanism called principal component analysis, or PCA.

This obscures the private information, but preserves the relative information between the different variables, such that a machine learning model can still be built.

There are 28 different pieces of information that come along with each credit card transaction, along with the size of the transaction, in Euros, and finally whether or not that transaction was fraud. That final column is what we’re trying to predict.

This dataset is already uploaded to Akkio for demonstration purposes, which you can see on the homepage as “Credit Card Fraud Demo,” but you can upload any dataset you want by simply clicking “Upload Dataset.”

Building the Model

Now, we can click on the second step in the flow, which is “Predict.” Scroll all the way down under “predict fields,” and you can select the column to predict, named “Fraud?”

Then just hit “Create Predictive Model,” and you’re done! In the credit card fraud demo, the model has already been made, but it takes as little as 10 seconds to train a model from scratch. You can also select a longer training time—from 1 to 5 minutes—for potentially more accurate models. Keep in mind that longer training times aren’t always better, and may lead to overfitting, which is particularly risky in cases like these, where we have a highly imbalanced dataset. We don’t want a model that always predicts no fraud!

Also note that you don’t pay for model training time, unlike with many traditional automated machine learning platforms, so feel free to go crazy building models.

Analyzing the Model

After a model is created, you get a simple overview, which highlights the top fields, model prediction quality, sample predictions, and more.

We ended up with a very high-quality model, with a raw accuracy of 99.94%, as of writing. Among 32,875 normal transactions and 52 fraudulent transactions, there were only 12 false positives of “not fraud” and 7 false positives of “fraud.”

There’s also the option to “See Model Report,” which lets us easily collaborate with others and share these model details with anyone, even if they don’t have an Akkio account.

In short, we’ve discovered that it’s very easy to build a highly accurate model to detect credit card fraud. 

Deploying the Model

Now that we’ve built a machine learning model, it’s time to deploy it in the real-world.

With Akkio, it becomes trivial to deploy complex machine learning models. The credit card fraud demo shows deployment via API as the third step, which is an easy way to serve predictions in a production setting. The API is formatted as a Curl command, which allows you to send a GET request that contains your flow key, API key, and input data, and get a prediction back.

If that sounds like a lot of technical jargon, there’s also the option to deploy the model via Zapier, a no-code automation tool. Zapier connects tools with what they call “Zaps,” and you could use a Zap to send new financial transaction data to the Akkio model automatically.

Zapier allows you to link up thousands of different tools, so no matter where your data is coming from, it’s easy to connect it to Akkio to get a prediction, even if you don’t have any technical expertise.

Setting Up Fraud Alerts and Notifications

Have you ever received an SMS from your bank asking to confirm a suspicious transaction?

This is standard practice at multi-billion-dollar banks like First Citizens Bank, HSBC, CIBC, American Express, Republic Bank, and the like.

However, not all banks have the technical and financial resources to implement credit card fraud detection the traditional way. Indeed, there are over 21,500 banks globally, many of which don’t have large teams of expert data scientists.

With Akkio, any bank or FinTech can effortlessly build and deploy fraud alert systems. Let’s walk through a simple example in Zapier. First, we create a “trigger” to pull in new financial transaction data.

For this example, let’s use a Google Sheets file named “Transactions” as the source of new transaction data. Note that any database could be used.

We’ll then use the credit fraud prediction model we’ve built to predict whether a new transaction is fraudulent. To activate Akkio in Zapier, visit this link, and then select “Make Prediction in Akkio.” Make sure that the data you input exactly matches up with what was used to build the model.

Now, Akkio will predict whether a new transaction is fraudulent. We want to capture that prediction, and if the prediction is that it’s fraudulent, we can send an SMS warning to the customer. To do that, we’ll need a filter that runs if the prediction is simply the word “Fraud.”

Finally, we’ll send an SMS warning to the associated customer, for any transaction that Akkio predicts is fraudulent.

Summary

We’ve explored how credit card fraud costs companies billions of dollars a year. Big banks and other large financial organizations employ expert AI teams to build fraud prediction models, but these efforts are too costly and time-intensive for thousands of other firms.

Using Akkio’s no-code machine learning, you can effortlessly build and deploy fraud detection models, and warn customers via SMS when a fraudulent transaction is found.

What else can you build with Akkio?
View all applications ->
SIGN up
Grow Faster with No-Code ML
Now everyone can leverage the power of AI to grow their business.