Why Graphs are great for Fraud Detection [Math Mondays]
Uncovering the unique advantages that graphs provide for fraud detection.
Hey, it’s your favorite cult leader here 🐱👤
Mondays are dedicated to theoretical concepts. We’ll cover ideas in Computer Science💻💻, math, software engineering, and much more. Use these days to strengthen your grip on the fundamentals and 10x your skills 🚀🚀.
To get access to all the articles and support my crippling chocolate milk addiction, consider subscribing if you haven’t already!
p.s. you can learn more about the paid plan here.
Those familiar with some computer science theory will know that graphs are classified as relational data structures. But very few classes give detailed IRL case studies of what this means. In fact, the relationality often takes a backseat to implementation details (and graph traversals). In my assessment, this is one of the reasons that the people who reached out to me often for Leetcode tutoring struggled with graphs in particular.
Close to 2 years ago, I did a piece where I explored the relationality of graphs, and talked about how that could be used to identify when a problem could be solved using graphs-
Believe it or not, this (graph spotting framework) is going to be simpler than you are expecting. For this, think back to our earlier statement: Graphs are a very efficient way of encoding and representing relationships between entities.
I want you to change your perspective about a Graph. Nodes, edges, and weights are all correct concepts, but they aren’t useful. What we care about is what they represent. Graphs represent a system. The nodes are the Entities/Citizens in that system. The edges represent a relationship between the citizens. And the weights of these edges just tell us how strong a relationship is. What about unweighted graphs? Just treat them as weighted graphs, where all the edge weights are the same. This helps when it comes to evaluating the correct traversal algorithm.
At the time I wrote that (and for most of this newsletter’s existence), this newsletter was very focused on helping people pass Coding Interviews (hence the URL, “coding interviews made simple”). To symbolize the change in the writing/focus, I figured I’d do a piece on the relationality of Graph and how it plays a crucial role in IRL software engineering situations. To do so, we will be looking at through a fantastic writeup by Grab, Graph for fraud detection. In it, they talk about why Graph Neural Networks outperform other techniques in fraud detection.
Why Graph Neural Networks are GOATed for Fraud Detection
Background- To those not familiar, Grab is the SE Asia equivalent of Uber (they even drove Uber out of large parts of the markets). They offer multiple services, including delivery, food delivery, and more. The large populations in SE Asia expose them to a lot of potential fraud. To quote the writeup “Grab has grown rapidly in the past few years. It has expanded its business from ride hailing to food and grocery delivery, financial services, and more. Fraud detection is challenging in Grab, because new fraud patterns always arise whenever we introduce a new business product. We cannot afford to develop a new model whenever a new fraud pattern appears as it is time consuming and introduces a cold start problem, that is no protection at the early stage. We need a general fraud detection framework to better protect Grab from various unknown fraud risks.” Let’s cover why Graph graph-based neural Networks are good for this.
Graphs are good for visualization- As we’ve covered extensively, visualizations are a key tool for analysts solving problems. This is no exception. Fraudsters tend to show strong correlations on a graph because they have to share physical properties such as personal identities, phone devices, Wi-Fi routers, delivery addresses, and so on, to reduce cost and maximise revenue. An example of such strong correlations is shown in Figure below, where the entities on the graph are densely connected, and the known fraudsters are highlighted in red. Those strong correlations on the graph are the key reasons that make the graph-based approach a sustainable foundation for various fraud detection tasks.
Best of all worlds- Graphs Neural Networks don’t require a lot of labeled data or feature engineering (which holds back Decision Trees), have better explainability than regular deep learning, and adapt to newer inputs (something rule-based systems can’t do)
Semi Supervision- Much of their generalization ability jives well with semi-supervision which allows us to leverage large volumes of data w/o labelling everything. “We train the RGCN (Relational Graph Convolutional Network) model on a graph with millions of nodes and edges, where only a few percentages of the nodes on the graph have labels. The semi-supervised graph model has little dependency on the labels, which makes it a robust model for tackling various types of unknown fraud.” GNNs work great (image on the left), and are able to create embeddings that clearly distinguish b/w fraudulent and real customers.
All of these make Graph Neural Networks an extremely powerful tool for Fraud Detection. To recap- graphs can be used to cluster and group people around behaviors that correlate strongly with fraud, can adapt to new fraud patterns well, and improve the transparency of your AI Systems.
Learning about Graph Neural Networks is a must for anyone looking to boost their machine-learning skills. To those of you looking for deeper immersion into AI, my sister publication, AI Made Simple, would be a great tool for you.
That is it for this piece. I appreciate your time. As always, if you’re interested in working with me or checking out my other work, my links will be at the end of this email/post. If you found value in this write-up, I would appreciate you sharing it with more people. It is word-of-mouth referrals like yours that help me grow.
Save the time, energy, and money you would burn by going through all those videos, courses, products, and ‘coaches’ and easily find all your needs met in one place at ‘Tech Made Simple’! Stay ahead of the curve in AI, software engineering, and the tech industry with expert insights, tips, and resources. 20% off for new subscribers by clicking this link. Subscribe now and simplify your tech journey!
Using this discount will drop the prices-
800 INR (10 USD) → 640 INR (8 USD) per Month
8000 INR (100 USD) → 6400INR (80 USD) per year (533 INR /month)
Reach out to me
Use the links below to check out my other content, learn more about tutoring, reach out to me about projects, or just to say hi.
Small Snippets about Tech, AI and Machine Learning over here
AI Newsletter- https://artificialintelligencemadesimple.substack.com/
My grandma’s favorite Tech Newsletter- https://codinginterviewsmadesimple.substack.com/
Check out my other articles on Medium. : https://rb.gy/zn1aiu
My YouTube: https://rb.gy/88iwdd
Reach out to me on LinkedIn. Let’s connect: https://rb.gy/m5ok2y
My Instagram: https://rb.gy/gmvuy9
My Twitter: https://twitter.com/Machine01776819
Great newsletter, thank you!