Unique properties of adversarially trained linear classifiers on Gaussian data

Jamie HayesarXiv 2020

TL;DR

This paper reveals a surprising disconnect: while adversarial training is crucial for robust machine learning, simple theoretical models can be misleading. The authors demonstrate that linear classifiers can achieve perfect accuracy on Gaussian data even with extremely strong adversarial perturbations during training, a property that doesn't hold for more complex models on real-world datasets like CIFAR-10. This highlights the need for caution when extrapolating findings from simplified settings to practical applications.

What Problem Does This Paper Address?

Machine learning models are notoriously susceptible to adversarial attacks – small, imperceptible changes to input data that can cause misclassifications. Adversarial training aims to mitigate this by exposing models to these perturbed examples during training. While much progress has been made in understanding why models are vulnerable, much of the theoretical work relies on simplified data distributions and hypothesis classes (like linear classifiers on Gaussian data). The core problem this paper addresses is the potential disconnect between insights gained from these simplified theoretical models and the behavior of models on complex, real-world datasets. Specifically, it questions whether the successes and failures observed in these simple settings truly inform our understanding of adversarial robustness in practice.

Methods

The paper focuses on a binary classification problem with Gaussian data, where inputs $x$ are drawn from a distribution conditioned on the label $y$. They consider a linear classifier $f_\theta(x) = \text{sign}(\theta^T x)$ and analyze its performance under adversarial training, which involves minimizing a worst-case loss function (Equation 2 in the paper).

The key methodological contributions are:

  • Theoretical analysis of linear classifiers on Gaussian data: The authors mathematically prove that for a linear classifier with a linear loss function, it's possible to achieve Bayes-optimal generalization error (the theoretical minimum possible error) even with an arbitrarily large adversarial perturbation budget ($\epsilon$). This is achieved when the learned parameter vector $\theta$ has positive components.
  • Gradient Descent Analysis: They analyze the behavior of gradient descent when optimizing the adversarial objective for a linear loss. They show that under certain conditions (specifically, when the adversary's perturbation budget $\epsilon$ is larger than the mean of the data distribution $\mu$), the gradient descent process is biased towards learning positive $\theta$ values, leading to robust performance.
  • Empirical Validation: The theoretical findings are supported by experiments on synthetic Gaussian data with varying perturbation budgets and different loss functions (linear, cross-entropy, hinge). They also contrast these results with experiments on the CIFAR-10 dataset.

Datasets

  • Synthetic Gaussian Data: The primary focus of the theoretical analysis and a significant portion of the empirical evaluation is on synthetic Gaussian data. This data is generated according to a specific distribution where $x | y \sim \mathcal{N}(y\mu, \sigma^2 I)$, meaning the data distribution for each class is a Gaussian centered around $\mu$ or $-\mu$.
  • CIFAR-10: This is a standard, real-world image classification dataset used to demonstrate that the properties observed on Gaussian data do not transfer to more complex scenarios.

Key Insights and Ideas

  • The "Easy" Case is Surprisingly Robust: The most striking finding is that a simple linear classifier on Gaussian data can be made arbitrarily robust to adversarial perturbations during training without sacrificing standard accuracy. This is counter-intuitive, as one might expect increasing perturbation levels to degrade performance.
  • Linearity and Gaussianity are Key: The combination of a linear hypothesis class and a Gaussian data distribution creates a scenario where adversarial training can effectively "learn through" the perturbations, essentially treating them as a form of label noise.
  • Gradient Descent Bias: For linear models and linear loss, gradient descent, when faced with a strong adversary, is shown to be biased towards learning parameters that lead to robust solutions. This bias is crucial for achieving the observed perfect accuracy.
  • The Danger of Oversimplification: The paper serves as a strong cautionary tale. The insights gained from studying adversarial robustness on simple Gaussian data do not necessarily translate to complex, high-dimensional, real-world datasets like CIFAR-10. This suggests that theoretical analyses on simplified settings should be interpreted with care.
  • CIFAR-10 Fails to Transfer: The contrast with CIFAR-10 is critical. On this dataset, adversarial training with large perturbation budgets leads to a complete failure to learn, with accuracy dropping to random guessing. This stark difference highlights the limitations of the simplified models.

Key Results

  • Perfect Accuracy on Gaussian Data: For linear classifiers on Gaussian data, the paper proves that it's possible to achieve Bayes-optimal generalization error (and thus perfect test accuracy) under adversarial training with an arbitrarily large perturbation budget $\epsilon$.
  • Empirical Confirmation: Experiments on Gaussian data show that even with $\epsilon$ significantly larger than $\mu$ (e.g., $\epsilon = 20\mu$), linear and cross-entropy loss functions achieve near-perfect test accuracy.
  • CIFAR-10 Failure: Adversarial training on CIFAR-10 with large $\epsilon$ values (e.g., $\epsilon = 127$ or $255$ for pixel values) results in test accuracy not exceeding random guessing (around 10%).
  • Loss Function Impact: While the theoretical results are strongest for linear loss, empirical results show that cross-entropy and hinge loss also perform well on Gaussian data under large $\epsilon$.

Limitations and Future Work

  • Focus on Linear Classifiers and Gaussian Data: The primary limitation is the focus on a very specific and simplified setting (linear classifiers on Gaussian data). The paper explicitly states that these findings do not transfer to more complex models or datasets.
  • "Mislabeled" Data: The paper highlights that with large $\epsilon$, the adversarial training process effectively treats the data as if it were almost entirely mislabeled. This is a property that is not desirable or observed in practical robust learning scenarios.
  • Future Work: The authors suggest that this work should serve as a caution against over-reliance on simple theoretical models for understanding adversarial robustness. Future work could explore why this disconnect exists and what properties of real-world data and models prevent such extreme robustness. They also briefly touch upon the "weakness" of linear loss functions in learning shifted intercepts, suggesting further investigation into loss function properties.

Summary updated

BibTeX
@misc{hayes2020unique,
  author = {Jamie Hayes},
  title = {{Unique properties of adversarially trained linear classifiers on Gaussian data}},
  year = {2020},
  eprint = {2006.03873},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.03873},
}
Figure