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

On the Robustness of Deep Clustering Models: Adversarial Attacks and Defenses

Anshuman Chhabra, Ashwin Sekhari, Prasant Mohapatra

Abstract

Clustering models constitute a class of unsupervised machine learning methods which are used in a number of application pipelines, and play a vital role in modern data science. With recent advancements in deep learning -- deep clustering models have emerged as the current state-of-the-art over traditional clustering approaches, especially for high-dimensional image datasets. While traditional clustering approaches have been analyzed from a robustness perspective, no prior work has investigated adversarial attacks and robustness for deep clustering models in a principled manner. To bridge this gap, we propose a blackbox attack using Generative Adversarial Networks (GANs) where the adversary does not know which deep clustering model is being used, but can query it for outputs. We analyze our attack against multiple state-of-the-art deep clustering models and real-world datasets, and find that it is highly successful. We then employ some natural unsupervised defense approaches, but find that these are unable to mitigate our attack. Finally, we attack Face++, a production-level face clustering API service, and find that we can significantly reduce its performance as well. Through this work, we thus aim to motivate the need for truly robust deep clustering models.

Introduction

While significant research has focused on hardening supervised learning models against adversarial perturbations, the robustness of unsupervised deep clustering models remains largely unexplored. Deep clustering models are increasingly deployed in critical domains such as medical imaging and forensic analysis. Unlike supervised classifiers where an attacker targets a specific label, attacking a clustering model involves disrupting the model's internal logic of sample similarity. This paper presents the first principled investigation into test-time blackbox attacks on these systems.

Methodology: GAN-Based Blackbox Attack

We propose a blackbox attack framework utilizing Generative Adversarial Networks (GANs). The attack is designed to be "score-based," requiring only the softmax probability outputs from the target model.

  1. Objective Function: The adversary aims to maximize the distance between the original cluster probability distribution and the perturbed distribution. This pushes samples away from their natural "neighborhoods" in the latent space.
  2. Architecture: A Generator ($G$) produces specific noise perturbations ($\delta$) for each input, while a Discriminator ($D$) ensures these changes remain imperceptible to human observers.
  3. Surrogate Strategy: To attack systems with hidden scores (e.g., commercial APIs), we employ a surrogate model strategy. We train an open-source clustering model, generate adversarial examples for it, and then transfer these images to the target system.

Experimental Evaluation

The attack was evaluated on standard benchmarks including CIFAR-10, CIFAR-100, and STL-10. For commercial testing, the Extended Yale Face B dataset was used to attack the Face++ API. We tested several state-of-the-art models, including CC, MiCE, SCAN, and SPICE.

Results and Discussion

The quantitative impact of the GAN-based attack is significant. For instance, the utility of the SPICE model on the STL-10 dataset (measured by Normalized Mutual Information, NMI) dropped from 0.87 to 0.14 under attack.

Visual comparison of original images and their adversarial counterparts. The attack successfully shifts images into incorrect clusters while maintaining visual similarity.

Key Insights

  • Clustering Breakdown: Attacked models often experience a total collapse where adversarial samples are lumped into a few giant, meaningless clusters.
  • Ineffective Defenses: Current unsupervised defenses, such as RUC (in-processing) and SSD (pre-processing anomaly detection), fail to mitigate the attack. The GAN-generated noise mimics the natural data distribution so closely that adversarial images remain "in-distribution" for most detectors.
  • Commercial Vulnerability: The attack successfully reduced the Face++ API's clustering performance from an NMI of 0.97 to 0.62 using a simple surrogate model.

Conclusion

Our findings reveal a critical lack of robustness in current deep clustering models. Existing defense mechanisms, often adapted from supervised learning, are ill-equipped to handle unsupervised GAN-based attacks. This work highlights the urgent need for new defense primitives designed specifically for the geometric properties of latent cluster spaces.

Summary updated

BibTeX
@inproceedings{chhabra2022robustness,
  author = {Anshuman Chhabra and Ashwin Sekhari and Prasant Mohapatra},
  title = {{On the Robustness of Deep Clustering Models: Adversarial Attacks and Defenses}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=gHtK3VyS3i},
}
Figure