Generative Kernel Spectral Clustering

Sonny Achten, David Winant, Johan A. K. Suykens

Abstract

Modern clustering approaches often trade interpretability for performance, particularly in deep learning-based methods. We present Generative Kernel Spectral Clustering (GenKSC), a novel model combining kernel spectral clustering with generative modeling to produce both well-defined clusters and interpretable representations. By augmenting weighted variance maximization with reconstruction and clustering losses, our model creates an explorable latent space where cluster characteristics can be visualized through traversals along cluster directions. Results on MNIST and FashionMNIST datasets demonstrate the model's ability to learn meaningful cluster representations.

Introduction: The Interpretability Gap

In machine learning, a persistent tension exists between performance and interpretability. Deep learning-based clustering methods excel at identifying patterns in complex, high-dimensional data like images, but they often operate as "black boxes." They may successfully group data points, but they rarely provide insight into why those points belong together. Conversely, traditional interpretable methods often struggle with the complexity of modern datasets or rely on post-hoc explanations that may not accurately reflect the model's internal logic.

Generative Kernel Spectral Clustering (GenKSC) addresses this by being generative by design. It doesn't just group data; it learns the underlying structure well enough to synthesize new, representative examples of each cluster, making the model's internal logic visually accessible.

Methodology: Deep Kernel Spectral Clustering

GenKSC builds upon the foundation of Kernel Spectral Clustering (KSC), which treats clustering as a weighted variance maximization problem. The authors introduce several key innovations to modernize this approach:

  1. Learnable Feature Maps: Instead of a fixed kernel function, GenKSC utilizes deep convolutional encoders to learn optimal data representations.
  2. Inverse Mapping (Decoder): A decoder network is integrated to map points from the abstract latent space back into the original data space (e.g., images).
  3. Augmented Loss Functions: The model is trained using a multi-part objective that balances reconstruction loss (preserving information) with a specific clustering loss. This loss forces latent representations to align with the vertices of a regular simplex.
  4. Simplex Latent Space: By predefining $k$ directions in the latent space, the model ensures maximal separation between groups.
Latent space visualization for MNIST012 showing the three distinct "spokes" corresponding to the learned cluster directions.

Interpretability via Latent Traversals

The primary innovation of GenKSC is the use of latent space traversals for interpretation. Because clusters are forced into specific linear directions (the "spokes" seen in the latent space), researchers can move along a "cluster line" and observe how the generated image evolves. This allows for:

  • Feature Exaggeration: Moving beyond typical data points on a cluster line generates "exaggerated" versions of a cluster, highlighting the specific features the model associates with that group.
  • Capturing Intra-Cluster Variance: The model can capture variations within a single cluster, such as the difference between a sleeveless dress and a T-shirt in the FashionMNIST dataset.
Latent space traversals for MNIST digits 1, 2, and 0, demonstrating how the model captures and exaggerates cluster-specific features.

Key Results

The researchers evaluated GenKSC on standard computer vision benchmarks, including MNIST012 (a subset of handwritten digits) and FashionMNIST.

  • MNIST012: The model successfully separated digits into three distinct spokes. Traversals revealed that the model is sensitive to digit thickness; thinner digits were mathematically harder for the model to cluster with high confidence, providing a direct look into the model's "uncertainty."
  • FashionMNIST: Even with ten complex clothing categories, the model maintained clear cluster directions. Qualitative results showed that moving along the "trousers" axis caused the generated images to develop increasingly distinct and well-defined pant legs.
  • Mathematical Rigor: The authors demonstrated that this neural network approach maintains the foundational stationarity conditions of traditional KSC, ensuring that deep learning flexibility does not come at the cost of mathematical soundness.

Conclusion and Future Work

GenKSC offers a promising path toward high-performance clustering that remains human-readable. While effective, the authors note that the model is currently sensitive to the balance between reconstruction and clustering hyperparameters. Future work may involve incorporating semi-supervised learning to guide latent space formation or extending the "explorable latent space" concept to non-visual data types, such as financial time series or genomic data.

Summary updated

BibTeX
@misc{achten2025generative,
  author = {Sonny Achten and David Winant and Johan A. K. Suykens},
  title = {{Generative Kernel Spectral Clustering}},
  year = {2025},
  eprint = {2502.02185},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.02185},
}
Figure