Adversarial Examples for Unsupervised Machine Learning Models

Chia-Yi Hsu, Pin-Yu Chen, Songtao Lu, Sijia Lu, Chia-Mu Yu

Abstract

Adversarial examples causing evasive predictions are widely used to evaluate and improve the robustness of machine learning models. However, current studies focus on supervised learning tasks, relying on the ground-truth data label, a targeted objective, or supervision from a trained classifier. In this paper, we propose a framework of generating adversarial examples for unsupervised models and demonstrate novel applications to data augmentation. Our framework exploits a mutual information neural estimator as an information-theoretic similarity measure to generate adversarial examples without supervision. We propose a new MinMax algorithm with provable convergence guarantees for efficient generation of unsupervised adversarial examples. Our framework can also be extended to supervised adversarial examples. When using unsupervised adversarial examples as a simple plug-in data augmentation tool for model retraining, significant improvements are consistently observed across different unsupervised tasks and datasets, including data reconstruction, representation learning, and contrastive learning. Our results show novel methods and considerable advantages in studying and improving unsupervised machine learning via adversarial examples.

Introduction

Adversarial examples—subtly perturbed inputs that cause models to fail—are a staple of supervised learning research. However, the field has largely ignored unsupervised learning because traditional attacks require ground-truth labels or a target class to "aim" for. Unsupervised models, such as autoencoders used for data reconstruction or feature extraction, also possess "blind spots" where they generalize poorly. This research addresses the gap by proposing a framework for generating Unsupervised Adversarial Examples (UAEs) without relying on labels, and subsequently using them as a powerful data augmentation tool to boost model performance and robustness.

Methodology

The core innovation is the use of a per-sample Mutual Information Neural Estimator (MINE) as a similarity metric.

Similarity Measure

Instead of relying on simple distance metrics like $L_p$ norms, the framework uses MINE to measure the information-theoretic similarity between an original sample and its perturbed version. Two methods are proposed to estimate this for a single sample:

  1. Random Sampling: Utilizing Gaussian projections.
  2. Convolution Layer Output: Utilizing feature maps from the model's first convolutional layer.
Visualizing the similarity estimation methods: original images compared with random sampling and convolutional layer outputs.

Defining the UAE

In an unsupervised context, an adversarial example is defined as a sample that is informationally dissimilar to the original (low mutual information) but yields a lower training loss (e.g., better reconstruction). This targets "on-manifold" samples that the model is biased toward but has not encountered during training, exposing generalization errors on low-loss samples.

MinMax Algorithm

To generate these examples efficiently, a new MinMax optimization algorithm was developed. It dynamically adjusts the trade-off between maximizing loss and maintaining similarity. The algorithm provides provable convergence guarantees and outperforms baseline methods like binary search in terms of maximizing mutual information over iterations.

Efficiency of the MinMax algorithm compared to Binary Search in maximizing Mutual Information (MI) across MNIST and CIFAR-10 datasets.

Experimental Results

The framework was evaluated across diverse datasets, including image data (MNIST, CIFAR-10, etc.) and tabular/sensor data (Isolet, HAR).

  • Data Reconstruction: Retraining autoencoders with UAEs led to massive improvements in reconstruction error—up to 73.5% improvement on SVHN and 56.7% on MNIST.
  • Contrastive Learning: Applied to SimCLR, UAE augmentation improved contrastive loss by 7.8% and downstream classification accuracy by 1.58%, outperforming other adversarial augmentation methods like CLAE.
  • Feature Selection: In representation learning with Concrete Autoencoders, UAEs improved performance across most datasets, with accuracy gains up to 1.39%.
  • Robustness: Models retrained with UAEs showed consistently lower Attack Success Rates (ASR) when faced with standard adversarial attacks, indicating that unsupervised augmentation can strengthen supervised robustness.

Discussion and Conclusion

The use of Mutual Information as a similarity constraint produces higher-quality, more diverse adversarial examples than standard distance-based constraints. By training on UAEs, models learn a more invariant representation of the data manifold. While generating UAEs via MINE introduces some computational overhead (e.g., ~1.7s per sample on CIFAR-10), the performance gains are significant. Future work may focus on scaling this framework to higher-resolution datasets and more complex generative models through more efficient MI estimation.

Summary updated

BibTeX
@inproceedings{hsu2022adversarial,
  author = {Chia-Yi Hsu and Pin-Yu Chen and Songtao Lu and Sijia Lu and Chia-Mu Yu},
  title = {{Adversarial Examples for Unsupervised Machine Learning Models}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i6.20650},
}
Figure