Cumulative Incremental Gain (CIG)
Cumulative incremental gain is the estimated additional outcome from treating everyone down to a given depth of a ranking, compared with leaving that same population untreated. Customers are ordered by predicted uplift score, highest first; CIG at 30 percent answers how many additional conversions are estimated if the top 30 percent receive treatment. It is the quantity the uplift curve plots on its vertical axis, and the same measurement that cumulative uplift describes from the other direction.
What is accumulated
The name suggests a sum over customers of what the treatment did to each, and that sum cannot be computed. Every customer was either treated or left alone, so one of the two outcomes the difference needs is missing from every row. Radcliffe and Surry put it plainly: “we cannot measure the uplift for an individual because we cannot simultaneously treat and not treat a single person”. A per-customer formula describes the quantity; it does not describe the calculation.
What is computed at each depth is a comparison of two groups. With \(n\) customers targeted, \(n_t\) of them treated with \(n_{t1}\) responders and \(n_c\) controls with \(n_{c1}\) responders,
\[ \text{CIG}(n) = \left( \frac{n_{t1}}{n_t} - \frac{n_{c1}}{n_c} \right) \cdot n \]
The rates matter, not the raw responder counts: the two arms can have different sizes. When controls outnumber treated customers, they can produce more responders even if their response rate is lower. Incremental gain works through a case where subtracting counts reports a loss in nine deciles out of ten on data where the campaign is clearly effective.
Here, \(n=n_t+n_c\) is the entire evaluation prefix, including its controls. Multiplying the rate difference by \(n\) estimates the gain from treating that whole prefix; it is not the number of conversions already caused among the \(n_t\) treated observations. For that treated-size scale, multiply by \(n_t\) instead. A causal interpretation requires a suitable experiment or adjustment, pre-treatment ranking features, and evaluation data not reused to fit the ranking. Both arms must be represented in each reported prefix.
Accumulating, and why it does not quite add
There are two ways to reach a figure at 50 percent depth: add up the gains of the first five deciles, or compute the comparison directly on the top half. They do not agree, and the disagreement is not a rounding artifact. The data below are synthetic โ 20,000 customers, 30 percent treated, a 5 percent base rate, and a 6 percentage point effect confined to the top third.
import numpy as np
def make_population(seed=7, N=20000):
"""20,000 customers, 30 percent treated, a 5 percent base rate,
and a 6 percentage point effect confined to the top third of the ranking."""
rng = np.random.default_rng(seed)
treatment = (rng.random(N) < 0.3).astype(int)
score = rng.random(N)
p = 0.05 + treatment * np.where(score > 2/3, 0.06, 0.0)
return (rng.random(N) < p).astype(int), score, treatment
def gain(y_chunk, t_chunk):
"""Incremental gain inside one slice: the difference of response rates, scaled."""
n_t, n_c = t_chunk.sum(), len(t_chunk) - t_chunk.sum()
y_t, y_c = y_chunk[t_chunk == 1].sum(), y_chunk[t_chunk == 0].sum()
return (y_t / n_t - y_c / n_c) * len(t_chunk)
y, score, treatment = make_population()
order = np.argsort(-score, kind="mergesort")
y, treatment = y[order], treatment[order]
running, depths = 0.0, []
for b in range(1, 11):
k = len(y) * b // 10
start = len(y) * (b - 1) // 10
running += gain(y[start:k], treatment[start:k])
direct = gain(y[:k], treatment[:k])
depths.append((b * 10, running, direct))
for depth, accumulated, direct in depths:
print(f"{depth:>3} {accumulated:>8.1f} {direct:>8.1f} {accumulated - direct:>+7.1f}")
# 10 132.2 132.2 +0.0
# 20 193.7 193.6 +0.1
# 30 327.0 328.3 -1.2
# 40 384.7 385.5 -0.8
# 50 401.8 396.4 +5.4
# 60 395.4 391.9 +3.5
# 70 414.3 410.3 +4.0
# 80 403.8 401.9 +1.9
# 90 384.3 381.8 +2.6
# 100 362.1 363.3 -1.2
| Depth | Accumulated from deciles | Computed directly | Difference |
|---|---|---|---|
| 10% | 132.2 | 132.2 | +0.0 |
| 30% | 327.0 | 328.3 | -1.2 |
| 50% | 401.8 | 396.4 | +5.4 |
| 70% | 414.3 | 410.3 | +4.0 |
| 100% | 362.1 | 363.3 | -1.2 |
Separately computed raw segment estimates need not add to the pooled raw estimate. Radcliffe and Surry devote a section to it, with a case where two segments showing 0.711 and 0.284 percentage points average to 0.497 while the combined population gives 0.500, and they head off the obvious objection: “This is not the result of rounding error.” The cause is that the treated share differs slightly between segments, which makes this a relative of Simpson’s paradox.
Implementations resolve the ambiguity by computing directly rather than accumulating. causalml’s get_cumlift evaluates the cumulative treated rate minus the cumulative control rate at every position in the ranking, and multiplies by the population targeted to reach the gain; scikit-uplift’s uplift_curve does the same at every distinct score value. Under this pooled-prefix convention, the result is the right-hand column above. Population effects themselves do aggregate with common population weights; the disagreement here comes from different estimators and their denominators, not from a failure of causal effects to add.
Reading the shape
A CIG that rises steeply and then levels off is the pattern a targeting model exists to produce: the effect is concentrated at the top of the ranking, and further depth adds cost without adding outcome. A CIG that climbs in a straight line means the ordering carries no information about the effect, whatever the model knows about who responds โ that line is the subject of random targeting strategy.
A CIG that peaks and falls has two possible causes that the chart cannot separate. One is a genuine negative effect in the tail; the other is noise, since each point is a difference of two rates and finite samples can give unstable estimates where the true effect is small. In the table above the curve peaks near 70 percent on data where the bottom two-thirds have a true effect of exactly zero, so the fall is noise by construction. Distinguishing the two needs segment sizes, intervals, and a second sample.
A profit decision uses contribution from incremental outcomes minus treatment cost. With declining marginal effects and constant positive cost, its optimum precedes the flat part of the expected gain curve. That ordering is not universal for noisy estimates, varying costs, or constrained policies. Radcliffe and Surry derive it by attaching cost and value to the same curve: at \$1,000 per 1 percent of the population treated and \$150 of contribution per incremental sale, one of their models peaks in profit at 40 percent volume with 680 incremental sales and about \$62,000, and another at 60 percent with 870 sales and about \$70,500.
Where it sits
| Quantity | What it reports |
|---|---|
| Incremental gain | One slice of the ranking, on its own |
| Cumulative incremental gain | Everything down to a depth, computed at that depth |
| Total incremental benefit | The value at full depth, and its conversion into money |
| Uplift@k | The same comparison at one depth, reported as a rate rather than a count |
| Uplift curve and AUUC | The whole path, and the area under it |
For the raw prefix comparisons shown here, randomized assignment supports comparison of treated and control customers at each depth. Observational data require a defensible identification argument and suitable adjustment; a previous targeting rule can otherwise confound the estimated gain โ see A/B testing.
References
- Nicholas J. Radcliffe and Patrick D. Surry, Real-World Uplift Modelling with Significance-Based Uplift Trees, Portrait Technical Report TR-2011-1, Stochastic Solutions White Paper, 2011
- causalml source,
causalml/metrics/visualize.py(get_cumlift,get_cumgain) - scikit-uplift 0.5.1 source,
sklift/metrics/metrics.py(uplift_curve)
Discover more from Insightful Data Lab
Subscribe to get the latest posts sent to your email.
