FrameShield: Adversarially Robust Video Anomaly Detection
Mojtaba Nafez, Mobina Poulaei, Nikan Vasei, Bardia Soltani Moakhar, Mohammad Sabokrou, MohammadHossein Rohban
TL;DR
The paper tackles the vulnerability of weakly supervised video anomaly detectors to adversarial perturbations by proposing FrameShield, a two-phase framework that first generates frame-level pseudo-labels with PromptMIL and then augments training with SRD-generated pseudo anomalies for precise frame-level supervision. The second stage performs frame-level adversarial training under a min-max objective with PGD, using an aggressive perturbation budget of $\epsilon = \frac{0.5}{255}$. Across five benchmarks, FrameShield achieves up to 71.0% improvements in robust AUROC under PGD-1000, with ablations confirming the value of both pseudo-labeling and SRD components. The work demonstrates that combining near-distribution pseudo anomalies with frame-level supervision yields substantially stronger defenses than prior MIL-based methods and offers a practical path toward robust WSVAD in real-world settings.
Abstract
Weakly Supervised Video Anomaly Detection (WSVAD) has achieved notable advancements, yet existing models remain vulnerable to adversarial attacks, limiting their reliability. Due to the inherent constraints of weak supervision, where only video-level labels are provided despite the need for frame-level predictions, traditional adversarial defense mechanisms, such as adversarial training, are not effective since video-level adversarial perturbations are typically weak and inadequate. To address this limitation, pseudo-labels generated directly from the model can enable frame-level adversarial training; however, these pseudo-labels are inherently noisy, significantly degrading performance. We therefore introduce a novel Pseudo-Anomaly Generation method called Spatiotemporal Region Distortion (SRD), which creates synthetic anomalies by applying severe augmentations to localized regions in normal videos while preserving temporal consistency. Integrating these precisely annotated synthetic anomalies with the noisy pseudo-labels substantially reduces label noise, enabling effective adversarial training. Extensive experiments demonstrate that our method significantly enhances the robustness of WSVAD models against adversarial attacks, outperforming state-of-the-art methods by an average of 71.0\% in overall AUROC performance across multiple benchmarks. The implementation and code are publicly available at https://github.com/rohban-lab/FrameShield.
