Learning Where and When: Patch-Based Spatiotemporal Localization in Weakly Supervised Video Anomaly Detection

Hamza Karim, Nghia Nguyen, Lokman Bekit, Yasin Yilmaz
6/28/2026
cs.CV

No confident code implementation found for this paper.

Abstract

Weakly supervised video anomaly detection (WSVAD) has predominantly focused on temporal localization, identifying when anomalies occur while largely neglecting their spatial extent within frames. Yet, spatial localization is essential for interpretability and practical deployment in real-world settings.

Show full abstract

We introduce a patch-based spatiotemporal framework for weakly supervised anomaly localization that jointly models where and when anomalies occur. Our approach operates on grid-level patch features and learns region-level anomaly scores under a multiple instance learning paradigm. We further propose a Proximity-Aware Top-k spatiotemporal selection strategy that enables the model to generate fine-grained spatial anomaly maps without requiring bounding-box supervision during training. Our method surpasses existing state-of-the-art approaches across multiple benchmarks, yielding substantial gains in spatiotemporal localization accuracy. In addition, we release frame-level bounding-box annotations for the test sets of two widely used datasets, along with our code and pretrained models, providing new resources to facilitate future research in spatially grounded WSVAD.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{karim2026learning,
  title  = {Learning Where and When: Patch-Based Spatiotemporal Localization in Weakly Supervised Video Anomaly Detection},
  author = {Hamza Karim and Nghia Nguyen and Lokman Bekit and Yasin Yilmaz},
  year   = {2026},
  eprint = {2606.29498},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.29498v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.29498.svg)](https://codeofpaper.com/paper/2606.29498)

Discussion