Angular Constraint Embedding via SpherePair Loss for Constrained Clustering

Ke Chen (NVIDIA) · Shaojie Zhang (University of Manchester)
angular constraint embeddingclustering-friendly embeddingsconstrained clusteringdeep constrained clusteringempirical validationgeometric formulationpairwise constraintsperformance evaluationrapid inferencerepresentation learningscalabilityspherepair lossstate-of-the-art methodstheoretical guaranteesunseen data generalization

Constrained clustering integrates domain knowledge through pairwise constraints. However, existing deep constrained clustering (DCC) methods are either limited by anchors inherent in end-to-end modeling or struggle with learning discriminative Euclidean embedding, restricting their scalability and real-world applicability. To avoid their respective pitfalls, we propose a novel angular constraint embedding approach for DCC, termed SpherePair. Using the SpherePair loss with a geometric formulation, our method faithfully encodes pairwise constraints and leads to embeddings that are clustering-friendly in angular space, effectively separating representation learning from clustering. SpherePair preserves pairwise relations without conflict, removes the need to specify the exact number of clusters, generalizes to unseen data, enables rapid inference of the number of clusters, and is supported by rigorous theoretical guarantees. Comparative evaluations with state-of-the-art DCC methods on diverse benchmarks, along with empirical validation of theoretical insights, confirm its superior performance, scalability, and overall real-world effectiveness. Code is available at [our repository](https://github.com/spherepaircc/SpherePairCC/tree/main).