NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Deep Kernel Learning for Clustering

Chieh Wu, Zulqarnain Khan, Stratis Ioannidis, Jennifer G. Dy

TL;DR

This paper introduces KernelNet (KNet), a novel deep learning approach that learns a data-tailored kernel for clustering. KNet effectively handles non-convex clusters and can generalize to out-of-sample data, outperforming existing state-of-the-art methods on various datasets.

What Problem Does This Paper Address?

Clustering algorithms aim to group similar data points. A crucial aspect of clustering is defining "similarity," often achieved through kernels. However, choosing the right kernel is data-dependent and can be challenging, requiring domain expertise. While general-purpose kernels exist, they may not be optimal for complex, non-convex cluster structures. Existing deep clustering methods often rely on autoencoders or specific penalty functions, which can struggle with these challenging cluster shapes. This paper addresses the need for a flexible, data-driven kernel learning method that can effectively discover clusters, especially non-convex ones, and generalize to new data.

Methods

The core of KNet is a deep neural network that learns an embedding function, denoted by $\psi_\theta$. This embedding transforms the input data into a new space where clusters become more convex and separable. The learned kernel is then defined based on the Euclidean distance in this embedded space: $k(x_i, x_j) = \exp(-\frac{||\psi_\theta(x_i) - \psi_\theta(x_j)||^2}{2\sigma^2})$.

The training objective for KNet is based on the Hilbert-Schmidt Independence Criterion (HSIC), which measures the statistical dependence between two random variables. Specifically, KNet aims to maximize the HSIC between the embedded data $\psi_\theta(X)$ and a spectral embedding $U$ derived from the data. This objective encourages the learned embedding to mimic the properties of spectral clustering, which is known for its ability to handle non-convex clusters.

The optimization process involves iteratively updating both the neural network parameters $\theta$ (for the embedding $\psi_\theta$) and the spectral embedding $U$. The paper proposes two methods for updating $U$: eigendecomposition of a derived Laplacian matrix and a more efficient Stiefel manifold ascent method. Additionally, KNet incorporates an autoencoder objective to ensure the learned embedding is injective, although experiments suggest this is not strictly necessary for good performance.

A key advantage of KNet is its ability to handle out-of-sample data. Once the embedding $\psi_\theta$ is trained on a dataset $X$, new data points can be embedded using the same $\psi_\theta$ and then clustered, avoiding the need to re-run the entire clustering algorithm from scratch. This also allows for efficient training by using only a subset of the data.

Datasets

The paper evaluates KNet on a variety of datasets, including:

  • Synthetic Datasets: Moon, Spirall, and Spiral2. These are specifically designed to have non-convex cluster structures, allowing the authors to demonstrate KNet's effectiveness in handling such challenging cases.
  • Real-world Datasets: Breast Cancer, Wine, RCV (text data), and Face (image data). These datasets represent diverse data types and complexities.

The paper does not introduce new benchmark datasets but uses established ones to compare KNet against existing methods.

Key Insights and Ideas

  • Deep Kernels for Clustering: The core idea of learning a flexible, data-driven kernel using a deep neural network is a significant departure from traditional kernel design. This allows the kernel to adapt to the specific structure of the data.
  • HSIC as a Clustering Objective: Leveraging HSIC to maximize the dependence between the learned embedding and a spectral embedding provides a principled way to guide the deep learning process towards discovering meaningful cluster structures, especially non-convex ones.
  • Generalization to Out-of-Sample Data: The ability to embed new data points using a pre-trained network is a crucial practical advantage, enabling efficient clustering of large datasets and avoiding costly re-computation.
  • Robustness to Noise: KNet demonstrates robustness to Gaussian noise in the input data, maintaining its ability to map non-convex clusters to convex representations.
  • Efficiency through Subsampling: Training KNet on a small subset of data and then applying it to the entire dataset significantly speeds up computation with minimal degradation in clustering performance.

Key Results

  • Outperforms State-of-the-Art: KNet consistently outperforms existing deep clustering methods (AEC, DEC, IMSAT, SN) and traditional methods (SC, k-means) on most datasets, achieving higher Normalized Mutual Information (NMI) scores.
  • Superior on Non-Convex Clusters: The improvement is particularly pronounced on datasets with non-convex clusters (Moon, Spirall), where KNet achieves perfect clustering (100% NMI) in many cases, while other methods struggle.
  • Significant Speedup: KNet's out-of-sample capability allows for training on as little as 1-35% of the data, leading to substantial acceleration in computation with only a 0-3% degradation in NMI.
  • Comparable Runtime: Despite the preprocessing step for initialization, KNet's overall runtime is comparable to or faster than many competing methods.

Limitations and Future Work

  • Initialization Sensitivity: The paper acknowledges that the non-convexity of the optimization problem means that KNet's performance can be sensitive to initialization. While they propose a principled initialization strategy, further research into more robust initialization could be beneficial.
  • Hyperparameter Tuning: While KNet generally performs well with default settings (e.g., $\lambda=0$), some hyperparameters still require tuning, especially for unsupervised selection. The paper suggests that selecting $\lambda$ such that the HSIC and reconstruction error terms are balanced can be a viable strategy.
  • Autoencoder Necessity: While the autoencoder objective is theoretically motivated to ensure injectivity, empirical results suggest it's not always necessary for good performance. Future work could explore its role more deeply or investigate alternative ways to ensure injectivity.
  • Computational Cost of Preprocessing: The preprocessing step for KNet, particularly the autoencoder training for initialization, can be computationally intensive. The authors suggest that improving this initialization could further speed up the method.

Summary updated

BibTeX
@inproceedings{wu2019deep,
  author = {Chieh Wu and Zulqarnain Khan and Stratis Ioannidis and Jennifer G. Dy},
  title = {{Deep Kernel Learning for Clustering}},
  booktitle = {SDM},
  year = {2019},
  doi = {10.1137/1.9781611976236.72},
}
Figure