- Introduced by
- Lee, Lessler & Stuart (2010); Chernozhukov et al. (2018, DML framework)
- Year
- 2010–2018
- Type
- Causal inference / semiparametric weighting
- Family
- Quasi-experimental / causal inference
What does it do?
Machine learning-augmented propensity score weighting (ML-PSW) estimates the propensity score with flexible machine learning algorithms, such as gradient boosting, LASSO or random forests, in place of a logistic regression.
It then applies inverse probability weights to balance treated and control groups. The aim is to reduce bias when a parametric propensity model is misspecified, for example when covariates enter nonlinearly or interact in complex ways. Causal validity still rests on the usual assumptions, including overlap and no unmeasured confounding.
The intuition behind the method
Classic propensity score weighting usually models treatment receipt with logistic regression, which assumes the covariates enter in a specified form. When many covariates interact nonlinearly, that assumption can fail and the resulting weights can be poorly calibrated. Machine learning methods such as gradient boosted trees or ensembles can capture some of these interactions without them being specified in advance. The estimated probability is then used in the usual inverse probability weighting formula. Better-balanced pseudo-populations are possible, but only if overlap holds and extreme estimated scores are handled.
History
Lee, Lessler and Stuart (2010) examined the use of machine learning for propensity score weighting using simulations. They compared logistic regression with CART-based models and ensemble methods, including boosted CART, across scenarios that differed in the degree of non-linearity and non-additivity between covariates and treatment. Logistic regression performed subpar when moderate non-additivity and moderate non-linearity occurred together, whereas ensemble methods gave substantially better bias reduction and more consistent 95 per cent confidence interval coverage. Chernozhukov et al. (2018) formalised the double/debiased machine learning framework, which combines Neyman-orthogonal scores with cross-fitting to support valid inference when nuisance parameters are estimated by machine learning.
When to use it
Use ML-PSW for an observational study with a binary treatment, a continuous or binary outcome, and a rich covariate set in which logistic regression may be misspecified because of nonlinearities or high-dimensional interactions. It is most relevant when there are many covariates or when subject-matter knowledge does not clearly specify a parametric propensity model. Do not use it when positivity (overlap) fails: if some covariate profiles predict treatment with near certainty, no weighting method can rescue the analysis. It is also unnecessary for randomised experiments, where randomisation already balances covariates in expectation. For continuous or multi-valued treatments the binary weight formula on this page does not apply, and a different weighting scheme is needed. In small samples, logistic regression may be more stable than ML-based scores.
Limitations and considerations
- Overlap (positivity) must hold. If some units have propensity scores near 0 or 1, their weights become very large and the estimate is unreliable, whatever algorithm is used.
- ML algorithms need reasonably large samples to outperform logistic regression. In small samples they can overfit and produce unstable weights.
- Inference is more involved than for logistic-based weighting, because the standard errors must account for the estimated scores and naive plug-in errors are not adequate.
- The method balances observed covariates only; unobserved confounders remain a threat to causal interpretation.
- Choosing among ML algorithms and tuning their hyperparameters adds researcher degrees of freedom, which should be fixed in advance where possible.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Lets the propensity model capture nonlinear covariate-treatment relationships without the analyst specifying them in advance, which targets the misspecification problem that motivates the method.
- Handles large covariate sets where a logistic model would require many manually specified interactions and transformations.
- With cross-fitting, the first-stage ML estimation can be built into a DML-style ATE estimator whose asymptotic properties are established by Chernozhukov et al. (2018).
- Can be combined with an outcome model in an augmented IPW (doubly robust) estimator, so that the ATE estimate remains consistent if either the propensity or the outcome model is correctly specified.
Applications
- Estimating the causal effect of a job-training programme on earnings in administrative data with many demographic and labour-market covariates.
- Evaluating the impact of a medical intervention using electronic health records with high-dimensional clinical variables.
- Assessing the effect of educational policies on student outcomes when treatment assignment depends on a large set of school and student characteristics.
- Studying the wage effect of union membership in surveys where selection into unions depends on nonlinearly interacting occupational features.
- Estimating advertising effectiveness from observational clickstream data with many behavioural covariates.
How it works
How it works
A machine learning algorithm (gradient boosted machines, LASSO logistic regression, random forests, or a super learner ensemble) is trained to predict the binary treatment indicator from the observed covariates. Its predicted probabilities serve as the estimated propensity score. Cross-fitting (sample splitting) is recommended, so that each unit's score comes from a model not fitted on that unit, which limits how much overfitting carries into the causal estimate.
Formula
\hat{e}(X_i) = P(D_i=1 \mid X_i) \text{ estimated via ML (e.g., GBM, LASSO, RF)}Each unit receives the inverse of the probability of the treatment it actually received: treated units get 1/e(X) and control units get 1/(1-e(X)), where e(X) is the estimated propensity score. The formula on this page uses these unstabilised weights. Stabilised weights, which multiply each term by the marginal treatment probability, are a common alternative that can reduce variance, but they are not part of the formula given here.
Formula
\hat{w}_i = \frac{D_i}{\hat{e}(X_i)} + \frac{1-D_i}{1-\hat{e}(X_i)}The estimator takes the sum of weighted outcomes for treated units, subtracts the sum of weighted outcomes for control units, and divides by n. Because each weight already contains the treatment indicator, the formula is equivalent to (1/n) Σ D_i Y_i / ê(X_i) minus (1/n) Σ (1−D_i) Y_i / (1−ê(X_i)), which is the Horvitz-Thompson style form in terms of the estimated propensity score. A normalised variant divides each weighted sum by the sum of its weights instead. The formula given here does not do this, and the difference can matter when weights are extreme. For the ATT, only control units are re-weighted to resemble the treated group.
Formula
\hat{\tau}_{ATE} = \frac{1}{n}\sum_{i=1}^{n} \hat{w}_i Y_i D_i - \frac{1}{n}\sum_{i=1}^{n} \hat{w}_i Y_i (1-D_i)Before estimation, the distribution of estimated propensity scores is inspected for values close to 0 or 1. Units in these regions receive very large weights and can dominate the estimate, so they are either removed or given capped weights. Any trimming rule changes the population the estimate refers to and should be reported.
Standard errors must reflect the fact that the propensity score was itself estimated; naive plug-in errors that treat the fitted scores as known ignore this first-stage error. Chernozhukov et al. (2018) show that valid inference with machine learning estimates of nuisance parameters rests on two ingredients: a Neyman-orthogonal score, which has reduced sensitivity to errors in the nuisance estimates, and cross-fitting. Their framework covers the average treatment effect under unconfoundedness and is most directly implemented with an augmented (doubly robust) score that also uses an outcome model. For the weighting estimator alone, a bootstrap that repeats the propensity model fitting, including any cross-fitting, within each resample is a practical way to include first-stage variability. Users should document which variance procedure their software applies and whether it accounts for the estimated propensity score.
Common pitfalls
- Using the same data to fit the ML propensity model and to estimate the causal effect without cross-fitting allows overfitting and regularisation bias to enter the estimate. Chernozhukov et al. (2018) show that naive plug-in estimators of this kind need not be root-N consistent, so conventional standard errors and confidence intervals can be unreliable.
- Skipping an overlap check before weighting: extreme weights from scores near 0 or 1 can dominate the estimator.
- Reporting weighted estimates without a covariate balance table (standardised mean differences before and after weighting) leaves readers unable to check that the pseudo-populations are balanced.
- Choosing the ML algorithm to maximise the significance or size of the ATE rather than covariate balance. Propensity models should be selected by how well they balance covariates, not by the final estimate.
- Applying the binary weight formula on this page to a continuous or multi-valued treatment without deriving an appropriate weighting scheme for that case.
Frequently asked questions
Which ML algorithm works best for propensity score estimation?
No single algorithm is guaranteed to dominate. Lee et al. (2010) found that boosted CART and other ensemble methods reduced bias relative to logistic regression when covariates were both nonlinear and non-additive. Algorithm choice should be guided by covariate balance after weighting, not by the size or significance of the causal estimate.
Is cross-fitting always necessary?
Cross-fitting (sample splitting) is strongly recommended whenever a flexible ML model is used for the propensity score. Without it, overfitting and regularisation bias in the first stage can prevent the plug-in ATE estimator from being root-N consistent, as Chernozhukov et al. (2018) show.
How do I handle extreme weights?
Inspect the propensity score distribution first. Common responses are trimming units with scores at the extremes, capping weights, or using overlap weights, which give most weight to units with scores near the middle of the range. Whatever rule is used should be reported, because it changes the population being estimated.
How is ML-PSW different from doubly robust estimation?
ML-PSW uses only the ML-estimated propensity score to construct weights. Doubly robust estimation additionally models the outcome as a function of covariates; the ATE estimator is then consistent if either the propensity model or the outcome model is correctly specified. Combining ML-PSW with an ML outcome model yields an augmented IPW (AIPW) estimator with double robustness.
How large a sample do I need?
There is no single sample-size threshold above which ML outperforms logistic regression. The Lee et al. (2010) simulations covered samples of 500, 1000 and 2000 units with 10 covariates. In smaller samples, check the stability of the weights and the covariate balance before relying on ML-based scores, and consider logistic regression or matching as comparisons.
Related methods
Sources
Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W., & Robins, J. (2018). Double/debiased machine learning for treatment and structural parameters. The Econometrics Journal, 21(1), C1-C68.
Open DOI referenceLee, B. K., Lessler, J., & Stuart, E. A. (2010). Improving propensity score weighting using machine learning. Statistics in Medicine, 29(3), 337-346.
Open DOI reference