Papers
Topics
Authors
Recent
Search
2000 character limit reached

Cluster Contrast (CueCo)

Updated 6 July 2026
  • The paper introduces CueCo, a framework that combines instance-level contrast and clustering to produce semantically compact and well-separated visual features.
  • Methodologically, CueCo utilizes a dual-encoder setup with momentum updates and an online FIFO queue to dynamically maintain negatives and centroid statistics.
  • Empirical results show competitive performance on CIFAR-10, CIFAR-100, and ImageNet-100, with notable improvements in both classification and clustering metrics.

Searching arXiv for recent and related papers on Cluster Contrast / CueCo to ground the article with current references. Cluster Contrast (CueCo) is a self-supervised framework for unsupervised visual representation learning that combines instance-level contrastive learning with feature-space clustering so as to enlarge inter-class separation while improving intra-class compactness. In the formulation introduced in “Cluster Contrast for Unsupervised Visual Representation Learning,” CueCo uses a query encoder and a momentum-updated key encoder, a MoCo-style FIFO queue, and joint optimization of contrastive, centroid-contrastive, and variance terms on datasets such as CIFAR-10, CIFAR-100, and ImageNet-100 (Giakoumoglou et al., 16 Jul 2025).

1. Core idea and conceptual scope

CueCo is organized around two complementary forces that the paper names scatter and align. The scatter force is supplied by instance-level contrastive learning: two augmented views of the same image are pulled together, while features of different images are pushed apart. The align force is supplied by clustering in feature space: features are attracted toward assigned centroids and their within-cluster dispersion is penalized. The intended outcome is a representation space in which semantically similar samples occupy compact groups and dissimilar samples are separated by larger margins (Giakoumoglou et al., 16 Jul 2025).

The method is explicitly two-network. Given two augmented views of an image, v=t(x)v = t(x) and v=t(x)v' = t'(x), the query encoder fθf_\theta produces z=fθ(v)\mathbf{z} = f_\theta(v) and the key encoder fξf_\xi produces z=fξ(v)\mathbf{z}' = f_\xi(v'). The key network is not trained by direct backpropagation from a separate objective; instead, it is updated as a slow-moving average of the query network. A FIFO queue of negative keys is then used both for instance contrast and as the working set on which centroid and variance statistics are maintained online.

This design places CueCo within a broader family of cluster-aware contrastive methods, but its defining emphasis is the simultaneous use of instance discrimination, feature-to-centroid attraction, and variance-aware compactness control within one training loop. A plausible implication is that CueCo treats clustering not as a downstream readout of contrastive features, but as a co-equal training signal.

The phrase Cluster Contrast predates CueCo in other subfields. In unsupervised person re-identification, “Cluster Contrast for Unsupervised Person Re-Identification” introduces a cluster-level memory dictionary and a cluster-level InfoNCE objective termed ClusterNCE, with one prototype per cluster rather than one vector per instance (Dai et al., 2021). This suggests a title overlap rather than a single standardized algorithm.

Earlier unsupervised clustering work already combined instance-level and cluster-level contrast. “Contrastive Clustering” performs instance contrast in the row space and cluster-level contrast in the column space of a soft assignment matrix, jointly learning representations and cluster assignments in an end-to-end online manner (Li et al., 2020). “You Never Cluster Alone” extends the mainstream contrastive learning paradigm to a cluster-level scheme through weighted aggregation of per-instance embeddings and a twin-track objective linking instance-level and cluster-level learning by assignment confidences (Shen et al., 2021).

Other strands operationalize cluster contrast through prototypes and pseudo-labels. “Cluster-guided Asymmetric Contrastive Learning for Unsupervised Person Re-Identification” uses cluster assignments and prototypes as supervision anchors, with positives defined by assigned cluster prototypes and negatives by other cluster prototypes, while enforcing invariance across color and grayscale branches (Li et al., 2021). “Dual Cluster Contrastive learning for Object Re-Identification” maintains both an individual cluster memory and a centroid cluster memory, using cross-view InfoNCE terms to exchange their respective benefits (Yao et al., 2021).

Beyond image representation learning, cluster-guided contrast has also been adapted to graph clustering. “Cluster-guided Contrastive Graph Clustering Network” replaces augmentation-driven positives with high-confidence same-cluster positives and replaces naive negatives with negatives formed by centers of different high-confidence clusters (Yang et al., 2023). Across these works, the term “CueCo” does not appear consistently; what is shared is the broader strategy of injecting cluster structure directly into contrastive objectives.

3. Mathematical formulation and representation geometry

