Deep Learning for Money Laundering and Financial Crime Prevention

In the past decade, we have seen remarkable breakthroughs in the areas of machine and deep learning, and their applications in a wide range of tasks, from image classification & video processing to speech recognition & natural language understanding. The data in these tasks are typically represented in the Euclidean space (i.e. they follow the rules of Euclidean geometry, e.g. the shortest distance between two points is a straight line). However, there are a number of applications where data are generated from non-Euclidean domains and are best represented as graphs with complex relationships (e.g. client accounts in a bank, interactions between these accounts, and the inflow and outflow of assets from these accounts). Consequently, many studies on extending deep learning techniques for graph data have emerged. There are indications that these emerging techniques perform significantly better than traditional methods on non-Euclidean data (e.g. rules based or statistical approach). Given their relevance to areas such as prevention of money laundering and financial crime, in this post, I have provided links to a couple of introductory talks on this topic. Enjoy!

Hands-On Machine Learning: Let’s Do Fashion!

I was recently watching a video clip on how a Japanese technology startup is using artificial intelligence to identify upcoming fashion trends (by analysing real-time images), and provide retail consumer brands an edge to speed up their inspirational design phase, help designers and fashion houses better personalise offerings and meet customer expectations. One of the main techniques used by this technology startup is image recognition and classification – an area where machine learning algorithms perform extremely well. There are of course many other amazing use cases of this technology, and if you know how to implement it, perhaps you too can launch your own cool startup?!

To that end, this article is a first in a series of hands-on introductory tutorials on how to use TensorFlow (an open source machine learning framework) and Python to create some amazing tools, such as a fully automated solution for image recognition and classification. In this very first tutorial, you will learn how to build a very basic neural network (with the least amount of coding possible) and train it to recognise images of various articles of clothing and accessories – such as shirts, bags, shoes, and other fashion items. There are of course other deep learning networks, such as the CNN, which will perform significantly better in this task. But to begin with, let’s just learn how to implement a simple neural network, and perhaps in a later tutorial, we will explore some of the state of the art solutions.

Deep learning without coding: Uber offers a free ride to data scientists!

“Using TensorFlow makes me feel like I’m not smart enough to use TensorFlow” – Rachel Thomas, Professor at the University of San Francisco and co-founder of Fast.ai. If you are wondering what is TensorFlow, it is one of the most popular deep learning framework originally developed by Google (if you would like to know more, here’s the link to an article I wrote about TensorFlow a couple of weeks back: Getting Started with TensorFlow and Deep Learning).

Using the native TensorFlow API for deep learning is no easy task, especially if you are a beginner. The main reason for this is the relatively low-level of abstraction offered by the TensorFlow API, which makes it extremely hard, if not impossible, to express complex ideas. However, things changed for the better in early 2017, when Francois Chollet, author of Keras and AI researcher at Google, revealed that work was already underway to develop a TensorFlow implementation of the Keras API specification. Keras is an extremely user friendly high-level API for building and training deep learning models; and making TensorFlow accessible natively via the Keras API means that developers new to machine learning can now get started with TensorFlow and deep learning very quickly, without sacrificing the flexibility and performance of TensorFlow. As a matter of fact, when TensorFlow 1.4 was released (we are awaiting the release of version 2.0 anytime now), it included an early implementation of the Keras API (tf.keras), which made it possible to build, train and test a pretty complex deep learning model (such as a classifier for handwritten digits) in just six to ten lines of Python code!

So where does Uber fit into all of this? It turns out that Uber’s Artificial Intelligence team was also working on a similar initiative (i.e. simplifying the development and use of deep learning models), codenamed Ludwig, over the past two years, but at an even higher level of abstraction – i.e. deep learning using TensorFlow without actually having to write a single line of code! And more importantly, Uber announced this week that they are open sourcing Ludwig! At a first glance, Ludwig looks pretty impressive as a toolkit for deep learning, and I look forward to trying it out (I will report back once I have run some of my own tests). But in the meantime, here is a list of some of the coolest features of Ludwig.

How do computers learn to read, speak and listen?

We can talk to almost all of our gadgets now, but exactly how does it work? When you ask “What song is this?” or say “Call Mom”, a miracle of modern technology is happening. And while it feels like it’s on the cutting edge, the science behind it has been around for a little while – it is called Natural Language Processing (NLP).

NLP is essentially a branch of artificial intelligence that helps computers understand, interpret and manipulate human language. NLP draws from many disciplines, including computer science and computational linguistics, in its pursuit to fill the gap between human communication and computer understanding.

