Doubly Robust Instance-Reweighted Adversarial Training

Daouda Sow, Sen Lin, Zhangyang Wang, Yingbin Liang

Adversarial training (AT) is the gold standard for defending deep neural networks against malicious attacks, but it suffers from a critical "weakest link" problem. Standard AT treats every data point equally, which often leads to a model that is robust on average but fails miserably on specific, vulnerable classes. While researchers have tried to fix this by "reweighting" important data points, they’ve mostly relied on hand-wavy heuristics—until now.

Presented at ICLR 2024, Doubly Robust Instance-Reweighted Adversarial Training (DONE) provides a mathematically grounded framework that uses distributionally robust optimization to make models robust not just to attacks, but to the inherent imbalances in the data itself.

TL;DR

The authors propose a novel "doubly robust" framework that uses bilevel optimization and KL-divergence regularization to automatically determine which data points need the most protection. This approach replaces unreliable heuristics with a principled algorithm that significantly boosts the robustness of the most vulnerable classes without sacrificing overall performance.

What Problem Does This Paper Address?

Adversarial training is computationally expensive and "capacity-hungry." Because adversarial examples are much harder to classify than clean ones, a model's limited capacity is often stretched thin.

Two major issues arise from this limitation:

  1. Non-uniform Robustness: In a dataset like CIFAR-10, a standard robust model might achieve 49% average robust accuracy, but its accuracy on the "cat" class might be as low as 14%. An intelligent attacker will simply target these "weak links."
  2. Heuristic Weighting: Previous attempts to prioritize "hard" examples (instance-reweighting) used geometric tricks or heuristics (e.g., "how many steps does it take to flip this label?"). These methods lack theoretical convergence guarantees and often fail to generalize across different datasets.

Methods: Doubly Robust Optimization

The authors frame the problem as a Doubly Robust Optimization task. It is "doubly" robust because it operates on two levels:

  • Level 1 (Inner): It finds the worst-case adversarial perturbation for each input (standard AT).
  • Level 2 (Outer): It finds the worst-case distribution of importance weights across the dataset.

To prevent the model from focusing exclusively on a single "hardest" image (which would ruin generalization), they add a KL-divergence regularizer. This forces the importance weights to stay relatively close to a uniform distribution while still allowing the model to prioritize vulnerable points.

Mathematically, this results in a Compositional Bilevel Optimization (CBO) problem. To solve it, they developed the DONE algorithm, which uses:

  • Implicit Differentiation: To calculate how the model parameters should change relative to the adversarial noise.
  • Log-Barrier Penalties: To handle the constraints of the attack space (e.g., ensuring the perturbation stays within a specific $\epsilon$-ball).
  • Running Averages: To provide a biased-but-consistent estimate of the complex objective function, ensuring the algorithm actually converges.

Key Insights

  • The "Softmax" of Importance: By using KL-regularization, the optimal weights for data points take a form similar to a softmax function. Points with higher loss automatically receive higher weights in a principled, non-heuristic way.
  • Mitigating the "Robust Overfitting" Effect: By carefully managing model capacity through reweighting, the framework helps the model focus on decision boundaries that actually matter, rather than getting bogged down by "unlearnable" adversarial noise.
  • Principled vs. Heuristic: Unlike prior work (like GAIRAT), which relies on the number of PGD steps to determine importance, DONE derives weights directly from the loss function's geometry, allowing for a rigorous convergence proof.

Key Results

The researchers evaluated their method on four standard image recognition benchmarks: CIFAR-10 (balanced and imbalanced), SVHN, STL-10, and GTSRB.

Boosting the Tail

On CIFAR-10, the method improved the robust accuracy of the 30% most vulnerable classes (the "tail") by a significant margin compared to standard AT. Vulnerable classes like "cat", "bird", and "deer" saw massive improvements.

Per-class robust accuracy comparison on CIFAR-10.

Overall Performance & Imbalanced Data Success

On balanced CIFAR-10, DONE achieved a ~3.5% improvement in overall robust accuracy against PGD attacks compared to the strongest baselines (like MAIL).

Furthermore, in scenarios where the training data was intentionally imbalanced, DONE maintained much higher robustness on minority classes where other methods collapsed to near 0% accuracy.

Robust accuracy comparison on balanced and unbalanced CIFAR-10.

Efficiency

The method also showed strong results in "Fast AT" settings, where models are trained with only a single step of gradient descent for the attack, making it viable for larger-scale applications.

Limitations and Future Work

  • Hyperparameter Sensitivity: The framework introduces a regularization parameter ($r$) that controls the trade-off between uniform and worst-case weighting. The authors used a decay schedule for this, but finding the optimal schedule for a new dataset might require tuning.
  • Computational Overhead: While the authors use tricks to simplify the Hessian calculations, implicit differentiation is generally more computationally demanding than standard backpropagation.
  • Beyond Classification: The current work focuses on image classification. The authors suggest that this principled reweighting could be applied to other domains like domain adaptation or long-tailed learning, but these remain areas for future exploration.

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