Uplift Modeling: predict the causal effect of marketing communications
A complex task in marketing analytics is the skill to predict customers’ reactions to specific marketing communications.
The marketing actions carried out can have different business objectives (such as cross-selling, upselling, and churn prevention) which are evaluated using different KPIs.
These actions translate into sending campaigns through different channels that can stimulate the customer in various ways (for example by providing information on a new product or offering advantageous discounts).
Customer base can also be truly heterogeneous: each customer has their level of engagement with the company and may only be interested in specific types of products or services that the company offers.
This variety of objectives, marketing tools and customers to be valorized makes it necessary to develop customer-centered strategies: a marketing campaign can have a positive, neutral, or negative effect.
The estimation of the uplift score could help marketing teams predict the difference in conversions between non-treated and treated customers, providing better targeting for marketing campaigns and resulting in increased ROI.
Uplift Score Definition
Below we will call “treatment” every marketing action carried out to achieve a business goal (sending campaigns, access to dedicated promotions, …). The term “conversion” will instead refer to a positive outcome of the treatment (purchase of a product, signing of a contract, …). The “treatment group” will be the sample of treated subjects, while the “control group” will be the sample of untreated subjects.
The uplift score is the difference in the conversion probability of a treated subject with a non-treated subject. It aims to isolate the influence of the treatment taking into account the starting condition of the customer.
So having Y for conversion, T for treatment and X for the features variable below is defined the uplift score:
Customers with positive uplift are the most persuadable. Marketing treatment positively impacts conversions, so they represent a valuable segment for campaign targeting.
Customers with an uplift score close to zero are customers who do not react to the marketing campaign. They may or may not convert regardless of treatment exposure. Sending campaigns to these customers is a waste of time and money.
Customers with a negative uplift, on the other hand, are those who are annoyed by marketing communications. Sending campaigns could lead them to lose interest in the products offered by the company.
When we talk about uplift estimation, a big problem arises: how could we analyze two different scenarios for the same customer? This issue is summarized by the “Fundamental Problem of Causal Inference”:
“It is impossible to observe the causal effect on a single unit.”
This means that we can’t analyze the results of the two different experiments for the same customer (exposure or not to the treatment) without introducing any interference.
How to evaluate a Uplift Model
One method for evaluating the performance of an uplift model is to compare the use of the model with a baseline approach.
Suppose we need to expose N subjects to a chosen treatment. As a baseline approach, it is possible to choose N random subjects from the entire population. In this case, the treatment gain would be equal to E[Y|T=1]-E[Y|T=0] and the number of conversions would increase linearly as the sample size N increases.
On the other side, a data-driven approach could be based on a wiser choice of the customers, selecting the N more reactive to the treatment (i.e. the N with the higher uplift score).
Moving N from zero to the size of the population we can plot the cumulative gain and compare the model approach with the random approach. This process will provide the Uplift Curve that shows the model contribution for each size N and the Area Under Uplift Curve (AUUC) will provide a good metric for validating uplift models.
Modeling Approaches
Below are exposed some approaches for the estimation of uplift score.
Four-Classes Classification
Treatment and outcome variables are joined together to create a unique target for a multiclass classification problem.
A classifier is trained on the training data, and during the inference phase each customer is assigned the probability score for each class.
Uplift approximation can be computed using the following formula:
Meta-Learners
Meta-learners are a framework used to approximate uplift scores using any machine learning models.
S-Learner
A single model is trained using the treatment variable as a boolean feature.
During the inference phase, the treatment variable is forced to 1 to predict the conversion probability with treatment and then is forced to 0 to predict the conversion probability without treatment. Both scores are computed for each customer, their difference gives an approximation of the uplift score.
If the treatment variable makes few contributions in predicting the outcome, a single model approach could not work well. The use of regularization could vanish the effect of the treatment variable on the outcome prediction, in this case, the uplift scores will always be near or equal to zero.
T-Learner
T-Learners can overcome the vanishing of uplift estimate for S-Learners using two different models.
Available data are split into Treatment Group and Control Group, two different models are trained separately on each dataset.
Both models are used during the inference phase, the scores difference approximates uplift.
A drawback could arise when a difference in complexity between the two models could provide an overcomplicated uplift score. Often treatment group and control group are not balanced: in general we expect to have fewer treated people, and this could limit the treatment model to learn more simple patterns to avoid overfitting.
Get Andrea Mosca’s stories in your inbox
Join Medium for free to get updates from this writer.
So the ensemble of a simple model and a complex model will be a complex model, which could poorly explain the reaction to the treatment.
A detailed explanation of this phenomenon is provided in [2].
X-Learner
X-Learners use imputation to improve predictions. Treatment group using Control group model and vice-versa.
At first two different models are trained on Treatment Group and Control Group, following the T-Learner framework.
Then the two models are used to make predictions on the opposite group and to approximate uplift on each sample.
Two new models are trained on uplift approximation to predict uplift for Treatment and Control groups.
At last, results are combined using propensity score g in (0,1):
Uplift Trees
Uplift Trees are tree-based algorithms that use splitting criteria based on differences in Uplift. At each step, a split is performed with the aim of increasing the difference between the outcome distributions of control and treatment groups.
Therefore for any probability divergence measure the gain is defined as the difference of the divergences of the probabilities P(Y|T=1) and P(Y|T=0) computed before and after carrying out the split.
Some popular choices for D are the following:
Kullback-Leibler Divergence
Euclidean Distance
Chi2 Divergence
End-to-end solution for targeting campaigns
Now that the modeling part has been covered it’s time to think about how to set up a campaign targeting framework, following best practices and avoiding common mistakes.
Keep business goals clear
For every marketing treatment, it should be clear what the final goal is. This will lead to the definition of the model’s design and the estimate of the model’s added value.
The following questions could help with the definition of business goals:
- How can I get value from this marketing campaign?
- What are the reactions I expect from customers?
- How can I measure the outcome of this treatment?
Collect the right data
For each treatment type is important to collect both treatment and control groups. Many of the uplift models are based on the assumption of independence between treatment and control groups.
Campaigns can be launched according to different criteria (business rules, ML models, …). Therefore, to avoid introducing bias into data collection, it is best to randomly remove a percentage of customers from each mailing and mark them as a control group.
Business metrics over Data Science metrics
The model accuracy computed on an independent test set could be a good reference point for guessing the performances of the model, but the real business impact can be determined only by a live testing approach.
Models should be tested with campaign launches and should be evaluated using appropriate business metrics that will depend on the campaign goal (for example: conversion rate, retention, …).
Conclusion
Marketing campaigns optimization is a complex task, the starting point is good domain knowledge that is necessary to understand what marketing needs are and what points need improvement.
Before approaching uplift modeling it is important to analyze the different reactions that customers may present after receiving a marketing treatment.
Data collection is a crucial point: for each different treatment it is necessary to collect a random control group that is large enough to train the models.
Different solutions have been shown for approximating the uplift score, the difficulty of the task is due to the fact that the causal effect of a treatment is not directly observable. Uplift curves can help validate the model, but the real model performances can be measured only with a live test.
References
- [1] Piotr Rzepakowski and Szymon Jaroszewicz. “Decision trees for uplift modeling with single and multiple treatments” (2012)
- [2] Sören R Künzel, Jasjeet S Sekhon, Peter J Bickel, and Bin Yu. “Metalearners for estimating heterogeneous treatment effects using machine learning” (2017)
- [3] CausalML package documentation: https://causalml.readthedocs.io/en/latest/methodology.html#










