Learning from Sample Stability for Deep Clustering

Zhixin Li, Yuheng Jia, Hui Liu, Junhui HouICML 2025

TL;DR

Deep clustering often struggles because it lacks ground-truth labels to guide the learning process. This paper introduces sample stability—a metric measuring how much a sample's internal representation changes between training epochs—as a novel supervision signal. The authors demonstrate that "unstable" samples are the primary culprits behind clustering errors and show how filtering them can significantly boost model performance.

What Problem Does This Paper Address?

In deep clustering, a neural network must learn to group similar data points without any human-provided labels. To achieve this, researchers usually rely on "surrogate" signals like data reconstruction or contrastive learning (comparing different views of the same image).

However, these methods often ignore the temporal dynamics of training. The authors observed a critical gap: some samples "settle down" into stable representations quickly, while others remain "unstable," shifting wildly in the feature space from one epoch to the next. This paper investigates why this happens and how we can use this internal "uncertainty" of the network to guide it toward better clustering.

Methods: Learning From Sample Stability (LFSS)

The authors propose a framework called LFSS (Learning From Sample Stability). The core idea is to track a sample's representation across two consecutive epochs and calculate their cosine similarity. This similarity score defines the "sample stability."

The LFSS architecture uses an asymmetric network setup (similar to BYOL) with three main components:

  1. Instance-level Stability Loss ($L_I$): This forces the network to maintain consistent representations for a sample across epochs, effectively "penalizing" unnecessary fluctuations.
  2. Cluster-level Stability Loss ($L_C$): The model performs K-means clustering to find cluster centers. Crucially, it excludes the most unstable samples (the top 10%) when calculating these centers. This prevents atypical or "confused" samples from pulling the cluster centers away from the true data distribution.
  3. Self-distillation with Noise ($L_S$): To make the representations more robust, the model adds random Gaussian noise to the online network's output before it reaches the prediction head, forcing the model to learn features that are invariant to small perturbations.

Key Insights and Ideas

  • Stability = Accuracy: There is a direct correlation between how stable a sample is and how likely it is to be clustered correctly. Unstable samples are almost always the ones the model gets wrong.
Correlation between sample stability bins and prediction accuracy across different epochs on CIFAR-10.
  • Persistent Instability: Instability isn't just a random fluke of a specific training run. Certain samples are "persistently unstable" across different methods and datasets.
  • The "Atypicality" Factor: Visual inspection reveals that unstable samples are often "atypical"—think of a penguin in weird lighting or a truck seen only through a rearview mirror. These are "hard" samples that the network struggles to memorize because they don't look like the "prototypical" version of their class.
  • Stability as a Filter: By identifying these "hard" samples in real-time, the model can choose to ignore them when defining what a "category" looks like (the cluster center), leading to much cleaner boundaries.

Datasets and Key Results

The researchers evaluated LFSS on a wide range of standard computer vision benchmarks, ranging from small-scale (CIFAR-10/20) to large-scale (Tiny-ImageNet, ImageNet-1K).

LFSS consistently outperformed 15 state-of-the-art deep clustering methods:

  • CIFAR-10: Achieved 93.4% accuracy, a massive jump from the 83.3% baseline.
  • ImageNet-Dogs: On this difficult fine-grained task, it reached 69.1% accuracy, outperforming the next best method (ProPos) by over 5%.
  • Versatility: The authors showed that "Sample Stability" can be plugged into other popular frameworks like SimCLR or MoCo, providing an immediate performance boost of up to 10% in some cases.

Limitations and Future Work

While highly effective, the method has a few trade-offs:

  • Memory Overhead: It requires a "predecessor network" (a copy of the weights from the previous epoch) to calculate stability, which increases memory usage.
  • Warmup Sensitivity: The model needs a "warmup" period (training without the cluster-level loss) to establish initial stability before the filtering mechanism becomes effective.
  • Future Directions: The authors suggest exploring more sophisticated ways to handle the "unstable" samples. Rather than just excluding them from cluster centers, future work could design specific sub-tasks to help the network learn these atypical cases more effectively.

Summary updated

BibTeX
@inproceedings{li2025learning,
  author = {Zhixin Li and Yuheng Jia and Hui LIU and Junhui Hou},
  title = {{Learning from Sample Stability for Deep Clustering}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=gtVW8CO6Wf},
}
Figure