Causal Inference in ML
Correlation is what ML learns. Causation is what business decisions need. Bridging the two requires causal inference techniques most ML engineers never learned.
Why correlation isn’t enough
An ML model finds patterns in observed data. If the data was collected under one regime and decisions are made under another, correlation breaks. Classic case: a model that says “customers who get the discount churn less” doesn’t mean discounts cause retention. Maybe the kind of customer offered discounts was less likely to churn anyway.
Causal techniques
- Randomised experiments (A/B tests): the gold standard. Random assignment breaks the confound.
- Instrumental variables: use a third variable that affects treatment but not outcome directly.
- Propensity score matching: balance treatment and control groups on observed covariates.
- Do-calculus / DAGs: graphical reasoning about which causal effects can be identified from observational data.
Tools
DoWhy, EconML (Microsoft), CausalML (Uber). Pythonic. Modest learning curve. Underused in ML teams that should be using them.
Where it pays
Anywhere business decisions are made on model output: pricing, marketing spend, intervention timing, treatment selection. The cost of wrong decisions dwarfs the cost of running the analysis.