Towards Calibrated Deep Clustering Network

Yuheng Jia, Jianhong Cheng, Hui Liu, Junhui Hou

TL;DR

Deep clustering models are notoriously overconfident, often assigning high certainty to incorrect predictions—a fatal flaw when these models rely on their own predictions to teach themselves. This paper introduces a dual-head "Calibrated Deep Clustering" (CDC) network that dynamically calibrates confidence scores without needing labeled data, dramatically reducing calibration error while simultaneously achieving state-of-the-art clustering accuracy.

What Problem Does This Paper Address?

In unsupervised deep clustering, models group data into categories without any ground-truth labels. The state-of-the-art approach to this is pseudo-labeling: the model makes predictions, assumes its most confident predictions are correct, and uses those as "pseudo-labels" to train itself further.

However, this creates a dangerous feedback loop due to the overconfidence problem. Modern neural networks tend to be highly confident even when they are wrong. If a clustering model is overconfident, it will select incorrect pseudo-labels, feed them back into its own training process, and progressively degrade its performance.

Reliability diagram for the SPICE method, demonstrating severe overconfidence with an Expected Calibration Error (ECE) of 40.6%.

Standard confidence calibration techniques from supervised learning don't work here. Methods like Temperature Scaling require a labeled validation set (which doesn't exist in unsupervised clustering). Regularization methods like Label Smoothing penalize all predictions uniformly, which flattens out the confidence of genuinely correct predictions and makes it impossible for the model to distinguish between reliable and unreliable samples. The authors tackle this gap by designing a calibration method specifically tailored for the label-free clustering environment.

Methods

The authors propose a novel framework called Calibrated Deep Clustering (CDC), which relies on three key innovations:

  1. Dual-Head Architecture: The network splits the workload into two distinct heads: a Clustering Head and a Calibration Head. Decoupling these tasks prevents the conflicting goals of "making sharp clustering predictions" and "penalizing overconfidence" from interfering with each other.
  2. Region-Aware Calibration: Instead of penalizing all high-confidence predictions, the Calibration Head groups the data's features into "mini-clusters" using K-means. It then aligns its predictions with the average prediction of the clustering head for that specific region. This acts as a targeted penalty: it lowers confidence in "unreliable regions" (near decision boundaries where features are ambiguous) while preserving high confidence in "reliable regions."
  3. Dynamic Pseudo-Labeling: Previous methods used a fixed, hardcoded confidence threshold (e.g., 0.95) to select pseudo-labels. CDC instead uses the calibrated confidence from the Calibration Head to dynamically determine how many samples to select from each class. If the model is genuinely learning a class well, it selects more samples; if it's struggling, it selects fewer.
  4. Prototype-Based Initialization: Typically, adding a randomly initialized clustering head on top of a pre-trained feature backbone destroys the useful features the backbone just learned. The authors initialize the weights of both heads using K-means cluster centers (prototypes) derived from the pre-trained features, preserving the network's discriminative power from epoch one.

Datasets

The model was evaluated on six standard image benchmark datasets of varying complexity:

  • CIFAR-10 & CIFAR-20
  • STL-10
  • ImageNet-10 & ImageNet-Dogs (subsets of ImageNet)
  • Tiny-ImageNet

Key Insights and Ideas

  • Overconfidence is a silent killer in self-training: The paper highlights that the success of pseudo-labeling is entirely bottlenecked by the model's ability to know when it is right. Uncalibrated models poison their own training pools.
  • Targeted penalties beat blanket regularization: By using feature space geometry (mini-clusters) to identify which samples should be penalized, the model avoids the trap of Label Smoothing, which makes the model artificially unsure about everything.
  • Random initialization causes "catastrophic forgetting" in clustering: The authors demonstrated that a pre-trained MoCo-v2 backbone achieves ~50.7% accuracy using basic K-means, but drops to 10.4% the moment a randomly initialized clustering head is attached. Their prototype initialization strategy is a simple but highly effective fix for this instability.
Ablation on training process initialization. Random initialization causes catastrophic forgetting (dropping to 10.4%), whereas CDC's initialization preserves and improves accuracy.

Key Results

  • Massive Drop in Calibration Error: CDC surpassed state-of-the-art methods by an average of 5x in Expected Calibration Error (ECE). For example, on CIFAR-10, the ECE dropped from 15.4% (using the SPICE-2 method) to just 1.1%.
  • State-of-the-Art Accuracy: Calibrating the network didn't just make it more honest; it made it more accurate. CDC achieved top clustering accuracy across the board (e.g., 94.9% on CIFAR-10 and 61.7% on the much harder CIFAR-20).
  • Superior Failure Rejection: Because the confidence scores are actually reliable, the model is much better at separating correct predictions from incorrect ones, improving AUROC (Area Under the Receiver Operating Characteristic) for failure rejection by 8.6% over the next best method.
  • Better Out-of-Distribution (OOD) Detection: The calibrated model proved significantly better at identifying anomalous data (e.g., recognizing CIFAR-100 images when trained only on CIFAR-10).

Limitations and Future Work

  • Limitations: The region-aware calibration relies on a hyperparameter, $K$ (the number of mini-clusters). While the authors show the model is relatively robust to changes in $K$, it still requires empirical tuning based on dataset complexity. Additionally, the dual-head setup and K-means operations slightly increase the memory footprint during training.
  • Future Work: The current framework only selects highly confident samples for pseudo-labeling. The authors suggest that exploring techniques from semi-supervised learning to safely utilize moderately confident samples could further boost the model's learning capacity in the future.

Summary updated

BibTeX
@inproceedings{jia2025towards,
  author = {Yuheng Jia and Jianhong Cheng and Hui LIU and Junhui Hou},
  title = {{Towards Calibrated Deep Clustering Network}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=JvH4jDDcG3},
}
Figure