Adversarial Examples Exist in Two-Layer ReLU Networks for Low Dimensional Linear Subspaces

Odelia Melamed, Gilad Yehudai, Gal Vardi

Despite their remarkable success across various domains, neural networks remain notoriously fragile. A tiny, human-imperceptible change to an input—an adversarial perturbation—can cause a highly confident model to misclassify it entirely. While extensive research has demonstrated that random networks are vulnerable to these attacks, the theoretical understanding of why trained networks remain so susceptible is still developing.

This paper provides a rigorous theoretical examination of this vulnerability by focusing on the geometry of the training data. The authors demonstrate that standard gradient-based training recipes inherently bake non-robustness into models when the data lies on a low-dimensional subspace.

The Data Manifold Hypothesis

A prevailing theory for adversarial vulnerability is the "Data Manifold Hypothesis." This hypothesis suggests that high-dimensional data (such as a 1024x1024 image) actually resides on a much lower-dimensional "manifold" or subset of the total space.

To ground their theoretical work, the authors first validate this hypothesis empirically. Using Principal Component Analysis (PCA), they demonstrate that real-world datasets like MNIST and CIFAR-10 are highly compressible, concentrating heavily on low-dimensional linear subspaces.

PCA cumulative variance for CIFAR-10 (a) and MNIST (b), demonstrating that real-world image data concentrates on low-dimensional linear subspaces.

The paper tackles a specific mathematical formalization of this phenomenon: what happens to a network's decision boundaries when the training data lives strictly within a low-dimensional linear subspace? The authors explore why trained models "cling" so closely to this subspace, creating blind spots where a tiny nudge in an orthogonal (perpendicular) direction easily flips the model’s prediction.

Theoretical Framework and Methods

To keep the mathematics tractable while yielding meaningful insights, the authors analyze a two-layer fully connected ReLU network. They assume the training data lies on a linear subspace $P$ of dimension $d - \ell$, where $d$ is the total input dimension and $\ell$ represents the number of "empty" or orthogonal dimensions.

The researchers employ several analytical techniques:

  • Gradient Lower Bounds: They derive mathematical lower bounds for the network's gradient in directions orthogonal to the data subspace ($P^\perp$).
  • Universal Perturbations: They prove the existence of a single, "universal" perturbation direction capable of flipping labels for many different data points simultaneously.
  • Regularization Tracking: They mathematically model how weights in the empty directions evolve during training under different initialization variances and with $L_2$ regularization.

Key Insights: The "Untrained" Directions

The core vulnerability stems from how standard gradient descent interacts with empty dimensions. Because the training data has zero component in the orthogonal subspace ($P^\perp$), the gradient of the loss with respect to those specific weight components is exactly zero. Consequently, the weights in these "off-manifold" directions never learn from the data; they remain stuck at their random initial values.

Even though these individual weight components are random, there are typically many of them (i.e., $\ell$ is large in high-dimensional spaces). When summed together, they create a massive gradient in the $P^\perp$ direction. The paper proves that the gradient projected onto the orthogonal subspace is bounded below by $\Omega(\sqrt{k\ell / md})$, where $k$ is the number of active neurons. Essentially, as the "emptiness" of the space ($\ell$) increases, the model's vulnerability grows.

Because of these large orthogonal gradients, the decision boundary in vanilla training stays extremely close to the data points. An attacker only needs to move a microscopic distance "off the manifold" to cross the boundary and fool the network. In fact, the authors show that a universal perturbation $z$ exists such that its magnitude $\|z\|$ is small, yet it flips the sign of the prediction for any point on the manifold.

Mitigating the Vulnerability

Fortunately, the authors' theoretical framework also points to practical solutions:

  1. Initialization as a Shield: The scale of the initial weights ($\beta$) acts as a direct multiplier for this vulnerability. By starting with smaller initialization weights, practitioners can reduce the random "noise" in untrained directions, pushing the decision boundary further away and improving robustness.
  2. $L_2$ Regularization: The authors prove that applying $L_2$ regularization (weight decay) causes the weights in the $P^\perp$ direction to decay exponentially over training steps. This effectively "cleans" the model of its initial random sensitivity in orthogonal directions.

Empirical experiments on synthetic datasets visually confirm these proofs, showing the decision boundary transforming from a highly sensitive, "wiggly" line hugging the data to a smoother, more robust boundary after applying smaller initializations or regularization.

Limitations and Future Work

While providing a strong theoretical foundation, the paper notes a few limitations:

  • Linear vs. Non-Linear: The current proofs strictly apply to linear subspaces. Real-world data manifolds are often curved. Extending this theory to general, non-linear manifolds using tangent spaces remains an open problem.
  • Architecture Depth: The formal proofs focus on two-layer networks with a fixed second layer. While the authors provide empirical evidence that these findings hold for deeper (e.g., 5-layer) networks where all layers are trained, formalizing the proofs for deep, fully-trained architectures is left for future work.

Ultimately, this research bridges a crucial gap between empirical observations of adversarial vulnerability and rigorous mathematical theory, highlighting how standard training practices must be adapted to account for the geometric realities of high-dimensional data.

Summary updated

BibTeX
@inproceedings{melamed2023adversarial,
  author = {Odelia Melamed and Gilad Yehudai and Gal Vardi},
  title = {{Adversarial Examples Exist in Two-Layer ReLU Networks for Low Dimensional Linear Subspaces}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=pJbEXBBN88},
}
Figure