Create and explore imaginative 3D worlds with our new product Dreamfield (opens in a new tab)
Papers
Topics
Authors
Recent
Search
2000 character limit reached

PatchMap: Spatial Benchmark for Patch Attacks

Updated 4 July 2026
  • PatchMap is a spatial benchmark designed to evaluate adversarial patch placements using exhaustive location sweeps on the ImageNet-1K dataset.
  • It decouples patch content from selection and placement, rigorously measuring untargeted misclassification rates and confidence drops across varied patch sizes and locations.
  • The benchmark offers reproducible, large-scale evaluations that provide actionable insights for developing location-aware defenses and advanced patch-placement strategies.

PatchMap is a spatially exhaustive benchmark for adversarial patch placement that pastes fixed, universal patches at every stride-2 location on ImageNet-1K validation images and records classification outcomes and confidences, thereby producing dense per-image, per-location vulnerability maps (Kimhi et al., 3 Aug 2025). In PatchMap v1.0, patch content is held fixed—ten 50×50 RGB universal adversarial patches from ImageNet-Patch, each optimized for a distinct target class—while the benchmark studies the selection of a 2D location and a scale on 224×224 images. Its primary reporting emphasizes untargeted misclassification rather than targeted success, even though the source patches are targeted (Kimhi et al., 3 Aug 2025).

1. Problem setting and conceptual separation

Adversarial patch attacks place a localized, printable pattern onto an image so that a downstream classifier’s prediction is corrupted. Such patches can be physically realized as stickers or posters and are constrained to compact spatial support; in PatchMap, the supported textures are square. PatchMap explicitly decouples two orthogonal design choices: patch content pp, meaning texture, color, and shape, and patch selection and placement, meaning which fixed patch is used and where it is pasted (Kimhi et al., 3 Aug 2025).

This decoupling is central to the benchmark’s scope. In v1.0, no re-optimization is performed, patches are applied without rotation, and color is unconstrained but fixed per patch. The benchmark task is: given an image xx, select a 2D location ll and a scale ss from a predefined set and paste the fixed patch pp. The square side lengths are $50$, $25$, and $10$ pixels on 224×224224\times224 images, corresponding to areas of approximately 4.98%4.98\%, 1.25%1.25\%, and 0.20%0.20\% of the image, respectively. A common misconception is that PatchMap’s headline numbers are targeted-attack results; in fact, the primary benchmark metric is untargeted attack success, namely whether the patched image causes a misclassification relative to the clean-correct label (Kimhi et al., 3 Aug 2025).

2. Benchmark construction and data representation

PatchMap v1.0 is built on the 50,000-image ImageNet-1K validation split, resized to 224×224224\times224. It uses ten fixed universal patches from ImageNet-Patch, three square sizes, and a stride-2 grid of feasible patch centers over the image plane. The grid has 112×112=12,544112\times112=12{,}544 positions. This yields approximately

50,000×10×3×12,544≈1.9×101050{,}000 \times 10 \times 3 \times 12{,}544 \approx 1.9\times10^{10}

potential placements (Kimhi et al., 3 Aug 2025).

The released benchmark is exhaustive over locations but optimized for tractable execution. By batching inference and discarding out-of-frame placements, PatchMap v1.0 actually runs approximately 1.1×1081.1\times10^8 forward passes. The abstract reports “over 1.5×1081.5\times10^8”; the released v1.0 dataset contains $100$M+ predictions and confidences. The attacked model in v1.0 is a standard torchvision ResNet-50 pretrained on ImageNet, with no adversarial fine-tuning. For each (image_id,patch_id,patch_size)(\text{image\_id}, \text{patch\_id}, \text{patch\_size}) triple, PatchMap stores a NumPy array of shape 2×112×1122\times112\times112: slice $0$ holds predicted class indices as int16, and slice $1$ holds softmax confidences as float32. The release comprises approximately $1.5$M files and approximately $1.5$ GB compressed. All benchmark evaluations can be reproduced on a single machine with at least $8$ GB RAM, and the code regenerates figures with approximately $2$ GPU-hours on one V100. A 6.5B-entry v2.0 with multiple backbones is designated as the full bench (Kimhi et al., 3 Aug 2025).

These design choices make PatchMap both exhaustive and usable. The exhaustive spatial sweep exposes location sensitivity that is invisible in single-placement or small-sample evaluations, while the stored predictions and confidences allow recomputation of downstream statistics without rerunning the entire inference pipeline.

3. Formalization, operators, and evaluation metrics

PatchMap formalizes patch application with an overwrite operator. Let x∈[0,1]H×W×3x \in [0,1]^{H\times W\times 3} be an image, p∈[0,1]s×s×3p \in [0,1]^{s\times s\times 3} the patch texture, and l=(k,ℓ)l=(k,\ell) a patch center. Let Al,s∈{0,1}H×W×3A_{l,s}\in\{0,1\}^{H\times W\times 3} be a binary mask that embeds a size-ss square centered at ll, and let El,s(p)∈[0,1]H×W×3E_{l,s}(p)\in[0,1]^{H\times W\times 3} be pp zero-padded to image size and placed at ll. The patching operator is

