Learning the kernel matrix by resampling

Xiao-Lei ZhangarXiv 2017

Abstract

In this paper, we introduce a new kernel learning method based on a nonparametric density estimator. The estimator consists of an ensemble of k-centroids clusterings. Each clustering randomly selects data points with randomly selected features as its centroids and learns a one-hot encoder via one-nearest-neighbor optimization. This process generates a sparse representation for each data point, from which we construct a nonlinear kernel matrix. A major advantage of this method is its relative insensitivity to free parameters, allowing it to produce high-quality results without exhaustive parameter tuning. In this preliminary study, we apply the generated kernel matrix to spectral clustering. Experimental results demonstrate that our method frequently outperforms the well-tuned Gaussian RBF kernel across diverse datasets.

Introduction

In kernel-based machine learning, such as Spectral Clustering or Support Vector Machines (SVMs), the choice of the kernel function is paramount. The Gaussian Radial Basis Function (RBF) is the standard choice, but it is highly sensitive to its width parameter ($\sigma$). A slight deviation from the optimal $\sigma$ can lead to a collapse in the model's ability to capture data structure. Finding this optimal value typically requires expensive grid searches, which are often impractical in unsupervised settings. This research proposes a simpler, robust kernel construction method that performs well "out of the box."

Methodology

The proposed method constructs a nonlinear kernel matrix through a four-step resampling pipeline:

  1. Random Feature Selection: For each clustering layer, a subset of dimensions is randomly selected from the original feature space.
  2. Random Sampling (Centroids): A fraction of the data points is randomly selected to serve as centroids for that specific layer.
  3. Sparse Representation Learning: Each input data point is assigned to its nearest centroid using one-nearest-neighbor optimization. This creates a "one-hot" indicator vector of length $k$ (the number of centroids).
  4. Kernel Matrix Construction: This process is repeated $V$ times (e.g., $V=400$). The final representation of a data point is the concatenation of these one-hot vectors. The kernel matrix $K$ is then constructed by taking the dot product of these high-dimensional sparse vectors.

Essentially, the similarity between two points is defined by how frequently they are co-clustered across hundreds of random projections and samplings.

Experimental Evaluation

The method was evaluated on 12 diverse datasets, including speech (Isolet1), chemical/biomedical data (Wine, New-Thyroid, Dermatology, Lung-Cancer), and various image sets (COIL20, COIL100, MNIST, USPS, UMIST, Extended-YaleB, ORL). These datasets range in dimensionality from 5 to 12,600 and contain between 3 and 100 classes.

Performance and Robustness

The proposed method was compared against Spectral Clustering using both untuned and optimally tuned Gaussian RBF kernels. As shown in the performance summary, the proposed method (even without tuning) frequently matches or exceeds the performance of the optimal RBF kernel.

Clustering accuracy (ACC) comparison across twelve datasets, highlighting the performance of the proposed method against standard baselines and tuned RBF kernels.

A key finding is the method's parameter insensitivity. While the RBF kernel's performance often peaks sharply at a specific $\sigma$ and drops elsewhere, the proposed method maintains stable performance across a wide range of its sampling parameter.

Accuracy (ACC) comparison between the proposed resampling method and the Gaussian RBF kernel across various datasets and parameter settings, demonstrating the robustness of the resampling approach.

Key Insights

  • Ensemble Wisdom: By aggregating 400 "weak" random clusterings, the method achieves a strong, stable kernel representation, similar to the principle behind Random Forests.
  • Implicit Nonlinearity: The one-hot encoding effectively maps data into a high-dimensional space where simple dot products capture complex nonlinear similarities.
  • Tuning Efficiency: The wide "sweet spot" for the sampling rate $\delta$ (typically 0.6 to 0.8) makes the method highly reliable for real-world applications where ground truth for tuning is unavailable.

Conclusion

This nonparametric resampling approach offers a simple yet powerful alternative to traditional kernel selection. While it introduces some computational overhead due to the ensemble size, its robustness and superior performance in spectral clustering tasks are significant. Future work will explore its application in supervised learning and its scalability for extremely large-scale datasets.

Summary updated

BibTeX
@misc{zhang2017learning,
  author = {Xiao-Lei Zhang},
  title = {{Learning the kernel matrix by resampling}},
  year = {2017},
  eprint = {1708.00365},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1708.00365},
}
Figure