TL;DR
SCMax is a fully parameter-free hierarchical clustering framework that eliminates the need to guess the number of clusters ($K$) or manually tune sensitive thresholds. By leveraging self-supervised contrastive learning to perturb data representations, it automatically discovers the optimal cluster structure at the exact moment when the consensus between original and perturbed states is maximized.
What Problem Does This Paper Address?
Clustering is a cornerstone of unsupervised learning, but most traditional algorithms aren't truly hands-off. They heavily rely on hyperparameters—most notably the number of clusters ($K$), but also distance thresholds or density cutoffs. In real-world scenarios, we rarely have prior knowledge of these values.
Common workarounds, like the "elbow method," are highly subjective, unstable in high-dimensional spaces, and require manual interpretation. While some "parameter-free" methods exist, they often just trade $K$ for other sensitive hyperparameters or suffer from massive computational overhead. The authors of this paper tackle a fundamental question: How can we automatically generate and evaluate cluster structures in a single, integrated process without any prior knowledge or manual tuning?
Methods
The proposed framework, SCMax (Self-supervised Consensus Maximization), solves this by combining hierarchical agglomerative clustering with a novel self-supervised evaluation metric.
- Autoencoder Module: First, raw data is passed through a standard autoencoder to map inputs into a lower-dimensional latent space ($Z$), filtering out noise and redundancy.
- Cluster Number Generation: Starting with each sample as its own cluster, SCMax recursively merges clusters using an efficient class-level nearest neighbor graph (built via KD-Trees). This keeps the time complexity down to $O(K \log K)$ and generates a sequence of candidate cluster structures.
- Self-Supervised Consensus Maximization: This is the core innovation. To evaluate which candidate structure is the "true" one, SCMax applies a controlled structural perturbation to the latent space. It uses a mini-batch structural contrastive loss guided by the current cluster assignments to pull same-cluster samples together and push different-cluster samples apart.
SCMax then measures the agreement between the next merge decisions made on the original latent space versus the perturbed space. This agreement is quantified using a new metric called the Nearest Neighbor Consensus (NNC) score. The optimal partition is selected when this consensus reaches its maximum.
Datasets
The authors evaluated SCMax across eight diverse, single-view benchmark datasets:
- Image Data: MSRCv1, HW2, MNIST, CIFAR-10, CIFAR-100, Fashion-MNIST, and YTF20 (a large face dataset).
- Text/Multimodal Data: Wiki.
The datasets scale from small text corpuses to large image collections containing over 63,000 samples and up to 100 ground-truth clusters. No new benchmarks were introduced.
Key Insights and Ideas
- The Stability "Sweet Spot": The framework hinges on the concept of nearest-neighbor stability. When the candidate cluster count matches the true number of clusters ($K = K_{true}$), the local neighborhood structure is highly robust; a slight contrastive perturbation won't alter intra-class relationships. However, if $K$ is too high (over-segmentation) or too low (under-segmentation), the cluster boundaries are highly volatile, causing the NNC score to drop sharply.
- Controllable vs. Random Perturbations: Instead of injecting random Gaussian noise—which lacks structural awareness—SCMax uses a contrastive loss to introduce directional and controllable interventions. Ablation studies proved that this structurally constrained perturbation is vital for accurately pinpointing the optimal cluster count.
Key Results
- State-of-the-Art Performance: SCMax consistently outperformed nine competitive "Non-K" (parameter-free) clustering methods in both Accuracy (ACC) and F-score. For instance, on CIFAR-10, SCMax achieved an accuracy of 87.03%, outperforming the next best parameter-free method (DeepDPM) by over 5%.
- Impressive $K$ Estimation: SCMax proved highly adept at inferring the true number of clusters. It guessed exactly 10 clusters for the Wiki dataset (true $K=10$) and 106 for CIFAR-100 (true $K=100$).
- Excellent Scalability: Many graph- and density-based clustering methods suffer from Out-of-Memory (OOM) errors on larger datasets due to quadratic ($O(N^2)$) or cubic ($O(N^3)$) complexities relative to the number of samples ($N$). Because SCMax's complexity primarily scales with the number of clusters ($K$) and batch size ($B$), it successfully processed large-scale datasets like Fashion-MNIST and YTF20 where competitors failed.
Limitations and Future Work
While SCMax represents a major step toward truly autonomous clustering, it still relies on a standard autoencoder for initial feature extraction, meaning the user must predefine the neural network's architecture.
For future work, the authors plan to eliminate this reliance on predefined architectural structures within the representation learning module. They also aim to explore more advanced cluster number generation strategies to further enhance the precision and robustness of the generated candidate structures.
Summary updated