Abstract
The weighted nearest neighbors (WNN) estimator is a popular and flexible nonparametric tool for mean regression. Bagging 1-nearest neighbor estimators provides a smooth weighting scheme, referred to here as Distributional Nearest Neighbors (DNN). However, DNN suffers from suboptimal convergence rates when the regression function exhibits higher-order smoothness, primarily due to inherent bias. This work introduces the Two-Scale DNN (TDNN) estimator, which reduces bias by linearly combining two DNN estimators with different subsampling scales. We prove that TDNN achieves the optimal nonparametric convergence rate under fourth-order smoothness conditions and establish asymptotic normality for both DNN and TDNN. Furthermore, we provide consistent variance estimators using jackknife and bootstrap techniques, enabling valid statistical inference and confidence interval construction for heterogeneous treatment effects (HTE).
Introduction
In nonparametric regression, $k$-nearest neighbors ($k$-NN) and weighted nearest neighbors (WNN) are standard tools. A popular variant is the bagged 1-NN estimator, or Distributional Nearest Neighbors (DNN). DNN is valued for its simplicity; it automatically assigns smooth, monotonic weights to neighbors by averaging 1-NN predictions across many random subsamples of the data.
However, DNN has historically faced two major flaws. First, if the underlying true function is highly smooth (e.g., fourth-order smoothness), DNN fails to achieve the mathematically optimal rate of convergence because its bias shrinks too slowly. Second, there has been a lack of asymptotic distribution theory for DNN. Without knowing the distribution of the estimator, researchers cannot easily construct valid confidence intervals or perform rigorous statistical inference—a significant roadblock for applications like causal inference.
Methodology: The Two-Scale Approach
To address these limitations, we propose the Two-Scale Distributional Nearest Neighbors (TDNN) estimator. The approach relies on a strategic mathematical framework designed to isolate and eliminate bias.
Bias Expansion and Cancellation
We mathematically prove the exact asymptotic expansion of the DNN's bias, showing that the leading bias term depends predictably on the subsampling scale $s$. Because the bias is a function of $s$, we compute two separate DNN estimators using two different subsampling scales ($s_1$ and $s_2$). By taking a specific linear combination of these two estimators, the leading-order bias terms perfectly cancel each other out.
This process naturally dictates that one of the two DNN estimators in the linear combination receives a negative weight. Consequently, TDNN assigns negative weights to some distant neighbors. While counterintuitive, allowing negative weights is a known requirement in nonparametric theory to achieve optimal convergence rates for highly smooth functions. TDNN provides a practical, automated way to assign them.
Asymptotic Normality and Inference
To enable statistical inference, we prove that TDNN is asymptotically normal as the subsampling scales and sample size diverge. Because the theoretical variance is too complex to compute directly, we developed and proved the consistency of both Jackknife and Bootstrap estimators to approximate the variance in practice. This allows for the construction of valid confidence intervals for the regression function.
Key Results
Theoretical Optimality
Under fourth-order smoothness conditions, TDNN achieves the minimax optimal convergence rate, overcoming the theoretical limits of standard DNN. This is achieved by representing the estimator as an infinite-order U-statistic and applying Hoeffding’s canonical decomposition to analyze its properties.
Empirical Performance
- Simulation Studies: In synthetic datasets utilizing both Gaussian and Uniform covariate designs, TDNN reduced the minimum Mean Squared Error (MSE) by over 45% compared to the single-scale DNN, primarily by mitigating finite-sample bias.
- Real-world Data: On the UCI Abalone dataset (predicting the age of an abalone based on physical measurements), TDNN outperformed standard $k$-NN, DNN, and even Random Forests in terms of predictive MSE.
- HTE Inference: In causal inference simulations, TDNN provided lower MSEs for treatment effect estimation and yielded valid confidence intervals with tighter, more accurate coverage compared to $k$-NN and DNN.
Limitations and Future Work
While TDNN offers significant improvements, it is still subject to the curse of dimensionality. Like all nearest-neighbor methods, the convergence rate slows as the number of features increases. While feature screening and Principal Component Analysis (PCA) can mitigate this, it remains a fundamental constraint.
Furthermore, while TDNN corrects bias for 4th-order smooth functions, even smoother functions might require a "multi-scale" DNN using three or more scales. Future research will also look toward extending TDNN to non-i.i.d. data, such as time series or survival data, and exploring distance metrics beyond Euclidean distance to better suit specific data manifolds.
Summary updated