Scalable Kernel Clustering: Approximate Kernel k-means

Radha Chitta, Rong Jin, Timothy C. Havens, Anil K. JainarXiv 2014

TL;DR

Kernel $k$-means is a powerful tool for finding non-linear clusters, but its $O(n^2)$ memory and runtime requirements make it unusable for large datasets. This paper introduces Approximate Kernel $k$-means (aKKm), which uses randomized sampling to restrict cluster centers to a low-dimensional subspace, slashing computational costs while maintaining clustering quality comparable to the full, exact algorithm.

What Problem Does This Paper Address?

Clustering is a fundamental task in data science, but simple algorithms like linear $k$-means often fail when data clusters are not linearly separable (e.g., nested circles or complex manifolds). Kernel $k$-means solves this by implicitly mapping data into a high-dimensional feature space where clusters are linearly separable.

The catch? To calculate distances in this high-dimensional space, the algorithm traditionally requires the "Kernel Matrix"—a table of similarities between every pair of points in the dataset. If you have $n = 1,000,000$ points, the matrix has $10^{12}$ entries, which is impossible to store or process on standard hardware. This paper tackles the scalability wall, aiming to bring the power of kernel clustering to "big data" scales involving millions of points.

Methods

The authors propose a randomized approximation scheme called Approximate Kernel $k$-means (aKKm). Their approach is built on a few clever observations:

  1. Subspace Restriction: In standard kernel $k$-means, cluster centers are represented as linear combinations of all $n$ points. The authors argue that we can achieve nearly the same result by restricting these centers to a subspace spanned by a small, randomly sampled subset of $m$ points ($m \ll n$).
  2. Efficient Objective Function: By restricting the search space for cluster centers, the authors derive a new optimization objective that only requires an $n \times m$ portion of the kernel matrix. This reduces memory footprint from $O(n^2)$ to $O(nm)$.
  3. Ensemble Boosting: To further improve stability and accuracy, they introduce Ensemble aKKm. They run the approximate algorithm multiple times with different random samples and then use a Meta-Clustering Algorithm (MCLA) to find a consensus partition. This mitigates the risk of a "bad" random sample ruining the results.
The Ensemble aKKm framework: multiple approximate clusterings (U^1 to U^r) are generated from random samples and combined using a Meta-Clustering Algorithm (MCLA) to produce a robust final partition U^(c).

How it differs from the standard: Unlike the "Nystrom method" (which approximates the whole matrix first) or "Two-step" methods (which cluster samples and then assign the rest), aKKm updates the cluster assignments for all points iteratively while keeping the centers constrained to the sampled subspace.

Datasets

The authors evaluated their method on four diverse datasets, ranging from medium to very large scales. These benchmarks represent various domains and utilize different kernel functions to test the flexibility of the aKKm approach.

Summary of datasets used in the evaluation, highlighting the scale (up to 4.8 million points) and the variety of kernel functions employed.
  • Imagenet: 20,000 images (12 classes) using a Spatial Pyramid Kernel.
  • MNIST: 70,000 handwritten digits using a Neural Kernel.
  • Forest Cover Type: 581,012 points (7 classes) using an RBF kernel.
  • Network Intrusion: 4,898,431 points (23 classes) using a Polynomial kernel.

Key Insights and Ideas

  • The Power of "Good Enough" Subspaces: You don't need the full $n$-dimensional space to find a good cluster center. A subspace spanned by as few as 0.01% to 0.05% of the data points is often sufficient to capture the essential non-linear structure.
  • Uniform Sampling Wins: Surprisingly, the authors found that simple uniform random sampling performed as well as, or better than, more complex "intelligent" sampling strategies (like diagonal or column-norm sampling) while being significantly faster to compute.
  • Direct vs. Indirect Approximation: Previous methods often approximated the eigenvectors of the kernel matrix. This paper shows that using the approximate kernel matrix directly to estimate clusters leads to more accurate results and better theoretical error bounds.

Key Results

  • Massive Speedups: On the Imagenet dataset, aKKm achieved over a 90% reduction in kernel computation time compared to standard kernel $k$-means.
  • High Fidelity: Despite the approximation, the Adjusted Rand Index (ARI)—a measure of clustering similarity—showed that aKKm results were up to 84% similar to the "gold standard" full kernel $k$-means.
  • Scalability to Millions: The authors successfully clustered the Network Intrusion dataset (nearly 5 million points) using less than 40 GB of RAM—a feat impossible for the standard algorithm.
  • Ensemble Gains: Using an ensemble of 10 partitions significantly boosted the Normalized Mutual Information (NMI), especially when the sample size $m$ was very small.

Limitations and Future Work

  • Sensitivity to $m$: While small $m$ works well, there is still a trade-off. If $m$ is too small, the subspace might miss critical features of the data distribution.
  • Kernel Selection: Like all kernel methods, the performance is highly dependent on choosing the "right" kernel and hyper-parameters (like the RBF width $\sigma$), which remains a non-trivial task for the user.
  • Future Directions: The authors suggest exploring even more efficient matrix approximation techniques and extending this framework to semi-supervised clustering, where a small amount of labeled data could guide the approximate kernel process.

Summary updated

BibTeX
@misc{chitta2014scalable,
  author = {Radha Chitta and Rong Jin and Timothy C. Havens and Anil K. Jain},
  title = {{Scalable Kernel Clustering: Approximate Kernel k-means}},
  year = {2014},
  eprint = {1402.3849},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1402.3849},
}
Figure