Abstract
Clustering and prediction are two primary tasks in the fields of unsupervised and supervised learning, respectively. Although much of the recent advances in machine learning have been centered around those two tasks, the interdependent, mutually beneficial relationship between them is rarely explored. One could reasonably expect appropriately clustering the data would aid the downstream prediction task and, conversely, a better prediction performance for the downstream task could potentially inform a more appropriate clustering strategy. In this work, we focus on the latter part of this mutually beneficial relationship. To this end, we introduce Deep Goal-Oriented Clustering (DGC), a probabilistic framework that clusters the data by jointly using supervision via side-information and unsupervised modeling of the inherent data structure in an end-to-end fashion. We show the effectiveness of our model on a range of datasets by achieving prediction accuracies comparable to the state-of-the-art, while, more importantly in our setting, simultaneously learning congruent clustering strategies.
Introduction
Clustering is a fundamental unsupervised learning task that is inherently ill-posed due to ambiguity. For instance, a dataset containing "red apples" and "green pears" can be validly clustered by either color or fruit type. Traditional unsupervised methods rely on fixed distance metrics that may not align with the user's specific goals. While semi-supervised clustering exists, it often relies on the "cluster assumption"—the premise that labels correspond directly to clusters. This assumption fails in complex scenarios where a single label might span multiple clusters or where side-information is continuous.
Deep Goal-Oriented Clustering (DGC) addresses this by treating a prediction task as a "teaching agent." By incorporating supervised side-information, DGC guides the unsupervised discovery of data structures that are relevant to a specific downstream objective.
Methodology
DGC extends the Variational Deep Embedding (VaDE) framework, which utilizes a Variational Autoencoder (VAE) with a latent space modeled as a Gaussian Mixture Model (GMM).
The framework is defined by three core components:
- Joint Generative Model: It assumes that both the input data ($x$) and the side-information ($y$) are generated from a latent code ($z$), which in turn is associated with a specific cluster ($c$).
- Goal-Oriented ELBO: A modified Evidence Lower Bound (ELBO) is derived, featuring a "Probabilistic Ensemble" term. This term incentivizes the model to identify clusters where the relationship between the latent space and the target $y$ is highly predictable.
- Entropy Regularization: To handle unlabeled test data, the model employs a regularization term based on prediction entropy. This allows the learned task-specific logic to inform cluster assignment even when labels are absent.
Experimental Evaluation
The authors evaluated DGC across three diverse datasets to test its robustness and flexibility:
- Noisy MNIST: MNIST digits (2 and 7) superposed on CIFAR-10 backgrounds. The goal is to separate digits while distinguishing between clean and noisy backgrounds using only the digit label.
- Pacman: A toy dataset of two interlocking annuli where standard unsupervised methods typically fail. Supervision is provided via a continuous response value.
- SVHN (Street View House Numbers): A real-world benchmark used to assess scalability and sensitivity to the number of clusters.
Key Results
DGC demonstrated superior performance across all benchmarks. In the Noisy MNIST experiment, DGC achieved a clustering accuracy of 99.6%, whereas the unsupervised VaDE baseline struggled at 95.6% due to the heavy background noise.
Crucially, DGC successfully mapped two labels (digits 2 and 7) to four distinct clusters (2-clean, 2-noisy, 7-clean, 7-noisy), proving it can handle non-1:1 label-to-cluster relationships.
On the Pacman dataset, DGC achieved 100% accuracy, perfectly separating the interlocking shapes where K-Means and Spectral Clustering failed. For SVHN, DGC reached a classification accuracy of 94.7% and a clustering accuracy of 92.6%, significantly outperforming purely unsupervised state-of-the-art methods which typically reach around 76.8%.
Discussion and Conclusion
DGC proves that supervision can act as a powerful compass for clustering. It is robust to the choice of cluster count ($K$); if $K$ is larger than the number of classes, the model simply distributes classes across multiple clusters rather than degrading in performance.
While DGC reduces the need for manual constraints (like "must-link" pairs), it still requires a relevant target variable $y$ and a pre-defined $K$. Future work may explore automated hyperparameter selection. DGC holds significant promise for scientific discovery, particularly in fields like medicine, where it could identify patient subgroups based on survival rates or treatment responses.
Summary updated