Adversarial Learning for Robust Deep Clustering

Xu Yang, Cheng Deng, Kun Wei, Junchi Yan, Wei Liu

Deep clustering models are highly vulnerable to adversarial perturbations in their latent embedding space. Tiny shifts can drastically alter cluster assignments without affecting image reconstruction. This paper introduces a novel adversarial attack to expose these unstable samples and a contrastive defense mechanism that makes the network robust while improving overall clustering accuracy on clean data.

The Hidden Vulnerability of Deep Clustering

Deep clustering combines autoencoders for feature extraction with clustering algorithms to group similar data points in an end-to-end unsupervised manner. While highly effective, these networks have a hidden vulnerability: they are easily fooled by adversarial attacks.

Because clustering lacks ground-truth labels, a tiny, invisible perturbation in the latent embedding space can push a sample across a decision boundary, completely changing its assigned cluster. The catch is that the autoencoder's reconstruction loss is entirely blind to this. The perturbed embedding will still reconstruct into an image that looks identical to the original, meaning the network is silently fooled. The authors aim to expose this vulnerability and build a defense mechanism to create more robust, clearly defined clusters.

A Two-Phase Adversarial Framework

The authors propose a two-phase adversarial learning framework—an "attack" and a "defense"—that operates entirely in the latent embedding space rather than on raw input pixels.

Architecture of the proposed adversarial learning framework
  1. The Attack Strategy: The main clustering network is frozen, and a separate attack network is trained. This network learns to add a small perturbation to the latent vector of a sample. The objective function ensures the perturbed feature still reconstructs the original image accurately (low reconstruction loss) but maximizes the difference in the predicted cluster label. This explicitly hunts down "unstable" samples near cluster boundaries.
  2. The Defense Strategy: Next, the attack network is frozen, and the main clustering network is updated. Using a discriminator and contrastive learning, the network is forced to output the same cluster prediction for both the clean embedding and its perturbed counterpart.

By iteratively playing this minimax game, the network pushes data points away from fragile decision boundaries, resulting in tighter, more distinct clusters.

Key Insights and Results

The authors evaluate their method on standard image benchmarks, including MNIST and Fashion-MNIST. Their findings reveal several critical insights about deep clustering robustness:

  • Reconstruction loss is insufficient: Relying solely on reconstruction loss leaves unsupervised models highly vulnerable, as autoencoders can perfectly reconstruct inputs even if their latent representations are maliciously nudged into different clusters.
  • Attacks act as diagnostic tools: By intentionally generating adversarial samples, the researchers explicitly find "unclear" samples whose cluster identities are ambiguous.
  • Dimensionality impacts stability: As the dimensionality of the embedding space increases, the intensity of the perturbation required to fool the network actually decreases. More complex feature structures are inherently less stable.
Clustering accuracy degradation during the attack strategy

The proposed attack effectively degrades clustering performance. For example, on a standard Convolutional Autoencoder (ConvAE) tested on MNIST, the attack dropped clustering accuracy from 85.7% to 77.5%.

However, training the network to resist these latent perturbations acts as a powerful regularizer. After applying the defense strategy, the ConvAE's baseline accuracy on clean MNIST data actually increased from 85.7% to 86.8%. This improvement demonstrates that forcing the model to ignore small latent shifts helps it learn better, more discriminative representations. The framework is also model-agnostic; when applied to the state-of-the-art DANDSC model on MNIST, accuracy improved from an already high 97.5% to 98.1%.

Limitations and Future Work

The authors note that clustering networks relying heavily on mutual information estimation are particularly susceptible to these latent perturbations because their feature distributions tend to be more discrete. Furthermore, while this work improves the security of unsupervised learning against data poisoning, the uncontrolled application of deep clustering in big data analytics still poses inherent risks to user privacy and information security that require ongoing research.

Summary updated

BibTeX
@inproceedings{yang2020adversarial,
  author = {Xu Yang and Cheng Deng and Kun Wei and Junchi Yan and Wei Liu},
  title = {{Adversarial Learning for Robust Deep Clustering}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
}
Figure