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

Learning perturbation sets for robust machine learning

Eric Wong, J. Zico Kolter

In the world of robust machine learning, researchers have spent a decade fighting a war against "noise." Specifically, the focus has been on $\ell_p$ norms—mathematical boundaries around an image where an adversary can alter pixels just enough to fool a model without a human noticing. But there is a fundamental problem: the real world does not care about $\ell_p$ norms. Real-world "perturbations" look like shifting shadows, morning fog, or a different camera angle.

In their work, Eric Wong and J. Zico Kolter argue that if we want models to be robust to the real world, we need to stop guessing what the mathematical constraints look like and start learning them directly from data.

TL;DR

Instead of using manually defined mathematical sets (like $\ell_p$ balls) to train robust models, this paper proposes learning "perturbation sets" directly from data using Conditional Variational Autoencoders (CVAEs). This allows researchers to train and certify models against complex, non-linear effects like lighting changes and weather corruptions that are impossible to define with simple equations.

The Problem: Beyond Mathematical Bubbles

Standard adversarial defenses are built on a "threat model"—a formal definition of what an attacker is allowed to change. Usually, this is a small $\ell_\infty$ or $\ell_2$ constraint. While these are great for academic benchmarks, they are poor proxies for human invariants. A human easily recognizes a face wearing glasses or a stop sign in the rain, but these transformations are mathematically complex and "unrestricted."

The challenge is that you cannot perform adversarial training if you cannot define the "set" of possible perturbations. If you cannot write down the equation for "fog," you cannot find the "worst-case fog" to train against. This paper bridges that gap by learning a generative model that acts as a bridge between a simple latent space and complex real-world effects.

Methodology: Learning the Threat Model

The authors use a Conditional Variational Autoencoder (CVAE) as the core engine to model these complex changes.

  1. Learning the Set: Given pairs of images—one clean ($x$) and one perturbed ($\tilde{x}$)—the CVAE learns to map the transformation into a low-dimensional latent space.
  2. Defining the Threat Model: Once trained, the "perturbation set" is defined as all images the CVAE's decoder can produce by taking the clean image and varying the latent code within a small ball.
  3. Theoretical Grounding: The authors prove that CVAEs are uniquely suited for this because they naturally satisfy two properties:
  4. Necessary Subset: The learned set actually contains the real-world perturbations seen in the data.
  5. Sufficient Likelihood: Real perturbations are assigned high probability, making the model useful for data augmentation.
  6. Robust Optimization: With this learned set, the authors perform Adversarial Training and Randomized Smoothing by optimizing directly in the latent space of the CVAE rather than the pixel space.

Datasets and Benchmarks

The authors evaluated their approach on three distinct settings to prove its versatility:

  • MNIST-RTS: A synthetic benchmark using Rotation, Translation, and Skew to verify the method when the ground truth is known.
  • CIFAR10-C: A popular benchmark of "common corruptions" (fog, snow, blur, etc.). They used 12 types of "natural" corruptions at the highest severity level.
Generated CIFAR-10 corruptions
  • Multi-Illumination (MI) Dataset: A real-world dataset of 1,000 scenes captured under 25 different lighting directions. They used this for a downstream material segmentation task.
Multi-Illumination dataset lighting variations

Key Insights and Ideas

  • The Latent Space as a Lever: The core breakthrough is realizing that we can treat a generative model's latent space exactly like we used to treat pixel space. By finding the "worst-case latent code," the model effectively finds the "worst-case lighting" or "worst-case fog."
  • Continuous from Discrete: The Multi-Illumination dataset only has 25 discrete lighting angles. However, the CVAE learns a continuous spectrum, allowing the model to defend against lighting angles that were not even present in the training set.
  • Generalization vs. Robustness: Usually, adversarial training (like $\ell_\infty$) acts as a trade-off that hurts standard accuracy. Here, because the perturbations are semantically meaningful (acting like advanced data augmentation), the robust models often showed improved generalization on clean data.

Key Results

  • CIFAR10-C Robustness: On adversarial versions of common corruptions, the CVAE-trained model achieved 55.6% robust accuracy, compared to just 10.1% for a standard model and 23.6% for a model trained to be robust to $\ell_\infty$ noise.
  • Lighting Robustness: In the material segmentation task, adversarial training in the CVAE latent space increased robust accuracy from 27.1% (standard data augmentation) to 35.4%.
  • Qualitative Quality: The perturbations generated by the model look remarkably realistic, capturing complex shadows and atmospheric effects rather than just imperceptible "pixel wiggles."

Limitations and Future Work

  • Requirement for Paired Data: The biggest hurdle is the need for paired data $(x, \tilde{x})$. You cannot just learn from a collection of random foggy images; you need the exact "before and after" scenes.
  • The "Certification" Caveat: While the authors provide "certified" robustness, this certificate is only as good as the CVAE. If the CVAE does not perfectly model the real world, the certificate might not hold up against a truly "unrestricted" real-world attack.
  • Scaling: While they demonstrated scaling to MIP3 resolutions ($500 \times 750$), training large generative models for every possible threat remains computationally expensive.

This work represents a significant step toward "unrestricted" robustness, moving the field away from toy mathematical constraints and toward the messy, non-linear reality of the physical world.

Summary updated

BibTeX
@inproceedings{wong2021learning,
  author = {Eric Wong and J. Zico Kolter},
  title = {{Learning perturbation sets for robust machine learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=Az5FgbmniGs},
}
Figure