Nearest Neighbor Matching as Least Squares Density Ratio Estimation and Riesz Regression
Masahiro Kato
TL;DR
This work unifies nearest-neighbor matching with density-ratio estimation (via LSIF) and with Riesz regression, showing NN matching is an instance of both LSIF and Riesz regression. By deriving the equivalence, the paper enables the transfer of convergence results, kernel choices, and covariate-shift analyses from LSIF and DRE literature to NN matching, and it demonstrates that inverse propensity weights can be naturally obtained within this LSIF/Riesz framework. The bias-corrected NN estimator is cast as a linear-model debiasing step, linking NN methods to automatic debiased machine learning and providing a constructive bridge to covariate balancing and TMLE. Overall, the results explain why increasing the neighbor count $M$ can improve efficiency and clarify the computational advantages of NN-based methods within a principled, density-ratio–driven paradigm.
Abstract
This study proves that Nearest Neighbor (NN) matching can be interpreted as an instance of Riesz regression for automatic debiased machine learning. Lin et al. (2023) shows that NN matching is an instance of density-ratio estimation with their new density-ratio estimator. Chernozhukov et al. (2024) develops Riesz regression for automatic debiased machine learning, which directly estimates the Riesz representer (or equivalently, the bias-correction term) by minimizing the mean squared error. In this study, we first prove that the density-ratio estimation method proposed in Lin et al. (2023) is essentially equivalent to Least-Squares Importance Fitting (LSIF) proposed in Kanamori et al. (2009) for direct density-ratio estimation. Furthermore, we derive Riesz regression using the LSIF framework. Based on these results, we derive NN matching from Riesz regression. This study is based on our work Kato (2025a) and Kato (2025b).
