DAFA: Distance-Aware Fair Adversarial Training

Hyungyu Lee, Saehyung Lee, Hyemi Jang, Junsung Park, Ho Bae, Sungroh Yoon · DOI

Abstract

Adversarial training (AT) is essential for model robustness but often leads to a "robust fairness" issue, where certain classes become significantly more vulnerable to attacks than others. We introduce DAFA (Distance-Aware Fair Adversarial training), a novel approach that mitigates this disparity by leveraging inter-class distances. By adjusting loss weights and adversarial margins based on class similarity, DAFA protects "hard" classes by pushing their decision boundaries away from their nearest neighbors. Our experiments on CIFAR-10, CIFAR-100, and STL-10 demonstrate that DAFA significantly improves worst-class robust accuracy while maintaining high average performance.

Introduction: The Robust Fairness Problem

Deep learning models are highly susceptible to adversarial attacks—small, intentional perturbations that trigger misclassifications. While Adversarial Training (AT) is the standard defense, it introduces a side effect: the robust fairness problem. In standard training, some classes are naturally harder to learn. AT exacerbates this imbalance; "easy" classes become much tougher, while "hard" classes suffer drastic accuracy drops under attack.

Previous attempts to address this treated it as a "long-tail" problem, often sacrificing the performance of easy classes to boost hard ones. However, this ignores why a class is hard. Adversarial misclassifications are not random; samples are typically mistaken for similar classes (e.g., a "cat" is confused with a "dog" rather than a "ship").

Methodology: Distance-Aware Training

DAFA (Distance-Aware Fair Adversarial training) proposes moving decision boundaries more aggressively between classes that are close in the feature space.

Comparison of DAFA with previous robust fairness methods. While previous methods focus on a generic hard/easy split, DAFA targets similar vs. dissimilar classes to improve worst-case performance.

The core components of DAFA include:

  1. Similarity Measurement: DAFA uses the model's softmax output probabilities as a proxy for inter-class distance. High cross-class probabilities indicate proximity.
  2. Dynamic Weight Allocation: The algorithm calculates a weight ($W_i$) for each class. It reallocates weight from easier classes to harder, similar classes.
  3. Distance-Aware Loss and Margin: These weights influence two training objectives:
  4. Loss Weighting: Harder classes receive a higher misclassification penalty.
  5. Adversarial Margin ($\epsilon$): Harder classes are trained against larger adversarial perturbations, forcing a wider safety buffer (decision boundary) specifically toward similar neighbors.

DAFA is implemented atop the TRADES framework, balancing clean and robust accuracy.

Key Insights: Proximity as the Driver of Hardness

The authors observe that a class's "hardness" in adversarial settings is primarily driven by its proximity to other classes (inter-class distance).

Empirical evidence of the proximity problem: (a) Similarity matrix of CIFAR-10 classes; (b, c) Relationship between class similarity and robust accuracy drop.
  • The "Animal" vs. "Non-Animal" Effect: In CIFAR-10, "cats" are hard because they are surrounded by similar animals (dogs, horses, deer). "Ships" are easy because they are distinct. DAFA recognizes that restricting the learning of "dogs" is more effective for helping "cats" than restricting "ships."
  • Boundary Shifting Efficiency: Shifting a decision boundary between two close classes yields a much higher gain in robust accuracy for the hard class than shifting a boundary between distant classes.

Experimental Results

DAFA was evaluated on CIFAR-10, CIFAR-100, and STL-10, consistently outperforming existing robust fairness methods like FRL, CFA, and BAT.

  • CIFAR-10: DAFA improved worst-class robust accuracy from 21.31% (baseline TRADES) to 30.53% (~9% improvement). Average robust accuracy remained stable at ~49%.
  • CIFAR-100: Worst-class robust accuracy improved from 1.33% to 2.33%.
  • STL-10: Worst-class robust accuracy rose from 7.73% to 10.73%.
  • Clean Accuracy: DAFA maintained clean accuracy levels very close to the baseline, avoiding the significant degradation seen in competing methods.

Conclusion and Future Work

DAFA provides a targeted approach to robust fairness by focusing on inter-class distances. While it requires a "warm-up" phase to establish initial class similarities and introduces minor computational overhead, its efficiency in improving worst-case performance is notable. Future research could explore alternative distance metrics and evaluate DAFA's scalability on larger datasets like ImageNet.

Summary updated

BibTeX
@inproceedings{lee2024dafa,
  author = {Hyungyu Lee and Saehyung Lee and Hyemi Jang and Junsung Park and Ho Bae and Sungroh Yoon},
  title = {{DAFA: Distance-Aware Fair Adversarial Training}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=BRdEBlwUW6},
}
Figure