While natural language processing isn’t a new science, the technology is rapidly advancing thanks to an increased interest in human-to-machine communications, plus an availability of big data, powerful computing and enhanced algorithms.

As a human, you may speak and write in English, Chinese or Hindi. But a computer’s native language – known as machine code or machine language – is largely incomprehensible to most people. But thanks to NLP, now you can say, “Alexa, I like this song,” and a device playing music in your home will lower the volume and reply, “Ok. Rating saved,” in a humanlike voice. Then it adapts its algorithm to play similar songs the next time you listen to that music station.

But how does NLP work? If you would like to know the answer, here’s an excellent video from CrashCourse that explains the key concepts behind NLP in plain and simple English!

Getting Started with TensorFlow and Deep Learning

Currently, the most famous deep learning library in the world is TensorFlow. Originally developed by researchers and engineers from the Google Brain team and made open source in 2015, TensorFlow is a library for numerical computation and large-scale machine learning. TensorFlow bundles together a collection of machine learning and deep learning (aka neural network) models and algorithms and makes them useful by way of a common metaphor. It uses Python to provide a convenient front-end API for building applications with the framework, while executing those applications in high-performance C++. More recently, experimental C++, Java and Go interfaces have also been added to TensorFlow.

The single biggest benefit TensorFlow provides for machine learning development is abstraction. Instead of dealing with the nitty-gritty details of implementing algorithms, or figuring out proper ways to hitch the output of one function to the input of another, the developer can focus on the overall logic of the application. TensorFlow takes care of the details behind the scenes.

Deep Learning – State of the Art (2019)

Deep learning, which is an immensely rich and hugely successful sub-field of machine learning, is evolving at such a rapid pace that unless you are in the academia, it is often hard to keep track of the latest developments. I was, therefore, thrilled when I came across a video recording of a lecture (titled “Deep Learning State of the Art (2019) – MIT”) that was recently given by Lex Friedman, a research scientist at Massachusetts Institute of Technology (MIT). In this 45-minute long lecture, Lex goes through a number of recent developments in deep learning that are defining the state of the art in the field of algorithms, applications, and tools. I have provided the link to this video recording in this article, which I hope you will find useful.

A Python book for machine learning

According to a recent study of GitHub, the de facto online code repository, Python came up as the number one programming language for machine learning and is also the third most commonly used language on GitHub overall. The same study also identified Tensorflow followed by scikit-learn as being the most active and popular machine learning projects on GitHub. Tensorflow, which was developed by the Google Brain Team, is an open-source programming library widely used for machine learning; and scikit-learn is the native Python library for machine learning.

The results of this study are not surprising to those of us who have done some amount of machine learning related development work. But if you are new to Python, Tensorflow and scikit-learn, and would like to invest some of your time and energy to learn how to use these tools in your own machine learning projects or to even beef up your CV, which book should you consider reading? Here’s my “one book” recommendation.

Machine learning approach to fraud detection

The traditional approach to tackling the problem of payment card related frauds is to use a set of rigid rules and parameters to query transactions, and to direct the suspicious ones through to the fraud department for human review. Rules are extremely easy to understand and are developed by domain experts and consultants who translate their experience and best practices to code to make automated decisions. But when a rules-based fraud detection system gets operationalised, one starts with say 100 fraud scenarios and 100 rules to handle it. As time goes by and as the fraudsters change tactics, we encounter more and more fraud scenarios and start adding more rules to keep the number of false positives and negatives under control. There comes a point where nobody really knows or can measure how well the rules work or how many exceptions there are – this is the situation today with a lot of legacy hand-crafted and rules-based fraud and anomaly detection systems.

But do we have a better alternative? The answer is yes, we do, and it is called Machine Learning!

Auditing the data using Python

“Python” and “R” are amongst the most popular open source programming languages for data science. While R’s functionality was developed with statisticians in mind, Python on the other hand is a general-purpose programming language, with an easy to understand syntax and a gentle learning curve. Historically, R has been used primarily for academic and research work, although anecdotal evidence suggests that R is starting to see some level of adoption in the enterprise world (especially in the Financial Services sector) due to its robust data visualisation capabilities. Python, on the other hand, is widely used in enterprises due to the breadth of its functionalities that span beyond data analytics and also because of the ease with which Python based solutions can be integrated with many other technologies in a typical enterprise set up. Needless to say, due to my enterprise background, I am more inclined towards Python as the data analysis tool of my choice.

In addition to Python and R, there is also a wide variety of very powerful commercial data analysis software. However, Python has several advantages over these commercial offerings as follows.