Characterizing Adversarial Subspaces Using Local Intrinsic Dimensionality

Xingjun Ma, Bo Li, Yisen Wang, Sarah M. Erfani, Sudanthi Wijewickrema, Grant Schoenebeck, Dawn Song, Michael E. Houle, James Bailey

Introduction

Deep Neural Networks (DNNs) are notoriously fragile; small, imperceptible perturbations—known as adversarial attacks—can flip a model's prediction with high confidence. While researchers have tried to detect these "optical illusions for AI," most previous methods relied on Kernel Density (KD), operating on the assumption that adversarial examples live in "low-probability" regions.

However, density measures often fail because an adversarial point can have the same local density as a normal point while still being fundamentally different in its geometric structure. The challenge is to find a property that uniquely identifies these "adversarial subspaces" where malicious examples reside. To address this, researchers introduce Local Intrinsic Dimensionality (LID) as a powerful tool to characterize and detect adversarial examples, demonstrating that adversarial perturbations "push" data points into higher-dimensional regions of the representational space.

Methodology: Local Intrinsic Dimensionality (LID)

The authors propose using LID to assess the "space-filling" capability of the region surrounding a reference example. If data lies on a simple 1D line, doubling the search radius roughly doubles the number of neighbors. In a 2D plane, it quadruples them. Adversarial examples are typically generated by moving a point away from the low-dimensional "manifold" where normal data lives and into the high-dimensional ambient space of the network's activations.

The implementation follows three main steps:

  1. LID Estimation: A Maximum Likelihood Estimator (MLE) is used to calculate the LID of a sample based on its distance to its $k$-nearest neighbors within a minibatch of training data.
  2. Feature Extraction: For any given input, LID scores are calculated at every transformation layer of the DNN (e.g., ReLU, Conv, Softmax).
  3. Detection: These LID scores are then used as features to train a simple Logistic Regression classifier to distinguish between normal, noisy, and adversarial examples.

Key Insights

Density vs. Dimensionality

A core finding of the paper is that density and dimensionality are not interchangeable, and dimensionality provides a much stronger signal for adversarial detection.

Comparison of normal and adversarial subspaces showing identical density (KD) but vastly different LID scores.

As illustrated above, two points might have the exact same number of neighbors and identical Kernel Density (KD=0.92). However, their LID can differ wildly (1.53 for a normal sample vs. 4.36 for an adversarial sample). This makes LID a significantly more robust "fingerprint" for adversarial regions.

The "Depth" Effect and Generalizability

Adversarial points consistently exhibit much higher LID scores than normal or even noisy data. They aren't just "rare"; they are geometrically "complex." Furthermore, the difference in LID between normal and adversarial samples becomes more pronounced in the deeper layers of the network. This suggests that as the network extracts more abstract features, the "off-manifold" nature of adversarial points becomes easier to spot.

Remarkably, a detector trained only on a simple attack (like the Fast Gradient Method, FGM) can still accurately detect much more complex attacks. This implies that different attack methods all tend to land in subspaces with similar dimensional properties.

Experimental Setup and Results

The researchers evaluated their approach using three standard image classification benchmarks (MNIST, CIFAR-10, and SVHN) against five prominent attack strategies, including FGM, BIM-a, BIM-b, JSMA, and the powerful Optimization-based (Opt) attack (Carlini & Wagner).

The LID-based detector consistently outperformed state-of-the-art measures like Kernel Density (KD) and Bayesian Uncertainty (BU):

  • Superior Detection: On the CIFAR-10 dataset against the "Opt" attack, LID achieved an AUC of 98.94%, compared to 91.35% for KD and 91.39% for BU.
  • Robustness to Adaptive Attacks: Even when the attacker was "aware" of the LID defense and tried to minimize the LID score during the attack, the failure rate of the attack remained extremely high (up to 100% on MNIST and ~97% on SVHN).
  • Stability: LID proved to be more stable across different parameter settings (like the choice of $k$ neighbors) compared to the bandwidth sensitivity of Kernel Density.

Limitations and Future Directions

While highly effective, the approach has limitations. The accuracy of LID estimation depends on the minibatch size; while a size of 100 works well, larger batches improve performance at the cost of increased computation. Additionally, there remains a theoretical gap: while the empirical evidence is strong, a full theoretical understanding of why DNN transformations specifically increase the LID of adversarial regions remains an open question.

Ultimately, as with all defenses, characterizing adversarial subspaces via LID opens the door for new types of attacks specifically designed to bypass dimensionality-based detection, continuing the ongoing arms race in AI security.

Summary updated

BibTeX
@inproceedings{ma2018characterizing,
  author = {Xingjun Ma and Bo Li and Yisen Wang and Sarah M. Erfani and Sudanthi Wijewickrema and Grant Schoenebeck and Dawn Song and Michael E. Houle and James Bailey},
  title = {{Characterizing Adversarial Subspaces Using Local Intrinsic Dimensionality}},
  booktitle = {International Conference on Learning Representations},
  year = {2018},
  url = {https://openreview.net/forum?id=B1gJ1L2aW},
}
Figure