P(x;l,s,p)=(1−Al,s)⊙x+Al,s⊙El,s(p).P(x;l,s,p)=(1-A_{l,s})\odot x + A_{l,s}\odot E_{l,s}(p).

No alpha blending is used; the patch directly replaces the covered pixels (Kimhi et al., 3 Aug 2025).

Let f(x)∈RCf(x)\in\mathbb{R}^C be the classifier’s softmax probabilities over CC classes, with predicted class

y^(x)=arg⁡max⁡cfc(x).\hat{y}(x)=\arg\max_c f_c(x).

Given ground-truth label yy, the clean-correct set consists of images with y^(x)=y\hat{y}(x)=y. PatchMap defines untargeted success at location ll by

Iuntarg(x,l,s,p)=I[y^(P(x;l,s,p))≠y],\mathbb{I}_{\mathrm{untarg}}(x,l,s,p)=\mathbb{I}\big[\hat{y}(P(x;l,s,p))\neq y\big],

and targeted success toward target yty_t by

Itarg(x,l,s,p)=I[y^(P(x;l,s,p))=yt].\mathbb{I}_{\mathrm{targ}}(x,l,s,p)=\mathbb{I}\big[\hat{y}(P(x;l,s,p))=y_t\big].

Top-1 accuracy drop for a set XX is

ΔAcc=1∣X∣∑x∈X(I[y^(x)=y]−I[y^(P(x;l,s,p))=y]),\Delta\mathrm{Acc}= \frac{1}{|X|}\sum_{x\in X} \left( \mathbb{I}[\hat{y}(x)=y]- \mathbb{I}[\hat{y}(P(x;l,s,p))=y] \right),

and confidence drop for the ground-truth class is

δ(x,l,s,p)=fy(x)−fy(P(x;l,s,p)).\delta(x,l,s,p)=f_y(x)-f_y(P(x;l,s,p)).

Over a population of images, patches, and sizes, PatchMap defines the per-location susceptibility map

M(l)=Ex,p,s[I(y^(P(x;l,s,p))≠y)]M(l)=\mathbb{E}_{x,p,s}\big[\mathbb{I}(\hat{y}(P(x;l,s,p))\neq y)\big]

and the confidence-drop map

Δ(l)=Ex,p,s[fy(x)−fy(P(x;l,s,p))].\Delta(l)=\mathbb{E}_{x,p,s}\big[f_y(x)-f_y(P(x;l,s,p))\big].

Its released tensors allow computing both quantities as averages over clean-correct images. The location-wise attack-success heat-map on clean-correct images is denoted ASR(r,c)\mathrm{ASR}(r,c). PatchMap also reports worst-location confidence drop per image,

Δconfi=max⁡r,c[fyi(xi)−fyi(P(xi;lr,c,s,p))],\Delta\mathrm{conf}_i=\max_{r,c}\big[f_{y_i}(x_i)-f_{y_i}(P(x_i;l_{r,c},s,p))\big],

and spatial robustness via quantiles ASRq\mathrm{ASR}_q, which measures the fraction of images fooled on more than a qq-portion of locations. Metrics are reported with 95% bootstrap confidence intervals using 1,000 resamples. Because softmax confidences are stored, calibration shifts such as ECE and Brier can also be computed. A transfer matrix TA→BT_{A\rightarrow B} is proposed for cross-model replay of scored locations, and v2.0 is intended to enable such analysis across architectures including ViT and ConvNeXt (Kimhi et al., 3 Aug 2025).

4. Empirical findings on spatial vulnerability

PatchMap’s principal empirical result is that vulnerability to adversarial patches is strongly location-dependent. Dense maps reveal stable spatial hot-spots where small patches cause confident misclassifications and large confidence drops. These hot-spots align strongly with object regions, as inferred by segmentation, and persist across images and patch sizes (Kimhi et al., 3 Aug 2025).

The benchmark also shows that very small patches remain potent. For the patch “Plate,” mean optimal ASR—the fraction of images for which some location causes misclassification—is $0.84$ at 50×5050\times50, $0.79$ at 25×2525\times25, and $0.69$ at 10×1010\times10. For “Electric Guitar,” the corresponding values are $0.94$, $0.82$, and $0.71$. Confidence collapse is similarly pronounced: average worst-location confidence drops on the ground-truth class for “Plate” are $0.62$, $0.60$, and $0.45$ across the same sizes, while “Electric Guitar” yields $0.71$, $0.62$, and $0.48$ (Kimhi et al., 3 Aug 2025).

Spatial robustness curves further refine the picture. Some patches, such as “Plate” at 50×5050\times50, achieve strong misclassification rates even across the worst approximately 60%60\% of locations, whereas others, such as “Guitar” at 50×5050\times50, achieve higher peak effects on the top approximately 40%40\% of locations. PatchMap also reports that higher segmentation object-confidence correlates with larger classifier confidence drop Δconf\Delta\mathrm{conf} at those locations, with strong correlation for scores above $0.2$, especially for smaller patches. This suggests that the benchmark is capturing structure tied to object-centric evidence rather than arbitrary spatial artifacts (Kimhi et al., 3 Aug 2025).

