Hard Adversarial Example Mining for Improving Robust Fairness

Chenhao Lin, Xiang Ji, Yulong Yang, Qian Li, Chao Shen, Run Wang, Liming FangarXiv 2023 · DOI

Abstract

Adversarial training (AT) is the primary defense against adversarial attacks but often results in "robust unfairness," where model performance varies significantly across different classes. Furthermore, the computational overhead of generating adversarial examples (AEs) remains a bottleneck. This paper introduces Hard Adversarial example Mining (HAM), a framework designed to improve class-wise fairness while reducing training time. By identifying and discarding "easy" adversarial examples early and reweighting "hard" ones based on attack dynamics, HAM achieves a ~46% reduction in training time and significantly narrows the fairness gap across standard benchmarks.

Introduction: The Robustness-Fairness Trade-off

While Adversarial Training (AT) enhances the overall robustness of deep neural networks, it introduces two critical challenges:

  1. Robust Unfairness: There is often a massive disparity in robust accuracy across classes. A model might successfully defend "car" images while remaining highly vulnerable to attacks on "cat" images.
  2. Computational Inefficiency: Generating multi-step adversarial examples at every training iteration is computationally expensive.

The authors identify adversarial confidence overfitting as a root cause of unfairness. Standard AT tends to make models overconfident on "easy" adversarial examples (those that fail to flip the prediction). This focus on easy samples prevents the model from learning effectively from "hard" samples, which are often concentrated in specific, more vulnerable classes.

Methods: Hard Adversarial Example Mining (HAM)

The HAM framework addresses these issues through a two-pronged strategy focused on the difficulty of adversarial examples.

The HAM framework: Early-dropping of easy adversarial examples after M steps and reweighting of hard examples.

1. Easy AE Early-Dropping

Instead of completing all $K$ steps (e.g., 10) of an adversarial attack for every sample, HAM evaluates the sample after a small number of steps $M$ (typically 3). If the sample has not crossed the decision boundary by step $M$, it is classified as "easy" and discarded for that epoch. This prevents the model from wasting computation on samples it already classifies robustly.

2. Hard AE Reweighting

For samples that successfully fool the model ("hard" AEs), HAM applies a reweighting scheme. The weight is determined by the "step size" required to cross the boundary—specifically, how much the model's logits change during the attack. Samples requiring larger updates to flip their labels are considered more critical for improving fairness and are assigned higher weights in the loss function.

Experimental Setup

The researchers evaluated HAM on three image classification benchmarks: CIFAR-10, SVHN, and Imagenette. These datasets provide a range of complexity from simple digits to more diverse natural objects, allowing for a robust assessment of the method's scalability and consistency.

Key Results

HAM demonstrates significant improvements in both efficiency and fairness without sacrificing average robust accuracy.

Comparison of standard deviation of robust error across different datasets, showing HAM's superior fairness performance.
  • Fairness Boost: On CIFAR-10, HAM reduced the Worst Robust Error from 85.5% in standard PGD-AT to 64.2%. As shown in the figure above, HAM consistently achieves a lower standard deviation of robust error across classes compared to other methods like PGD-AT, FRL, and BAT.
  • Computational Efficiency: The early-dropping mechanism resulted in an approximately 46% reduction in training time compared to traditional AT.
  • Methodological Synergy: HAM is highly extendable. When combined with other state-of-the-art methods like MART, it further reduced the worst-class error by an additional 34.5%.

Conclusion and Future Directions

HAM demonstrates that computational efficiency and robust fairness are not mutually exclusive. By intelligently mining hard adversarial examples, models can achieve more uniform protection across classes while significantly speeding up the training process.

Future work includes investigating the sensitivity of hyperparameters, such as the starting epoch for mining and the optimal value for $M$. Additionally, extending the evaluation to larger-scale datasets like ImageNet-1k and a broader range of attack types (e.g., $l_2$ or non-gradient-based attacks) will be crucial for establishing HAM's generalizability in diverse adversarial settings.

Summary updated

BibTeX
@misc{lin2023hard,
  author = {Chenhao Lin and Xiang Ji and Yulong Yang and Qian Li and Chao Shen and Run Wang and Liming Fang},
  title = {{Hard Adversarial Example Mining for Improving Robust Fairness}},
  year = {2023},
  eprint = {2308.01823},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.01823},
}
Figure