Weakly-Supervised Spatiotemporal Anomaly Detection

Urvi Gianchandani, Praveen Tirupattur, Mubarak ShaharXiv 2026

TL;DR

This paper presents a weakly-supervised approach to detect where and when anomalies occur in surveillance videos using only video-level labels (i.e., "this video contains an anomaly" vs. "this video is normal"). By leveraging Multiple Instance Learning (MIL) and spatiotemporal feature cuboids, the authors achieve significantly better localization results than previous weakly-supervised methods on the UCF Crime2Local dataset.

What Problem Does This Paper Address?

Surveillance cameras generate massive amounts of data, far more than human operators can monitor. Automated anomaly detection is essential, but training these systems usually requires labor-intensive, frame-by-frame annotations.

Most existing research focuses on temporal detection—identifying when an event happens. However, anomalies are often localized to a specific area of the screen (e.g., a fight in a corner). While spatiotemporal detection (the where and when) is more useful, it typically requires expensive spatial bounding box annotations for training. This paper tackles the challenge of achieving spatiotemporal localization using only "weak" labels, which are much cheaper to obtain.

Methods

The authors propose a pipeline that treats anomaly detection as a needle-in-a-haystack problem using Multiple Instance Learning (MIL).

  1. Feature Extraction: They use the I3D (Inflated 3D ConvNet) architecture, specifically the output from the sixth inception module (4e), to extract rich features from video segments.
  2. Spatiotemporal Cuboids: Instead of analyzing the whole frame, they divide the feature map into a grid of 49 spatiotemporal cuboids. Each cuboid represents a specific region of the video over a short duration.
  3. MIL Ranking Loss: The core of the learning process involves "bags" and "instances."
    • A Positive Bag is an anomalous video clip; it must contain at least one anomalous cuboid.
  4. A Negative Bag is a normal video clip; all its cuboids must be normal.
  5. The model is trained using a ranking loss that forces the highest anomaly score in a positive bag to be higher than the highest score in a negative bag.
Figure 1: The network architecture of the proposed approach. Given the positive (containing anomaly somewhere) and negative (containing no anomaly) video clips, we extract I3D features and divide each of the feature representations into multiple spatiotemporal cuboids. Then, each video clip is represented as a bag and each spatiotemporal segment represents an instance in the bag. The ranking loss is computed between the highest scores in each bag (show in red in the figure) for training.

Datasets

The study utilizes two primary benchmarks:

  • UCF-Crime: A large-scale dataset of 1,900 real-world surveillance videos covering 13 anomaly types (e.g., fighting, accidents, explosions).
  • UCF Crime2Local: A subset of UCF-Crime that includes spatiotemporal (bounding box) annotations for 300 videos. Crucially, the authors only use these spatial annotations for evaluation, not for training, maintaining the weakly-supervised nature of their approach.

Key Insights and Ideas

  • Spatial Granularity Matters: By breaking the video into spatial cuboids rather than treating the whole frame as one unit, the MIL algorithm can more effectively "find" the specific region causing the anomaly score to spike.
  • Feature Layer Selection: The authors found that features from the 4e layer of I3D provided the best balance of semantic information and spatial resolution for this task.
  • Weak vs. Full Supervision: While fully supervised methods (using bounding boxes during training) still perform better, this approach shows that spatial localization is possible without them, offering a scalable path for massive datasets.

Key Results

The proposed method demonstrates a clear improvement over previous weakly-supervised baselines:

  • UCF Crime2Local: The model achieved an AUC (Area Under the Curve) of 68%. This significantly outperforms the 56.12% AUC achieved by previous weakly-supervised "Video Segment" methods.
  • Comparison to Supervised: While their 68% AUC is lower than the 74.73% achieved by the supervised "Oracle Tube" method (which uses spatial annotations during training), it represents a major step forward for label-efficient learning.
  • Full UCF Crime: On the full dataset, the method achieved a 63% AUC.
Figure 2: The graph and table on the left side of the figure are the results on UCF Crime2Local, which contains a portion of the data from the UCF Crime dataset. We compare our best result for AUC of 68%, without using the temporal annotations to the results from [2]. Their weakly-supervised approach gave an AUC of 56.12% whereas their supervised approach gave a result of 74.73%. We compare our results with the ‘Video Segment' column since they are both weakly supervised. The graph and table on the right are the results on the whole UCF Crime dataset. We compare our best AUC of 63% to the results from [3].

Limitations and Future Work

The authors identify two main areas for improvement:

  1. Localization Precision: The current model often predicts "multiple blobs" as anomalous rather than a single, clean region. They suggest adding regularization to encourage the model to focus on a single primary region per video.
  2. Missing Motion Cues: The current implementation focuses primarily on appearance. The authors believe integrating a two-stream approach—incorporating optical flow to capture motion information—would significantly boost performance, as many anomalies (like a car crash or a fight) are defined by movement patterns.

Summary updated

BibTeX
@misc{gianchandani2026weakly,
  author = {Urvi Gianchandani and Praveen Tirupattur and Mubarak Shah},
  title = {{Weakly-Supervised Spatiotemporal Anomaly Detection}},
  year = {2026},
  eprint = {2605.13746},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.13746},
}
Figure