Saliency Diversified Deep Ensemble for Robustness to Adversaries

Alex Bogun, Dimche Kostadinov, Damian Borth

TL;DR

Deep neural network ensembles often fail against adversarial attacks because individual models share the same underlying blind spots. This paper introduces Saliency Map Diversity (SMD), a training regularizer that penalizes alignment between the input saliency maps of ensemble members. By forcing each network to focus on distinct features of the input image, SMD dramatically lowers attack transferability and sets new state-of-the-art defense benchmarks against both white-box and black-box adversaries.

What Problem Does This Paper Address?

Ensemble methods are a classic technique to boost accuracy and generalization in machine learning. However, standard ("naive") ensembles provide little defense against adversarial attacks: if all member models rely on the same fragile pixel patterns, an adversarial perturbation designed for one model will reliably fool the rest (known as adversarial transferability).

Existing defense methods attempt to encourage ensemble diversity by decorrelating non-maximal prediction vectors or misaligning loss gradients. Yet, many of these approaches either collapse under medium-to-strong white-box attacks, target loss functions rather than class-specific features, or introduce high computational overhead without preventing models from attending to the exact same image regions.

Methods

The authors propose Saliency Map Diversity (SMD):

  • Saliency Calculation: For each ensemble member $f_m$, the saliency map $\mathbf{s}_m$ is defined as the first-order gradient of the true class prediction score with respect to the input: $$\mathbf{s}_m = \frac{\partial f_m(\mathbf{x})[y]}{\partial \mathbf{x}}$$ This captures which input pixels the model considers most crucial for the correct label.

  • SMD Regularizer: The regularizer measures pairwise cosine similarities between normalized saliency maps using a numerically stable LogSumExp formulation: $$\mathcal{L}_{\text{SMD}}(\mathbf{x}) = \log \sum_{m} \sum_{l > m} \exp \left( \frac{\mathbf{s}_m^T \mathbf{s}_l}{\|\mathbf{s}_m\|_2 \|\mathbf{s}_l\|_2} \right)$$ Minimizing this term penalizes shared visual sensitivity, forcing ensemble members to distribute their attention across non-overlapping, distinct image features.

  • Loss-Agnostic Diversification: Unlike gradient-alignment approaches (such as GAL) that rely on overall loss gradients and can get distracted by incorrect-class predictions, SMD operates strictly on the attribution of the true class.

  • Hybrid Formulation (SMD+): The authors integrate SMD into DVERGE (an existing cross-adversarial training method), combining feature-vulnerability diversification with saliency diversification.

Datasets

The authors evaluated their defense across standard computer vision benchmarks:

  • MNIST (28×28 grayscale handwritten digits; evaluated using 3-, 5-, and 8-member LeNet-5 ensembles).
  • Fashion-MNIST (F-MNIST) (28×28 grayscale apparel items; evaluated using LeNet-5 ensembles).
  • CIFAR-10 (32×32 color natural images; evaluated using ResNet-20 ensembles).

No new benchmarks were introduced.

Key Insights and Ideas

  • Interpretability Directly Informs Robustness: A network's vulnerability stems from its local sensitivity. Rather than abstractly decorrelating output distributions, directly misaligning interpretability signals (saliencies) forces the networks to learn genuinely distinct visual pathways for the same correct label.
  • Neutralizing Transferability: Because an attacker optimizing against model $A$ perturbs pixels that model $B$ largely ignores, adversarial perturbations generated on one member fail to transfer to others.
  • Synergy with Vulnerability Diversity: Saliency diversification addresses where networks look, whereas methods like DVERGE address how networks react to distilled adversarial features. Combining them (SMD+) consistently yielded the best robustness across evaluations.

Key Results

  • White-Box Robustness ($\epsilon = 0.3$, 3-member ensemble):
  • On MNIST under a 10-step PGD attack, naive ensembles achieve only 2.9% accuracy and DVERGE achieves 10.6%, while SMD reaches 21.4% and SMD+ jumps to 54.7%.
  • Under Momentum Iterative Method (MIM) attacks on MNIST, SMD+ reaches 71.0% (versus 5.5% for naive and 20.6% for DVERGE).
  • On F-MNIST, SMD+ achieves 13.3% under PGD (naive: 5.5%, DVERGE: 7.3%).
  • Black-Box Robustness:
  • When evaluated against surrogate models, SMD+ leads or matches top defenses across all benchmarks (e.g., 36.3% on MNIST PGD vs. 21.7% naive; 47.1% on F-MNIST PGD vs. 33.1% naive).
  • Attack Transferability:
  • In cross-member transferability experiments on F-MNIST, adversarial samples generated from one member resulted in target member accuracies of ~60–63% under SMD+, compared to only ~36–40% in naive ensembles.
  • Ensemble Adversarial Training (EAT):
  • When combined with adversarial training, SMD+ scored 48.1% white-box PGD accuracy on MNIST, where naive EAT crumbled to 3.4% and DVERGE EAT managed 15.2%.

Limitations and Future Work

  • High Variance in Standalone SMD: Standalone SMD exhibited higher performance variance across random seeds than baseline defenses (though combining it into SMD+ resolved this and reduced variance below DVERGE).
  • Computational Cost: Calculating input gradients for every ensemble member at each training step increases computation: training a 3-member LeNet ensemble on MNIST jumped from ~4 minutes (naive) to 18 minutes (SMD) and 48 minutes (SMD+); ResNet-20 on CIFAR-10 required roughly 3 days.
  • Parallelization Not Yet Implemented: The gradient update formulation shows that ensemble members could theoretically be trained in parallel if saliency maps are shared across processes, but the authors leave parallel implementation for future work.

Summary updated

BibTeX
@inproceedings{bogun2021saliency,
  author = {Alex Bogun and Dimche Kostadinov and Damian Borth},
  title = {{Saliency Diversified Deep Ensemble for Robustness to Adversaries}},
  booktitle = {AdvML @ AAAI},
  year = {2021},
  url = {https://openreview.net/forum?id=wGkmGrDsco8},
}
Figure