Generative Local Metric Learning for Kernel Regression

Yung-Kyun Noh, Masashi Sugiyama, Kee-Eung Kim, Frank C. Park, Daniel D. Lee

Introduction: The Pitfalls of Standard Kernel Regression

Kernel regression, particularly the Nadaraya-Watson (NW) estimator, is a foundational non-parametric method that predicts values by taking a weighted average of nearby training samples. While theoretically elegant, it encounters two significant hurdles in practice:

  1. The Curse of Dimensionality: In high-dimensional spaces, the concept of "nearby" breaks down. Points become increasingly sparse, making local averages unreliable.
  2. Finite Sample Bias: With limited data, the estimator suffers from bias, particularly along directions where the target variable or the underlying data density changes rapidly.

Standard interventions, such as bandwidth selection (adjusting the overall size of the kernel), often fail because they do not account for the shape of the data distribution. Alternative methods like Locally Linear Regression (LLR) attempt to correct this but are highly prone to overfitting when dealing with numerous features.

The Solution: Generative Local Metric Learning

To overcome these limitations, researchers propose Generative Local Metric Learning. The core innovation is moving away from standard "isotropic" kernels (perfect spheres) and instead utilizing "Mahalanobis" kernels (stretched ellipsoids) that are custom-tailored for every query point.

Mahalanobis kernels adapt their shape and orientation to the local gradient, unlike standard isotropic kernels.

The methodology relies on several key steps:

  • Bias Analysis: The authors derive a formula demonstrating that NW bias is fundamentally dependent on the gradients of both the data density $p(x)$ and the target function $y(x)$.
  • The "Zero-Bias" Metric: They mathematically prove that for Gaussian-distributed data, there always exists a specific metric matrix $A$ capable of eliminating the leading-order bias.
  • Global-to-Local Strategy: Estimating gradients using only a few local neighbors is notoriously noisy in high dimensions. Instead, the authors fit a global Gaussian generative model to the entire dataset. They then use this global model's parameters to analytically calculate stable gradients at any specific local point.
  • Efficient Computation: Finding the optimal metric for a $D$-dimensional space might sound computationally prohibitive. However, the authors show this reduces to solving a simple 2x2 eigenvector problem based on the two directions spanned by the density and target gradients.

Key Insights: Reshaping vs. Resizing

A major takeaway from this research is that bias is the real enemy in high-dimensional spaces. Reducing bias is far more critical for overall accuracy (Mean Square Error, or MSE) than reducing variance.

Most traditional research focuses on how large a kernel should be (bandwidth resizing). This paper demonstrates that the orientation and shape (the metric) of the kernel is a much more powerful lever for performance. By using rough global information to provide a stable "skeleton," the local estimators can effectively ignore high-dimensional noise.

Applying the learned metric yields a consistently lower Mean Square Error (MSE) that is highly robust to bandwidth selection, compared to the standard approach.

Datasets and Results

The proposed method (NW+GMetric) was rigorously evaluated across a wide variety of benchmarks, including synthetic Gaussian data, Delve datasets (Abalone, Bank-8fm, CPU), and numerous UCI/KEEL datasets ranging from dozens of features to tens of thousands of samples.

  • Superior Performance: NW+GMetric achieved the best or near-best performance on 11 out of 14 real-world datasets.
  • Robustness to Non-Gaussianity: Even though the optimal metric is derived using a Gaussian assumption, it significantly reduced MSE on datasets that are clearly non-Gaussian (such as the "Slice" and "Naval" datasets), succeeding where purely linear global models failed.
  • Efficiency: Because the metric calculation ultimately involves a 2x2 matrix regardless of the input dimensionality, the method remains highly computationally feasible for high-dimensional problems.

Limitations and Future Work

While highly effective, the approach does have limitations. The underlying mathematics rely on a single Gaussian generative model. For highly complex, multi-modal data distributions, a single Gaussian might be too blunt of an instrument. Additionally, the metric $A$ must be calculated for every new query point, adding overhead compared to fixed-metric approaches.

Future work may explore integrating more sophisticated generative models—such as Gaussian Mixture Models or Variational Autoencoders—to derive even more accurate local metrics for highly non-linear data landscapes.

Summary updated

BibTeX
@inproceedings{noh2017generative,
  author = {Yung-Kyun Noh and Masashi Sugiyama and Kee-Eung Kim and Frank C. Park and Daniel D. Lee},
  title = {{Generative Local Metric Learning for Kernel Regression}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
}
Figure