PatchGuard: Adversarially Robust Anomaly Detection and Localization through Vision Transformers and Pseudo Anomalies
Mojtaba Nafez, Amirhossein Koochakian, Arad Maleki, Jafar Habibi, Mohammad Hossein Rohban

TL;DR
PatchGuard introduces a Vision Transformer-based anomaly detection and localization method that uses pseudo anomalies and adversarial training to significantly improve robustness against adversarial attacks in industrial and medical applications.
Contribution
It proposes a novel ViT-based framework with foreground-aware pseudo anomalies and a new loss function, enhancing adversarial robustness in anomaly detection and localization.
Findings
Achieves 53.2% improvement in AD under adversarial attacks
Achieves 68.5% improvement in AL under adversarial attacks
Maintains competitive accuracy in non-adversarial settings
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdversarial Robustness in Machine Learning · Anomaly Detection Techniques and Applications · Smart Grid Security and Resilience
MethodsLinear Layer · Adam · Byte Pair Encoding · Attention Is All You Need · Vision Transformer · Multi-Head Attention · Dropout · Label Smoothing · Dense Connections · Residual Connection
