Understanding Overfitting in Adversarial Training via Kernel Regression

Teng Zhang, Kang Li · DOI

Abstract

Adversarial training and data augmentation with noise are widely adopted techniques to enhance the performance of neural networks. This paper investigates adversarial training and data augmentation with noise in the context of regularized regression in a reproducing kernel Hilbert space (RKHS). We establish the limiting formula for these techniques as the attack and noise size, as well as the regularization parameter, tend to zero. Based on this limiting formula, we analyze specific scenarios and demonstrate that, without appropriate regularization, these two methods may have larger generalization error and Lipschitz constant than standard kernel regression. However, by selecting the appropriate regularization parameter, these two methods can outperform standard kernel regression and achieve smaller generalization error and Lipschitz constant. These findings support the empirical observations that adversarial training can lead to overfitting, and appropriate regularization methods, such as early stopping, can alleviate this issue.

Introduction

Deep learning models are notoriously fragile; a tiny, imperceptible change to an input—an adversarial perturbation—can trick a state-of-the-art network into misclassifying it. To combat this, researchers use Adversarial Training (AT), which incorporates these "attack" examples into the training process, and Data Augmentation (DA) with noise.

While these methods generally improve robustness, practitioners have noticed a frustrating phenomenon: robust overfitting. Unlike standard training, where models often generalize well even when they interpolate the training data (benign overfitting), adversarial training often sees test performance plummet if the model is trained for too long. This paper provides a rigorous mathematical foundation for why this happens and how regularization acts as a cure.

Theoretical Framework: Kernel Regression in RKHS

The authors bridge the gap between complex neural networks and manageable mathematics by using Kernel Regression in a Reproducing Kernel Hilbert Space (RKHS). This is a powerful proxy because, in the limit of infinite width, neural networks behave like kernel machines via the Neural Tangent Kernel (NTK).

The core of the approach involves deriving "limiting formulas" for both DA and AT estimators as the perturbation size ($\epsilon$) and the regularization parameter ($\lambda$) approach zero. By treating the fitted functions as projections onto specific subspaces, the authors analyze how the model reacts to perturbations in the input space. They compare three specific estimators:

  1. Standard: Basic kernel regression.
  2. Augmented (DA): Training on data plus random noise.
  3. Adversarial (AT): Training on the "worst-case" perturbations within a small ball.

Key Insights: The Regularization Paradox

The "Small $\lambda$" Trap

The most striking finding is that if the regularization parameter $\lambda$ is too small (specifically $o(\epsilon^2)$), the adversarial and augmented estimators actually perform worse than standard regression. In this regime, their Lipschitz constants—a measure of how much the output changes relative to the input—explode, making the model highly unstable. This provides a theoretical explanation for why "overtraining" leads to a loss of robustness.

The Sweet Spot

There exists an optimal level of regularization where AT and DA finally outperform standard methods. When $\lambda$ is tuned correctly, these models achieve lower generalization error and smaller Lipschitz constants than standard training. This suggests that AT and DA are not inherently flawed, but rather highly sensitive to the regularization regime.

AT and DA as Cousins

The paper shows that the limiting formulas for adversarial training and data augmentation are remarkably similar. This explains why they often exhibit similar overfitting patterns in practice. Furthermore, in the context of gradient descent, "early stopping" acts as a form of implicit regularization. The results explain why stopping early prevents the model from entering the "small $\lambda$" regime where the Lipschitz constant spikes.

Empirical Results

The authors validated their theoretical findings using both controlled environments and real-world data:

  • Two-Point Example: Using a simple linear function, the authors proved that inadequate regularization makes the adversarial estimator's Lipschitz constant and Mean Squared Error (MSE) significantly worse than a standard ridgeless model.
  • Quadratic Kernel: In high-dimensional settings where the number of features exceeds the number of samples, the authors showed that under-regularized robust models are almost surely less robust than standard ones.
  • MNIST Simulations: For the (2,7) digit pair, the "Augmented" MSE was 0.1603 with optimal regularization, but jumped significantly if the regularization was too low or too high. As the number of iterations increased (effectively decreasing regularization), the MSE and Lipschitz constant followed a U-shaped curve—decreasing initially, hitting an optimal point, and then rising as the model overfit.

Conclusion and Limitations

This research clarifies the relationship between adversarial training and regularization. It confirms that robust overfitting is a consequence of the model's behavior in low-regularization regimes. However, some limitations remain:

  1. Small Perturbation Limit: The derivations assume $\epsilon$ is very small. Future work could explore larger, non-local perturbations.
  2. Kernel Choice: While NTK provides a bridge to deep learning, real neural networks are finite-width and learn features, which might introduce dynamics not captured by a static kernel.
  3. Optimal Selection: While the paper proves an optimal $\lambda$ exists, finding it for any given dataset remains a practical challenge for researchers.

Summary updated

BibTeX
@misc{zhang2023understanding,
  author = {Teng Zhang and Kang Li},
  title = {{Understanding Overfitting in Adversarial Training via Kernel Regression}},
  year = {2023},
  eprint = {2304.06326},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.06326},
}
Figure