5. Segmentation-guided placement heuristic

PatchMap uses its dense spatial analysis to motivate a simple zero-gradient placement heuristic. Let g(x)∈[0,1]H×W×Cg(x)\in[0,1]^{H\times W\times C} be per-pixel softmax from a segmentation model, with channel bb denoting background. Define object-confidence by

S=1−g(x)b.S = 1 - g(x)_b.

Given a binary patch mask M∈{0,1}s×sM\in\{0,1\}^{s\times s}, the heuristic slides MM over SS and selects the center maximizing the sum of object-confidence under the patch:

$(k^\*,\ell^\*)=\arg\max_{k,\ell} \big(S\odot \mathrm{Shift}_{k,\ell}(M)\big)_1.$

The patch is then placed at $(k^\*,\ell^\*)$, without using gradients or queries from the attacked classifier. In the reported study, segmentation cues come from DeepLab-v3+ with a ResNet-101 backbone pretrained on PASCAL VOC 2012, and the attacked classifiers are ResNet-18, ResNet-50, MobileNet-V2, EfficientNet-B1, and a Fast Adversarially Trained ResNet-50 (Kimhi et al., 3 Aug 2025).

The heuristic improves attack success consistently. For “Plate” at 50×5050\times50 (approximately 4.98%4.98\% area), ASR on ResNet-50 is $0.46$ for segmentation-guided placement, versus $0.39$ for Random and $0.32$ for Fixed. On the adversarially trained ResNet-50, the values are $0.39$, $0.36$, and $0.31$. On ResNet-18 they are $0.63$, $0.57$, and $0.46$; on MobileNet-V2, $0.55$, $0.48$, and $0.41$; and on EfficientNet-B1, $0.43$, $0.37$, and $0.35$. The average improvement is reported as +8+8 percentage points versus Random and +13+13 percentage points versus Fixed. Gains remain visible for smaller patches: for “Plate” at 25×2525\times25, ResNet-50 reaches $0.21$ versus $0.19$ versus $0.15$, and for “Electric Guitar” at 25×2525\times25, ResNet-50 reaches $0.22$ versus $0.19$ versus $0.16$. On ResNet-18 with 10×1010\times10 patches, segmentation-guided placement reaches 27%27\% ASR versus 18%18\% for Random and 14%14\% for Fixed (Kimhi et al., 3 Aug 2025).

The reported interpretation is direct: the heuristic places the patch over segmentation-confident object regions, which typically contain pixels most diagnostic for classification. PatchMap’s dense maps and Δconf\Delta\mathrm{conf} analyses confirm that occluding these regions produces larger confidence collapses and misclassifications. The study does not compare against gradient-based or reinforcement-learning location optimizers; PatchMap is intended to function as a common benchmark for such methods rather than as a closed comparison set (Kimhi et al., 3 Aug 2025).

6. Scope, limitations, reproducibility, and research implications

PatchMap is consequential primarily because it makes the spatial dimension of adversarial patch attacks measurable. The results indicate that robust training alone does not neutralize strategic location choice: on Fast Adversarially Trained ResNet-50, segmentation-guided placement still improves ASR, for example from $0.36$ to $0.39$ for “Plate” at 50×5050\times50. The paper therefore argues that defenses should be location-aware. Suggested directions include training-time data augmentation that pastes universal patches over segmentation-confident regions, monitoring calibration shifts such as ECE and Brier under patching, and training spatial detectors on PatchMap hot-spot statistics to flag suspicious occlusions (Kimhi et al., 3 Aug 2025).

The benchmark also has clear limitations. Patch content is limited to ten fixed universal textures from ImageNet-Patch; no rotation or non-square shapes are considered. The evaluation domain is ImageNet-1K validation at 224×224224\times224, so object-layout biases and resolution effects may influence where hot-spots appear. Architecture coverage in the exhaustive v1.0 maps is ResNet-50-specific, although the segmentation-guided study extends to four additional classifiers and one adversarially trained model. Exhaustive spatial sweeps are compute-intensive, even if PatchMap mitigates this by releasing precomputed tensors. Finally, although the source patches originate from targeted optimization, the benchmark’s primary emphasis remains untargeted misclassification; targeted success rates are derivable but not the default report (Kimhi et al., 3 Aug 2025).

Reproducibility is a core feature of the release. PatchMap v1.0, comprising approximately 100M predictions, is hosted on HuggingFace under CC-BY-4.0, and loaders, plotting scripts, and leaderboard scripts are provided on GitHub. The file format is per-(image,patch,size)(\text{image},\text{patch},\text{size}) .npz, storing predicted labels and softmax confidences in a 2×112×1122\times112\times112 tensor, so users can stream batches and compute metrics without monolithic archives. The planned v2.0, described as a 6.5B-entry full bench with multiple backbones, is intended to extend PatchMap from a single-model exhaustive release into a broader substrate for location-aware defenses, adaptive attacks, and cross-architecture transfer analysis (Kimhi et al., 3 Aug 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to PatchMap.