Robustness to Adversarial Examples through an Ensemble of Specialists

Mahdieh Abbasi, Christian Gagné

Introduction

Convolutional Neural Networks (CNNs) are notoriously brittle. Tiny, human-invisible perturbations—known as adversarial examples—can trick a state-of-the-art model into misclassifying an image with high confidence. Existing defenses usually involve "adversarial training" (showing the model attacks during training), but this approach often overfits to specific attacks and incurs a "clean data tax," degrading accuracy on normal images.

Instead of trying to "fix" a neural network to correctly classify adversarial attacks, this paper proposes treating adversarial detection as an open set recognition problem. The authors introduce a "Specialists+1" ensemble that identifies and rejects malicious inputs. By training a group of specialist models on specific subsets of confusing classes, the system creates a high-disagreement (high entropy) state when faced with an adversary, allowing the system to say "I don't know" rather than being confidently wrong.

The Specialists+1 Ensemble

The core of the proposed defense is the Specialists+1 Ensemble, which relies on the observation that adversarial examples do not cause random errors; rather, they push samples into specific "confusing target subsets."

Confusion matrices for MNIST and CIFAR-10 showing how adversarial examples target specific classes.

The ensemble is built and operates as follows:

  1. Analyzing Confusion: The authors first analyze how a standard model fails under attack. For any given true class (e.g., "Dog"), adversarial versions of that image are usually misclassified into a very small, specific subset of other classes (e.g., "Cat" or "Horse").
  2. Building Specialists: For every class $i$, a "specialist" CNN is created. This specialist is trained only on class $i$ and its most frequent adversarial "confusers." Crucially, these specialists are trained on clean data, not adversarial data. Their "specialty" is having a more nuanced understanding of the boundaries between naturally similar classes.
  3. The "+1" Generalist: The ensemble includes one standard "generalist" model trained on all classes.
  4. The Voting Mechanism: When an image is processed, the models vote. If the generalist and the relevant specialists all agree on a class, the prediction is accepted. If there is significant disagreement (high entropy), the system flags the input as an adversarial example and rejects it.

Experiments and Key Results

The researchers evaluated their approach on two classic computer vision benchmarks: MNIST (grayscale handwritten digits) and CIFAR-10 (color images across 10 categories). They tested the ensemble against three types of attacks: Fast Gradient Sign (FGS), DeepFool (DF), and the Szegedy et al. (L-BFGS) method.

By shifting the goalpost from achieving 100% accuracy on malicious inputs to ensuring reliability, the Specialists+1 ensemble demonstrated significant improvements in adversarial detection.

Density plots showing how the Specialists+1 ensemble shifts the confidence of adversarial examples toward zero compared to baseline models.
  • Confidence Shifting: In standard models, adversarial examples often result in high-confidence wrong answers. The Specialists+1 ensemble successfully "shifted" the confidence of adversarial samples toward zero, creating a clear separation between clean and adversarial inputs.
  • Effective Rejection: On MNIST, the ensemble could reject the vast majority of FGS and DeepFool attacks by setting a confidence threshold of 0.5, while only losing a tiny fraction of accuracy on clean images.
  • CIFAR-10 Performance: The method was also effective on the more complex CIFAR-10 dataset. However, the "clean data tax" was slightly higher here, as some clean samples were shifted to lower confidence and rejected along with the adversaries.

Limitations and Future Work

While highly effective at rejecting attacks, the Specialists+1 approach has limitations:

  • Computational Cost: Training $K+1$ models (where $K$ is the number of classes) is computationally expensive. For a dataset like ImageNet with 1,000 classes, this specific architecture would be difficult to scale without further optimization.
  • The Rejection Trade-off: The system occasionally rejects difficult "clean" samples. Finding the perfect confidence threshold to balance security and usability remains a challenge.

Future work may explore comparing this "clean-trained" ensemble against models explicitly trained on adversarial examples, potentially combining the two approaches for even greater robustness.

Summary updated

BibTeX
@inproceedings{abbasi2017robustness,
  author = {Mahdieh Abbasi and Christian Gagné},
  title = {{Robustness to Adversarial Examples through an Ensemble of Specialists}},
  booktitle = {Workshops @ ICLR},
  year = {2017},
}
Figure