TL;DR
Standard contrastive learning excels at learning unique features by pushing every image representation apart, but this directly contradicts the goal of deep clustering, which aims to group similar images together. This paper introduces Semantic Contrastive Learning (SCL), a framework that resolves this tension by only pushing images away from "pseudo-negatives" in other clusters. By jointly optimizing instance-level discrimination and cluster-level decision boundaries, SCL achieves state-of-the-art deep clustering performance, particularly on complex, fine-grained datasets.
What Problem Does This Paper Address?
Deep clustering aims to categorize unlabelled images into semantically meaningful groups without human annotation. Recently, self-supervised contrastive learning (via instance discrimination) has become the dominant paradigm for learning rich visual representations.
However, standard contrastive learning treats every single image as its own distinct class. This creates a fundamental contradiction: instance discrimination tries to pull all images apart (even those belonging to the same semantic class), while clustering tries to push them together. Existing methods try to patch this by restricting learning to local neighborhoods or alternating between representation learning and offline clustering. These workarounds often lead to error propagation, where early incorrect cluster assignments permanently ruin the learned feature space.
Methods
The authors propose Semantic Contrastive Learning (SCL) to harmonize instance-level diversity and cluster-level compactness. The framework consists of several key components:
- Cross-Cluster Instance Discrimination: Instead of contrasting a query image against all other images in the dataset, SCL only contrasts it against a set of pseudo-negatives belonging to different clusters. This resolves the contrastive contradiction, allowing images within the same cluster to naturally drift closer together.
- Semantic Memory: SCL maintains $C$ independent memory banks (where $C$ is the number of clusters). When a sample is evaluated, its negative contrastive set is drawn exclusively from the memory banks of the other $C-1$ clusters.
- Cluster Discrimination & Consistency Loss: SCL uses a distance-based classifier to compute the probability of a sample belonging to a cluster based on its similarity to that cluster's memory bank anchors. A consistency loss ($L_{CD}$) minimizes the cross-entropy between these distance-based assignments and the predictions from a parametric classifier network.
- Hard Sample Mining: Samples that frequently hop between clusters during training are flagged as semantically ambiguous ("hard samples") and assigned higher weights in the instance discrimination loss to provide sharper learning signals.
Datasets
The method was evaluated on six standard object recognition benchmarks:
- CIFAR-10 and CIFAR-100 (using the 20 super-classes as ground truth).
- STL-10 (evaluated without using its additional unlabelled background set to ensure a fair, data-efficient comparison).
- ImageNet-10 and ImageNet-Dogs (a challenging fine-grained subset of 15 dog breeds).
- Tiny-ImageNet (a larger-scale dataset with 100,000 images across 200 classes).
Key Insights and Ideas
- Restricting Negatives as an Implicit Positive Force: The core "aha" moment is that contrastive learning doesn't need to explicitly force positive pairs together to form clusters. By simply restricting the negative pairs to out-of-cluster samples, intra-cluster samples naturally group together without suffering from class ambiguity.
- Mutual Benefit of Joint Optimization: Representation learning and decision boundary estimation shouldn't be decoupled. SCL shows that optimizing them concurrently via a shared semantic memory allows the cluster boundaries to guide feature learning, while sharper features simultaneously refine the boundaries.
- Robustness to Noise: Traditional pseudo-labeling methods suffer from a vicious cycle where early wrong assignments ruin feature representations. SCL's contrastive formulation inherently relies on underlying visual similarities, making it highly resilient to noisy intermediate cluster assignments.
Key Results
SCL demonstrated significant performance gains over state-of-the-art deep clustering and contrastive learning methods:
- Fine-Grained Superiority: On the highly challenging ImageNet-Dogs dataset, SCL achieved a clustering accuracy (ACC) of 76.3%, outperforming the closest contrastive deep clustering competitor (IDFD) by a massive 17.2% margin.
- Scalability: On Tiny-ImageNet (200 classes), SCL achieved 17.2% ACC and an Adjusted Rand Index (ARI) of 0.080, outperforming Contrastive Clustering (CC), which stood at 14.0% ACC and 0.071 ARI.
- Ablation Verification: Removing either the cross-cluster instance discrimination or the online cluster discrimination components caused a significant drop in performance, proving that the synergy between both components drives SCL's success.
Limitations and Future Work
- Background Dominance: SCL struggles when an image is heavily dominated by its background rather than the target object. Unsupervised models still find it difficult to locate the correct "focus of attention" without explicit bounding boxes or saliency cues.
- Fixed Cluster Numbers: Like most deep clustering algorithms, SCL assumes the number of clusters ($C$) is known beforehand. Extending this framework to discover the number of clusters dynamically remains an open challenge.
Summary updated