Machine Learning-Augmented Coarsened Exact Matching (ML-CEM)

Statistics
Introduced by
Extension of Iacus, King & Porro (2012) CEM; ML integration developed in subsequent causal ML literature
Year
2012-2019
Type
Matching / quasi-experimental
Family
Quasi-experimental / causal inference

What does it do?

ML-augmented Coarsened Exact Matching (ML-CEM) is a variant of Coarsened Exact Matching (CEM; Iacus, King & Porro, 2012) in which a supervised learning algorithm, rather than the analyst, proposes the cutpoints used to coarsen continuous or ordinal covariates.

Matching then proceeds as in CEM: treated and control units are compared only within strata whose coarsened covariate values are identical, and units in strata lacking either treated or control units are pruned. The aim is to reduce analyst discretion in choosing bins. Whether this improves balance relative to manually specified CEM depends on the data and has not been established here.

The intuition behind the method

In standard CEM, the analyst decides how to bin each covariate (for example, age into decades) before matching treated and control units that fall in identical bins. Different cutpoint choices change how many units are matched and how balanced the matched groups are. ML-CEM delegates the choice of cutpoints to a learning algorithm, such as a regression tree, whose splits suggest where bin boundaries should fall. The grouping of units into strata is then guided by patterns in the data, while the matching itself stays exact within strata.

History

Coarsened Exact Matching was introduced by Iacus, King and Porro in a 2012 Political Analysis article (available online in 2011), which also develops the Monotonic Imbalance Bounding class of matching methods from which CEM is derived. Using machine learning to choose the coarsening is an extension of CEM; no single originating publication is identified on this page.

When to use it

Consider ML-CEM when you have observational data with several continuous or ordinal covariates, you want the exact-within-stratum logic of CEM, and you have no principled basis for choosing bin boundaries. It is likely to be most useful when the sample is large enough that pruning still leaves a substantial matched set, and when the learned coarsening rule can be reported and reproduced. Its benefits relative to manually specified CEM are expected rather than demonstrated, so compare the resulting balance and matched sample with a hand-coarsened CEM. Avoid it when the sample is small, because exact agreement across many coarsened covariates quickly leaves few matches. It is also a poor choice when the audience needs a coarsening rule that can be explained without reference to a learning algorithm. ML-CEM does not address unmeasured confounding.

Limitations and considerations

  • Learned cutpoints are harder to justify substantively than hand-chosen bins, so the coarsening rule may need its own explanation for non-specialist readers.
  • Each added covariate multiplies the number of strata, so with many covariates a large share of units can be pruned; the learner does not prevent this.
  • The learner adds tuning choices, such as tree depth, that change the coarsening and therefore the matched sample.
  • Like all matching estimators, ML-CEM assumes unconfoundedness given the observed covariates and cannot remove bias from unmeasured confounders.
  • Valid standard errors for matching estimators need care, and simple resampling may not be valid.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • The cutpoints come from a stated algorithm and can be re-derived from the same data, which may reduce analyst discretion (an expected benefit not tested here against manual CEM).
  • Keeps CEM's stratum structure, so the matched groups are discrete and can be inspected directly, unlike a single continuous propensity score.
  • The learner can be matched to the data structure: tree-based splits can capture interactions among covariates.
  • Because coarsening is automated, the same rule can be applied to several outcomes or subsamples without re-specifying bins by hand.

Applications

  • Illustrative: estimating treatment effects in public health studies where age, BMI, or biomarker distributions are skewed and hard to bin manually.
  • Illustrative: policy evaluation with administrative records where covariate cutpoints cannot be determined from theory alone.
  • Illustrative: education research comparing program participants to non-participants across several demographic and academic covariates.
  • Illustrative: firm-level intervention studies where financial ratios are skewed and hard to bin by hand.
  • Illustrative: survey-based social science studies with many ordinal and continuous predictors of selection into treatment.

How it works

How it works

1

Each continuous or ordinal covariate X_k is mapped to a small number of categories by a coarsening function C_k(X_k) defined by a set of cutpoints. In standard CEM the analyst specifies these cutpoints. In ML-CEM a data-driven rule supplies them, for example the split points of a decision tree.

Formula
C_k(x) = g \text{ if } c_{k,g-1} < x \le c_{k,g}, \quad g = 1,\dots,G_k
2

