Defending Adversarial Examples by Negative Correlation Ensemble

Wenjian Luo, Hongwei Zhang, Linghao Kong, Zhijian Chen, Ke Tang

Abstract

Deep Neural Networks (DNNs) are notoriously vulnerable to adversarial examples—inputs modified by human-imperceptible perturbations designed to induce misclassification. While ensemble methods are a common defense, they often fail due to adversarial transferability, where different models share a common adversarial subspace. This paper introduces the Negative Correlation Ensemble (NCEn), a novel training strategy that forces ensemble members to have negatively correlated gradient directions and magnitudes. By diversifying the loss landscape geometry, NCEn effectively disrupts the shared adversarial subspace, significantly enhancing robustness without compromising clean accuracy.

Introduction

The fragility of state-of-the-art DNNs remains a significant hurdle for their deployment in safety-critical environments. Adversarial attacks exploit the sensitivity of these models to small input changes. A standard defense is to use a "committee" or ensemble of networks; however, if these models are trained on similar data, they often learn similar decision boundaries. Consequently, an attack designed to fool one model often succeeds against the others.

The authors of this paper identify that existing defenses fail to account for the interaction between ensemble members during training. NCEn addresses this by moving beyond simple output diversity, focusing instead on the geometric relationship between the models' gradients.

Methodology: The NCEn Framework

NCEn hardens ensembles by adding two specific regularization terms to the standard cross-entropy loss function. These terms are designed to create a "tug-of-war" effect among ensemble members, preventing a single perturbation from being effective across the entire group.

1. Gradient Direction Regularization ($\text{Loss}_{cos}$)

This term utilizes cosine similarity to ensure that the gradient directions of ensemble members are negatively correlated. If one model's loss increases when moving in a specific direction in the input space, the regularization encourages other models to have gradients pointing in different directions. This maximizes the diversity of the decision boundaries across the ensemble.

2. Gradient Magnitude Regularization ($\text{Loss}_{norm}$)

Attackers often target the "weakest link"—the model with the highest sensitivity, or largest gradient magnitude. NCEn forces the gradient magnitudes of ensemble members to be negatively correlated. This prevents any single model from becoming overly sensitive and ensures the ensemble's collective prediction is not compromised by a few highly vulnerable members.

3. Training Objective

The final training objective is a weighted sum of the standard classification loss and the two diversity terms: $$\text{Loss} = \text{Cross-Entropy} + \lambda_{norm}\text{Loss}_{norm} + \lambda_{cos}\text{Loss}_{cos}$$

Experimental Setup

The approach was evaluated on two benchmark image classification datasets:

  • FashionMNIST: A dataset of clothing items used for complex grayscale classification.
  • CIFAR-10: A standard benchmark consisting of 60,000 color images across 10 classes.

Additionally, the authors introduced a synthetic noise dataset ($D_{noise}$) generated from a truncated normal distribution. This was mixed with the training data to help the ensemble ignore useless high-frequency features and avoid overfitting to adversarial noise.

Key Results and Insights

The authors compared NCEn against state-of-the-art baselines, including Gradient Alignment Loss (GAL) and Joint Gradient Phase and Magnitude Regularization (GPMR), across various attack methods such as FGSM, PGD, and MI-FGSM.

Superior Robustness

NCEn consistently achieved the highest Adversarial Accuracy (AAE). For instance, on FashionMNIST under the MI-FGSM attack, NCEn improved AAE by up to 14 percentage points over competing methods. This suggests that the negative correlation strategy is more effective at hardening the ensemble than simple independence or alignment-based methods.

Maintaining Clean Accuracy

A common challenge in adversarial defense is the trade-off between security and performance on normal data. NCEn maintained a high Accuracy of Clean Examples (ACE), often staying above 90% for FashionMNIST and 84% for CIFAR-10, proving that robustness does not have to come at the cost of utility.

Breaking Transferability

The core success of NCEn lies in its ability to disrupt the shared adversarial subspace. Analysis of the models showed that an attack generated against one specific model in the ensemble had a very low success rate when tested against other members, confirming that the geometric diversity successfully localized vulnerabilities.

Conclusion and Future Work

Negative Correlation Ensemble (NCEn) represents a significant advancement in ensemble-based adversarial defense. By focusing on the geometry of the loss landscape—specifically the direction and magnitude of gradients—the method creates a more resilient collective model. While the current implementation requires manual selection of the ensemble size ($k$), future work will focus on automating this parameter and scaling the approach to larger, more complex architectures.

Summary updated

BibTeX
@inproceedings{luo2022defending,
  author = {Wenjian Luo and Hongwei Zhang and Linghao Kong and Zhijian Chen and Ke Tang},
  title = {{Defending Adversarial Examples by Negative Correlation Ensemble}},
  booktitle = {DMBD},
  year = {2022},
  doi = {10.1007/978-981-19-8991-9\_30},
}
Figure