Quant Memo
Advanced

The X-Learner

The X-Learner is a meta-learning recipe for estimating causal treatment effects that borrows strength across treatment and control groups, making it especially useful when one group is much smaller than the other.

Prerequisites: ATE, ATT and Other Treatment Effect Estimands

Estimating how much a treatment (a marketing offer, a drug, a trading signal flag) changes an outcome for each individual is harder than estimating an average effect, because you only ever observe one outcome per person — either treated or not, never both. Meta-learners solve this by turning the problem into a sequence of ordinary supervised-learning fits. The X-Learner is one such recipe, designed specifically to handle unbalanced groups, such as when only 5% of customers received a promotion.

It works in stages. First, fit separate outcome models on the treated group and the control group. Second, use each model to impute the "missing" counterfactual outcome for the other group — predicting what a treated person's outcome would have looked like untreated, and vice versa — and compute the resulting individual-level effect estimates. Third, fit two more models to smooth those imputed effects, one trained on each group, and combine them using a weighting function (often the propensity score) that leans more heavily on whichever group's estimate is more reliable.

The X-Learner's distinguishing move is using the model fit on one group to impute counterfactuals for the other group, then re-weighting the two resulting effect estimates by group size — which is what makes it noticeably better than simpler meta-learners when treatment and control groups are very unequal in size.

Worked example

A retailer sent a discount coupon to only 8% of its customer base. An S-Learner or T-Learner would struggle because the control-group model is trained on far more data than the treatment-group model, biasing effect estimates toward whichever group the underlying model was more confident about. The X-Learner instead uses the well-trained control model to impute what treated customers would have done untreated, produces a treatment-effect estimate from the small treated group, weights it against the control-side estimate by propensity score, and ends up less distorted by the size imbalance.

Related concepts

Practice in interviews

Further reading

  • Künzel et al., 'Metalearners for Estimating Heterogeneous Treatment Effects Using Machine Learning'
ShareTwitterLinkedIn