# FLAME: A Fast Large-scale Almost Matching Exactly Approach to Causal Inference

arXiv: https://arxiv.org/abs/1707.06315 · HTML: https://mlsanity.com/paper/1707.06315/

## Key facts

- Cited by 16 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 19 Jul 2017.

## Built on by (most cited first, 16 of 16)

- [Interpretable Machine Learning: Fundamental Principles and 10 Grand Challenges](https://mlsanity.com/paper/2103.11251/) (2021)
- [Counterfactuals and Causability in Explainable Artificial Intelligence: Theory, Algorithms, and Applications](https://mlsanity.com/paper/2103.04244/) (2021)
- [Validating Causal Inference Methods](https://mlsanity.com/paper/2202.04208/) (2022)
- [Neural Score Matching for High-Dimensional Causal Inference](https://mlsanity.com/paper/2203.00554/) (2022)
- [Variable Importance Matching for Causal Inference](https://mlsanity.com/paper/2302.11715/) (2023)
- [Implicitly Guided Design with PropEn: Match your Data to Follow the Gradient](https://mlsanity.com/paper/2405.18075/) (2024)
- [Doubly Robust Kernel Statistics for Testing Distributional Treatment Effects](https://mlsanity.com/paper/2212.04922/) (2022)
- [Estimating causal effects with optimization-based methods: A review and empirical comparison](https://mlsanity.com/paper/2203.00097/) (2022)
- [Matched Machine Learning: A Generalized Framework for Treatment Effect Inference With Learned Metrics](https://mlsanity.com/paper/2304.01316/) (2023)
- [Generalized coarsened confounding for causal effects: a large-sample framework](https://mlsanity.com/paper/2501.03129/) (2025)
- [dame-flame: A Python Library Providing Fast Interpretable Matching for Causal Inference](https://mlsanity.com/paper/2101.01867/) (2021)
- [A Two-Stage Feature Selection Approach for Robust Evaluation of Treatment Effects in High-Dimensional Observational Data](https://mlsanity.com/paper/2111.13800/) (2021)
- [Beyond Flatland: A Geometric Take on Matching Methods for Treatment Effect Estimation](https://mlsanity.com/paper/2409.05459/) (2024)
- [A Two-Stage Interpretable Matching Framework for Causal Inference](https://mlsanity.com/paper/2504.09635/) (2025)
- [Revisiting Broken Windows Theory](https://mlsanity.com/paper/2509.16490/) (2025)
- [A Novel Computational Framework for Causal Inference: Tree-Based Discretization with ILP-Based Matching](https://mlsanity.com/paper/2604.27307/) (2026)

## Abstract (arXiv)

A classical problem in causal inference is that of matching, where treatment units need to be matched to control units based on covariate information. In this work, we propose a method that computes high quality almost-exact matches for high-dimensional categorical datasets. This method, called FLAME (Fast Large-scale Almost Matching Exactly), learns a distance metric for matching using a hold-out training data set. In order to perform matching efficiently for large datasets, FLAME leverages techniques that are natural for query processing in the area of database management, and two implementations of FLAME are provided: the first uses SQL queries and the second uses bit-vector techniques. The algorithm starts by constructing matches of the highest quality (exact matches on all covariates), and successively eliminates variables in order to match exactly on as many variables as possible, while still maintaining interpretable high-quality matches and balance between treatment and control groups. We leverage these high quality matches to estimate conditional average treatment effects (CATEs). Our experiments show that FLAME scales to huge datasets with millions of observations where existing state-of-the-art methods fail, and that it achieves significantly better performance than other matching methods.
