Nearest Neighbor Matching as Least Squares Density Ratio Estimation and Riesz Regression

Nearest neighbor matching is a classical way to estimate treatment effects from observational data. Taking as its starting point the result of Lin and coauthors that matching is a form of density-ratio estimation, this study shows that nearest neighbor matching can be written as one implementation of the Riesz regression covered on the Generalized Riesz Regression page.

The problem

For a given unit, nearest neighbor matching finds several units in the opposite treatment group whose covariates are close, and fills in the unobserved potential outcome with the average of their outcomes. It is simple to implement and easy to interpret. Its statistical properties, though, have been worked out in a literature separate from density-ratio estimation and debiased machine learning. Lin and coauthors joined the two by deriving nearest neighbor matching from density-ratio estimation, but it was still unclear which existing method their density-ratio estimator corresponds to, and how it connects to debiased machine learning, which estimates the correction term directly.

The proposed method

Two equivalences carry the argument. The density-ratio estimator of Lin and coauthors turns out to be essentially the LSIF (least-squares importance fitting) of Kanamori and coauthors, which estimates a density ratio directly by minimizing squared error, run with a particular kernel. Riesz regression, in turn, can be derived from the LSIF formulation. Put the two together and nearest neighbor matching follows from Riesz regression.

Main results and conditions

The correspondence yields two things. Established results for LSIF, such as how the kernel can be swapped and what convergence rates hold, carry over to nearest neighbor matching as they stand. It also shows how far the LSIF and Riesz regression formulations reach, since a method of quite different origin turns out to fit inside them. The argument rests on assumptions that are standard in observational studies. Conditioning on the covariates makes treatment independent of the potential outcomes, which is unconfoundedness, and the propensity score stays away from 0 and 1. Boundedness of the variables is assumed as well, only to keep the argument simple.

Relation to earlier work

Abadie and Imbens studied the large-sample properties of matching estimators (2006, Large Sample Properties of Matching Estimators for Average Treatment Effects). Lin, Ding, and Han showed that the density ratio can be estimated from how often a unit is matched, which recasts nearest neighbor matching from the density-ratio side (2023, Estimation Based on Nearest Neighbor Matching: From Density Ratio to Average Treatment Effect). LSIF, which estimates a density ratio directly by minimizing squared error, is due to Kanamori, Hido, and Sugiyama (2009, A Least-squares Approach to Direct Importance Estimation). Riesz regression, which estimates the Riesz representer that serves as the correction term, was proposed by Chernozhukov and coauthors (2024, Automatic Debiased Machine Learning via Riesz Regression). This study explains these separately developed lines as one estimation problem.

Where it applies

Where matching has been the tool for estimating effects, the behavior of the estimator can now be reread through the theory of density-ratio estimation. Routes to improvement sit inside the same formulation, whether that means changing the choice of kernel or switching to a Riesz regression implementation.

Paper and materials

BibTeX

@misc{nearest-neighbor-matching-riesz-regression,
  author       = {Masahiro Kato},
  title        = {Nearest Neighbor Matching as Least Squares Density Ratio Estimation and Riesz Regression},
  year         = {2025},
  eprint       = {2510.24433},
  archivePrefix = {arXiv},
  url          = {https://arxiv.org/abs/2510.24433},
}

Related topics

Published: 22 July 2026. Last checked: 22 July 2026.