Clustering-driven Deep Embedding with Pairwise Constraints

Sharon Fogel, Hadar Averbuch-Elor, Jacob Goldberger, Daniel Cohen-Or · DOI

Abstract

Recently, there has been increasing interest to leverage the competence of neural networks to analyze data. In particular, new clustering methods that employ deep embeddings have been presented. In this paper, we depart from centroid-based models and suggest a new framework, called Clustering-driven deep embedding with PAirwise Constraints (CPAC), for non-parametric clustering using a neural network. We present a clustering-driven embedding based on a Siamese network that encourages pairs of data points to output similar representations in the latent space. Our pair-based model allows augmenting the information with labeled pairs to constitute a semi-supervised framework. Our approach is based on analyzing the losses associated with each pair to refine the set of constraints. We show that clustering performance increases when using this scheme, even with a limited amount of user queries. We demonstrate how our architecture is adapted for various types of data and present the first deep framework to cluster 3D shapes.

Introduction

Deep clustering methods aim to combine the representation learning power of neural networks, such as autoencoders, with clustering objectives to group complex data. However, most state-of-the-art deep clustering techniques, like Deep Embedding Clustering (DEC) or Joint Unsupervised Learning (JULE), are parametric—they require the number of clusters to be known a priori. Furthermore, they typically rely on centroid-based optimization, which forces data into a predefined number of buckets.

In real-world exploratory data analysis, the true number of clusters is rarely known. Additionally, incorporating partial user knowledge (semi-supervised clustering) via pairwise constraints (e.g., "must-link" or "cannot-link") is often difficult in existing deep frameworks. CPAC addresses these gaps by proposing a non-parametric, pair-driven deep clustering approach that naturally accommodates both unsupervised and semi-supervised settings.

Methodology

The CPAC framework operates in two primary stages:

  1. Latent Space Initialization: A standard autoencoder is trained using a reconstruction loss to establish an initial, meaningful latent representation of the data.
  2. Clustering Embedding Optimization: The network is fine-tuned using a combined loss function. Instead of using cluster centroids, the clustering loss relies on a connectivity graph constructed via Mutual K-Nearest Neighbors (MKNN). If two points are mutually among each other's nearest neighbors, they are treated as a "must-link" pair, and the loss function pulls their representations closer in the latent space.

To prevent the network from collapsing all points into a single coordinate, the reconstruction loss is maintained. Optimizing this combined loss is complex, so the authors employ an ADMM (Alternating Direction Method of Multipliers) optimization scheme. This decouples the clustering loss from the reconstruction loss, allowing the network to alternate between updating cluster assignments and updating autoencoder weights.

The CPAC architecture uses a Siamese network with reconstruction, representation, and pairwise losses.

Semi-Supervised Extension: The framework supports active learning by identifying "hard" pairs—connections with high clustering loss—and requesting user labels. These manual constraints are then injected directly into the connectivity graph to refine the embedding.

Datasets and Evaluation

The method was evaluated across diverse modalities:

  • Images/Faces: USPS (digits), FRGC (faces), YouTube Faces (YTF), and CMU-PIE (faces).
  • Text: A 10,000-sample subset of the REUTERS news dataset.
  • 3D Point Clouds: ShapeNet (intra-class clustering) and ModelNet10 (inter-class clustering).

Applying deep clustering to 3D point clouds is a novel contribution of this work, requiring specialized autoencoders (e.g., PointNet-like architectures with Chamfer loss) to handle geometric data.

Results and Discussion

CPAC demonstrates strong performance in both unsupervised and semi-supervised scenarios:

  • Unsupervised Performance: CPAC consistently outperforms other non-parametric methods such as standard RCC, Affinity Propagation, and HDBSCAN. It achieves results comparable to state-of-the-art parametric methods, despite not knowing the number of clusters beforehand.
  • Semi-Supervised Gains: Minimal user supervision leads to significant improvements. For example, on the USPS dataset, adding just 5,000 labeled connections (less than 0.2% of possible pairs) increased Accuracy from 0.58 to 0.86.
  • 3D Shape Clustering: The framework successfully clustered 3D objects into visually distinct categories based purely on geometry.
Visualization of 3D shape clustering on ModelNet10 using CPAC.

The use of MKNN serves as a powerful, conservative prior. By requiring mutual connectivity, the initial unsupervised graph reduces false-positive connections compared to standard KNN. Furthermore, shifting to a pair-based objective removes the need for cluster count estimation, as clusters emerge naturally as connected components.

Conclusion

While CPAC is robust, the reliance on MKNN can still lead to some false-positive connections in noisy unsupervised settings. Future work could explore more sophisticated neighborhood connectivity metrics, such as incorporating local density distributions, to further enhance the initial graph's robustness and reduce the need for manual constraints.

Summary updated

BibTeX
@article{fogel2018clustering,
  author = {Sharon Fogel and Hadar Averbuch-Elor and Jacob Goldberger and Daniel Cohen-Or},
  title = {{Clustering-driven Deep Embedding with Pairwise Constraints}},
  journal = {IEEE Computer Graphics and Applications},
  year = {2018},
  doi = {10.1109/mcg.2018.2881524},
}
Figure