Ensemble Robustness of Deep Learning Algorithms

Jiashi Feng, Tom Zahavy, Bingyi Kang, Huan Xu, Shie MannorarXiv 2016

Abstract

The question why deep learning algorithms generalize so well has attracted increasing research interest. However, most of the well-established approaches, such as hypothesis capacity, stability or sparseness, have not provided complete explanations. In this work, we focus on the robustness approach: if the error of a hypothesis will not change much due to perturbations of its training examples, then it will also generalize well. As most deep learning algorithms are stochastic (e.g., Stochastic Gradient Descent, Dropout, and Bayes-by-backprop), we revisit the robustness arguments and introduce a new approach, ensemble robustness, that concerns the robustness of a population of hypotheses. Through the lens of ensemble robustness, we reveal that a stochastic learning algorithm can generalize well as long as its sensitiveness to adversarial perturbations is bounded in average over training examples. Moreover, an algorithm may be sensitive to some adversarial examples but still generalize well. We provide extensive simulations for different deep learning algorithms and different network architectures exhibiting a strong correlation between ensemble robustness and the ability to generalize.

Introduction: The Generalization Paradox

Deep learning presents a fundamental challenge to classical statistical learning theory. Modern deep neural networks (DNNs) often have far more parameters than training samples, yet they generalize remarkably well instead of merely memorizing the data. Furthermore, these models are notoriously fragile; tiny, imperceptible adversarial perturbations can cause them to fail. This creates a "generalization paradox": how can models that are so easily "tricked" by specific inputs still perform robustly on unseen data?

Existing theories based on hypothesis capacity (e.g., VC dimension) or algorithmic stability have struggled to fully explain this phenomenon. This paper proposes that the answer lies in the stochastic nature of deep learning algorithms and introduces the concept of ensemble robustness.

From Algorithmic to Ensemble Robustness

The authors build upon the framework of algorithmic robustness, which posits that an algorithm generalizes well if its loss is relatively invariant to small perturbations in the training data. However, standard robustness assumes a deterministic hypothesis.

Since modern deep learning is inherently stochastic—relying on random weight initialization, data shuffling in SGD, and techniques like Dropout—the training process produces a distribution of possible models rather than a single deterministic one.

Ensemble Robustness is defined by the expected difference between the loss on a training sample and its perturbed counterpart, where the expectation is taken over the internal randomness of the learning algorithm. Theoretically, the authors derive PAC-style generalization bounds linking this ensemble measure directly to the gap between training and test error.

Empirical Evaluation

To validate the theory, the authors conducted extensive simulations on image classification benchmarks (MNIST and notMNIST) using various architectures and training methods, including Stochastic Gradient Descent (SGD) and Bayes-by-Backprop. They approximated ensemble robustness ($\bar{\epsilon}_{emp}$) by averaging the sensitivity of five distinct model instances to adversarial perturbations.

Correlation between ensemble robustness ($\bar{\epsilon}_{emp}$) and generalization error across different algorithms.

The results demonstrate a remarkably strong correlation between the empirical ensemble robustness and actual generalization error. As shown in the figure above, Pearson correlation coefficients ($r$) consistently fall between 0.73 and 0.90 across different optimization strategies.

Key Insights

1. Stochasticity as a Regularizer

The inherent randomness in algorithms like SGD and Dropout is not just a computational artifact; it is a mechanism that promotes ensemble robustness. While a single model instance might be vulnerable to a specific adversarial attack, the population of models remains stable on average.

2. Average-Case vs. Worst-Case Robustness

A critical distinction is made between adversarial fragility (worst-case sensitivity) and ensemble robustness (average-case sensitivity). A network can be "non-robust" in the adversarial sense—meaning a breaking perturbation exists—while remaining "ensemble robust" because those failures are rare across the distribution of hypotheses. This explains why adversarial vulnerability does not preclude good generalization.

3. Adversarial Training

The paper provides a theoretical justification for adversarial training. By training on perturbed examples, the algorithm explicitly minimizes the ensemble robustness measure, forcing the resulting distribution of hypotheses to be less sensitive to data variations, thereby improving generalization.

Conclusion

Ensemble robustness offers a powerful new lens for understanding generalization in deep learning. By shifting focus from individual, deterministic models to the behavior of the learning algorithm's output distribution, we can reconcile the observed fragility of DNNs with their impressive performance on new data. Furthermore, because ensemble robustness can be estimated using only training data, it presents a promising alternative to cross-validation for model selection, particularly in data-constrained regimes.

Summary updated

BibTeX
@misc{feng2016ensemble,
  author = {Jiashi Feng and Tom Zahavy and Bingyi Kang and Huan Xu and Shie Mannor},
  title = {{Ensemble Robustness of Deep Learning Algorithms}},
  year = {2016},
  eprint = {1602.02389},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1602.02389},
}
Figure