A Non-Bipartite Matching Framework for Difference-in-Differences with General Treatment Types

Siyu Heng, Yuan Huang, Hyunseung KangarXiv 2025 · DOI

This technical note introduces a robust new way to handle one of the most common "what-if" scenarios in data science and economics: Difference-in-Differences (DID) with continuous or multi-valued treatments.

TL;DR

Researchers have developed a non-bipartite matching framework that extends Difference-in-Differences (DID) to any treatment type—binary, ordinal, or continuous. By moving away from parametric models and the rare requirement for "stayers" (units with no treatment change), this method provides a nonparametric, design-based approach to causal inference that is valid even in small, finite populations.

What Problem Does This Paper Address?

Difference-in-Differences is a workhorse of causal inference, used to estimate the effect of a "treatment" (like a new policy) by comparing changes over time between a treated group and a control group. However, standard DID has a major limitation: it’s built for binary (yes/no) treatments.

When the treatment is a "dose"—like the amount of a subsidy or the intensity of a medical intervention—researchers usually do one of two things:

  1. Dichotomize: They turn the dose into a binary "high vs. low" split. This throws away valuable information and often leads to biased results.
  2. Parametric Modeling: They assume a linear relationship between dose and outcome. If the real world is non-linear, the model fails.

Furthermore, many existing methods for continuous DID rely on "stayers"—units whose treatment level doesn't change at all over time. In many real-world datasets (like tracking all 50 U.S. states), finding "stayers" is nearly impossible. This paper aims to solve DID for general treatments without needing stayers or rigid linear models.

Methods

The authors propose a Non-Bipartite Matching framework. Unlike traditional matching (bipartite), which forces you to match a "treated" unit to a "control" unit, non-bipartite matching allows any unit to be matched with any other unit to form a pair.

The core of the method involves two steps:

  • Optimal Matching Design: The algorithm partitions the study units into pairs. It uses a specialized distance metric to ensure that matched pairs are (1) very similar in their baseline characteristics (to reduce bias) but (2) as different as possible in their treatment "trajectories" over time (to maximize the signal).
  • The DID Ratio Estimand: Instead of a simple difference, they introduce the sample average DID ratio. This measures the rate of change in outcomes relative to the change in treatment dose across the matched pairs.

Crucially, the framework is design-based. It doesn't assume the data comes from some infinite "super-population." Instead, it treats the observed units as the entire population of interest and focuses on the randomness of how treatment trajectories were assigned within the matched pairs.

Datasets

The paper evaluates the framework using a simulated dataset of $N = 2,000$ independent units.

  • Complexity: The simulation includes non-linear terms (trigonometric and exponential functions) for covariates and unobserved confounders to mimic the messiness of real-world observational data.
  • Comparison: The authors compare their new estimator against a "Dichotomized DID" (splitting at the median) and a "Parametric DID" (linear regression).

The authors note that real-world data applications and further simulation studies are currently in progress as part of this ongoing research.

Key Insights and Ideas

  • Ditching the "Stayer" Requirement: You don't need units with zero change to establish a baseline. You just need units that changed differently. By matching units with different trajectories, the framework extracts causal signals from the entire dataset.
  • Preserving the Dose: By using the full treatment-dose information rather than coarsening it into categories, the method avoids the "suboptimal covariate balance" that often plagues dichotomized studies.
  • Design-Based "Parallel Trends": The authors establish a "post-matching randomization condition." This is the design-based equivalent of the famous "parallel trends" assumption, providing a rigorous mathematical foundation for inference without needing outcome distribution models.

Key Results

The simulation results demonstrate a massive reduction in bias compared to traditional workarounds:

  • Bias Reduction: Across various effect sizes ($\beta = 1.5$ to $3.0$), the proposed DID Ratio estimator maintained a very low bias (around 0.05–0.06).
  • Failure of Alternatives: The Dichotomized DID performed poorly, with bias ranging from 4.27 to 7.49. Even the Parametric DID, which is more sophisticated, showed significantly higher bias (0.37–0.38) because it couldn't handle the non-linear relationships in the data.
  • Robustness: The DID Ratio remained valid even when the underlying causal effects were heterogeneous or non-linear, where the other two methods didn't even have a well-defined causal target.

Limitations and Future Work

As this is a "technical note" reporting preliminary results, there are a few areas for expansion:

  • Multiple Time Periods: The current formulation focuses on two time periods (before and after). While the authors mention it can be naturally extended to multiple periods, the detailed math for that is not the focus here.
  • Real-World Validation: While the simulation is promising, the paper does not yet include a case study using real-world observational data (though the authors state this is currently in progress).
  • Computational Complexity: Optimal non-bipartite matching can be computationally intensive for extremely large datasets, though the use of Derigs’ algorithm helps mitigate this.

Summary updated

BibTeX
@misc{heng2025non,
  author = {Siyu Heng and Yuan Huang and Hyunseung Kang},
  title = {{A Non-Bipartite Matching Framework for Difference-in-Differences with General Treatment Types}},
  year = {2025},
  eprint = {2511.21973},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.21973},
  howpublished = {arXiv},
}
Figure