GeCC: Generalized Contrastive Clustering with Domain Shifts Modeling

Yujie Chen, Wenhui Wu, Le Ou-Yang, Ran Wang, Debby Dan WangAAAI 2025 · DOI

TL;DR

This paper introduces GeCC, a novel contrastive clustering framework that tackles the issue of domain-specific features learned during data augmentation. By incorporating a "cluster-guided domain shifts modeling" module and attention mechanisms, GeCC effectively disentangles cluster-related information from augmentation artifacts, leading to improved clustering performance and generalization.

What Problem Does This Paper Address?

Deep clustering methods aim to group data into clusters without explicit labels by leveraging neural networks to learn informative representations. Contrastive learning has shown great promise in this area by using augmented views of data to learn robust representations. However, a significant challenge arises because common data augmentation techniques, while helping to learn general features, can also introduce domain-specific information. This can cause contrastive clustering models to "get stuck" on these domain-specific features, hindering their ability to generalize to unseen data and ultimately degrading clustering performance. The paper aims to address this by developing a method that can better disentangle cluster-relevant features from augmentation-induced domain-specific biases.

Methods

The core of GeCC lies in its novel Cluster-guided Domain Shifts Modeling (CDSM) module. This module builds upon the idea of Domain Shifts with Uncertainty (DSU) but enhances it by incorporating clustering information. Instead of synthesizing new instances based solely on feature statistics, CDSM uses cluster assignments to guide the synthesis of a "reference view." This reference view is designed to represent diverse domain information while being more aligned with cluster-specific characteristics.

GeCC also employs attention mechanisms for both instance representation and cluster assignment contrastive learning. These attention weights are computed based on the relative domain differences between the newly generated reference view and the augmented views. This allows the model to dynamically focus on more relevant features and down-weight those that are overly domain-specific.

Specifically, the framework consists of:

  • A weight-sharing encoder to extract initial embeddings from augmented data.
  • Instance-level and cluster-level projectors to map embeddings to representation and assignment spaces.
  • The CDSM module to generate a reference embedding.
  • Instance Representation Contrastive Module: Learns representations by contrasting three views (two augmented, one reference) using domain attention weights.
  • Cluster Assignment Contrastive Module: Aligns cluster assignments across different views using distribution attention weights, with an added regularization term to prevent trivial solutions.

The overall objective function combines the losses from these two contrastive modules.

Datasets

The proposed method is evaluated on four benchmark image datasets:

  • CIFAR-10: 10 classes, 60,000 samples (Train+Test split).
  • CIFAR-100: 20 super-classes, 60,000 samples (Train+Test split).
  • ImageNet-10: 10 classes, 13,000 samples (Train split).
  • ImageNet-Dogs: 15 classes, 19,500 samples (Train split).

Key Insights and Ideas

  • Domain-specific features are a major bottleneck for contrastive clustering: The paper convincingly demonstrates that standard contrastive methods can overfit to augmentation-induced domain information, leading to suboptimal clustering.
  • Cluster information is crucial for guiding domain shift modeling: Simply using DSU is insufficient; integrating cluster assignments into the domain shift synthesis process is key to creating a more effective reference view.
  • Attention mechanisms can dynamically adapt to domain variations: By weighting the contrastive losses based on domain differences, the model can learn to prioritize cluster-relevant features and ignore domain-specific noise.
  • A unified end-to-end framework is powerful: GeCC integrates representation learning and clustering in a single stage, avoiding the error accumulation issues of two-stage methods.

Key Results

GeCC consistently outperforms other state-of-the-art methods across all four benchmark datasets in terms of NMI, ACC, and ARI. For instance, on ImageNet-Dogs, GeCC achieves improvements of up to 3.35% in NMI, 7.38% in ACC, and 4.53% in ARI compared to the second-best method, DivClust. Ablation studies confirm the effectiveness of both the CDSM module and the attention weights, showing significant performance degradation when these components are removed.

Limitations and Future Work

  • Pseudo-label quality: The paper acknowledges that the quality of pseudo-labels can impact the CDSM module, especially in the initial training stages. They propose a probabilistic application of CDSM that increases with training epochs to mitigate this.
  • Computational cost: While not explicitly detailed as a limitation, the introduction of a new module and attention mechanisms might increase computational overhead compared to simpler contrastive clustering methods.
  • Future work: The authors suggest that their method can be extended to other unsupervised learning tasks and potentially applied to more complex real-world scenarios with diverse domain shifts. Further exploration into more sophisticated domain shift modeling techniques could also be a promising direction.

Summary updated

BibTeX
@inproceedings{chen2025gecc,
  author = {Yujie Chen and Wenhui Wu and Le Ou-Yang and Ran Wang and Debby Dan Wang},
  title = {{GeCC: Generalized Contrastive Clustering with Domain Shifts Modeling}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i15.33753},
}
Figure