- Introduced by
- Hainmueller (2012) for entropy balancing; ML augmentation developed by Zhao & Percival (2017) and subsequent literature
- Year
- 2012-2017
- Type
- Weighting-based causal estimator
- Family
- Quasi-experimental / causal inference
What does it do?
Machine learning-augmented entropy balancing (ML-EB) combines entropy balancing, a reweighting method for observational studies with a binary treatment, with a machine-learning model of the outcome.
The sources in this entry show that entropy balancing is doubly robust when the outcome and treatment models are linear and logistic; ML-EB extends the idea by letting the outcome model be flexible, which can matter when covariate effects are nonlinear or numerous. Whether the same double-robustness holds for a machine-learning outcome model depends on conditions that the cited sources do not establish.
The intuition behind the method
Entropy balancing chooses weights for control units so that their covariate moments match those of the treated group. ML-EB adds a second component: a machine-learning model predicts the outcome from the covariates, and the predictions are used to correct the weighted comparison between groups. The intended logic is that if the weights leave some covariate-related imbalance, the outcome model can absorb part of it, and if the outcome model is poor, the weights still provide balance. This is the reason the method is described as doubly robust. The guarantee is conditional: at least one component must be adequately specified, and the cited sources establish this only for linear outcome and logistic propensity models.
History
Hainmueller (2012) introduced entropy balancing as a preprocessing method that finds control-unit weights satisfying exact covariate moment constraints through a maximum-entropy reweighting scheme. Zhao and Percival showed that entropy balancing is doubly robust with respect to linear outcome regression and logistic propensity score regression, and that it reaches the semiparametric variance bound when both models are correctly specified. The machine-learning augmentation is a later extension of this framework and is not attributed to a particular author on this page.
When to use it
Choose ML-EB when you have observational data with a binary treatment, a set of pre-treatment covariates that plausibly contain the confounders, and a target of the effect on the treated, because the weights are built to match the treated group. It is most relevant when the covariate set is large or the relationship between covariates and the outcome may be nonlinear, cases in which a single linear outcome model or a propensity model is hard to specify. The method relies on unconfoundedness given the chosen covariates, on overlap between the treated and control covariate distributions so that suitable control weights exist, on the stable unit treatment value assumption (no interference between units and a single version of the treatment), and on the constrained moments capturing the functions of covariates that drive both treatment and outcome. The sample should be large enough for both the weights and the flexible outcome model to be estimated with reasonable precision; with a small sample, a simpler weighting or regression estimator is usually easier to defend. Do not use it for a multi-valued or continuous treatment without an appropriate generalisation, or when unmeasured confounding is a serious concern, because reweighting cannot remove confounding from variables that were not measured.
Limitations and considerations
- The method only balances the moments that are specified in advance; higher-order moments or interactions must be added by hand, and adding many constraints can make the optimisation infeasible when there are few control units.
- The ML outcome model and cross-fitting add computational and implementation effort compared with inverse-probability weighting or a regression adjustment.
- Like all observational methods, validity rests on unconfoundedness: unmeasured confounders bias the estimate whichever weighting or outcome model is used.
- Variance estimation by bootstrap can be slow on large datasets, since the weights and the outcome model must be re-estimated in every replicate.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Under the conditions shown by Zhao and Percival, the estimate remains consistent if either the balancing weights or the outcome model is correctly specified. They establish this for entropy balancing with a linear outcome regression and a logistic propensity model; for a flexible machine-learning outcome model the guarantee is not established by the cited sources.
- Exact balance on the chosen covariate moments comes from the optimisation itself, so balance does not depend on repeated checking and re-fitting of a propensity model.
- The outcome model can capture nonlinear and interaction effects that a linear regression adjustment would miss.
- Cross-fitting, a common practice in double machine learning, lets the outcome model be flexible while keeping its predictions for the correction term separate from the units it was trained on.
Applications
- Illustrative use: estimating the effect of a job-training programme on earnings with administrative data that contain many demographic and labour-market history variables.
- Illustrative use: evaluating a firm-level technology adoption on productivity when adoption depends on many observable firm characteristics.
- Illustrative use: assessing the effect of an institutional change on turnout with a large set of socio-economic covariates.
- Illustrative use: comparing outcomes for patients who received a treatment, using rich electronic health record covariates that may have nonlinear relationships with the outcome.
- Illustrative use: evaluating an education intervention by balancing students on detailed prior achievement and demographic profiles.
How it works
How it works
Entropy balancing chooses non-negative weights for the control units so that each weighted covariate moment in the control group equals the corresponding moment in the treated group. The weights solve an entropy-based optimisation problem (the maximum-entropy reweighting described by Hainmueller), so exact balance on the specified moments is obtained directly rather than through repeated trimming or re-fitting of a propensity model. Only the moments included in the constraints are guaranteed to balance.
Formula
\min_{w} H(w) = \sum_i w_i \log(w_i) \quad \text{s.t.} \sum_i w_i c_r(X_i) = m_r,\; w_i \ge 0A flexible learner is fitted on the control units to estimate the conditional mean outcome given covariates, which is the function written as mu-hat in the mechanics block. Cross-fitting (sample splitting) is a common practice in double machine learning: each unit's prediction comes from a model not trained on that unit, which keeps the correction term from being distorted by overfitting. It is advisable here when the outcome model is flexible.
Formula
\hat{\mu}(x) = \hat{E}[Y \mid X = x,\, D = 0]The estimate is the weighted mean of treated outcomes minus a correction term built from the outcome model's predictions. The mechanics block gives one form of the correction, but the cited sources do not derive this augmented form, so the weighting of the correction terms should be checked against a derivation before implementation. The double-robustness property is established in the sources only for linear outcome and logistic propensity models; extending it to a general machine-learning outcome model requires separate support.
Formula
\hat{\tau}_{\text{ML-EB}} = \sum_{i: D_i=1} w_i Y_i - \left( \sum_{i: D_i=1} w_i \hat{\mu}(X_i) - \sum_{i: D_i=0} \hat{\mu}(X_i) \right)A closed-form variance for the augmented estimator is not provided here. A practical option is the bootstrap, re-running the full pipeline (weights, outcome model and augmentation) in each replicate so that uncertainty from both steps is captured. Ignoring the joint uncertainty of the two steps can understate standard errors.
Common pitfalls
- Balancing only means can leave substantial imbalance on nonlinear terms or interactions; check post-weighting balance on the moments that matter for the outcome, not only on the constrained means.
- Fitting the outcome model and computing the augmentation on the same sample can bias the correction term. Cross-fitting is a common remedy in double machine learning and is advisable when the outcome model is flexible.
- Reading 'doubly robust' as a guarantee of correctness: the estimate is consistent only if at least one component is correctly specified, and if both are poorly specified the bias is not removed. For this method the sources establish the property only for linear outcome and logistic propensity models.
- Ignoring covariate overlap: entropy balancing can assign very large weights to a few control units that differ markedly from the treated group, which inflates variance and makes the estimate sensitive to those units.
- Applying the method to a continuous or multi-valued treatment without a generalised balancing scheme breaks the two-group moment-matching constraints on which the weights are built.
Frequently asked questions
How does ML-EB differ from standard entropy balancing?
Standard entropy balancing reweights control units to match treated-group covariate moments. ML-EB adds a correction based on a flexible machine-learning outcome model, in place of a linear one. Zhao and Percival show that entropy balancing is doubly robust with respect to linear outcome regression and logistic propensity regression; whether the ML-EB estimator keeps this property for flexible learners depends on conditions the cited sources do not establish.
What does 'doubly robust' mean in this context?
An estimator is doubly robust if it remains consistent when either of two nuisance models is correctly specified. In ML-EB the two components are the entropy-balancing weights and the outcome model. If at least one is correct, the estimate converges to the target effect as the sample grows, but if both are poorly specified there is no such guarantee. The cited sources establish this for linear outcome and logistic propensity models.
Why is cross-fitting used?
Cross-fitting (sample splitting) evaluates the outcome model's predictions on units that were not used to train it. Training and predicting on the same units can make the predictions too close to the observed outcomes, which distorts the correction term. It is a common practice in the double machine-learning literature and is advisable when the outcome model is flexible.
What if I cannot balance all covariate moments exactly?
The entropy-balancing optimisation can become infeasible when many high-order constraints are imposed with few control units. In practice, constrain means and, where theoretically important, second moments or key interactions. The outcome model can absorb some outcome-relevant imbalance, but it does not restore covariate balance, so balance should still be checked after weighting.
Which machine-learning algorithms are suitable for the outcome model?
Common candidates include gradient-boosted trees, lasso and elastic net, random forests and ensembles. No single learner is recommended here. Choose among candidates using out-of-sample predictive performance, and be cautious with very flexible learners when the sample is small, since their estimation error can offset the benefit of the correction.
Related methods
Sources
Hainmueller, J. (2012). Entropy balancing for causal effects: A multivariate reweighting method to produce balanced samples in observational studies. Political Analysis, 20(1), 25-46.
Open DOI referenceZhao, Q., & Percival, D. (2017). Entropy balancing is doubly robust. Journal of Causal Inference, 5(1), 20160010.
Open DOI reference