Doubly Robust Instance-Reweighted Adversarial Training

Daouda Sow, Sen Lin, Zhangyang Wang, Yingbin Liang · DOI

Abstract

Adversarial Training (AT) remains the primary defense against adversarial perturbations, yet it often suffers from non-uniform robustness across different data classes and limited model capacity. This paper introduces DONE (Doubly Robust Instance-Reweighted Adversarial Training), a principled framework that integrates Distributionally Robust Optimization (DRO) with bilevel optimization. By assigning importance weights to vulnerable samples through a theoretically grounded approach, DONE improves both average and worst-case robustness. We introduce the Compositional Implicit Differentiation (CID) algorithm to solve the resulting nested optimization problem. Empirical results across multiple benchmarks, including CIFAR10 and GTSRB, demonstrate that DONE significantly outperforms existing heuristic reweighting methods, particularly in imbalanced data scenarios.

Introduction

Deep learning models are notoriously fragile when faced with adversarial attacks—small, intentional perturbations designed to flip a model's prediction. While Adversarial Training (AT) is the standard defense, it faces two significant challenges:

  1. Limited Model Capacity: Models possess a finite "budget" for robustness. Attempting to protect every data point equally often results in mediocre performance across the entire dataset.
  2. Non-Uniform Robustness: Traditional AT frequently leads to a "weakest link" problem. For instance, on the CIFAR10 dataset, a model might achieve 49% average robust accuracy, yet its accuracy on specific classes like "cat" might plummet to 14%. This disparity is exacerbated in imbalanced datasets.

Previous attempts to address these issues utilized "instance reweighting"—assigning higher importance to harder examples. However, these methods (such as GAIRAT) often rely on geometric heuristics rather than a rigorous theoretical foundation. DONE addresses this gap by framing instance reweighting as a principled optimization problem.

The DONE Framework

The authors propose DONE (Doubly Robust Instance Reweighted AT), which derives its name from two distinct layers of robustness:

  • Layer 1: Robustness to adversarial perturbations (the standard "inner loop" attack).
  • Layer 2: Robustness to the worst-case distribution of data (the "outer loop" reweighting).

Mathematical Foundation

DONE is structured as a nested Bilevel Optimization problem. The inner level identifies the most effective adversarial attack, while the outer level determines the optimal importance weights for each data point. To ensure training stability and prevent the model from over-focusing on a single outlier, the framework incorporates KL-Divergence Regularization. This term encourages the weight distribution to remain relatively close to uniform while still highlighting vulnerable samples.

To solve this complex nested problem, the authors developed the Compositional Implicit Differentiation (CID) algorithm. Because the inner optimizer is not always differentiable, CID utilizes a log-barrier penalty and the Implicit Function Theorem to calculate gradients through the optimization process, providing rigorous convergence guarantees.

Experimental Evaluation

The researchers evaluated DONE on four standard image recognition benchmarks: CIFAR10, SVHN, STL10, and the German Traffic Sign Recognition Benchmark (GTSRB). These datasets were tested in both balanced and imbalanced (0.2 ratio) settings to evaluate how the model handles neglected or minority classes.

Key Insights

  • Principled Weighting: Unlike heuristic methods that use "rules of thumb," DONE derives weights by optimizing a specific objective function. This allows for a strong negative correlation between a class's robustness and its assigned weight—the more difficult a class is to defend, the more the model prioritizes it during training.
  • Mitigating Robust Overfitting: Traditional AT often experiences a performance drop if trained for too long. DONE's instance-reweighting approach allows the model to use its capacity more efficiently, reducing the impact of robust overfitting.
  • Compositional Bilevel Optimization (CBO): Beyond adversarial defense, the authors define a new class of optimization problems (CBO) that may have broader applications in meta-learning and neural architecture search.

Results

The DONE framework consistently outperformed state-of-the-art baselines like MAIL and GAIRAT:

  • Overall Robustness: On CIFAR10, DONE improved overall robust accuracy by approximately 3.5% over standard AT.
  • Tail Class Performance: The most significant gains were observed in the "RA-Tail-30" metric (the robust accuracy of the 30% most vulnerable classes). In imbalanced settings, DONE improved the robustness of these weakest classes by an average of 11%.
  • Resilience to Strong Attacks: The model demonstrated superior performance against "AutoAttack," a suite of diverse and rigorous attacks, confirming that the gains are not merely a result of gradient masking.

Limitations and Future Work

Despite its success, DONE involves higher computational complexity than standard AT due to the requirements of bilevel optimization and the calculation of second-order information (Hessians). While the authors provide approximations for ReLU networks, the process remains intensive. Additionally, the KL-regularization parameter requires careful scheduling to ensure optimal weight distribution. Future research may explore applying this principled reweighting to domain adaptation and general imbalanced classification tasks outside of the adversarial context.

Summary updated

BibTeX
@inproceedings{sow2024doubly,
  author = {Daouda Sow and Sen Lin and Zhangyang Wang and Yingbin Liang},
  title = {{Doubly Robust Instance-Reweighted Adversarial Training}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=OF5x1dzWSS},
}
Figure