Standard-Deviation-Inspired Regularization for Improving Adversarial Robustness

Olukorede Fakorede, Modeste Atsague, Jin Tian

TL;DR

Standard adversarial training often overfits to the specific perturbation attack used during training (like PGD) and struggles to generalize to stronger, unseen threats. This paper introduces a lightweight Standard-Deviation-Inspired (SDI) regularization term that directly widens the margin between the ground-truth probability and competing class predictions. Adding SDI regularization to standard Adversarial Training (AT) and TRADES consistently improves robust generalization across benchmarks, boosting performance against Carlini-Wagner (CW), AutoAttack, and query-based black-box attacks.

What Problem Does This Paper Address?

Adversarial Training (AT) frames robust learning as a min-max game: the inner step crafts worst-case input perturbations that maximize prediction loss, while the outer step adjusts model weights to minimize loss on those perturbed inputs.

However, models trained using conventional cross-entropy or KL-divergence PGD attacks often become specialized to that specific attack mechanism. Consequently, they generalize poorly when attacked by different methods, such as Carlini-Wagner (CW) or the ensemble AutoAttack suite. While earlier works attempted to address this with logit squeezing or label smoothing, these methods can induce gradient obfuscation (giving a false impression of security). The authors seek a non-information-theoretic objective operating directly on post-softmax probabilities that genuinely improves adversarial robustness without causing gradient masking.

Methods

The paper introduces the MSDI metric, adapted from descriptive statistics:

$$M_{\text{SDI}}(\mathbf{x}_i, y_i, \theta) = \sqrt{\frac{\sum_{k=1}^{|C|} \left(f_\theta(\mathbf{x}_i)_k - f_\theta(\mathbf{x}_i)_{y_i}\right)^2}{|C| - 1}}$$

where $f_\theta(\mathbf{x}_i)$ represents the model's post-softmax probability vector and $y_i$ is the ground-truth label.

The authors propose two complementary perspectives:

  1. Adversarial Generation (Inner Optimization): Minimizing $M_{\text{SDI}}$ pulls the probability of the true class closer to the incorrect classes, dispersing model confidence. The authors derive SDI-PGD, generating adversarial attacks by moving in the direction of $-\nabla_{\mathbf{x}} M_{\text{SDI}}$.
  2. Selective Regularization (Outer Optimization): To train the model, they maximize $M_{\text{SDI}}$ on adversarial examples, encouraging high confidence in the true label while pushing incorrect class probabilities down. Because blindly maximizing $M_{\text{SDI}}$ on already misclassified inputs ($f_\theta(\mathbf{x})_y < \max_{k \neq y} f_\theta(\mathbf{x})_k$) could paradoxically push true confidence even lower, the authors apply the loss selectively:

$$L_{\text{SDI}}(\mathbf{x}_i, y_i; \theta) = \begin{cases} M_{\text{SDI}}(\mathbf{x}_i, y_i; \theta) & \text{if } f_\theta(\mathbf{x}_i)_{y_i} - \max_{k \neq y_i} f_\theta(\mathbf{x}_i)_k \ge 0 \\ 0 & \text{otherwise} \end{cases}$$

This term is subtracted from the outer objective of Standard AT (AT-SDI) and TRADES (TRADES-SDI) scaled by a hyperparameter $\beta$.

Adversarial Example x'  --->  Is true class probability >= max incorrect class?
                                    |                           |
                                  [Yes]                        [No]
                                    |                           |
                       Apply Standard/TRADES Loss   Apply Standard/TRADES Loss
                       minus β * MSDI(x')           (No SDI penalty)

Datasets

The authors evaluate across four image benchmarks using ResNet-18, WideResNet-34-10, and VGG-16:

  • CIFAR-10 and CIFAR-100
  • SVHN (Street View House Numbers)
  • Tiny ImageNet

No new datasets were introduced.

Key Insights and Ideas

  • Duality Between SDI and Adversarial Robustness: Generating adversarial examples can be formulated simply as minimizing $M_{\text{SDI}}$. In evaluations on AT and TRADES models, SDI-PGD yields stronger attacks (53.95% / 54.32% robust accuracy) than KL-divergence attacks (68.03% / 68.87%), demonstrating that the metric produces valid, non-vanishing gradients without gradient obfuscation.
  • Closing the Attack Generalization Gap: While standard AT models frequently show a steep performance drop when evaluated on CW or AutoAttack compared to PGD-20, adding $L_{\text{SDI}}$ significantly narrows this gap. On CIFAR-10, AT-SDI actually achieves higher robustness against CW than against PGD-20.
  • Orthogonal to Information Theory: Unlike cross-entropy, entropy, or KL divergence, $M_{\text{SDI}}$ provides a purely variance-based dispersion penalty across class probabilities, offering complementary regularization benefits.
  • Negligible Computational Overhead: Evaluating $L_{\text{SDI}}$ adds fewer than 4 seconds per epoch on ResNet-18 (single Nvidia A100 GPU), compared to 8–10 seconds added by KL divergence or MSE regularizers.

Key Results

  • CIFAR-10 (WideResNet-34-10):
  • AT-SDI improves Standard AT from 54.95% to 57.49% on CW (+2.54%) and from 51.92% to 53.57% on AutoAttack (+1.65%).
  • TRADES-SDI improves over TRADES from 54.51% to 56.57% on CW and from 53.07% to 54.21% on AutoAttack, while boosting clean accuracy (84.70% $\to$ 85.37%).
  • When combined with Adversarial Weight Perturbation (AT-SDI + AWP), the model achieves 60.30% on CW, 56.71% on AutoAttack, and 65.56% on SPSA (a query-based black-box attack).
  • CIFAR-100 & SVHN (ResNet-18):
  • On CIFAR-100, AT-SDI improves CW robustness from 25.64% to 29.37% and AutoAttack from 24.07% to 26.38%.
  • On SVHN, AT-SDI boosts CW accuracy by +5.23% (52.92% $\to$ 58.15%) and AutoAttack by +1.20%.

Limitations and Future Work

  • Hyperparameter Sensitivity: Performance depends on tuning the scaling parameter $\beta$. While $\beta = 3.0$ worked across most setups, setting $\beta \ge 5.0$ degrades clean accuracy and AutoAttack performance.
  • Conditional Restriction: The regularizer only activates when the multi-class margin is non-negative ($d_m \ge 0$). Severely perturbed examples where the top prediction has already flipped receive zero regularization from $L_{\text{SDI}}$.
  • Scope: The method focuses on classification settings with distinct class probabilities; extension to multi-label learning or large-vocabulary domains (e.g., ImageNet-1k) remains unexplored.

Summary updated

BibTeX
@article{fakorede2024standard,
  author = {Olukorede Fakorede and Modeste Atsague and Jin Tian},
  title = {{Standard-Deviation-Inspired Regularization for Improving Adversarial Robustness}},
  journal = {Accepted by TMLR},
  year = {2024},
  url = {https://openreview.net/forum?id=6GfqN0Ca1Y},
}
Figure