Sparse patches adversarial attacks via extrapolating point-wise information

Yaniv Nemcovsky, Avi Mendelson, Chaim Baskin

TL;DR

Jointly optimizing both the locations and pixel values of multiple adversarial patches is a combinatorial, non-differentiable nightmare. This paper introduces PGDTrim, a framework that solves this by training a dense perturbation with dropout, estimating the point-wise importance of perturbed pixels via Monte Carlo sampling, and iteratively trimming down to sparse patches. The method sets a new state-of-the-art for sparse ($L_0$) attacks across various vision architectures and enables the simultaneous optimization of multiple adversarial patches of arbitrary sizes.

What Problem Does This Paper Address?

Adversarial attacks bounded by an $L_0$ norm manipulate a very small budget of pixels. In real-world scenarios—such as evading vision models on autonomous vehicles—these perturbations are frequently constrained to contiguous clusters known as patch attacks.

Optimizing multiple patches at once is notoriously difficult: selecting patch locations is a discrete combinatorial search that scales exponentially with the number of patches, while optimizing pixel perturbations relies on continuous gradient descent. As a result, previous patch attacks rely on heavy compromises:

  • Fixing patch positions beforehand and only optimizing pixel values.
  • Fixing patch patterns beforehand and optimizing placement.
  • Limiting the attack to just a single patch.

The authors address this gap by proposing an algorithm capable of simultaneously optimizing the locations and perturbations of multiple sparse patches (as well as arbitrary unconstrained sparse attacks).

Methods

The proposed framework, PGDTrim (and its patch variant PGDTrimKernel), approaches sparse attack generation through an iterative "dense-to-sparse" schedule:

  1. Point-wise Evaluation via TrimStep: Instead of choosing pixels greedily or relying on convex $L_1$ relaxations, the method scores each pixel’s marginal value to the attack objective. It computes an expectation $L_{\delta_s}$ of the loss when random sub-masks are applied to a pre-trained dense perturbation. This expectation is estimated efficiently using Monte Carlo sampling.

  2. Logarithmic Trimming Schedule: Rather than dropping down to the target $L_0$ budget $\epsilon_0$ in one aggressive step, the attack trims perturbation masks gradually along a logarithmic schedule (halving the number of active points across rounds from $N$ down to $\epsilon_0$).

  3. Dropout-PGD (DPGD): Standard dense perturbations fail when partially masked. To make perturbations robust to mask projections during TrimStep, the authors introduce Bernoulli dropout into the PGD optimization loop, matching the dropout rate to the ratio of the upcoming trim step ($L_0^{\text{next}} / L_0^{\text{curr}}$).

  4. Patch Selection (PGDTrimKernel): To enforce patch constraints of kernel size $K_h \times K_w$, the pixel scores are pooled across kernel windows using sum-pooling. Patches are chosen greedily via a max-out scheme, zeroing out selected regions step-by-step to handle overlaps properly.

Datasets

  • ImageNet (ILSVRC 2012): The standard image classification benchmark used to evaluate attacks across several vision architectures:
  • Standard models: InceptionV3, standard ResNet-50, Swin-B (Vision Transformer), and ConvNeXt-B.
  • Robust models: Robust ResNet-50 (trained with state-of-the-art adversarial defense from Salman et al., 2020 via RobustBench).
  • No new benchmarks or datasets were introduced.

Key Insights and Ideas

  • Dense perturbations contain sparse "significance" maps: Rather than trying to optimize sparse locations directly from scratch, optimizing a dense perturbation with dropout encourages the network to concentrate attack strength into the most sensitive input coordinates.
  • Monte Carlo prior approximation works: Exactly evaluating which pixel subsets to keep is computationally intractable ($|C_{N, \epsilon_0}|$ combinations). However, computing the expected loss via Monte Carlo sampling over Bernoulli masks provides an accurate surrogate for pixel attribution.
  • Robustness under structured patches: Even under rigid spatial constraints ($2 \times 2$ patches), PGDTrim matches the performance of unconstrained sparse baselines (like GreedyFool), demonstrating that spatial clustering does not have to come at the expense of attack potency.

Key Results

  • Dominant Sparse Attack Performance: On InceptionV3 and standard ResNet-50, PGDTrim achieves 100% Adversarial Success Rate (ASR) at $\epsilon_0 = 128$ pixels (out of $224 \times 224$ or $299 \times 299$ images), substantially outperforming prior state-of-the-art sparse attacks including $PGD_{L0}$, GreedyFool (GF), SparseFool (SF), and Homotopy.
  • Resilience Against Defended Models: On adversarially robust ResNet-50, PGDTrim hits 100% ASR at $\epsilon_0 = 224$, maintaining a massive gap over all competing sparse baselines across every tested $L_0$ budget.
  • Vision Transformers and Modern ConvNets: PGDTrim generalizes across architectures, consistently outperforming baselines on Swin-B and ConvNeXt-B models.
  • Multi-Patch Evaluation: Attacks using $2 \times 2$ and $4 \times 4$ patches maintain high attack success rates. In particular, $2 \times 2$ patch attacks remain competitive with the best unconstrained sparse baseline (GreedyFool).

Limitations and Future Work

  • Patch Geometries: While the paper notes that arbitrary patch shapes can theoretically be accommodated via binary masks on kernel $K$, the experimental validation is restricted to rectangular patches ($2 \times 2$ and $4 \times 4$).
  • Computational Cost: PGDTrim requires multiple trim steps (e.g., 11 steps), multiple random restarts, and 1,000 Monte Carlo evaluations per trim step, making it computationally heavier than single-pass heuristic attacks.
  • Physical-World Deployment: Although motivated by real-world physical adversarial patch scenarios (such as camera and autonomous system vulnerabilities), experiments were conducted entirely in digital simulation settings. Physical print-and-capture validation remains open for future research.

Summary updated

BibTeX
@inproceedings{nemcovsky2024sparse,
  author = {Yaniv Nemcovsky and Avi Mendelson and Chaim Baskin},
  title = {{Sparse patches adversarial attacks via extrapolating point-wise information}},
  booktitle = {AdvML-Frontiers @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=5DCCVCN2st},
}
Figure