Contrasting Adversarial Perturbations: The Space of Harmless Perturbations

Lu Chen, Shaofeng Li, Benhao Huang, Fan Yang, Zheng Li, Jie Li, Yuan Luo

In the world of Deep Neural Networks (DNNs), we are used to hearing about "adversarial examples"—tiny, imperceptible tweaks to an image that cause a model to confidently misclassify a "panda" as a "gibbon." But what if the opposite were true? What if you could add massive, glaringly obvious noise to an image, yet the network’s output remained mathematically identical?

A recent paper, "Contrasting Adversarial Perturbations: The Space of Harmless Perturbations," reveals exactly that. The authors demonstrate that DNNs possess a "harmless perturbation space" where even large-scale changes are completely ignored by the model.

TL;DR

This paper identifies "harmless perturbations"—specific directions in the input space where changes, regardless of their magnitude, leave a DNN's output mathematically invariant. By exploiting the non-injective nature of layers like ReLU and the nullspace of linear weights, the authors show how to hide sensitive data from humans while keeping it perfectly readable for AI.

What Problem Does This Paper Address?

Most robustness research focuses on the fragility of DNNs—how small noises can break them. This paper investigates a different kind of robustness: invariance.

The authors ask: Are there perturbations that preserve network output invariance?

The answer lies in the fact that DNNs are composed of non-injective functions. In simple terms, many different inputs can map to the exact same output. For example, a linear layer that compresses a high-dimensional input into a lower-dimensional output naturally has a "nullspace"—a set of directions that the layer simply cannot "see." By identifying these blind spots, the researchers show that DNNs are surprisingly consistent under massive perturbations, provided those perturbations stay within the "harmless" subspace.

Methods

The researchers developed a framework to rigorously define and solve for these harmless subspaces across different types of layers:

  1. Linear Layers: For a layer $L(x) = Ax$, the harmless perturbations are simply the nullspace of the parameter matrix $A$. If the input dimension $n$ is greater than the output dimension $m$, there exists a subspace of dimension $n-m$ where any added noise is zeroed out.
  2. Non-linear Layers: The authors extend this to non-linearities. For ReLU, any perturbation added to a negative input (which is already being zeroed out) is harmless. For Pooling layers, perturbations that maintain the same average or maximum value within a window are harmless.
  3. Decomposition: They prove that any arbitrary perturbation (like random noise or an adversarial attack) can be decomposed into two parts: a "harmless" component (parallel to the subspace) and a "harmful" component (orthogonal to it). Crucially, the network's decision is driven only by the harmful component.
Figure 1: (a) Harmless perturbations added to images completely do not change the network output of the images, regardless of the magnitude of these harmless perturbations. (b) Illustration of the equivalent effect of any perturbation on the network output. Given any linear layer with a harmless subspace H, the network outputs of any perturbations δ and ˆδ are equivalent to those of their components δ⊥orthogonal to the harmless subspace.

Datasets

The authors validated their theory across several standard benchmarks and architectures:

  • Datasets: MNIST, CIFAR-10, CIFAR-100, and SVHN.
  • Architectures: VGG-16, ResNet-18/50, EfficientNet, and custom Multi-Layer Perceptrons (MLP-5).

Key Insights and Ideas

  • Magnitude vs. Utility: In adversarial attacks, we usually assume smaller is better (to stay imperceptible). This paper argues that perturbation magnitude is not a decisive factor in attacking a network; only the "effective component" orthogonal to the harmless space matters.
  • Human vs. AI Perception: There is a massive gap between what humans see and what DNNs process. We can generate images that look like pure static to a human but are classified with 100% accuracy and zero change in confidence by a DNN.
  • Privacy Protection: Because these perturbations can be massive, they can be used to "scramble" sensitive images (like medical data) so they are unrecognizable to humans, yet still perfectly usable for cloud-based AI analysis without any loss in performance.
  • Model Fingerprinting: Harmless subspaces are determined by a model's specific weights. A perturbation that is harmless for ResNet-50 will likely cause a huge output change in ResNet-18. This makes them excellent "fingerprints" for identifying specific model instances.
Harmless perturbations as model fingerprints: noise that is harmless for one model causes significant changes in another.

Key Results

  • Mathematical Invariance: In experiments on ResNet-50, harmless perturbations resulted in a Root Mean Squared Error (RMSE) of nearly zero ($~10^{-15}$), effectively proving mathematical invariance. In contrast, Gaussian noise of the same magnitude caused an RMSE of over 5.0 and a 32% drop in accuracy.
  • Subspace Dimension: The authors verified that the dimension of the harmless space follows the $n-m$ rule for linear layers. As the output dimension of a layer increases, the "blind spot" shrinks.
The dimension of the harmless subspace decreases as the number of output kernels or neurons increases.

Limitations and Future Work

  • White-Box Requirement: Calculating the harmless subspace requires full access to the model's parameters (weights). This is not applicable in black-box scenarios.
  • Sample Dependency: While harmless spaces for linear layers are universal, the expanded spaces created by ReLU and Max-Pooling are dependent on the specific input image.
  • Transferability: The paper notes that harmless perturbations generally don't transfer between models. While this is great for fingerprinting, it limits the use of this theory for developing general-purpose defenses that work across different architectures.

This work provides a fascinating new lens on DNN robustness, suggesting that our models aren't just fragile—they are also strangely, mathematically blind to vast regions of the input space.

Summary updated

BibTeX
@inproceedings{chen2025contrasting,
  author = {Lu Chen and Shaofeng Li and Benhao Huang and Fan Yang and Zheng Li and Jie Li and Yuan Luo},
  title = {{Contrasting Adversarial Perturbations: The Space of Harmless Perturbations}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  url = {https://openreview.net/forum?id=O0Fmwjl7WU},
}
Figure