Causal Artificial Intelligence (AI), or causal inference, is the new and exciting science of cause and effect. It can enable businesses to understand and serve customers more effectively and efficiently than ever before, in a robust and transparent way. In this blog post series, dunnhumby Data Scientist Dimitra (Mimie) Liotsiou introduces this topic.
Cause and effect relationships are everywhere around us. When something happens – whether it’s a bottle smashing on the floor or a rocket launching into space – it’s because one or several other factors caused that event to take place.
In retail, cause and effect relationships are also everywhere. You’ve likely already thought about questions of cause and effect (causal questions), whether consciously or not, if you’ve ever wondered about questions such as:
Even though causal questions have been important to philosophers and scientists for centuries, obtaining a robust scientific understanding of causality has proved elusive.
However, there have recently been major scientific advances in this field. As Harvard professor Gary King put it: “More has been learned about causal inference in the last few decades than the sum total of everything that had been learned about it in all prior recorded history.”
We now have a scientific apparatus capable of taking us from mere statistical correlation to causation, by enabling us to disentangle and accurately measure the effects of different causes. In retail, this is key, so that data-driven insights will be more accurate and lead to the right course of action. And causal AI can do this at scale, for large, complex real-world problems, robustly and transparently.
Without the right approach, it becomes very easy to draw the wrong conclusions about cause and effect.
A well-known example is the following: a study found a correlation between chocolate consumption and the number of Nobel prizes won per capita per country. Does this mean eating more chocolate makes it more likely to win a Nobel? That doesn’t seem very plausible. Indeed, taking a step back to consider what else may be going on, further studies found that when adjusting for per capita income the correlation becomes insignificant. Income is a common cause of chocolate consumption and Nobel wins:
This chocolate-Nobels correlation is an example of a “spurious correlation” – a statistical relationship between two variables, that does not indicate a causal link from one variable to the other. Taking a broader look at the situation, we discover the correlation is explained by something else that’s going on, like a common cause (income, in this example).
Unfortunately, the data science, statistical, and machine learning methods commonly used today on Big Data can only tell us about correlations. They can’t tell us about causation, no matter how much data we collect, leaving us exposed to spurious correlations. This is where the causal inference approach comes in.
Retail data science insights need to be actionable. They need to give an accurate prediction of the effects caused by actions, so that, based on these insights, decision-makers can choose the right action to take next.
That means insights based on correlations will not suffice -- we don’t want a scenario where we invest in something based on a correlation, only to find it was spurious and the investment was misplaced or wasted.
Let’s consider another example: sending promotional coupons to existing customers of a product (i.e. customers with some degree of loyalty). Let’s say we find a strong positive relationship between receiving coupons and future purchases, so we might consider investing more in this coupon initiative. However, loyalty is a common cause of both receiving a coupon and of purchasing the product in the future regardless of whether a coupon was received. The result contains a spurious correlation, as the effects of the coupon and of prior loyalty are tangled together. Let’s say we adjust for loyalty, and the coupon’s effect turns out much weaker -- this initiative brings in little new revenue, as a lot of people would buy the product anyway due to pre-existing loyalty. So, investing more in this initiative may not be worthwhile after all.1
More generally, questions requiring actionable predictive insights about effects of actions are ubiquitous in retail, and very important. Further examples include questions about, for example, the impact of a media campaign, range change, price change, or a rewards programme, on key outcomes like customer spend, in-store footfall, or loyalty. Broader questions like “which factors influence average customer spend?”, or questions about uplift or incrementality, also fall in this category.
Irrespective of what you want to know, to answer a causal question accurately, you need to use causal methods.
The Nobel and coupon examples were simple illustrations of the causal inference approach. More generally, to go beyond correlations, we need to consider the wider picture of the various underlying causal factors and relationships at play in the real world, and appropriately account for these.
If we wanted to understand the impact of advertising a product on its total sales, for example, there is a whole range of variables that we could adjust for, such as variables capturing characteristics of:
Clearly, there are many factors to consider here. Should we adjust for all of them? Just some? If so, which ones should we include? Which should we leave out?
This is a critical and complex question, as indiscriminately adjusting for all, or as many as possible, variables can also introduce spurious correlations (bias) into results. Fortunately, causal AI provides the solution, as it can automatically determine the right set of variables to adjust for in a given context.
Reaping the benefits of causal AI entails moving from the traditional data science pipeline, which hinges entirely on correlations, to the causal pipeline, in which traditional data science methods still feature but are only one stage of the process.
Harnessing these advanced causal methods comes with its own nuances and complexities, so expertise and care is needed to apply them effectively.
At dunnhumby, we are actively working on bringing causal AI to bear on a wide range of retail problems.
A more in-depth look at how causal AI works, and at the causal pipeline, is something I’ll cover in the second post in this series, coming soon. In the meantime, to discover more, please see this presentation I gave at the recent London Data Science Festival.
[1] A similar example, with targeted online adverts instead of coupons, is discussed here
Truly understand your Customers and unlock your Customer First transformation with Strategy Development, Research & Insights and Organisation Engagement
Design the right strategy with the Customer at the centerA look at dunnhumby’s unique Customer Data Science, which is at the core of everything we do.
Combining the latest techniques, algorithms, processes and applicationsCookie | Description |
---|---|
cli_user_preference | The cookie is set by the GDPR Cookie Consent plugin and is used to store the yes/no selection the consent given for cookie usage. It does not store any personal data. |
cookielawinfo-checkbox-advertisement | Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category . |
cookielawinfo-checkbox-analytics | Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Analytics" category . |
cookielawinfo-checkbox-necessary | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
CookieLawInfoConsent | The cookie is set by the GDPR Cookie Consent plugin and is used to store the summary of the consent given for cookie usage. It does not store any personal data. |
viewed_cookie_policy | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
wsaffinity | Set by the dunnhumby website, that allows all subsequent traffic and requests from an initial client session to be passed to the same server in the pool. Session affinity is also referred to as session persistence, server affinity, server persistence, or server sticky. |
Cookie | Description |
---|---|
wordpress_test_cookie | WordPress cookie to read if cookies can be placed, and lasts for the session. |
wp_lang | This cookie is used to remember the language chosen by the user while browsing. |
Cookie | Description |
---|---|
CONSENT | YouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data. |
vuid | Vimeo installs this cookie to collect tracking information by setting a unique ID to embed videos to the website. |
_ga | The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors. |
_gat_gtag_UA_* | This cookie is installed by Google Analytics to store the website's unique user ID. |
_ga_* | Set by Google Analytics to persist session state. |
_gid | Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously. |
_hjSessionUser_{site_id} | This cookie is set by the provider Hotjar to store a unique user ID for session tracking and analytics purposes. |
_hjSession_{site_id} | This cookie is set by the provider Hotjar to store a unique session ID, enabling session recording and behavior analysis. |
_hp2_id_* | This cookie is set by the provider Hotjar to store a unique visitor identifier for tracking user behavior and session information. |
_hp2_props.* | This cookie is set by the provider Hotjar to store user properties and session information for behavior analysis and insights. |
_hp2_ses_props.* | This cookie is set by the provider Hotjar to store session-specific properties and data for tracking user behavior during a session. |
_lfa | This cookie is set by the provider Leadfeeder to identify the IP address of devices visiting the website, in order to retarget multiple users routing from the same IP address. |
Cookie | Description |
---|---|
aam_uuid | Set by LinkedIn, for ID sync for Adobe Audience Manager. |
AEC | Set by Google, ‘AEC’ cookies ensure that requests within a browsing session are made by the user, and not by other sites. These cookies prevent malicious sites from acting on behalf of a user without that user’s knowledge. |
AMCVS_14215E3D5995C57C0A495C55%40AdobeOrg | Set by LinkedIn, indicates the start of a session for Adobe Experience Cloud. |
AMCV_14215E3D5995C57C0A495C55%40AdobeOrg | Set by LinkedIn, Unique Identifier for Adobe Experience Cloud. |
AnalyticsSyncHistory | Set by LinkedIn, used to store information about the time a sync with the lms_analytics cookie took place for users in the Designated Countries (which LinkedIn determines as European Union (EU), European Economic Area (EEA), and Switzerland). |
bcookie | LinkedIn sets this cookie from LinkedIn share buttons and ad tags to recognise browser ID. |
bscookie | LinkedIn sets this cookie to store performed actions on the website. |
DV | Set by Google, used for the purpose of targeted advertising, to collect information about how visitors use our site. |
ELOQUA | This cookie is set by Eloqua Marketing Automation Tool. It contains a unique identifier to recognise returning visitors and track their visit data across multiple visits and multiple OpenText Websites. This data is logged in pseudonymised form, unless a visitor provides us with their personal data through creating a profile, such as when signing up for events or for downloading information that is not available to the public. |
gpv_pn | Set by LinkedIn, used to retain and fetch previous page visited in Adobe Analytics. |
lang | Session-based cookie, set by LinkedIn, used to set default locale/language. |
lidc | LinkedIn sets the lidc cookie to facilitate data center selection. |
lidc | Set by LinkedIn, used for routing from Share buttons and ad tags. |
li_gc | Set by LinkedIn to store consent of guests regarding the use of cookies for non-essential purposes. |
li_sugr | Set by LinkedIn, used to make a probabilistic match of a user's identity outside the Designated Countries (which LinkedIn determines as European Union (EU), European Economic Area (EEA), and Switzerland). |
lms_analytics | Set by LinkedIn to identify LinkedIn Members in the Designated Countries (which LinkedIn determines as European Union (EU), European Economic Area (EEA), and Switzerland) for analytics. |
NID | Set by Google, registers a unique ID that identifies a returning user’s device. The ID is used for targeted ads. |
OGP / OGPC | Set by Google, cookie enables the functionality of Google Maps. |
OTZ | Set by Google, used to support Google’s advertising services. This cookie is used by Google Analytics to provide an analysis of website visitors in aggregate. |
s_cc | Set by LinkedIn, used to determine if cookies are enabled for Adobe Analytics. |
s_ips | Set by LinkedIn, tracks percent of page viewed. |
s_plt | Set by LinkedIn, this cookie tracks the time that the previous page took to load. |
s_pltp | Set by LinkedIn, this cookie provides page name value (URL) for use by Adobe Analytics. |
s_ppv | Set by LinkedIn, used by Adobe Analytics to retain and fetch what percentage of a page was viewed. |
s_sq | Set by LinkedIn, used to store information about the previous link that was clicked on by the user by Adobe Analytics. |
s_tp | Set by LinkedIn, this cookie measures a visitor’s scroll activity to see how much of a page they view before moving on to another page. |
s_tslv | Set by LinkedIn, used to retain and fetch time since last visit in Adobe Analytics. |
test_cookie | Set by doubleclick.net (part of Google), the purpose of the cookie is to determine if the users' browser supports cookies. |
U | Set by LinkedIn, Browser Identifier for users outside the Designated Countries (which LinkedIn determines as European Union (EU), European Economic Area (EEA), and Switzerland). |
UserMatchHistory | LinkedIn sets this cookie for LinkedIn Ads ID syncing. |
UserMatchHistory | This cookie is used by LinkedIn Ads to help dunnhumby measure advertising performance. More information can be found in their cookie policy. |
VISITOR_INFO1_LIVE | A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface. |
YSC | YSC cookie is set by YouTube and is used to track the views of embedded videos on YouTube pages. |
yt-remote-connected-devices | YouTube sets this cookie to store the video preferences of the user using embedded YouTube video. |
yt-remote-device-id | YouTube sets this cookie to store the video preferences of the user using embedded YouTube video. |
yt.innertube::nextId | This cookie, set by YouTube, registers a unique ID to store data on what videos from YouTube the user has seen. |
yt.innertube::requests | This cookie, set by YouTube, registers a unique ID to store data on what videos from YouTube the user has seen. |
_gcl_au | Set by Google Analytics, to take information in advert clicks and store it in a 1st party cookie so that conversions can be attributed outside of the landing page. |