CueCo uses three losses. The instance discrimination term is an InfoNCE objective in which the positive pair is (z,z)(\mathbf{z}, \mathbf{z}') and the negatives {zk}\{\mathbf{z}_k\} are taken from the queue:

Lcontr(z,z)=logexp(zz/τ)exp(zz/τ)+k=1Kexp(zzk/τ).\mathcal{L}_{\text{contr}}(\mathbf{z}, \mathbf{z}') = -\log \frac{ \exp\left(\mathbf{z}^\top \mathbf{z}' / \tau\right) }{ \exp\left(\mathbf{z}^\top \mathbf{z}' / \tau\right) + \sum_{k=1}^{K}\exp\left(\mathbf{z}^\top \mathbf{z}_k / \tau\right) }.

The features are L2L_2-normalized, the similarity function is the dot product of normalized vectors, and all temperatures are set to v=t(x)v' = t'(x)0 (Giakoumoglou et al., 16 Jul 2025).

Clustering enters through centroid assignment and centroid contrast. For cluster v=t(x)v' = t'(x)1, the centroid and variance estimated from assigned key features are

v=t(x)v' = t'(x)2

A query feature is assigned to its nearest centroid by Euclidean distance:

v=t(x)v' = t'(x)3

The centroid contrastive term is then

v=t(x)v' = t'(x)4

This term treats the assigned centroid as the positive cluster prototype and the remaining centroids as competing alternatives (Giakoumoglou et al., 16 Jul 2025).

CueCo further adds a variance-regularized compactness penalty,

v=t(x)v' = t'(x)5

The total objective is

v=t(x)v' = t'(x)6

with v=t(x)v' = t'(x)7, v=t(x)v' = t'(x)8, and v=t(x)v' = t'(x)9. In the paper’s interpretation, the contrastive term supplies the repulsive geometry that prevents collapse, while centroid contrast and variance reduction provide attractive forces that tighten semantically coherent groups. This suggests an equilibrium picture in which cluster radii shrink without sacrificing instance-level separation.

4. Architecture, online clustering, and optimization

CueCo uses a query encoder fθf_\theta0 and a key encoder fθf_\theta1. The key encoder is updated by exponential moving average:

fθf_\theta2

with a cosine schedule for fθf_\theta3 starting at fθf_\theta4 and increasing to fθf_\theta5. The implementation uses a modified ResNet-18 backbone in which fθf_\theta6 is fθf_\theta7 and max-pooling is removed. The query branch has a 2-layer MLP projection head and a prediction head; the key branch has the backbone and projection head only. The hidden size is fθf_\theta8 with ReLU, the output is fθf_\theta9-dimensional, and BatchNorm is applied with no ReLU on the output (Giakoumoglou et al., 16 Jul 2025).

The queue has size z=fθ(v)\mathbf{z} = f_\theta(v)0 and serves two roles. First, it provides the negatives for instance InfoNCE. Second, it provides the feature pool on which K-means initialization and momentum grouping compute and update centroids and variances online. The paper notes that the number of clusters z=fθ(v)\mathbf{z} = f_\theta(v)1 (or z=fθ(v)\mathbf{z} = f_\theta(v)2 for centroids) is not explicitly specified; centroids are initialized randomly or via K-means and then maintained online by momentum grouping.

Training proceeds iteratively. For each minibatch, two BYOL-style augmentations are sampled, query and key features are computed and normalized, InfoNCE is evaluated against queue negatives, and current keys are enqueued while the oldest entries are removed. Clustering is frozen for the first z=fθ(v)\mathbf{z} = f_\theta(v)3 iterations to prevent instability. After this warm-up, each query is assigned to its nearest centroid, centroid contrast and variance losses are evaluated, cluster features may be reset every z=fθ(v)\mathbf{z} = f_\theta(v)4 iterations to avoid collapse and maintain balanced clusters, and centroids and variances are updated with momentum coefficients z=fθ(v)\mathbf{z} = f_\theta(v)5 and z=fθ(v)\mathbf{z} = f_\theta(v)6, whose numerical values are not specified in the paper. Pretraining uses SGD with base learning rate z=fθ(v)\mathbf{z} = f_\theta(v)7, cosine decay to z=fθ(v)\mathbf{z} = f_\theta(v)8, momentum z=fθ(v)\mathbf{z} = f_\theta(v)9, and weight decay fξf_\xi0; CIFAR-10 and CIFAR-100 are trained for fξf_\xi1 epochs, and ImageNet-100 for fξf_\xi2 epochs (Giakoumoglou et al., 16 Jul 2025).

A common misconception is that CueCo performs full offline reclustering each epoch. Its actual mechanism is online: centroid statistics are maintained through the queue and momentum updates rather than through repeated full-dataset clustering.

5. Empirical behavior, evaluation, and ablations

CueCo is evaluated by linear probing on frozen features, by unsupervised image classification metrics, and by ablation studies. With a ResNet-18 backbone and linear evaluation, the reported top-1 accuracies are 91.40\% on CIFAR-10, 68.56\% on CIFAR-100, and 78.65\% on ImageNet-100; the corresponding top-5 accuracies are 99.79\%, 91.05\%, and 94.03\% (Giakoumoglou et al., 16 Jul 2025).

The paper positions these results as competitive rather than uniformly dominant. On CIFAR-10, CueCo at 91.40 is slightly below MoCo-v2 at 92.94, MoCo-v3 at 93.10, and BYOL at 92.61. On CIFAR-100, CueCo at 68.56 is close to MoCo-v2 at 69.54 and BT at 69.18, and above SimCLR at 65.39, SimSiam at 65.86, SwAV at 64.67, and DINO at 66.38. On ImageNet-100, CueCo at 78.65 is competitive with MoCo-v2 at 78.20 and BT at 78.62, while BYOL at 80.09 and MoCo-v3 at 80.86 are higher (Giakoumoglou et al., 16 Jul 2025).

For unsupervised image classification, CueCo reports clustering metrics on CIFAR-10 and CIFAR-100. On CIFAR-10, it achieves NMI 69.33, AMI 69.01, ARI 53.87, and ACC 75.06. On CIFAR-100, it reports NMI 52.37, AMI 46.31, ARI 11.35, and ACC 33.82. Compared to reimplemented SimCLR and MoCo-v2, the paper reports the best values across all listed clustering metrics on both datasets, which it attributes to the addition of feature-space clustering.

The ablation results are structurally important. On CIFAR-100, contrastive only gives top-1 67.9, top-5 90.7, 20-NN 66.5, 100-NN 66.4, NMI 50.5, AMI 44.4, ARI 8.3, and ACC 31.1. Adding centroid contrast improves clustering metrics substantially but slightly lowers top-1 to 66.9. Adding variance without centroid contrast yields top-1 68.4 and modest improvements in clustering metrics. Using all three terms gives top-1 68.5, top-5 91.0, 20-NN 66.8, 100-NN 67.0, NMI 52.3, AMI 46.3, ARI 11.3, and ACC 33.8. The paper interprets this as a trade-off in which centroid contrast particularly benefits clustering structure, while variance improves linear evaluation and nearest-neighbor performance when combined with the other terms (Giakoumoglou et al., 16 Jul 2025).

6. Variants, limitations, and conceptual boundaries

CueCo inherits limitations typical of online cluster-guided self-supervision. The paper identifies noisy assignments early in training, sensitivity to the number of clusters fξf_\xi3, possible distortion from class imbalance and domain shifts, and sensitivity to auxiliary hyperparameters such as fξf_\xi4, fξf_\xi5, fξf_\xi6, fξf_\xi7, EMA momentum, momentum grouping coefficients, batch size, and queue size (Giakoumoglou et al., 16 Jul 2025). The first fξf_\xi8 iterations without clustering and the periodic reset of cluster features every fξf_\xi9 iterations are explicit stabilizers for this failure mode.

A second misconception is that all cluster-contrast methods use the same mechanism. In fact, the literature spans several distinct templates. CueCo maintains centroids online from a queue and optimizes instance, centroid, and variance terms jointly (Giakoumoglou et al., 16 Jul 2025). In contrast, the graph-clustering model CCGC uses high-confidence pseudo-labels to define same-cluster positives and different-cluster center negatives, with two unshared encoders and no explicit graph augmentations (Yang et al., 2023). In person re-identification, the original Cluster Contrast method uses cluster-level memory and ClusterNCE (Dai et al., 2021), CACL uses cluster prototypes to align color and grayscale views (Li et al., 2021), and DCC uses dual memories—individual and centroid—with cross-view consistency (Yao et al., 2021). Oracle-guided Contrastive Clustering expands the positive set by oracle-validated same-cluster pairs in order to realize personalized clustering orientations (Wang et al., 2022). CoHiClust replaces flat prototypes with distributions over nodes in a binary tree and applies contrast at multiple depths, thereby producing hierarchical rather than flat cluster structure (Znaleźniak et al., 2023).

The term CueCo is therefore best understood as the name of a specific 2025 visual representation-learning framework, not as a universally standardized label for all cluster-level contrastive methods. At the same time, the broader research trajectory suggests a stable conceptual pattern: cluster cues can enter contrastive learning through prototypes, centroid memories, assignment distributions, high-confidence pseudo-labels, oracle constraints, or hierarchical routing. CueCo is one concrete realization of that pattern, distinguished by its online centroid maintenance, explicit scatter–align decomposition, and variance-aware compactness objective.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Cluster Contrast (CueCo).