The detector learned the wrong thing: anti-shortcut adversarial training for defending against physically realizable attacksDetectors Learn the Wrong Thing: Shortcut-Resistant Adversarial Training Against Physically Realizable Attacks
The authors propose InsCAT to defend against physically realizable pedestrian detection attacks, stating that adversarial training causes the detector to treat the attack texture as evidence of pedestrian presence, with an average attack AP of 82.3% on rendered nuScenes.
Physically realizable evasion attack: the attacker designs a printable clothing texture p (UV texture space), mapped onto the clothing surface of a 3D human mesh and projected into the scene image via rendering, with the goal of suppressing the detector's person class; during training, attack textures are generated by online optimization, and evaluation textures are generated independently and do not participate in training.
- When adversarial training is performed against physically realizable pedestrian detection attacks, the attack texture repeatedly co-occurs with positive pedestrian samples, and the detector may treat the texture itself as evidence of pedestrian presence, leading to false detections on texture-only inputs without pedestrians and worse cross-attack generalization.
- Proposes the InsCAT framework: ROPO maintains a global attack texture online and reuses rendered samples to amortize rendering cost; SICA aligns adversarial pedestrian features at the instance level to matching clean features and pushes them away from pure-texture negatives; Guard coordinates the three loss weights according to validation metrics.
- On rendered nuScenes, YOLOv5n achieves an average attack AP of 82.3%, 11.1 percentage points higher than the strongest baseline PAD; texture FPR drops from 46.9% for AT-Mix to 7.3%; physical video evaluation gives F1 96.6% and FPR 1.8%; single-frame latency is 0.29 ms.
- The authors state that the study is limited to RGB pedestrian detection and wearable textures generated under limited clothing, action and rendering conditions, and that future directions include broader scenes, more target categories, scale-aware detection, and adaptive attacks against the learned representations (Section 5.3).
- Evaluated models
- YOLOv5nFaster R-CNNDN-DETR
- Benchmarks
- MS-COCO 2017INRIAPersonnuScenes-mini
- Metrics
- person APtexture FPRASRF1PrecisionRecall
The researchers propose InsCAT, an instance-level contrastive adversarial training framework to prevent detectors from treating adversarial textures as independent evidence of object presence. The authors point out that adversarial textures repeatedly co-occurring with positive pedestrian samples leads detectors to form a texture-patch shortcut, causing false detections on pure-texture inputs and weakening cross-attack generalization; the framework uses SICA to align adversarial pedestrian features with matched clean features and push them away from pure-texture negative samples, and combines ROPO and Guard to maintain online attack pressure and coordinate training. On rendered nuScenes, INRIAPerson, printed clothing, and three types of detectors, the authors evaluate with eight independently generated attack textures; on rendered nuScenes the average attack AP reaches 82.3%, 11.1 percentage points higher than the strongest baseline; compared with AT-Mix, the texture false positive rate drops from 46.9% to 7.3%. In physical tests, F1 is 96.6% and the false positive rate is 1.8%, with consistent improvements also on separately trained detectors.
Paper analysis
What problem does this paper attempt to solve?
The authors state that physical adversarial training causes the detector to treat attack textures as pedestrian evidence, forming a patch texture shortcut.
Core problem: In adversarial training against physically realizable attacks, the detector learns the attack texture itself as independent evidence for the presence of a pedestrian (which the authors call the patch texture shortcut), leading to false detections on texture-only inputs without pedestrians and worse cross-attack generalization.
- Problem setting: Pedestrian detection is a foundational capability for intelligent transportation infrastructure, surveillance and autonomous driving deployment; physically realizable adversarial textures (from local patches to full-body clothing textures) can be printed to suppress pedestrian detection, and the authors consider robust defense a safety-critical requirement.
- Shortcomings of existing methods: The authors state that input-purification defenses become unreliable when the perturbation is distributed over full-body clothing textures; robustness learned by existing physical adversarial training from one attack texture does not reliably transfer to independently generated textures, and does not explicitly constrain which visual cues the detector encodes.
- Core observation: The authors' feature diagnostics show that adversarial pedestrian representations become more similar to pure-texture representations, and pure-texture inputs trigger confident pedestrian predictions in the absence of any person; Figure 1 shows AT-Mix has high attack AP but high texture FPR, while InsCAT balances both.
- Proposed method: The paper proposes InsCAT (Instance Level Contrastive Adversarial Training); its core module SICA aligns adversarial pedestrian features to matched clean features and separates them from pure-texture negatives, ROPO maintains online attack pressure, and Guard coordinates training.
- Threat model (Section 3.1):
- Attacker goal: A physically realizable evasion attack that suppresses the detector's person class.
- Knowledge and capability: Design a printable clothing texture p (Ht×Wt×3 in the UV texture space P=[0,1]), mapped onto the clothing surface of a 3D human mesh and projected into the scene image via a physically parameterized renderer.
- Victim system: Object detectors (YOLOv5n, Faster R-CNN, DN-DETR in the experiments).
- Separation of training and evaluation: Training textures are generated by online optimization; the eight evaluation textures are generated independently and do not participate in training.
What related research exists?
Related work is divided into four groups: physical attacks, defenses, shortcut learning, and contrastive learning; baselines include six purification methods and adversarial training methods.
Physical attacks (Section 2.1)
- AdvPatch, AdvT-shirt: Establish bounded printable patches and deformable wearable attacks to suppress pedestrian detection.
- AdvTexture, AdvCaT: Extend attacks to full-body clothing surfaces, improving robustness to viewpoint, deformation and natural appearance.
- NatPatch, T-SEA, TRDPatch, AdvReal, AdvSerial: Introduce generative priors, cross-architecture transfer, dynamic physical conditions, joint 2D+3D optimization and consecutive-frame attacks respectively; the authors state that the diversity of the attack family requires evaluating defenses on independently generated attacks.
Defenses (Section 2.2)
- Input purification: LGS and Jedi identify suspicious regions from local image statistics, PAD exploits semantic independence and spatial heterogeneity, and SAC, PatchZero and NAPGuard learn to segment or detect adversarial regions; the authors note that such methods rely on separating the attack region from the target, which is difficult for full-body textures.
- Adversarial training: FreeAT reuses gradients to reduce training cost; physical adversarial training optimizes rectangular occlusions, patch positions or universal patches during training; PBCAT expands the training threat model through local and global composite perturbations. The authors state that these works advance the construction and diversity of training attacks, whereas this paper turns to the instance-level evidence learned from textured positive samples.
Shortcut learning and spurious correlations (Section 2.3)
- Geirhos et al., Shah et al., Ilyas et al., Kurakin et al.: Shortcut learning, simplicity bias, non-robust features and label leaking show that models prefer predictive cues that more easily achieve the training objective. The authors state that this motivates examining whether the optimized physical texture itself becomes evidence for the target class.
- Geirhos et al. [33] and Burgert et al. [34]: The former states that ImageNet-trained CNNs follow texture in shape-texture conflicts, while the latter finds through controlled feature suppression that standard CNNs strongly rely on local shape cues; the authors use this to emphasize isolating individual cues rather than inferring feature reliance only from task performance.
Contrastive learning (Section 2.4)
- SimCLR, MoCo, ACL, RoCL, AdvCL: Self-supervised and adversarial contrastive pretraining, mainly targeting global representations for image classification.
- FSCE: Uses proposal-level contrastive learning in detection models to capture instance-specific representations; InsCAT follows this idea, applying contrastive adjustment to ground truth-aligned RoI features.
Baselines and benchmarks: Adversarial training baselines are PBCAT, ℓ∞-AT (MTD) and the internal baseline AT-Mix (same ROPO online texture generation, sample mixing and Guard as InsCAT, with only SICA removed); input purification baselines are SAC, PatchZero, Jedi, PAD, NAPGuard and LGS; evaluation is conducted on rendered nuScenes, the INRIAPerson digital paste domain and physically printed clothing.
The authors position this paper as: not expanding the training attack distribution, but constraining the instance-level evidence the detector learns from adversarial-texture positive samples.
How does the paper address this problem?
InsCAT uses ROPO to generate attacks online, SICA for instance-level contrastive alignment, and Guard to coordinate training, suppressing texture shortcuts.
Overall approach: embed online min-max patch optimization into the standard detector training loop, with the inner maximization updating a globally shared attack texture and the outer minimization updating the detector, while using InsCAT's SICA loss to constrain instance-level feature relationships, so that adversarial pedestrian representations align with clean representations and move away from pure-texture representations.
Threat model and defense objective
- Attack formalization: texture p is passed through renderer R to generate adversarial image Iadv = R(M, p, c), where c includes viewing azimuth, lighting, background, body shape and pose; the patch objective is to suppress the maximum pedestrian detection score plus a total variation regularizer (Eq. 2).
- Defense objective: minimize Ldet(θ; Iadv, y) + αs LSICA(θ; Iadv, Icle, Ineg) (Eq. 6), i.e., maintain pedestrian detection under adversarial appearance and reduce reliance on texture cues; clean and adversarial renderings share the same scene conditions, differing only in clothing appearance.
ROPO: render-amortized online patch optimization
- Render buffer: a FIFO queue of capacity m=120 stores the latest adversarial renderings and detection labels, refreshing the texture and renderings every fi=20 detection batches, during which buffered samples are reused to amortize rendering cost.
- Single global texture: the entire training maintains one globally shared UV texture, optimized across viewpoints, poses, lighting and backgrounds, following the physical constraint that a printable garment must be effective under varied observation conditions.
- Two-branch inner maximization: with the detector frozen, perform n p=5 Adam updates on the texture; the 3D branch propagates gradients through differentiable rendering (PyTorch3D), and the 2D branch provides an auxiliary attack signal by differentiably compositing the texture onto the 614 positive sample images of INRIAPerson Train/pos, with the two detection terms equally weighted (Eq. 8).
Dynamic negative sample generation
- Pure-texture negatives: the current attack texture is scaled, tiled into a mosaic, randomly offset-cropped, and given a sparse random mask before being composited onto a blank background, containing no pedestrian pixels; bounding boxes are used only to determine the extent of the texture region.
- Trajectory snapshots: with probability p s =0.70, negatives are generated from snapshots of the online patch trajectory, avoiding dependence on a single texture state and requiring no extra cache or external attack textures.
SICA: structure-invariant contrastive alignment
- Alignment layer choice: attached to the deep spatial feature map before the detection head (P5 for YOLOv5n, FPN-P5 for Faster R-CNN, the last backbone layer for DN-DETR), with ground truth boxes passed through RoIAlign, average pooling and a two-layer MLP projection head to obtain ℓ2-normalized embeddings; the backbone is frozen, and the neck, detection head and projection head are updated jointly.
- Contrastive objective: the authors state that the InfoNCE form may raise positive and negative similarities simultaneously with an insufficient relative margin, so they adopt the gap-aware form Lgap = 1/N∑i max(0, δ + sneg(i) − spos(i)) (Eq. 10), directly optimizing the margin between positive and negative similarities; δ=0.35, mneg=0.10, λ=0.3.
- Stop-gradient: clean and texture-negative embeddings are detached as fixed targets in each SICA update, and gradients propagate only through the adversarial branch.
Overall objective and training schedule
- Total loss: Ltotal = wc·Lcle + wa·Ladv-buf + 1ROPO·(Ladv-rend + αs·LSICA) (Eq. 12); in the robust stage wa=2.0, αs=1.5, wc=0.5.
- Three-stage schedule: the clean floor is defined as the epoch-0 clean validation metric minus tolerance ϵc=0.03; once met, the robust stage begins, lowering the clean loss weight and raising the adversarial and SICA weights.
- Adversarial guard: when the adversarial validation metric ma drops by more than ϵa=0.03 from its historical best and the clean metric meets the threshold, wc is further lowered and wa and αs raised to prevent robustness forgetting; after ma recovers, the weights are restored, with no new contrastive term introduced.
What experiments did the paper conduct?
Evaluated on rendered nuScenes, INRIAPerson and physical video across three detectors, InsCAT achieves attack AP 82.3% and texture FPR 7.3%.
Experimental setup
- Detectors under test: YOLOv5n (main experiments, 640×640 input), Faster R-CNN, DN-DETR, representing one-stage, two-stage and Transformer paradigms respectively.
- Data: MS-COCO 2017 train2017 (118,287 images, 80 classes) for detector training; INRIAPerson Train/pos 614 images used only for the 2D attack branch, Test/pos 288 images used only for digital paste evaluation; nuScenes-mini provides backgrounds, with 404 CAMFRONT images for training and 2,020 images from the remaining five camera views for evaluation.
- Attacks: Training textures are generated online by ROPO; evaluation includes two non-optimized controls, RandomNoise and GrayBlock, and eight independently generated attack textures (AdvPatch, AdvTexture, AdvT-shirt, NatPatch, TRDPatch, TSEA, AdvReal, AdvSerial), none of which participate in training.
- Baselines: Input purification LGS, Jedi, PAD, SAC, PatchZero, NAPGuard (as preprocessing for the same frozen detector); adversarial training ℓ∞-AT (MTD), PBCAT (only Faster R-CNN and DN-DETR), and the internal baseline AT-Mix (whose only difference from InsCAT is the removal of SICA).
- Metrics: person AP (main metric), texture FPR (false detection rate on texture-only inputs without pedestrians), ASR; physical evaluation additionally reports Precision, Recall, F1.
- Training details: up to 100 epochs, cosine learning rate decay, early stopping after 10 epochs without validation improvement; adversarial mixing ratio ρadv=0.30; latency measured on a single RTX 4080.
Main results
According to Table 1 (rendered nuScenes, YOLOv5n, person AP):
Method Clean Average attack AP Original (no defense) 85.9 35.9 PAD (strongest baseline) 80.6 71.2 LGS 87.4 40.4 Jedi 82.0 23.3 SAC 85.9 35.7 PatchZero 86.8 39.6 NAPGuard 72.4 23.1 InsCAT (authors' method) 96.0 82.3 - The authors state that InsCAT surpasses PAD on all eight evaluation textures, with the largest gaps on AdvTexture, TSEA and AdvReal; ℓ∞-AT (MTD) has an average attack AP of 37.2.
- In the INRIAPerson digital paste domain (Table 2), PAD leads all eight attacks with an average attack AP of 89.3; InsCAT ranks second at 78.3, 5.3 percentage points above the strongest adversarial training baseline ℓ∞-AT at 73.0; the two have similar clean AP (95.8 vs. 95.9). The authors state that this setting favors per-image preprocessing defenses.
- Latency (Table 3): InsCAT has no preprocessing stage, with total latency 0.29 ms/frame (overhead +0.04 ms); PAD preprocessing takes 8601.25 ms/frame, LGS 70.01 ms, Jedi 553.83 ms. Figure 4 shows InsCAT in the upper-left region of the latency-robustness plots for both domains, and PAD in the upper-right.
Texture shortcut diagnostics
- What was measured: Pedestrian false detections were counted on pure-texture images without pedestrians (Figure 5), with each detected pedestrian counted as a false positive.
- Results: AT-Mix has an average texture FPR of 46.9%, more than three times the 14.1% of the undefended model, reaching 67%, 70%, 59%, 64% and 71% on AdvPatch, AdvTexture, AdvTshirt, T-SEA and AdvReal respectively; InsCAT averages 7.3%, lower than the undefended model on six textures and no higher than the undefended model on all eight textures.
- Authors' interpretation: AT-Mix's attack AP of 78.1 is close to InsCAT's 82.3, but its texture FPR is 6.4 times higher; the authors state that attack AP alone cannot fully characterize robustness, and that high detection performance can coexist with texture-triggered false detections.
Module ablation and cross-detector evaluation
- Component ablation (Table 5, nuScenes synthetic images with fixed attack textures): ROPO alone gives adv AP50 of 0.731; adding Pull raises the similarity gap from 0.119 to 0.200; adding Push (without Guard) gives AP50 0.739 but the gap shrinks to 0.016 and sneg rises to 0.328; AT-Mix (ROPO+Guard) has the highest AP50 at 0.802 but sneg 0.333 and gap 0.124; full InsCAT has AP50 0.773, sneg 0.140 and gap 0.239. The authors state that Push requires Guard coordination and that strengthening it alone worsens feature separation.
- Cross-detector (Table 8): InsCAT improves adversarial AP50 on all three architectures and both domains; relative to pretrained models, improvements are 10.1–26.6 percentage points on INRIAPerson and 23.8–46.4 percentage points on nuScenes; on Faster R-CNN and DN-DETR it is 6.0–11.7 percentage points higher than PBCAT. INRIAPerson clean AP50 changes are within 0.9 percentage points, and nuScenes clean rendered AP improves by more than 10 percentage points.
- Training efficiency (Table 4): ROPO (fi=20) reduces render calls within 300 batches from 4907 for FreshRender to 176 (a 27.9× reduction), total time from 427.2 s to 40.9 s (10.45× speedup), and throughput from 37.5 to 391.5 samples/s.
Physical-world evaluation
- Setup: Adversarial clothing generated by AdvReal-v5 and AdvSerial-v5, two videos totaling 6372 frames and 6372 pedestrian instances, 3186 frames per clothing type, captured with an Intel D435i, evaluated directly without adaptation (Table 9).
- Results: The undefended model has Precision 97.8%, Recall 78.2%, ASR 21.8%, FPR 2.2%; AT-Mix has Recall 96.4% and ASR 3.6%, but Precision drops to 67.5% and FPR rises to 32.5%; InsCAT has Precision 98.2%, Recall 95.0%, F1 96.6%, ASR 5.0%, FPR 1.8%.
- Distance analysis (Figure 7): In the 5–10 m near range, InsCAT's average confidence is 0.76–0.83, versus 0.49–0.62 for the undefended model under adversarial textures; AdvSerial-v5 leaves the undefended model with Recall of only 12.5% throughout, which InsCAT raises to 23.8%; beyond about 15 m, confidence drops substantially for both models, and clean white clothing shows similar degradation, with the authors stating that far-distance failure mainly stems from the smaller apparent scale of the target rather than solely from adversarial textures.
Other ablations and analyses
- Feature layer choice (Table 6): Under full InsCAT, P5 has the lowest sneg at 0.442 and the highest gap at 0.449; in layer-wise training, P5 has the largest gap (0.447) and dneg (0.625), so P5 is chosen.
- Hyperparameter sensitivity (Table 7): For λ∈{0.1,0.3,0.5} and wneg∈{0.4,0.8,1.2}, each metric varies by no more than 0.8 percentage points, less than the between-group standard deviation; defaults are λ=0.3 and wneg=0.8.
- Interpretability (Figure 6, Figure 8): Grad-CAM shows AT-Mix responds to isolated texture clothing, while InsCAT attends to broader body regions; t-SNE shows a shift between clean and adversarial pedestrian feature distributions for the pretrained model, AT-Mix training mixes the three feature types together, and InsCAT places clean and adversarial pedestrian features in the same region while separating them from pure-texture negatives.
- Negative results: In the INRIAPerson digital domain, InsCAT trails PAD, by 35.0, 17.5 and 16.5 percentage points on TSEA, AdvReal and TRDPatch respectively (Table 2); the authors state that this setting does not reproduce clothing deformation, viewpoint, lighting or temporal motion, which favors preprocessing defenses.
What are some points that can be further explored?
The authors state that the study is limited to RGB pedestrian detection and limited clothing rendering conditions, and list extension directions including scenes, categories, scale and adaptive attacks.
Limitations and future directions noted by the authors
- Scope: The authors state that this study focuses on RGB pedestrian detection and wearable textures generated from a limited set of clothing, motion and rendering conditions (Section 5.3).
- Broader scenes: The authors state that broader scene variation in intelligent transportation environments is a natural extension direction (Section 5.3).
- More target categories: The authors state that the approach can be extended to other target categories (Section 5.3).
- Scale-aware detection: The authors state that scale-aware detection is a future direction; experiments also show that beyond about 15 m, confidence drops substantially for both models (Section 5.3, Figure 7).
- Adaptive attacks: The authors state that adaptive attacks against the learned representation are a natural extension (Section 5.3).
- Cross-environment transfer: The authors state that these directions can further test how shortcut-resistant feature learning transfers across physical environments and perception tasks (Section 5.3).
Scope of experimental coverage
- The detectors under test are YOLOv5n, Faster R-CNN and DN-DETR, three in total, covering one-stage, two-stage and Transformer paradigms (Section 4.1, Table 8).
- Evaluation attacks are eight independently generated physical attack textures plus two non-optimized controls; training textures and evaluation textures are completely separated (Section 4.1).
- Defense baselines include six input purification methods (LGS, Jedi, PAD, SAC, PatchZero, NAPGuard) and adversarial training methods ℓ∞-AT, PBCAT, AT-Mix; PBCAT is evaluated only on Faster R-CNN and DN-DETR (Sections 4.2, 4.5).
- Physical evaluation uses two adversarial clothing types (AdvReal-v5, AdvSerial-v5), 6372 frames in total, the same Intel D435i camera, and a single near-to-medium-distance walking scenario (Section 4.6).
- The paper does not report statistical significance tests or numbers of repeated runs for the main results (Table 7 gives only means and standard deviations for hyperparameter sensitivity); it does not report agreement with human judgment.
Summarize the main content of the paper
InsCAT suppresses the texture shortcut through instance-level contrastive alignment, balancing attack robustness and low false detections in digital and physical evaluations.
A defense paper against physically realizable pedestrian detection attacks; its core claim is that the real weakness of adversarial training lies not in whether attack samples are included, but in what evidence the detector learns from them.
- Problem: Attack textures repeatedly co-occur with positive pedestrian samples during training, so the detector can treat the texture itself as a shortcut for pedestrian presence (patch texture shortcut), manifesting as false detections on texture-only inputs without pedestrians and worse cross-attack generalization.
- Method: In the InsCAT framework, ROPO maintains a global attack texture online and amortizes cost with a render buffer (10.45× training speedup); SICA performs gap-aware contrast on ground truth-aligned RoI features at the P5 feature layer, pulling adversarial pedestrian representations toward matched clean representations and pushing them away from pure-texture negatives; Guard dynamically adjusts the weights of three losses according to validation metrics to prevent robustness forgetting.
- Main results: On rendered nuScenes, YOLOv5n achieves an average attack AP of 82.3%, 11.1 percentage points higher than the strongest baseline PAD (Table 1); average texture FPR drops from 46.9% for AT-Mix to 7.3% (Figure 5).
- Cross-architecture and physical validation: On Faster R-CNN and DN-DETR, adversarial AP50 improves by 10.1–46.4 percentage points relative to pretrained models (Table 8); physical video evaluation gives F1 96.6% and FPR 1.8%, whereas AT-Mix has FPR 32.5% (Table 9).
- Exception: In the INRIAPerson digital paste domain, PAD leads with an average attack AP of 89.3 over InsCAT's 78.3, but PAD requires 8601.25 ms of preprocessing per frame, while InsCAT's total latency is 0.29 ms (Tables 2, 3).
- Authors' conclusion: Robust physical detection requires simultaneously maintaining object detection under attack and preventing adversarial textures from becoming independent evidence for the target class; the authors state that the framework provides a way to enhance the reliability of perception systems in safety-critical environments such as intelligent transportation, with future directions including broader scenes, more categories, scale-aware detection and adaptive attacks.