Adversarially Robust Training through Structured Gradient Regularization

Kevin Roth, Aurélien Lucchi, Sebastian Nowozin, Thomas HofmannarXiv 2018

Abstract

Deep neural networks are notoriously vulnerable to adversarial perturbations—small, human-imperceptible changes to input data that can cause catastrophic misclassification. While adversarial training is a common defense, its high computational cost and tendency to overfit to specific attack types limit its practicality. We introduce Structured Gradient Regularization (SGR), a computationally efficient method that approximates the effects of adversarial training. By penalizing the model's gradient according to the learned covariance structure of adversarial noise, SGR provides a principled "first-principles" approach to robustness that generalizes across different noise patterns without the need for explicit adversarial example generation during training.

Introduction

The fragility of deep learning models is well-documented: a few carefully crafted pixel changes can flip a prediction entirely. The standard remedy, adversarial training, involves generating these malicious examples (e.g., via Projected Gradient Descent) and including them in the training set. However, this process is slow and often results in models that recognize the specific attack process rather than becoming truly robust. This paper proposes SGR, which asks: Can we mathematically approximate the effect of training with noise using a simple regularizer that understands the structure of adversarial attacks?

Methods

SGR is derived by performing a Taylor expansion on the loss function, demonstrating that training with noise is mathematically equivalent to adding a gradient-based penalty. Unlike standard Gradient Norm (GN) regularization, which penalizes gradients equally in all directions, SGR is structured and data-dependent.

Structured Covariance

The core innovation is the use of a covariance matrix ($\Sigma$) to penalize gradients more heavily in directions where adversarial noise is most likely to occur. The authors demonstrate that adversarial perturbations are not random; they possess a distinct short-range correlation structure. By tracking these correlations, the model builds a running estimate of the noise's "shape."

Visualization of adversarial noise covariance structure across different settings.

Memory-Efficient Implementation

For high-dimensional image data, a full covariance matrix is too large to store. SGR addresses this by using a covariance function based on pixel displacement. This leverages the fact that adversarial noise typically exhibits short-range spatial correlations, allowing for a memory-efficient implementation that adds minimal overhead to standard training loops.

Spatial correlation of adversarial perturbations as a function of pixel displacement.

Results

The researchers evaluated SGR on MNIST, CIFAR-10, and a synthetic Long-range Correlated (LRC) noise attack designed to challenge unstructured defenses.

  • Superiority over Simple Regularization: On the LRC attack, SGR outperformed standard GN regularization by over 25% in classification accuracy.
  • MNIST Robustness: SGR achieved ~90% accuracy against PGD white-box attacks on MNIST, a significant jump from the ~45% accuracy of standard models.
  • Efficiency: SGR requires only a few extra lines of code and adds very little computational overhead compared to full adversarial training.
  • Generalization: By avoiding the direct use of adversarial samples, SGR prevents "label leaking" and provides a robust "first line of defense" that maintains high accuracy on clean data.

Conclusion

Structured Gradient Regularization offers a principled, efficient alternative to traditional adversarial training. By regularizing the model's sensitivity to the specific spatial structures of adversarial noise, it achieves significant robustness with minimal computational trade-offs. Future work will explore more complex covariance structures and the application of SGR to non-perceptual data domains like natural language processing.

Summary updated

BibTeX
@misc{roth2018adversarially,
  author = {Kevin Roth and Aurélien Lucchi and Sebastian Nowozin and Thomas Hofmann},
  title = {{Adversarially Robust Training through Structured Gradient Regularization}},
  year = {2018},
  eprint = {1805.08736},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1805.08736},
}
Figure