atlas

Research map / Adversarial robustness and security / Attacks on text and graphs

PatchGuard: Adversarially Robust Anomaly Detection and Localization through Vision Transformers and Pseudo Anomalies

CVPR 2025 · Adversarial robustness and security › Attacks on text and graphs · approach: Defenses against universal perturbations · 6 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes PatchGuard, an adversarially robust anomaly detection and localization method that trains a from-scratch ViT with foreground-aware pseudo-anomalies (with masks) and an attention-degree regularizer under PGD adversarial training.

Problem

Anomaly detection and localization models are highly vulnerable to adversarial attacks, and existing methods trained only on normal data, or with outlier exposure, lack robustness, especially for pixel-level localization and high-resolution data.

Approach

Generate near-distribution pseudo-anomalies with ground-truth masks by distorting Grad-CAM-identified foreground regions, train a from-scratch ViT with patch-level cross-entropy plus a regularizer that raises last-layer attention degree, and perform adversarial training with PGD.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use PatchGuard instead of the strongest listed baselinePatchGuard · MVTec AD (average)AUROC: 7.4 -> 74.1Helped
use PatchGuard instead of the strongest listed baselinePatchGuard · Anomaly localization (average)AUROC: 13.6 -> 81.1Helped
add attention regularization (α=1) instead of removing it (ablation)PatchGuard · MVTec ADAUROC: 60.7 -> 71.1Helped
add attention regularization (α=1) instead of removing it (ablation)PatchGuard · MVTec AD localizationAUROC: 65.3 -> 73.8Helped
increase attention regularization scaling factor from 1 to 2 (ablation)PatchGuard · MVTec ADAUROC: 71.1 -> 70.1Hurt
increase attention regularization scaling factor from 1 to 5 (ablation)PatchGuard · MVTec ADAUROC: 71.1 -> 64.1Hurt
increase attention regularization scaling factor from 1 to 2 (ablation)PatchGuard · MVTec AD localizationAUROC: 73.8 -> 68.9Hurt
increase attention regularization scaling factor from 1 to 5 (ablation)PatchGuard · MVTec AD localizationAUROC: 73.8 -> 65.6Hurt
use foreground-aware pseudo-anomaly generation instead of CutPaste (ablation)PatchGuard · MVTec ADAUROC: 60.3 -> 71.1Helped
use foreground-aware pseudo-anomaly generation instead of FPI (ablation)PatchGuard · MVTec ADAUROC: 62.1 -> 71.1Helped
use foreground-aware pseudo-anomaly generation instead of NSA (ablation)PatchGuard · MVTec ADAUROC: 66.5 -> 71.1Helped
use foreground-aware pseudo-anomaly generation instead of GLASS (ablation)PatchGuard · MVTec ADAUROC: 62.0 -> 71.1Helped

Surprising findings

Limitations

Experimental setup

Datasets: MVTec AD VisA BTAD MPDD WFDD DTD-Synthetic Head-CT BraTS2021

Benchmarks: MVTec AD VisA BTAD MPDD WFDD DTD-Synthetic Head-CT BraTS2021

Metrics: AUROC

Baselines: DRAEM PatchCore SimpleNet ReContrast GeneralAD GLAD GLASS PrincipaLS ZARND RODEO MuSc ReConPatch

Builds on: Outlier Exposure PGD adversarial training DRAEM Grad-CAM Rodeo

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy