Certified Robustness against Sparse Adversarial Perturbations via Data Localization

Ambar Pal, Rene Vidal, Jeremias Sulam

Abstract

Recent work in adversarial robustness suggests that natural data distributions are localized, i.e., they place high probability in small volume regions of the input space, and that this property can be utilized for designing classifiers with improved robustness guarantees for $\ell_2$-bounded perturbations. Yet, it is still unclear if this observation holds true for more general metrics. In this work, we extend this theory to $\ell_0$-bounded adversarial perturbations, where the attacker can modify a few pixels of the image but is unrestricted in the magnitude of perturbation, and we show necessary and sufficient conditions for the existence of $\ell_0$-robust classifiers. Theoretical certification approaches in this regime essentially employ voting over a large ensemble of classifiers. Such procedures are combinatorial and expensive or require complicated certification techniques. In contrast, a simple classifier emerges from our theory, dubbed Box-NN, which naturally incorporates the geometry of the problem and improves upon the current state-of-the-art in certified robustness against sparse attacks for the MNIST and Fashion-MNIST datasets.

Introduction

Adversarial attacks typically involve making subtle, often imperceptible changes to an input to deceive a machine learning model. Sparse attacks ($\ell_0$-bounded) represent a particularly challenging threat model: an attacker is restricted to modifying only a small number of pixels but can change their values arbitrarily (e.g., from white to black).

Historically, theoretical results suggested that robustly classifying high-dimensional data is mathematically impossible. However, this contradicts human perception; humans are not fooled by a few corrupted pixels. This paper bridges this gap by demonstrating that sparse robustness is fundamentally tied to data localization—the phenomenon where natural data clusters within tiny volumes of the input space. By leveraging this property, the authors introduce Box-NN, a classifier based on axis-aligned boxes that achieves state-of-the-art (SOTA) certified robustness against sparse attacks.

Theoretical Foundation: Data Localization

The core thesis of this work is that the existence of a robust classifier is both a necessary and sufficient condition for a data distribution to be "localized." If data is concentrated in small, sufficiently separated volumes, a robust classifier must exist. This insight refutes general "impossibility" results by showing they do not account for the specific geometry of natural data.

In the context of $\ell_0$ robustness, the geometry of the image domain $[0, 1]^n$ makes robustness uniquely dependent on axis-aligned structures. Unlike $\ell_2$ (Euclidean) distance, $\ell_0$ distance is "all or nothing" per coordinate, favoring rectangular decision boundaries.

The Box-NN Classifier

Inspired by the geometry of localized data, the authors propose Box-NN. Instead of standard neural network layers, Box-NN defines decision regions as unions of axis-aligned rectangular boxes (cuboids).

Visualization of data localization using axis-aligned boxes ($B_{dog}$, $B_{cat}$) to represent class-specific regions in the input space.

Mechanism and Certification

To classify a point, the model identifies the box to which the point is closest in terms of $\ell_0$ distance (the number of coordinates requiring modification to enter the box). Because the decision boundaries are simple boxes, the "certified radius"—the maximum number of pixels an attacker can change before the prediction flips—can be calculated via a straightforward, closed-form expression. This avoids the computational burden of probabilistic estimates or complex ensembles used in prior work.

Optimization

Training a model composed of boxes presents challenges, as the "distance to a box" function typically has zero gradients. The authors employ several relaxations to enable gradient-based learning:

  • Soft-min: A smooth approximation of the min function to facilitate gradient flow.
  • Conical Relaxation: Replacing hard indicator functions with "conical" shapes to provide a differentiable slope for optimization.

Experimental Results

The Box-NN approach was evaluated on MNIST and Fashion-MNIST, which are standard benchmarks for certified $\ell_0$ robustness.

Dataset Method Median Certified Radius ($\bar{r}$)
MNIST Box-NN (Ours) 13
Best Prior Work (FPA) 12
Randomized Ablation 10
Fashion-MNIST Box-NN (Ours) 22
Randomized Ablation 16

Box-NN achieves SOTA median certified radius, representing the maximum number of pixels an attacker can change while maintaining at least 50% accuracy. Crucially, Box-NN maintains higher certified accuracy across a wider range of perturbation budgets compared to baseline methods like randomized ablation.

Discussion and Conclusion

This work demonstrates that $\ell_0$ robustness is primarily a function of data distribution volume. By wrapping localized data in axis-aligned boxes, Box-NN provides superior mathematical guarantees with a simpler architecture.

While highly effective for grayscale datasets, scaling this approach to high-resolution, complex datasets like ImageNet remains a challenge. Future research may explore more flexible geometric primitives, such as non-axis-aligned polytopes, which could offer better representational capacity while remaining amenable to efficient certification.

Summary updated

BibTeX
@article{pal2024certified,
  author = {Ambar Pal and Rene Vidal and Jeremias Sulam},
  title = {{Certified Robustness against Sparse Adversarial Perturbations via Data Localization}},
  journal = {Accepted by TMLR},
  year = {2024},
  url = {https://openreview.net/forum?id=17Ld3davzF},
}
Figure