T-learners, S-learners and X-learners

20 May 2022

Problem

Product teams run an experiment and learn the average effect, but the decision is per customer: who should get the discount, the message or the feature. The average can hide groups where the effect is large, zero or negative. The target is the conditional average treatment effect (CATE), the expected effect for users with given pre-treatment characteristics.

Illustrative example: a promo email is tested on a random half of users. The average lift in purchases is small, and you need to find which user groups drive it.

Solution in brief

Meta-learners turn any supervised model into a CATE estimator. The T-learner fits two models, one per group, and subtracts them. The S-learner fits one model with the treatment flag as a feature. The X-learner adds a second stage that models imputed individual effects and blends them. Which one wins depends on how complex the effect is and how large each group is.

Questions this case answers
  • How to estimate how a treatment effect varies across individuals using ordinary supervised models, and choose a modeling scheme when the groups are unbalanced
  • How to estimate the treatment effect for each customer segment, not just the average effect?
  • How to choose between T-, S- and X-learners for a given experiment?
  • How to estimate heterogeneous effects when the control group is much larger than the treatment group?

Tools and methods

  • T-learner — separate outcome models for control and treatment, CATE is their difference
  • S-learner — one outcome model with the treatment indicator as an ordinary feature
  • X-learner — three-step method that models imputed individual effects and blends them with a propensity-based weight
  • EconML — Microsoft's Python package that implements all three learners
Continue reading — it's free

Google or a one-time email code. No password.