Probabilistic Margins for Instance Reweighting in Adversarial Training

Qizhou Wang, Feng Liu, Bo Han, Tongliang Liu, Chen Gong, Gang Niu, Mingyuan Zhou, Masashi Sugiyama

Abstract

Adversarial training (AT) is a robust defense against adversarial attacks, but its effectiveness is often limited by the uniform treatment of training examples. Previous instance reweighting methods, such as GAIRAT, rely on the Least PGD Steps (LPS) to measure vulnerability, which suffers from path-dependency and discreteness. This paper introduces the Probabilistic Margin (PM), a continuous and path-independent metric based on model output probabilities. We propose the Margin-Aware Instance reweighting Learning (MAIL) framework, which utilizes PM to prioritize vulnerable examples. Experimental results on SVHN, CIFAR-10, and CIFAR-100 demonstrate that MAIL significantly improves adversarial robustness, achieving state-of-the-art performance against sophisticated attacks like AutoAttack and CW.

Introduction

Deep neural networks are notoriously fragile; tiny, invisible perturbations (adversarial attacks) can flip a model's prediction. Adversarial Training (AT)—training on these "broken" examples—is the gold standard for defense. However, models have limited capacity. If we treat every adversarial example as equally important, the model often fails to learn effectively.

Recent research suggested that we should give more weight to examples closer to the decision boundary because they are the most "vulnerable." To measure this closeness, previous methods used Least PGD Steps (LPS)—the number of gradient steps an attacker needs to take to flip the model's label. However, LPS has two major flaws: it is path-dependent (varying with the attacker's trajectory) and discrete (limited to a few integer values), making it a "blunt instrument" for fine-grained reweighting.

The Probabilistic Margin (PM) Metric

To address the limitations of LPS, we propose the Probabilistic Margin (PM). Instead of counting steps in the input space, PM evaluates the model's output probabilities. Specifically, PM is defined as the difference between the probability of the true label and the maximum probability of all other labels: $$PM = P(\text{true label}) - \max P(\text{other labels})$$

Conceptual comparison of LPS and PM relative to the decision boundary.

If the model is highly confident in the correct label, PM is large and positive. As the model approaches a decision flip, PM nears zero, and it becomes negative if the model is already misclassifying the instance. Unlike LPS, PM is continuous and independent of the attack path, providing a stable "vulnerability spectrum."

Margin-Aware Instance reweighting Learning (MAIL)

The MAIL framework uses a sigmoid-based function to assign weights based on PM. Instances with low or negative PM (highly vulnerable or already misclassified) receive high weights, while those with high PM (safe instances) are down-weighted to preserve model capacity. To ensure stable training, we implement a "burn-in" period where the model trains normally for the first few epochs before reweighting is applied.

Key Insights: Probability Space vs. Input Space

Measuring distance in high-dimensional input space is inherently unstable. By shifting the metric to the normalized probability space ($[0, 1]$), PM achieves consistency across different classes and data points.

Correlation between Probabilistic Margin (PM) and the least PGD steps.

As shown in the empirical analysis, PM correlates with LPS but offers much higher granularity. This allows MAIL to prioritize data with surgical precision. Furthermore, PM identifies vulnerable points that might be missed by LPS due to the "maximum steps" threshold.

Experimental Results

The MAIL framework consistently outperforms existing state-of-the-art methods like TRADES and MART, as well as the previous reweighting champion, GAIRAT.

  • Robustness against AutoAttack (AA): On CIFAR-10, MAIL-TRADES achieved 50.60% accuracy against AutoAttack, significantly outperforming GAIRAT, which dropped to 33.35%.
  • Overcoming Obfuscated Gradients: Unlike previous methods that relied on "jittery" discrete metrics, MAIL remains robust against CW and AA attacks due to its mathematically smoother metric.
  • Generalization: PM can be integrated into various adversarial training objectives (AT, TRADES, or MART) to provide a consistent performance boost across SVHN, CIFAR-10, and CIFAR-100 datasets using architectures like ResNet-18 and WideResNet-32-10.

Conclusion and Limitations

While MAIL provides a significant leap in adversarial robustness, it may be more sensitive to label noise. If a natural image is mislabeled, it will yield a low PM, causing the model to over-prioritize the incorrect label. Future work will explore the implications of this reweighting strategy on model fairness and its performance against black-box attacks.

Summary updated

BibTeX
@inproceedings{wang2021probabilistic,
  author = {Qizhou Wang and Feng Liu and Bo Han and Tongliang Liu and Chen Gong and Gang Niu and Mingyuan Zhou and Masashi Sugiyama},
  title = {{Probabilistic Margins for Instance Reweighting in Adversarial Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
}
Figure