Dom Foord
DataReply
Published in
8 min readSep 25, 2023

--

Causal ML: The future of decision making with transparency and explainability

The Idea:

We have seen over the last decade a revolution in computing processing power that enables algorithms to be used for tasks such as classification and regression, impacting industries in areas as broad as retail or finance. This so-called ‘Data Science Revolution’ has been described as ‘representing the greatest single impact and fundamental shift in the means of production since the Industrial Revolution…’, and has totally changed the way that businesses now make decisions.

However, a problem is the following: with each improvement in the accuracy and power of a model comes a commensurate decrease in transparency and explainability. As an example, neural networks are notorious for being ‘black boxes’ — although their ability to correctly predict an outcome is unparalleled, sometimes we have no idea how these predictions are generated. Causal ML aims to answer this, by providing a framework to work out the most impactful features that affect a prediction, revolutionising the decision-making process by bringing human interpretation back into the fold.

  1. Introduction and Business value:

The success of the use of data science and machine learning in industry to build predictive models cannot be overstated. From retail to financial services and automotive, decisions are influenced more and more by models built from machine learning algorithms that are showing unprecedented improvement in this process. From predictive forecasting through to anti money laundering chain detection, we are able to automate tasks with higher and higher degrees of success. However, this comes with the downside that for an individual prediction, we often have little idea how it would have come about.

This has a larger impact in some industries than others. For example, in the manufacturing industry, we aren’t really too worried if using machine learning, we can detect when certain machines are due to break down despite being unable to explain how our model works. We only care about the outcome in so far as it enables us to schedule maintenance in more efficient way — there isn’t a great loss if our model goes wrong. However, this isn’t the case in other industries and cases.

In FSI, mainly anti-money laundering regulations are in place for a good reason and are onerous in terms of time and manpower required to adopt these. We would think that this would be a task primed to be revolutionised through using ML to identify cases, but relying on purely statistical methods has led to lives ruined, as in the case where the Netherlands were relying on algorithms to detect benefit fraud. Without being able to explain the models used, there are no checks or balances when things go wrong — despite obvious racial biases in the outcomes of the programme, those responsible were able to hide behind the opacity of the model due to the lack of explainability.

This is where causal ML comes to the fore. In industries where we can rely on black-box models while still respecting data principles such as avoiding racial and sexual biases, we can carry on using the incredible power of more traditional machine learning algorithms. However, when we find ourselves in situations where these may be more of a concern, this is where Causal ML provides value. Further, Causal ML offers the ability to carry out interventions — that is, to see the impact of particular choices on outcomes before they’ve even been implemented. This is the key difference — we cannot simulate counterfactuals using more traditional models.

2. Understanding Causal ML

Rather than thinking about what Causal ML is immediately, it’s worth taking a detour into the world of more classical statistics/Data Science. The archetypal example to hold in your head is that of the beach featured in the film ‘Jaws’. Imagine gathering the data of ice-cream sales and shark attacks on a given day. You would expect to see, quite rightly, that there is a correlation between these two features — as ice-cream sales increase, you would see an increase in shark attacks, and vice-versa. Does this mean that ice-cream sales cause shark attacks or vice-versa? Of course not!

Figure 1 — A spurious correlation

Instead, what we have here is a confounding variable; that is, whether the sun shines. In this instance, we have an extra unobserved feature which causes the spurious correlation between ice-cream sales and shark attacks. In order to visualise the true relationship between shark attacks and ice-cream sales, we need to hold the amount of Sun to be fixed. Doing so will ‘unlink’ these data points and remove the spurious regression.

Figure 2 — An example of a DAG — here temperature is the confounding variable, as it ‘points’ to both sharks and ice-cream

This is the fundamental example that displays what Causal ML is trying to accomplish. Before doing any machine learning, we visualise the relationships between features using a so-called ‘Directed Acyclic Graph’, or ‘DAG’. DAGs allow us to identify spurious relationships, and as a result, both directly through data analysis, and indirectly through the improvement of existing machine learning algorithms, enable us to take better decisions impacting the bottom line. These ideas have been expanded upon to the extent that we can implement them in more complicated contexts, such as training neural networks, or even in CV/NLP.

