NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Matched Machine Learning: A Generalized Framework for Treatment Effect Inference With Learned Metrics

Marco Morucci, Cynthia Rudin, Alexander VolfovskyarXiv 2023 · DOI

Abstract

We introduce Matched Machine Learning, a framework that combines the flexibility of machine learning black boxes with the interpretability of matching, a longstanding tool in observational causal inference. Interpretability is paramount in many high-stakes application of causal inference. Current tools for nonparametric estimation of both average and individualized treatment effects are black-boxes that do not allow for human auditing of estimates. Our framework uses machine learning to learn an optimal metric for matching units and estimating outcomes, thus achieving the performance of machine learning black-boxes, while being interpretable. Our general framework encompasses several published works as special cases. We provide asymptotic inference theory for our proposed framework, enabling users to construct approximate confidence intervals around estimates of both individualized and average treatment effects. We show empirically that instances of Matched Machine Learning perform on par with black-box machine learning methods and better than existing matching methods for similar problems. Finally, in our application we show how Matched Machine Learning can be used to perform causal inference even when covariate data are highly complex: we study an image dataset, and produce high quality matches and estimates of treatment effects.

Introduction

In observational causal inference, researchers aim to estimate the effect of a treatment (e.g., a medical intervention) when randomized controlled trials are unavailable. Traditionally, matching has been the preferred tool for this task. By finding a "control" unit that closely resembles a "treated" unit, researchers can estimate what would have happened in the absence of treatment. The primary advantage of matching is its auditability: a human expert can inspect the matched pairs and verify that the comparison is valid.

However, as datasets grow in complexity and dimensionality, traditional matching methods often struggle to find good matches. This has led to the rise of "black-box" machine learning (ML) models, such as Causal Forests or Neural Networks, which offer superior predictive accuracy but lack transparency. In high-stakes fields like medicine or public policy, this lack of interpretability is a significant barrier. Matched Machine Learning (M-ML) bridges this gap by using ML to learn an optimal distance metric for matching, providing state-of-the-art accuracy while remaining fully auditable.

The Matched Machine Learning Framework

The M-ML framework operates in three distinct stages:

  1. Representation Learning: A "black-box" ML model (e.g., a Random Forest, Gradient Boosted Tree, or CNN) is trained on a subset of the data to learn a representation function, $\phi(\mathbf{x})$. This function maps complex, high-dimensional raw data into a lower-dimensional feature space where units are considered "close" if their predicted outcomes are similar.
  2. Matching: In the remaining data, the black-box model is discarded. Instead, the learned representation $\phi(\mathbf{x})$ is used to find matches. Units are paired if they are close in the learned feature space, typically using a fixed "caliper" distance or K-Nearest Neighbors.
  3. Estimation: The treatment effect is calculated by averaging the outcomes of the matched groups. This simple averaging ensures that the final estimate is transparent and can be traced back to specific, human-inspectable matched units.

A Unified View of Matching

A key contribution of this work is demonstrating that M-ML is a generalized framework that encompasses many existing matching techniques. By varying the choice of the representation function $\phi$ and the distance metric $q$, researchers can recover classical methods or develop new, more powerful ones.

Table 1: Comparison of various matching methods as special cases of the Matched Machine Learning framework.

As shown in Table 1, methods ranging from Propensity Score Matching to more modern approaches like MALTS can be viewed as specific instances of the M-ML framework. This unification allows for a more systematic study of matching properties and the development of the Matched Double Machine Learning (M-DML) estimator, which ensures that average treatment effect estimates are $\sqrt{n}$-consistent and asymptotically normal.

Empirical Evaluation and Real-World Application

The authors evaluated M-ML across simulated environments and a complex real-world image dataset:

  • Simulations: In tests mimicking nonlinear and piecewise relationships, M-ML performed on par with or better than pure black-box methods like Bayesian Additive Regression Trees (BART). Crucially, M-ML provided more robust confidence interval coverage than Causal Forests, which often produced intervals that were too narrow.
  • Instagram Image Study: To demonstrate the framework's flexibility, the authors analyzed 1,677 image posts from food brands to see if brand responsiveness to comments increased future engagement. By using a Variational Autoencoder (VAE) as the representation function $\phi$, they matched posts based on visual content. This allowed for visual verification—ensuring, for example, that a photo of a pasta dish was matched with a visually similar pasta dish—leading to a more credible estimate of a 44% increase in future engagement.

Conclusion

Matched Machine Learning offers a path forward for causal inference in the age of big data. It provides "auditability for free," allowing researchers to leverage the power of modern ML without sacrificing the transparency required for high-stakes decision-making. While currently focused on discrete treatments, future work aims to extend this framework to continuous treatment regimes and further refine the theoretical bounds for first-stage ML models.

Summary updated

BibTeX
@misc{morucci2023matched,
  author = {Marco Morucci and Cynthia Rudin and Alexander Volfovsky},
  title = {{Matched Machine Learning: A Generalized Framework for Treatment Effect Inference With Learned Metrics}},
  year = {2023},
  eprint = {2304.01316},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.01316},
}
Figure