NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Unbiased Multiple Instance Learning for Weakly Supervised Video Anomaly Detection

Hui Lv, Zhongqi Yue, Qianru Sun, Bin Luo, Zhen Cui, Hanwang Zhang

Introduction

Detecting anomalies in video—such as accidents, crimes, or fires—is a critical task for automated surveillance and public safety. However, training these systems is challenging due to the lack of frame-level annotations. Most real-world datasets provide only video-level labels, indicating that an anomaly occurs somewhere within a clip without specifying the exact timing. This paradigm is known as Weakly Supervised Video Anomaly Detection (WSVAD).

The standard approach to WSVAD is Multiple Instance Learning (MIL), where a video is treated as a "bag" of snippets. While effective, MIL-based models often fall victim to "context bias," where the model learns to associate environmental shortcuts (like smoke or specific backgrounds) with anomalies, rather than learning the intrinsic features of the events themselves. This paper introduces Unbiased Multiple Instance Learning (UMIL), a framework designed to mitigate context bias and improve the localization of anomalies.

The Problem: Context Bias in MIL

In a typical MIL setup, the model identifies the snippet with the highest anomaly score in an "abnormal" video and treats it as the primary learning target. This "lazy" learning strategy often leads the model to latch onto the most obvious visual cues. For instance, if most training videos of explosions also contain smoke, the model may learn that "smoke equals anomaly."

This shortcut results in two primary failure modes:

  1. False Alarms: The model flags normal occurrences, such as a smoking chimney, as anomalies because they share contextual features with training-set crimes.
  2. Missed Detections: The model fails to recognize anomalies that lack these common shortcuts, such as a subtle pickpocketing event or an explosion without significant smoke.

The UMIL Framework

UMIL addresses these issues by forcing the model to look beyond the "easiest" samples. The framework operates through a three-stage process focused on snippet partitioning and invariant feature learning.

1. Snippet Partitioning

Instead of focusing solely on the highest-scoring snippets, UMIL tracks the prediction history of all snippets throughout the training process. Snippets are divided into two categories:

  • Confident Set: Snippets where the model provides consistent, high-confidence predictions.
  • Ambiguous Set: Snippets where the model’s predictions fluctuate, indicating uncertainty or subtle anomalous features that the model has not yet mastered.

2. Unsupervised Clustering

To extract signal from the Ambiguous Set, UMIL employs unsupervised clustering. This step aims to discover the intrinsic differences between subtle anomalies and normal snippets that the model currently finds confusing. By grouping these ambiguous samples, the framework provides a structured way for the model to learn from "hard" examples rather than discarding them as noise.

3. Invariant Pursuit

The core of UMIL is the pursuit of an invariant classifier. The model is trained to find a feature representation that remains effective across both the Confident and Ambiguous sets. By requiring the classifier to correctly identify obvious anomalies while simultaneously separating the clusters within the ambiguous data, UMIL prevents the model from relying on shortcuts found only in the easy samples.

Fine-Grained Partitioning

Unlike traditional methods that average features over long video segments—which can dilute the signal of brief anomalies—UMIL utilizes 1-second snippets. It averages the predictions rather than the features, preserving the temporal resolution necessary to detect short-lived events.

Experimental Results

The researchers evaluated UMIL on two major benchmarks: UCF-Crime (1,900 real-world surveillance videos) and TAD (Traffic Anomaly Detection, 1,075 videos).

Performance Metrics

Beyond standard Area Under the Curve (AUC), the paper emphasizes $AUC_A$ (AUC for abnormal videos only). This metric specifically measures how well a model localizes an anomaly within a video known to contain one, providing a more accurate assessment of a model's practical utility than global AUC, which can be inflated by easily identifying "perfectly normal" videos.

  • UCF-Crime: UMIL achieved a state-of-the-art (SOTA) 86.75% AUC, with a +1.3% improvement in the $AUC_A$ metric.
  • TAD: The model achieved 92.93% AUC, representing a significant +3.3% improvement over previous benchmarks.

Efficiency

UMIL is highly efficient for real-time applications. By allowing for end-to-end fine-tuning of the video backbone (X-CLIP), the model optimizes visual representations specifically for anomaly detection. During inference, UMIL processes a 5-frame clip in just 0.003 seconds, making it approximately 80 times faster than competing SOTA models like RTFM.

Conclusion

UMIL represents a significant step forward in weakly supervised video anomaly detection by explicitly addressing the problem of context bias. By leveraging ambiguous data through clustering and invariant pursuit, the framework moves beyond simple shortcuts to learn more robust and discriminative features. While the reliance on unsupervised clustering presents some limitations if initial features are poor, the significant gains in both accuracy and inference speed make UMIL a powerful tool for real-world surveillance and safety applications.

Summary updated

BibTeX
@inproceedings{lv2023unbiased,
  author = {Hui Lv and Zhongqi Yue and Qianru Sun and Bin Luo and Zhen Cui and Hanwang Zhang},
  title = {{Unbiased Multiple Instance Learning for Weakly Supervised Video Anomaly Detection}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  doi = {10.1109/cvpr52729.2023.00775},
}
Figure