Geometry-aware Instance-reweighted Adversarial Training

Jingfeng Zhang, Jianing Zhu, Gang Niu, Bo Han, Masashi Sugiyama, Mohan Kankanhalli

TL;DR

GAIRAT challenges the "one-size-fits-all" approach to adversarial training by assigning weights to data points based on their proximity to the decision boundary. By prioritizing "attackable" points over "guarded" ones, the method significantly boosts model robustness and mitigates the notorious problem of robust overfitting.

What Problem Does This Paper Address?

In the world of adversarial machine learning, there is a persistent "robustness-accuracy trade-off": making a model resistant to attacks usually makes it less accurate on clean data.

The authors identify two core reasons for this struggle:

  1. Insufficient Model Capacity: Even massive, over-parameterized neural networks struggle with adversarial training (AT). This is because AT doesn't just ask the model to learn a point; it asks it to "smooth" an entire high-dimensional neighborhood around that point. This "smoothing effect" consumes an overwhelming amount of model capacity. As shown below, adversarial training error (PGD-10) remains high compared to natural training, regardless of network depth.
Training error comparison showing the capacity gap in adversarial training across different networks and perturbation bounds
  1. Data Inequality: Standard AT treats every data point as equally important. However, a point deep within its class territory (a "guarded" point) is naturally more robust than one sitting right on the edge of the decision boundary (an "attackable" point). Forcing the model to spend equal effort on guarded points leads to "robust overfitting," where the decision boundary becomes unnecessarily complex and "tortuous," harming performance on new data.

Methods: Geometry-aware Instance-reweighted Adversarial Training

To address data inequality, the authors propose Geometry-aware Instance-reweighted Adversarial Training (GAIRAT). The core idea is to assign a weight to the loss of each adversarial example based on the geometric difficulty of attacking its natural counterpart.

Illustration of GAIRAT's weighting scheme based on distance to the decision boundary
  • The Geometry Value ($\kappa$): Instead of calculating complex geometric distances, the authors use a clever proxy: the number of PGD (Projected Gradient Descent) iterations required to find a misclassified adversarial variant.
  • Small $\kappa$: The point is close to the boundary (easy to attack) $\rightarrow$ High Weight.
  • Large $\kappa$: The point is far from the boundary (hard to attack) $\rightarrow$ Low Weight.
  • Reweighting Function: They use a non-increasing function (typically a tanh-based curve) to map the iteration count $\kappa$ to a weight $\omega$. This ensures the model focuses its limited capacity on the most critical "borderline" examples.
  • General Framework: GAIRAT isn't just one algorithm; it’s a weighting scheme that can be plugged into existing methods like standard AT, TRADES, or Friendly Adversarial Training (FAT).

Key Insights and Results

  • The "Blocking Effect": In standard training, loss magnitude usually signals importance. But in AT, the model is specifically trained to minimize the loss of the "strongest" attack. This creates a "blocking effect" where loss values become less useful for distinguishing important points. GAIRAT bypasses this by using the number of steps to find an attack as an external metric.
  • Overfitting is a Choice: Robust overfitting (where test robustness drops while training robustness climbs) happens because the model tries too hard to fit the "guarded" points. By downweighting them, GAIRAT keeps the decision boundary cleaner and more generalizable.

Quantitative Improvements: The improvements are significant across various architectures (ResNet-18 to Wide ResNet-32-10) on standard benchmarks like CIFAR-10 and SVHN:

  • Robustness Boost: On CIFAR-10 (WRN-32-10), GAIRAT achieved a robust accuracy of 57.81% (PGD-20), compared to 51.96% for standard AT.
  • Breaking the Trade-off: When combined with Friendly Adversarial Training (GAIR-FAT), the model improved both standard accuracy and robust accuracy compared to the baseline.
  • Overfitting Mitigation: While standard AT shows a sharp rise in robust test error late in training, GAIRAT's error remains stable, proving it effectively handles the robust overfitting issue.

Limitations and Future Work

  • Heuristic Weighting: The choice of the tanh weighting function is heuristic. Finding the mathematically "optimal" weighting function remains an open research question.
  • Attack Specificity: While GAIRAT performs exceptionally well against PGD-based attacks, its performance can dip when faced with different attack types like C&W (dropping to ~40% robustness in some tests), suggesting a potential mismatch between the training and evaluation attack geometries.
  • Computational Bookkeeping: While not significantly slower than standard AT, the method requires tracking iteration counts for every sample in a batch, adding a small layer of implementation complexity.

Summary updated

BibTeX
@inproceedings{zhang2021geometry,
  author = {Jingfeng Zhang and Jianing Zhu and Gang Niu and Bo Han and Masashi Sugiyama and Mohan Kankanhalli},
  title = {{Geometry-aware Instance-reweighted Adversarial Training}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=iAX0l6Cz8ub},
}
Figure