Abstract
Clustering continues to be a significant and challenging task. Recent studies have demonstrated impressive results by applying clustering to feature representations acquired through self-supervised learning, particularly on small datasets. However, when dealing with datasets containing a large number of clusters, such as ImageNet, current methods struggle to achieve satisfactory clustering performance. In this paper, we introduce a novel method called Contrastive representation Disentanglement for Clustering (CDC) that leverages contrastive learning to directly disentangle the feature representation for clustering. In CDC, we decompose the representation into two distinct components: one component encodes categorical information under an equipartition constraint, and the other component captures instance-specific factors. To train our model, we propose a contrastive loss that effectively utilizes both components of the representation. We conduct a theoretical analysis of the proposed loss and highlight how it assigns different weights to negative samples during the process of disentangling the feature representation. Further analysis of the gradients reveals that larger weights emphasize a stronger focus on hard negative samples. As a result, the proposed loss exhibits strong expressiveness, enabling efficient disentanglement of categorical information. Through experimental evaluation on various benchmark datasets, our method demonstrates either state-of-the-art or highly competitive clustering performance. Notably, on the complete ImageNet dataset, we achieve an accuracy of 53.4%, surpassing existing methods by a substantial margin of +10.2%.
Introduction
Unsupervised clustering aims to group data without explicit labels. While performance on small-scale datasets like CIFAR-10 has improved significantly, large-scale benchmarks such as ImageNet remain difficult. Standard representation learning often treats every image as a unique class, failing to recognize semantic similarities between different instances of the same category. This often leads to "cluster degeneracy," where models collapse data into a few massive clusters. The proposed Contrastive representation Disentanglement for Clustering (CDC) addresses these issues by explicitly separating categorical identity from instance-specific details.
Methodology
The core of CDC is the disentanglement of the feature representation into two distinct parts: a categorical component ($z^c$) and an instance-wise component ($z^n$). The $z^c$ component is designed to capture cluster-level information, while $z^n$ captures unique attributes like lighting and pose.
To ensure effective clustering, CDC employs an Equipartition Constraint using the Sinkhorn-Knopp algorithm, which forces a balanced distribution of images across clusters. Furthermore, a Self-Adjusting Contrastive Loss is introduced. In this formulation, categorical similarity acts as a weight for negative samples. This mechanism effectively up-weights "hard negatives"—samples that are semantically similar but distinct instances—forcing the network to refine cluster boundaries.
Experimental Results
The researchers evaluated CDC on various benchmarks, ranging from small-scale (CIFAR-10) to the full ImageNet-1000 dataset. The results demonstrate a significant leap in performance over previous state-of-the-art methods.
On the full ImageNet dataset, CDC achieved a record-breaking 53.4% accuracy, a 10.2% improvement over the previous best method, SCAN. On CIFAR-10, the method reached 89.0% accuracy, nearing supervised performance levels. Beyond clustering, features learned by CDC showed superior generalization on downstream tasks like object detection on COCO, outperforming standard self-supervised baselines like MoCo v2.
Conclusion
CDC introduces a powerful framework for large-scale clustering by leveraging representation disentanglement. By combining an equipartition constraint with a novel weighted contrastive loss, it effectively handles the complexities of datasets with many clusters. While the method requires careful hyperparameter tuning and significant compute for full-scale ImageNet training, its ability to learn semantically rich, clustered representations sets a new benchmark for unsupervised learning.
Summary updated