mlsanityData to 7 Oct 2026

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

arXiv 2506.09237 ↗First posted 10 Jun 2025cs.CV cs.LGcited by 8

Not on the map. Why?

Abstract (arXiv)

Anomaly Detection (AD) and Anomaly Localization (AL) are crucial in fields that demand high reliability, such as medical imaging and industrial monitoring. However, current AD and AL approaches are often susceptible to adversarial attacks due to limitations in training data, which typically include only normal, unlabeled samples. This study introduces PatchGuard, an adversarially robust AD and AL method that incorporates pseudo anomalies with localization masks within a Vision Transformer (ViT)-based architecture to address these vulnerabilities. We begin by examining the essential properties of pseudo anomalies, and follow it by providing theoretical insights into the attention mechanisms required to enhance the adversarial robustness of AD and AL systems. We then present our approach, which leverages Foreground-Aware Pseudo-Anomalies to overcome the deficiencies of previous anomaly-aware methods. Our method incorporates these crafted pseudo-anomaly samples into a ViT-based framework, with adversarial training guided by a novel loss function designed to improve model robustness, as supported by our theoretical analysis. Experimental results on well-established industrial and medical datasets demonstrate that PatchGuard significantly outperforms previous methods in adversarial settings, achieving performance gains of 53.2% in AD and 68.5% in AL, while also maintaining competitive accuracy in non-adversarial settings. The code repository is available at https://github.com/rohban-lab/PatchGuard .

Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 78 of its 99 references that are in the map. First posted on arXiv 10 Jun 2025.

Builds on

78 of 99 references.

References · 78

  1. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  2. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  3. 2015U-Net: Convolutional Networks for Biomedical Image Segmentationcited by 19,604
  4. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
  5. 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,482
  6. 2014Explaining and Harnessing Adversarial Examplescited by 7,287
  7. 2016Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localizationcited by 6,690
  8. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
  9. 2013Intriguing properties of neural networkscited by 5,114
  10. 2020Bootstrap your own latent: A new approach to self-supervised Learningcited by 4,712
  11. 2019CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Featurescited by 2,875
  12. 2020Exploring Simple Siamese Representation Learningcited by 2,853
38 more
  1. 2020Unsupervised Learning of Visual Features by Contrasting Cluster Assignmentscited by 2,845
  2. 2017Improved Regularization of Convolutional Neural Networks with Cutoutcited by 1,623
  3. 2020Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attackscited by 1,442
  4. 2018Deep Anomaly Detection with Outlier Exposurecited by 939
  5. 2021Generalized Out-of-Distribution Detection: A Surveycited by 796
  6. 2021Towards Total Recall in Industrial Anomaly Detectioncited by 772
  7. 2020Simple Copy-Paste is a Strong Data Augmentation Method for Instance Segmentationcited by 595
  8. 2021CutPaste: Self-Supervised Learning for Anomaly Detection and Localizationcited by 529
  9. 2021DRAEM -- A discriminatively trained reconstruction embedding for surface anomaly detectioncited by 510
  10. 2021The RSNA-ASNR-MICCAI BraTS 2021 Benchmark on Brain Tumor Segmentation and Radiogenomic Classificationcited by 507
  11. 2018Threat of Adversarial Attacks on Deep Learning in Computer Vision: A Surveycited by 459
  12. 2020CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted Instancescited by 441
  13. 2020Hard Negative Mixing for Contrastive Learningcited by 399
  14. 2022SPot-the-Difference Self-Supervised Pre-training for Anomaly Detection and Segmentationcited by 397
  15. 2017Adversarial Examples: Attacks and Defenses for Deep Learningcited by 350
  16. 2023WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentationcited by 311
  17. 2022A Unified Model for Multi-class Anomaly Detectioncited by 267
  18. 2023SimpleNet: A Simple Network for Image Anomaly Detection and Localizationcited by 256
  19. 2019Simple Black-box Adversarial Attackscited by 249
  20. 2017Detecting Adversarial Samples from Artifactscited by 244
  21. 2019Adversarial Attacks and Defenses in Images, Graphs and Text: A Reviewcited by 234
  22. 2014Towards Open World Recognitioncited by 226
  23. 2021VT-ADL: A Vision Transformer Network for Image Anomaly Detection and Localizationcited by 222
  24. 2021A Unified Survey on Anomaly, Novelty, Open-Set, and Out-of-Distribution Detection: Solutions and Future Challengescited by 154
  25. 2023Deep Industrial Image Anomaly Detection: A Surveycited by 147
  26. 2020Learning and Evaluating Representations for Deep One-class Classificationcited by 133
  27. 2020Deep Learning for Medical Anomaly Detection -- A Surveycited by 127
  28. 2020ATOM: Robustifying Out-of-distribution Detection Using Outlier Miningcited by 116
  29. 2021Natural Synthetic Anomalies for Self-Supervised Anomaly Detection and Localizationcited by 116
  30. 2022DSR -- A dual subspace re-projection network for surface anomaly detectioncited by 89
  31. 2023Dream the Impossible: Outlier Imagination with Diffusion Modelscited by 77
  32. 2022SegPGD: An Effective and Efficient Adversarial Attack for Evaluating and Boosting Segmentation Robustnesscited by 74
  33. 2024A Unified Anomaly Synthesis Strategy with Gradient Ascent for Industrial Anomaly Detection and Localizationcited by 74
  34. 2016Semantic Segmentation using Adversarial Networkscited by 73
  35. 2023ReContrast: Domain-Specific Anomaly Detection via Contrastive Reconstructioncited by 62
  36. 2021A Survey On Universal Adversarial Attackcited by 59
  37. 2020Robust Out-of-distribution Detection for Neural Networkscited by 57
  38. 2023Anomaly Detection with Conditioned Denoising Diffusion Modelscited by 56

50 most cited of 78 All 78 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 3; 2026: 5.

8 papers.