Metric embedding for kernel classification rules

Bharath K. Sriperumbudur, Omer A. Lang, Gert R. G. LanckrietICML 2008

Introduction

This paper introduces a method to simultaneously learn the optimal bandwidth and a data-dependent distance metric for kernel-based classification. By embedding data into a Euclidean space using Reproducing Kernel Hilbert Spaces (RKHS) and solving a semidefinite program, the authors create a classification rule that matches or exceeds the performance of state-of-the-art distance metric learning algorithms.

The Challenge of Kernel Classification

In nonparametric statistics, "kernel classification" (or Parzen windowing) is a classic technique. It classifies a point based on a weighted majority vote of its neighbors, where the weights are determined by a "smoothing kernel."

However, two major hurdles limit its effectiveness:

  1. Bandwidth Selection: The "width" ($h$) of the kernel determines how many neighbors influence the decision. Pick a value too small, and the model overfits; too large, and it blurs the class boundaries.
  2. The Distance Metric: Standard kernels rely on Euclidean distance. But for complex data (like images or manifolds), Euclidean distance is often a poor measure of similarity.

While researchers have previously looked at learning distance metrics for $k$-Nearest Neighbor ($k$-NN) classifiers, doing so for kernel rules—especially while jointly optimizing the bandwidth—remains a significant challenge.

Proposed Method: Kernel Classification Rule (KCR)

The authors propose a framework called Kernel Classification Rule (KCR) learning. Their approach involves several key steps:

  • Metric Embedding: Instead of just learning a matrix for a Mahalanobis distance, they learn a function $\phi$ that embeds the data into a Euclidean space. By restricting this function to an RKHS, they can use the "Representer Theorem" to simplify a complex functional optimization problem into a finite-dimensional one.
  • Minimizing Error Bounds: Directly minimizing classification error is NP-hard because the loss function is a step function (non-differentiable). The authors replace this with a convex upper bound (similar to the hinge loss used in SVMs) on the "resubstitution error" (error on the training set).
  • Semidefinite Programming (SDP): For the "naïve kernel" (which gives equal weight to all points within a radius $h$), the optimization problem transforms into a Semidefinite Program.
  • Optimization Algorithm: Since standard SDP solvers scale poorly ($O(n^6)$), the authors developed a specialized Gradient Projection Algorithm that uses alternating projections to handle the constraints more efficiently.

Key Insights

  • Joint Optimization: The bandwidth ($h$) and the distance metric ($\Sigma$) are deeply coupled. By treating them as part of the same optimization problem, the model can find a global structure where the kernel radius perfectly matches the density of the embedded data.
  • Kernel vs. Kernel: The paper clarifies a common point of confusion: the smoothing kernel used for classification is not the same as the reproducing kernel used for the embedding. One defines the "vote," while the other defines the "space."
  • Relationship to $k$-NN: With a naïve kernel, their rule is essentially a variation of the $k$-nearest neighbor rule, but with a "soft" $k$ that can vary across the data space.

Experimental Results

The authors evaluated their method on four classic benchmark datasets from the UCI Machine Learning Repository: Balance, Ionosphere, Iris, and Wine. The KCR method was compared against several heavyweights, including LMNN (Large Margin Nearest Neighbor) and KMLCC (Kernel Metric Learning by Collapsing Classes).

Classification error rates across datasets
  • Accuracy: As shown in the results table, KCR achieved the lowest test error on the Balance, Iris, and Wine datasets. On the Ionosphere dataset, it performed competitively, nearly matching the best-performing algorithm (KLMCA).
2D projections of learned metrics
  • Visualization: 2D projections of the learned metrics demonstrate that KCR is highly effective at collapsing classes into tight clusters while pushing different classes apart. This creates much cleaner decision boundaries than standard $k$-NN.

Limitations and Future Work

  • Scalability: While the Gradient Projection Algorithm is faster than generic SDP solvers, it still involves operations that scale with the square or cube of the number of training points ($n$). This makes it difficult to apply to massive datasets without further approximation.
  • Theoretical Guarantees: The authors note that while the empirical results are strong, formal theoretical guarantees for the consistency of this specific learned rule are a goal for future research.
  • Extension to Large-Scale: Future work will focus on extending the method to handle larger datasets, possibly by using sparse approximations of the kernel matrix.

Summary updated

BibTeX
@inproceedings{sriperumbudur2008metric,
  author = {Bharath K. Sriperumbudur and Omer A. Lang and Gert R. G. Lanckriet},
  title = {{Metric embedding for kernel classification rules}},
  booktitle = {International Conference on Machine Learning},
  year = {2008},
  doi = {10.1145/1390156.1390283},
}
Figure