Rademacher Complexity for Adversarially Robust Generalization

Dong Yin, Kannan Ramchandran, Peter Bartlett

Introduction

Machine learning models, particularly deep neural networks, are notoriously vulnerable to adversarial examples—tiny, calculated perturbations to an input that cause a model to misclassify it with high confidence. To mitigate this, researchers often employ adversarial training, where the model is trained directly on these "hard" examples.

However, adversarial training introduces a massive "generalization gap." A model might achieve 96% accuracy on adversarial training data but drop to a mere 47% on adversarial test data. In standard machine learning, this gap is typically much smaller. This paper investigates a fundamental question: Why is robust generalization so much harder than natural generalization?

By analyzing Rademacher complexity, the authors prove that adversarial generalization is fundamentally harder because it suffers from an unavoidable dependence on the input dimension ($d$), unless specific constraints like $\ell_1$ regularization are applied.

Methods: Measuring Complexity in the Adversarial Setting

To understand this generalization gap, the authors utilize Rademacher complexity, a measure of the "richness" or "flexibility" of a hypothesis class. If a model class can easily fit random noise, it has high Rademacher complexity and is prone to overfitting.

The paper extends this tool to the adversarial setting. Instead of evaluating the complexity of the standard loss function, the authors analyze the complexity of the adversarial loss—the loss when an attacker is allowed to perturb the input within an $\ell_\infty$ ball of radius $\epsilon$.

Their technical approach involves:

  • Linear Classifiers: Deriving tight upper and lower bounds for both binary and multi-class linear models.
  • Neural Networks: Establishing lower bounds for the adversarial Rademacher complexity of ReLU networks.
  • SDP Relaxation: For one-hidden-layer neural networks, using a Semidefinite Programming (SDP) surrogate loss to derive computationally tractable margin bounds.

Key Insights

The theoretical analysis yields several critical insights into the nature of adversarial robustness:

The Dimension Curse: In standard learning, generalization bounds often depend only logarithmically on the dimension $d$, or sometimes not at all. This paper proves that for $\ell_\infty$ adversarial attacks, the complexity must depend polynomially on $\sqrt{d}$ if the weights are constrained by $\ell_p$ norms (for $p > 1$). For a weight vector with $\ell_2$ norm $W$, the adversarial complexity is bounded by $O(W \cdot \epsilon \sqrt{d/n})$. This explicitly shows that as the dimension $d$ grows, more data ($n$) is needed to maintain the same level of generalization.

Adversarial Complexity is Always Higher: The authors prove that adversarial Rademacher complexity is never smaller than its natural counterpart. Robustness inherently makes the learning problem more complex; it does not come for free.

The $\ell_1$ Escape Hatch: A major breakthrough in the paper is the discovery that the dimension dependence disappears if $\ell_1$ norm constraints are used on the weight matrices. This suggests that encouraging sparsity in the weights is a mathematically sound strategy to improve robust generalization.

Experimental Validation

The authors validated their theoretical findings using the MNIST dataset, specifically testing the dimension dependence and the proposed $\ell_1$ regularization solution.

The Effect of Input Dimension

To isolate the effect of the dimension ($d$) on the generalization gap, the authors created two modified versions of MNIST while keeping the $\ell_2$ norm of the images constant: a downsampled version ($d=196$) and an expanded version ($d=3136$).

Generalization gap across different input dimensions

As predicted by the theoretical bounds, the generalization gap (train accuracy minus test accuracy) increased significantly as the dimension grew from 196 to 3136, even though the underlying "content" of the images remained identical.

Mitigating the Gap with $\ell_1$ Regularization

The theory suggests that $\ell_1$ regularization can remove the problematic dimension dependence. Experiments confirmed that increasing the $\ell_1$ regularization coefficient ($\lambda$) significantly narrows the gap between training and test accuracy under attack.

Effect of L1 regularization on the generalization gap

As the perturbation size increases, models without regularization ($\lambda=0.0$) suffer a massive generalization gap. However, applying $\ell_1$ regularization ($\lambda=0.001$ or $0.002$) keeps the gap stable and significantly lower, validating the "$\ell_1$ escape hatch" theory.

Limitations and Future Work

While this paper provides foundational insights, it has a few limitations:

  • Attack Type: The analysis focuses primarily on $\ell_\infty$ attacks. Other threat models, such as $\ell_2$ or $\ell_0$ attacks, might exhibit different complexity signatures.
  • Network Depth: The most detailed neural network bounds are provided for one-hidden-layer networks using a surrogate loss. Extending these tight bounds to very deep architectures remains an open challenge.
  • Surrogate vs. Actual Loss: The margin bounds for neural networks rely on an SDP surrogate. While this provides a "certified" upper bound, there may still be a gap between this surrogate and the actual adversarial loss used in practical settings like Projected Gradient Descent (PGD) training.

Summary updated

BibTeX
@inproceedings{yin2019rademacher,
  author = {Dong Yin and Kannan Ramchandran and Peter Bartlett},
  title = {{Rademacher Complexity for Adversarially Robust Generalization}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
  url = {https://openreview.net/forum?id=ryNj-iWOWr},
}
Figure