Fantastic Robustness Measures: The Secrets of Robust Generalization

Hoki Kim, Jinseong Park, Yujin Choi, Jaewook LeeNeurIPS 2023

Deep neural networks are notoriously vulnerable to adversarial examples—tiny, human-imperceptible perturbations that cause models to fail catastrophically. While "adversarial training" (AT) helps defend against these attacks, it suffers from a severe case of robust overfitting. A model might become nearly invincible against attacks on its training data, yet remain highly fragile against the exact same attacks on unseen test data.

To address this, researchers have proposed various mathematical "complexity measures" (like loss flatness or classification margins) to predict and improve robust generalization. However, these measures are often tested in narrow, isolated settings. This paper asks a critical question: Do these measures actually work in the wild, across different architectures, optimizers, and datasets?

The Challenge: Robust Overfitting

Traditionally, machine learning models generalize relatively well from training to test sets. In adversarial training, however, the gap between training robustness and test robustness can be massive.

Train vs. Test Robustness illustrating the robust overfitting phenomenon.

As models continue to train and approach 100% robustness on the training set, their performance on the test set often peaks and then sharply degrades. Finding a metric that accurately predicts this "robust generalization gap" without needing a validation set is the holy grail of adversarial defense research.

Methodology: A Large-Scale Stress Test

To find out which measures actually predict robust performance, the authors performed a massive empirical study:

  1. Massive Model Zoo: They trained 1,344 models on CIFAR-10, varying eight different parameters including architecture (mostly ResNet-style), training method, optimizer, and batch size.
  2. Diverse Measures: They evaluated 23 different measures categorized into five types: weight-norm, margin, smoothness, flatness, and gradient-norm.
  3. New Evaluation Metric ($\pi_k$): Standard correlation metrics can be misleading due to "Simpson’s Paradox"—where a trend exists in sub-groups but disappears when lumped together. The authors introduced $\pi_k$, which calculates correlation while fixing specific training setups to reveal hidden relationships.
  4. Validation: They cross-referenced their findings with over 100 top-tier models from the RobustBench leaderboard across CIFAR-10, CIFAR-100, and ImageNet.

The large-scale analysis revealed several surprising truths that challenge conventional wisdom in the field:

  • The "Margin" Trap: Traditional machine learning theory suggests that a larger "margin" (the distance between a data point and the decision boundary) is better. However, this study finds that in adversarial training, maximizing the margin beyond a certain point actually harms generalization.
  • Flatness Isn't Everything: A popular trend in AI research suggests that "flatter" minima (where the loss doesn't change much if you perturb the weights) generalize better. Surprisingly, flatness-based measures correlated poorly with robust generalization. In some cases, sharper models actually performed better.
  • The Power of Input Gradients: The most consistent predictor of the robust generalization gap was the norm of the input gradients ($x\_grad\_norm$). Models where small changes in the input lead to large changes in the loss are much more likely to suffer from robust overfitting. When conditioned on cross-entropy loss, this measure achieved the highest rank correlation compared to all others.

Sensitivity to Setup and Training Methods

One of the most critical findings is that the robust generalization gap is incredibly sensitive to the specific training configuration.

Correlation of various measures with the generalization gap, highlighting sensitivity to specific training setups.

A measure that works perfectly for one training method might fail completely for another. For example, Boundary Thickness was found to be highly effective at predicting performance, but only for models trained with vanilla Adversarial Training (AT). It failed to predict performance for other popular methods like TRADES or MART. Similarly, weight norms like the Frobenius norm only work well if you are comparing models with the exact same architecture.

Limitations and Future Directions

While comprehensive, the study has a few limitations. The primary focus was on ResNet-style architectures and $L_\infty$ PGD attacks. Although preliminary tests with AutoAttack and Transformer validations via RobustBench showed similar trends, more dedicated studies on non-convolutional architectures and different attack norms (like $L_2$) are needed.

Furthermore, calculating some of these measures is computationally expensive, making them difficult to use as real-time regularizers during training. Future work could focus on finding cheaper approximations of the input gradient norm, potentially unlocking new, highly efficient methods for training robust neural networks.

Summary updated

BibTeX
@inproceedings{kim2023fantastic,
  author = {Hoki Kim and Jinseong Park and Yujin Choi and Jaewook Lee},
  title = {{Fantastic Robustness Measures: The Secrets of Robust Generalization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=AGVBqJuL0T},
}
Figure