Quant Memo
Advanced

Estimating Conditional Average Treatment Effects With ML

An average effect can hide the fact that a treatment helps some people and hurts others — CATE estimation uses machine learning to predict how the effect itself varies across individuals, not just its overall average.

Prerequisites: Confounding in Financial Data, Double Machine Learning

A firm-wide A/B test finds that sending a "rebalance now" nudge to retail investors raises the fraction who actually rebalance by 4 percentage points on average, across 50,000 users. That single number hides an enormous amount. It might mean the nudge helps almost everyone by a similar small amount — or it might mean the nudge strongly helps disciplined, engaged investors and does nothing (or actively annoys and drives away) passive ones, with the two effects averaging out to +4. Those are completely different businesses to run. The average treatment effect (ATE) answers "does this work on average?" The conditional average treatment effect (CATE) answers the more useful question: "for whom does this work, and by how much?"

Defining CATE

Formally, CATE at a point xx (a vector of an individual's characteristics — age, account size, past trading behaviour) is the expected difference between their outcome under treatment and their outcome without it, given those characteristics:

τ(x)=E[Y(1)Y(0)X=x]\tau(x) = \mathbb{E}[Y(1) - Y(0) \mid X = x]

In words: among all individuals who share characteristics xx, how much does treatment shift the average outcome? You never observe both Y(1)Y(1) (what happens with treatment) and Y(0)Y(0) (what happens without it) for the same person — this is the fundamental problem of causal inference — so τ(x)\tau(x) must be estimated, not measured directly, from a population where some people were treated and some were not.

Why ordinary ML doesn't just do this

A model trained to predict the outcome YY directly from features XX and treatment status DD will happily predict outcomes, but reading "the effect of treatment" off such a model is not the same as estimating it causally, for the same reason a plain correlation isn't causation — see Confounding in Financial Data. CATE methods build the causal structure into the estimator itself, most commonly through meta-learners: fit one flexible model on the treated group to predict Y(1)Y(1) as a function of XX, fit a second flexible model on the untreated group to predict Y(0)Y(0) as a function of XX, and take the difference of the two predictions at any given xx as the estimated τ(x)\tau(x). More refined variants (X-learners, R-learners, causal forests) correct for the fact that the treated and untreated groups may not look alike to begin with, using the same residualization logic as Double Machine Learning.

ATE=4 account tenure (short → long) estimated effect τ(x)
The dashed line is the single average effect an A/B test reports. The curve is CATE — the nudge helps new, engaged accounts far more than long-tenured ones, information the average alone destroys.

Worked example

Suppose the true effects are: for accounts under 1 year old, the nudge raises rebalancing probability by 12 percentage points; for accounts over 5 years old, it raises it by only 1 point. If new accounts are 30% of the tested population, the reported ATE is 0.30×12+0.70×1=4.30.30 \times 12 + 0.70 \times 1 = 4.3 points — almost exactly the "4%" headline number, and it would lead a team to roll the nudge out to everyone. A CATE model that conditions on tenure recovers the 12-point and 1-point figures separately, which changes the decision entirely: target the nudge at new accounts, where it does most of its work, and skip it for long-tenured accounts where the gain barely covers the cost of sending it.

CATE is not a fancier average — it is a function of individual characteristics. The whole point is that τ(x)\tau(x) can be large for some xx and near zero or negative for others, even when E[τ(x)]\mathbb{E}[\tau(x)] averages out to a single respectable-looking ATE.

Where quants meet this

Beyond retail nudges, CATE estimation is used to decide which accounts to offer a fee discount to, which clients respond to a given research report, or which stocks respond most to a factor tilt conditional on regime — anywhere "does this work" is really "for whom does this work." It is the estimation machinery behind Uplift Modelling, which packages the same idea for marketing and targeting decisions specifically.

CATE estimates are noisier than ATE estimates by construction — you are estimating a whole function instead of one number, from the same amount of data. A CATE model can report large, confident-looking differences across subgroups that are mostly sampling noise, especially in small treated groups. Check estimated effects against a held-out sample before acting on any subgroup split, the same discipline as controlling model variance anywhere else.

Overlap: the condition CATE quietly requires

CATE estimation only works at values of xx where both treated and untreated individuals actually exist in the data — a condition called overlap or positivity. If every account under six months old happened to receive the nudge, and every account over five years never did, there is no data anywhere showing what a young account looks like without the nudge. The two meta-learner models would each be predicting into a region they never observed, quietly extrapolating rather than estimating, and τ(x)\tau(x) there is not a causal estimate so much as a guess dressed up as one. Checking overlap — plotting the distribution of XX separately for treated and untreated groups and confirming they meaningfully cover the same region — is a standard, easy-to-skip diagnostic that should happen before any CATE numbers are trusted.

Model choice for the two arms

The meta-learner framework is agnostic to which flexible model does the predicting inside each arm — random forests, gradient boosting and neural networks are all used in practice, and the choice interacts with the bias-variance trade-off exactly as for an ordinary prediction problem, per The Bias-Variance Decomposition. Causal forests, a purpose-built variant, modify the tree-splitting criterion itself to directly optimise for detecting heterogeneity in τ(x)\tau(x) rather than for predicting YY well, tending to produce sharper subgroup boundaries than subtracting two ordinary models' outputs after the fact.

Related concepts

Practice in interviews

Further reading

  • Wager & Athey, Estimation and Inference of Heterogeneous Treatment Effects Using Random Forests (2018)
  • Künzel et al., Metalearners for Estimating Heterogeneous Treatment Effects (2019)
ShareTwitterLinkedIn