Improving Adversarial Robustness via Promoting Ensemble Diversity

Tianyu Pang, Kun Xu, Chao Du, Ning Chen, Jun Zhu

TL;DR

This paper introduces a novel training regularizer called Adaptive Diversity Promoting (ADP) that significantly boosts the adversarial robustness of model ensembles. By forcing individual models to have diverse and mutually orthogonal "wrong" predictions (non-maximal probabilities), the authors make it much harder for adversarial examples to transfer between ensemble members, effectively closing a common loophole in defense strategies.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are notoriously fragile when faced with adversarial examples—inputs specifically crafted with tiny, human-imperceptible perturbations designed to fool a classifier. While ensembling multiple models is a standard way to improve general performance, it often fails as a defense because adversarial examples tend to "transfer": an image that fools Model A is highly likely to fool Model B if they were trained similarly.

The authors identify a major gap: most ensemble defenses focus on making individual models stronger but ignore the interaction between them. Previous attempts to encourage "diversity" in ensembles usually focused on making models fail on different training points. However, since modern DNNs are so accurate on training data, these old definitions of diversity are either useless or actively harmful to the model's final accuracy.

Methods

The core contribution is a new definition of Ensemble Diversity (ED) and a corresponding regularizer.

  1. Non-Maximal Predictions: Instead of looking at the "correct" class prediction, the authors look at the probabilities assigned to all the other classes (the non-maximal predictions).
  2. Geometric Diversity: They define diversity as the squared volume spanned by these non-maximal prediction vectors across the ensemble. Intuitively, if Model 1 thinks a "dog" looks slightly like a "cat," Model 2 should think it looks slightly like a "car."
Baseline vs ADP Geometric Diversity
  1. The ADP Regularizer: The authors propose a training objective with two main components:
  2. Ensemble Shannon Entropy: Encourages the ensemble's average prediction to be somewhat smooth (similar to label smoothing), which provides the "space" for diversity to exist.
  3. Logarithm of Ensemble Diversity (LED): Explicitly encourages the non-maximal prediction vectors of different models to be mutually orthogonal.
  4. Simultaneous Training: Unlike standard ensembles where models are trained independently, ADP-trained models are trained together, interacting through the regularizer to ensure their decision boundaries diverge in a way that thwarts adversarial transfers.

Datasets

The authors evaluated their method on three standard image classification benchmarks:

  • MNIST: Handwritten digits (10 classes).
  • CIFAR-10: General objects (10 classes).
  • CIFAR-100: General objects (100 classes).

Key Insights and Ideas

  • Orthogonality as Defense: By forcing models to be "wrong" in different directions, the "adversarial space" for one model becomes "safe space" for another. An attack that tries to push an image into Model 1's "cat" region might still land in Model 2's "dog" (correct) region.
  • Maintaining Accuracy: Because the regularizer focuses on the non-maximal predictions, it doesn't force the models to be wrong about the true label. This allows the ensemble to maintain state-of-the-art accuracy on normal, clean data while gaining robustness.
  • Orthogonality to Other Defenses: ADP is "orthogonal" to existing defenses like Adversarial Training (AdvT). You can use both simultaneously to get the benefits of both.
  • Computational Efficiency: While it requires simultaneous training, the overhead is minimal (roughly 10% more time per epoch) because the diversity calculation involves small matrices (proportional to the number of models, not the number of parameters).

Key Results

  • White-box Robustness: On MNIST, under a PGD attack (a strong iterative attack), a baseline ensemble achieved only 6.3% accuracy. The ADP-trained ensemble achieved 41.0%.
  • Black-box Transferability: The authors showed that adversarial examples crafted to fool one ADP-trained model were significantly less likely to fool its peers compared to a baseline ensemble.
  • Synergy with Adversarial Training: Combining ADP with standard Adversarial Training (AdvT) on CIFAR-10 improved PGD accuracy from 32.8% (AdvT alone) to 36.2% (AdvT + ADP).
  • Ensemble Accuracy: Interestingly, ADP often improved clean-data accuracy for the ensemble, even if individual model accuracy dropped slightly, proving that diversity is a "free lunch" for generalization.

Limitations and Future Work

  • Scaling to Large Class Counts: The authors note that when the number of classes ($L$) is very large (like ImageNet), the non-maximal probabilities become very small, which might lead to numerical vanishing gradients. They suggest "temperature scaling" as a potential fix.
  • Dependence on Ensemble Size: The geometric interpretation of diversity (volume) is limited by the dimensionality of the output space. If the number of models $K$ exceeds the number of classes $L$, the vectors cannot all be orthogonal.
  • Adaptive Attacks: While the paper tests against many standard attacks, future work could explore "ensemble-aware" attacks specifically designed to find the narrow overlap between diverse models.

Summary updated

BibTeX
@inproceedings{pang2019improving,
  author = {Tianyu Pang and Kun Xu and Chao Du and Ning Chen and Jun Zhu},
  title = {{Improving Adversarial Robustness via Promoting Ensemble Diversity}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
  url = {https://openreview.net/forum?id=SkbtyjZ_Zr},
}
Figure