Clustering is a fundamental task in unsupervised learning, yet the standard $k$-means algorithm often struggles with data that is not linearly separable. While kernel $k$-means addresses this by mapping data into a high-dimensional feature space where clusters become separable, it introduces a massive computational bottleneck. This paper introduces the first "strong" coreset for kernel $k$-means clustering that works for general kernels, offering a size independent of both the dataset size and the feature space dimension.
The Computational Challenge
The power of kernel methods comes at a significant cost. Due to the "kernel trick," evaluating the clustering cost for even a single set of centers requires $\Omega(n^2)$ operations, where $n$ is the number of data points. This quadratic complexity makes kernel clustering nearly impossible for large-scale datasets. Previous attempts to mitigate this were often restricted to specific kernels (like Gaussian), produced coresets that grew exponentially with parameters, or were limited to a fixed set of candidate centers.
A General Coreset Framework
The authors bridge the gap between kernel methods and coresets—small, weighted subsets of data that accurately approximate the clustering cost of the full dataset for any possible set of centers. Their approach relies on several technical breakthroughs:
- Dimension-Independent Embedding: The authors prove that data points in a potentially infinite-dimensional Hilbert space can be embedded into an $(n+1)$-dimensional Euclidean space without distorting the distances between data points and potential centers.
- Importance Sampling: By adapting a state-of-the-art Euclidean coreset construction, the method uses "importance sampling" based on a sensitivity framework. This ensures that small, outlier clusters are not missed, unlike traditional uniform sampling.
- Kernel Trick Integration: Crucially, the algorithm never explicitly computes high-dimensional feature maps. It utilizes the kernel function $K(x, y)$ to compute all necessary distances in $\tilde{O}(nk)$ time.
- Merge-and-Reduce: Because the resulting coreset is "strong" (preserving costs for all possible centers), it is composable. This enables the use of the merge-and-reduce framework to handle data streams or distributed datasets efficiently.
Empirical Performance
The method was evaluated on four large-scale datasets: Twitter (21M points), Census1990 (2.4M points), Adult (~49k points), and Bank (~41k points), using both RBF (Gaussian) and Polynomial kernels.
- Accuracy: On all datasets, the coreset achieved less than 10% error using only 1,000 points, significantly outperforming uniform sampling.
- Speedup: The coreset-based approach was several orders of magnitude faster than vanilla kernelized $k$-means++. When applied to spectral clustering, the method achieved a 1000x speedup over popular implementations for datasets of $n=40,000$, while finding lower cost objective values.
- Model Efficiency: A major advantage is that optimal centers can be represented as linear combinations of only the points in the coreset, rather than the entire dataset, making the final model much smaller and faster for inference.
Conclusion and Future Work
This work provides the first streaming algorithm for kernel $k$-means with provable guarantees, using space that only grows logarithmically with the number of points. While the theoretical coreset size bounds are polynomial in $k$ and $1/\epsilon$, empirical results suggest that much smaller coresets work excellently in practice. Future research may explore automating kernel parameter selection (e.g., $\sigma$ for RBF) within the coreset framework and further refining the iterative sampling process.
Summary updated