Adversarial Spheres

Justin Gilmer, Luke Metz, Fartash Faghri, Samuel S. Schoenholz, Maithra Raghu, Martin Wattenberg, Ian J. Goodfellow

Introduction

Adversarial examples—tiny, often imperceptible perturbations that completely fool AI models—might not be a "bug" in neural network architectures. Instead, they may be an inevitable consequence of high-dimensional geometry. By studying a simple dataset of concentric spheres, researchers have demonstrated that if a model has even a microscopic amount of test error in high dimensions, a misclassified point is mathematically guaranteed to be lurking very close to almost every correctly classified input.

The Geometric Hypothesis

Since 2014, researchers have been puzzled by the phenomenon of adversarial examples: a state-of-the-art image classifier can be 99% accurate, yet a tiny change to an image can reliably flip its prediction.

Several theories have attempted to explain this vulnerability. Is it because neural networks are "too linear"? Is it because adversarial examples live "off the manifold" (in regions of space where no real data exists)? This paper investigates a fundamentally different hypothesis: the geometry of high-dimensional space itself. In high dimensions, the concept of "close" behaves very differently than it does in our familiar 2D or 3D world. The authors set out to determine if adversarial vulnerability is simply a logical byproduct of having a non-zero error rate in a high-dimensional space.

The Concentric Spheres Dataset

To isolate the effect of geometry from the complexities of natural images, the authors propose a simple, synthetic task: classifying points as belonging to either an inner sphere (radius 1.0) or an outer sphere (radius 1.3) in $d$-dimensional space.

2D slice of the concentric spheres dataset showing training data and the max margin boundary.

This dataset is perfectly separable—a spherical shell at radius 1.15 neatly divides the two classes. Because the problem is mathematically simple, it serves as an ideal testbed to understand why models fail to be perfectly robust. The dimensionality ($d$) was varied throughout the experiments, typically set to 500 to simulate high-dimensional environments.

To test their hypothesis, the authors evaluated standard Deep ReLU networks alongside a simpler "Quadratic Network" ($\hat{y}(x) = \sum \alpha_i z_i^2 - 1$), which allowed for rigorous mathematical analysis. They also developed a "manifold attack" using Projected Gradient Descent (PGD). Unlike standard attacks that push points into empty space, this attack forces the adversarial example to stay exactly on the surface of the sphere, proving that vulnerabilities exist even within the true data distribution.

Key Insights: The Inevitability of Vulnerability

The core findings of the paper revolve around how high-dimensional geometry distorts our intuition about distance and error.

  • The "Concentration of Measure" Effect: In high dimensions, most of the surface area of a sphere lies near its "equator." If a model has a tiny patch of error (e.g., misclassifying just 0.01% of the sphere), that patch is actually geometrically "close" to almost every other point on the sphere.
  • Theorem 5.1: This theorem is the heart of the paper. It proves that for any model with a small constant error rate, the average distance to the nearest error scales as $O(1/\sqrt{d})$. As the dimension $d$ increases, the distance to the nearest adversarial example shrinks toward zero.
  • The Error-Robustness Tradeoff: To linearly increase the distance to the nearest adversarial example, a model's error rate must be decreased exponentially.
Decision boundaries viewed along random vs. adversarial directions.

Surprisingly, when the authors trained various architectures, the models didn't just fail randomly; they naturally approached the theoretical limit of robustness. They were as robust as they mathematically could be, given their test error.

Empirical Results

The empirical tests strongly supported the geometric theory:

  • Near-Perfection is Not Enough: A ReLU network trained on 50 million samples from the 500-dimensional spheres achieved an error rate of less than 1 in 10 million. Despite this near-perfection, the manifold attack easily found adversarial examples at a distance of only 0.18 (compared to the typical distance of 1.41 between two random points).
  • Confirmed Scaling: The authors confirmed that as the dimensionality of the spheres increases, the distance to the nearest adversarial example decreases exactly as predicted by the $1/\sqrt{d}$ scaling law.
  • Debunking "Off-Manifold" Exclusivity: The research debunked the idea that adversarial examples only exist because they are "off-manifold." In high dimensions, there are plenty of misclassified points sitting right on the data manifold itself.

Limitations and Future Work

The primary limitation of this work is the simplicity of the dataset. Real-world image manifolds (like those representing "cats" or "dogs") are not perfect spheres; they have much more complex, "wrinkled" geometries. While the paper proves that high dimensionality is a sufficient cause for adversarial examples, it does not prove it is the only cause in complex datasets.

Future work should investigate whether the "manifold attack" is equally effective on real image datasets and whether the $1/\sqrt{d}$ relationship holds for more complex data structures. If this geometric theory holds universally, it suggests a sobering reality: the only way to truly solve adversarial examples is to achieve near-zero test error—a daunting, perhaps impossible, task for complex real-world data.

Summary updated

BibTeX
@inproceedings{gilmer2018adversarial,
  author = {Justin Gilmer and Luke Metz and Fartash Faghri and Samuel S. Schoenholz and Maithra Raghu and Martin Wattenberg and Ian J. Goodfellow},
  title = {{Adversarial Spheres}},
  booktitle = {Workshops @ ICLR},
  year = {2018},
}
Figure