3. Our Experience

  • Retail optimisation engine with Causal ML

Data Reply has made pioneering use of Causal ML in the retail and automotive industry. In the case of the fashion retailer, over the course of a two-year long project, we aimed to build a pipeline to better price items for a large multinational fashion manufacturer and retailer. Prior to the involvement of Data Reply, they had a small in-house team who were using more traditional methods revolving around standard regression techniques to work out both pricing and promotions for items. While this worked well for them, they were at a loss to explain to the stores why they had chosen the prices they had obtained.

Figure 3

Through the use of Causal ML however, Data Reply was able to improve the process through the ability to have more explainable models, as well as positively impact the margins on the individual items. One way that Causal ML improves on more traditional ML algorithms is that you can directly measure the impact of interventions — this has uses in releasing new clothing items that might be variants of prior examples, enabling the company to more reliably price these new items released to the market depending on the relative characteristics of the clothing.

  • Uplift modelling for automotive

Data Reply is currently working with one of the major UK/EU luxury car brands. The automotive client followed a similar process — after cleaning the data and creating the necessary pipelines, we created propensity models with the aim of identifying customers who were most likely to buy a car. Although this worked well and we now had predictive capabilities for future purchases, propensity models fail to address why clients are more likely to make a purchase, which in reality is more valuable to the client than who. For example, if we have two scenarios, where in one scenario a customer is offered complementary extended warranty, and in the other they must pay for it, how much more likely are they to buy the car? Or does it even have an effect?

This is why we turned to using causality through uplift modelling, where we can identify which variables to change if we want to maximise the probability of selling. By applying causal techniques, we simulate scenarios where factors (such as offering complementary warranty, or sending a newsletter) are applied or removed, and we can see the resulting increase or decrease in probability of buying. The true value for the client comes from knowing not only which discounts or marketing campaigns are necessary to get customers to buy, but whether they are even necessary i.e., if the customer would have bought anyway.

4. Future and Conclusion

For now, Causal ML still is in its infancy — we know how its use can successfully impact more traditional Data Science tasks such as classification and regression. However, we also expect to see an impact on more technical tasks such as NLP and CV, and most importantly given the AI revolution of 2022–23 in large language models such as ChatGPT, especially in understanding how outputs are generated, a key impeder in the rollout of AI across society.

We at Data Reply see Causal ML as a key mechanism to be incorporated into day-to-day data pipelines currently in use across industries, as varied as retail, automotive or FSI, and see a great deal of value to be added through the incorporation of causal algorithms. Data pipelines in use can be upgraded to make use of Causal ML, or we can build models from the ground up. Especially since we can make use of this technology to model interventions, countless new problems in industry can now be tackled.

The incorporation of these ideas into current data pipelines will lead to large increases in productivity through their ability to improve decision-making processes, and further we foresee a future in which LLMs produce explanations for their output. Exciting times!

Figure 4

Intrigued by the promise of transparent decision-making through Causal ML?

At Data Reply, our seasoned experts are ready to guide your business in leveraging Causal ML for more transparent and understandable decisions. Let’s redefine the future of business intelligence together.

Reach out to us at info.data.uk@reply.com or directly connect with our Data Science Manager, Perumal S K.

References

Molak, A., Jaokar, A. (2023). Causal Inference and Discovery in Python: Unlock the Secrets of Modern Causal Machine Learning with DoWhy, EconML, PyTorch and More. United Kingdom: Packt Publishing.

https://www.politico.eu/article/dutch-scandal-serves-as-a-warning-for-europe-over-risks-of-using-algorithms/

Victor Chernozhukov and others, Double/debiased machine learning for treatment and structural parameters, The Econometrics Journal, Volume 21, Issue 1, 1 February 2018, Pages C1–C68, https://doi.org/10.1111/ectj.12097

Emre Kıcıman, Robert Ness, Amit Sharma, Chenhao Tan, Causal Reasoning and Large Language Models: Opening a New Frontier for Causality

https://doi.org/10.48550/arXiv.2305.00050

--

--