A supervised learner, such as a regression tree or random forest, is fitted to the covariates to predict treatment assignment (a propensity-type model). Its split points on each covariate are then used as the cutpoints of C_k in the CEM steps. If an outcome model is used instead, it must be fitted on a separate sample or by cross-fitting, so that the outcome in the estimation sample does not determine the strata.

Formula
\{c_{k,g}\} = \text{split points on } X_k \text{ of a learner } \hat f \text{ fitted to predict } T_i \text{ from } X_i
3

Each unit is assigned the stratum defined by the vector (C_1(X_1), ..., C_K(X_K)). Treated and control units are matched when their strata are identical. Strata containing both treated and control units are retained. No interpolation between strata is performed.

Formula
s(i) = \big(C_1(X_{i1}),\dots,C_K(X_{iK})\big); \quad i \sim j \iff s(i)=s(j)
4

Units in strata that contain no unit from the opposite treatment arm are removed from the analysis. Pruning improves balance on the coarsened covariates at the cost of sample size.

Formula
\text{retain } i \text{ iff } \exists\, j:\ s(j)=s(i),\ T_j \ne T_i
5

The displayed formula is an unweighted matched-control estimator: for each treated unit it takes the difference between its outcome and the mean outcome of its matched controls, and averages over treated units. The CEM estimator of Iacus, King and Porro (2012) instead uses stratum-level weights, so that controls are reweighted to match the number of treated units in each stratum. Say which version you use when reporting results. Inference for matching estimators requires care: a naive bootstrap is not generally valid for matching estimators, so confirm that the variance estimator you use is appropriate for your design.

Formula
\hat{\tau}_{ATT} = \sum_{s} \frac{m_T^{s}}{m_T}\left(\bar Y_T^{s} - \bar Y_C^{s}\right)

Common pitfalls

  • Using the outcome variable to train the coarsening model in the same sample used for estimation, which can introduce overfitting bias; fit the learner on a hold-out sample or use cross-fitting.
  • Accepting pruning-induced sample loss without reporting it; report the fraction pruned and the representativeness of the remaining sample.
  • Treating automated coarsening as a black box; always inspect balance after matching, because the learner's cutpoints do not guarantee balance on every covariate.
  • Choosing an overly flexible learner that fits the coarsening to noise in the training data.
  • Leaving the weighting scheme unstated: unweighted and stratum-weighted estimators can differ when strata contain different numbers of controls.
  • Using a naive bootstrap for standard errors without checking that it is valid for the matching estimator.

Frequently asked questions

How does ML-augmented CEM differ from standard propensity score matching?

Standard propensity score matching collapses all covariates into a single estimated probability score and matches on that scalar. CEM, and its ML variant, instead coarsens each covariate separately and requires exact agreement across all coarsened values within a stratum. This makes covariate balance easier to inspect, and it avoids the risk that balance on the score hides imbalance on individual covariates. Covariate balancing propensity scores (Imai & Ratkovic, 2014) are a different alternative that estimates the score so as to optimise covariate balance directly.

Which ML algorithm should I use for the coarsening step?

Regression trees are a natural choice because their split points translate directly into coarsening cutpoints. Fit the learner to predict treatment assignment. If you use an outcome-based model, fit it on a separate sample or with cross-fitting so the outcome does not shape the strata in the estimation sample. Tune the learner by cross-validation to avoid overfitting.

What happens to units that cannot be matched?

They are pruned. ML-CEM, like standard CEM, discards treated units with no control counterpart in their stratum and control units with no treated counterpart. Always report the fraction pruned and assess whether the matched sample remains representative of your target population.

Can I use ML-CEM with panel data?

This use is not covered by the cited sources. If you combine matched strata with a panel estimator such as difference-in-differences, the parallel-trends assumption of that estimator must hold and be checked separately, along with balance on baseline covariates.

Does ML-CEM eliminate unmeasured confounding?

No. Like all matching estimators, ML-CEM requires the unconfoundedness (ignorability) assumption: conditional on observed covariates, treatment assignment is as good as random. If important confounders are unobserved, no matching method, including ML-augmented variants, can remove the resulting bias.

Related methods

Sources

  1. Iacus, S. M., King, G., & Porro, G. (2012). Causal Inference without Balance Checking: Coarsened Exact Matching. Political Analysis, 20(1), 1-24.

    Open DOI reference
  2. Imai, K., & Ratkovic, M. (2014). Covariate balancing propensity score. Journal of the Royal Statistical Society: Series B, 76(1), 243-263.

    Open DOI reference