NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Graph Contrastive Clustering

Huasong Zhong, Jianlong Wu, Chong Chen, Jianqiang Huang, Minghua Deng, Liqiang Nie, Zhouchen Lin, Xian-Sheng Hua · DOI

Abstract

Unsupervised image clustering remains a significant challenge in computer vision due to the high intra-class variance of visual data. While recent contrastive learning methods have improved feature representations by enforcing instance-level consistency, they often fail to capture semantic relationships by treating all distinct images as negative pairs. This paper introduces Graph Contrastive Clustering (GCC), a framework that shifts the focus to cluster-level consistency. By utilizing a K-Nearest Neighbor (KNN) graph to identify latent categories, GCC enforces similarity between semantic neighbors. Experimental results demonstrate that GCC achieves state-of-the-art performance, notably boosting CIFAR-10 clustering accuracy from approximately 72% to over 85%.

Introduction

Clustering images without labels is difficult because objects within the same category can appear visually distinct. Traditional contrastive learning methods, such as SimCLR or MoCo, teach models that an image and its augmented version should have similar representations. However, these methods primarily focus on instance-level consistency, treating every other image in a dataset as a "negative" example. This approach ignores latent category information, often pushing semantically similar images (e.g., two different dogs) apart in the feature space. GCC addresses this by incorporating graph-based relationships to enforce similarity between neighbors, thereby optimizing the feature space for grouping similar objects together.

Methods

The GCC framework employs a dual-head architecture designed to move beyond simple self-augmentation consistency. The core innovation lies in using a graph to define "positives" based on semantic proximity.

The GCC dual-head architecture featuring Representation Graph Contrastive (RGC) and Assignment Graph Contrastive (AGC) modules.
  1. Graph Construction: The model constructs a KNN graph based on current image features. To maintain stability during training, a moving average of features from previous epochs is used.
  2. Representation Graph Contrastive (RGC) Module: This module utilizes a graph Laplacian-based loss to pull an image toward its neighbors in the KNN graph while pushing it away from non-neighbors, encouraging the learning of clustering-friendly features.
  3. Assignment Graph Contrastive (AGC) Module: This head focuses on final cluster assignments, enforcing the rule that an image and its neighbor's augmentation should share the same cluster label. This effectively lifts consistency requirements to the semantic category level.
  4. Cluster Regularization: To avoid trivial solutions where all images are assigned to a single cluster, a regularization term encourages an even distribution across all potential clusters.

Key Results

GCC significantly outperformed previous state-of-the-art (SOTA) methods across six widely-used benchmarks. On CIFAR-10, it achieved 85.6% accuracy, a substantial improvement over the previous best of 72.7%. Similarly, on CIFAR-100, accuracy reached 47.2%, up from 36.7%.

Training progress and Top-K Nearest Neighbor accuracy comparison between GCC and SimCLR on CIFAR-10 and CIFAR-100.

As shown in the performance plots, GCC maintains higher accuracy across various Top-K values compared to standard contrastive methods like SimCLR. Qualitative t-SNE visualizations further confirm that GCC produces tighter, more distinct clusters, whereas basic contrastive learning often leaves different classes entangled.

Discussion and Limitations

A key insight of this work is that neighbors in the feature space can serve as effective "soft labels" in the absence of ground truth. However, the method's success is dependent on the initial quality of features; if the starting KNN graph is too noisy, convergence may be hindered. Additionally, the model can occasionally be misled by visual similarities that do not align with semantic categories, such as grouping objects based on shape or color (e.g., a basketball and an orange) rather than their actual class. Future research may explore more complex graph structures or multi-view information to further refine these semantic boundaries.

Summary updated

BibTeX
@inproceedings{zhong2021graph,
  author = {Huasong Zhong and Jianlong Wu and Chong Chen and Jianqiang Huang and Minghua Deng and Liqiang Nie and Zhouchen Lin and Xian-Sheng Hua},
  title = {{Graph Contrastive Clustering}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00909},
}
Figure