Prompt-Enhanced Multiple Instance Learning for Weakly Supervised Video Anomaly Detection

Junxi Chen, Liang Li, Li Su, Zheng-Jun Zha, Qingming HuangOpenReview 2024

TL;DR

This paper introduces a novel "prompt-enhanced" Multi-Instance Learning (MIL) approach for weakly supervised video anomaly detection (wVAD). By leveraging both "abnormal-aware" and "normal context" prompts, the method effectively captures diverse anomalous patterns and crucially, delineates clearer event boundaries, achieving state-of-the-art results on multiple benchmarks.

What Problem Does This Paper Address?

Video Anomaly Detection (VAD) is crucial for applications like surveillance and medical imaging, aiming to identify unusual events within video frames. However, training these models often relies on "weakly supervised" labels, meaning only video-level labels (e.g., "this video contains an anomaly") are available, not precise frame-level annotations. This poses two main challenges:

  1. Modeling Diverse Anomalies: Coarse video-level labels make it difficult for models to learn the nuances of various abnormal patterns, which can differ significantly in appearance and temporal behavior.
  2. Defining Clear Boundaries: Anomalies are often intertwined with their context (e.g., an explosion with fire and smoke). Without frame-level labels, distinguishing the exact start and end of an anomaly from its surrounding context is challenging, leading to ambiguous event boundaries.

Existing Multi-Instance Learning (MIL) methods, while popular for wVAD, struggle with these issues due to insufficient supervision and difficulty in separating anomaly from context.

Methods

The proposed method, Prompt-Enhanced Multiple Instance Learning (PE-MIL), tackles these challenges with two key innovations:

  • Abnormal-Aware Prompts (APL): This module aims to inject rich semantic information about anomalies into the video features. It involves:
  • Event-Context Separation: Using scaled anomaly scores to distinguish between frames likely containing the anomaly and those containing context.
  • Prompt Construction: Creating "abnormal-aware" prompts by combining abnormal class annotations with learnable prompts. These prompts are then aligned with visual features to enrich them with semantic priors.
  • Dynamic Cross-Modal Alignment: A reasoning module dynamically aligns these semantic prompts with video features, ensuring that the model learns to recognize diverse abnormal patterns more precisely.
  • Normal Context Prompt (NCP): This component focuses on improving the clarity of anomaly boundaries. It works by:
  • Learning Normal Patterns: A two-stage training process is used. In the first stage, the model learns to detect anomalies. In the second stage, with the main model frozen, a "normal context prompt" is trained to summarize typical normal patterns.
  • Enriching Context Features: During inference, this learned normal context prompt is integrated with the video features. This helps to amplify the distinction between anomalous and normal context, thereby enabling the model to generate sharper and more accurate event boundaries.

These two prompt-based modules work in tandem with a standard MIL framework, which uses a ranking loss to encourage higher anomaly scores for abnormal videos.

Datasets

The proposed method was evaluated on three widely used datasets for video anomaly detection:

  • UCF-Crime: A large-scale dataset with 13 anomaly categories.
  • ShanghaiTech: Features surveillance videos from 13 campus scenes.
  • XD-Violence: A comprehensive dataset with diverse sources (movies, games, car cameras) and six anomaly categories, notable for its challenging artistic expressions and multi-modal (video and audio) content.

Key Insights and Ideas

  • Prompts as Semantic Bridges: The core idea is that text-based prompts (both for anomalies and normal context) can act as powerful semantic bridges, injecting crucial prior knowledge into visual features that are otherwise ambiguous due to weak supervision.
  • Decoupling Anomaly from Context is Key: The paper highlights that the coupling between an anomaly and its surrounding context is a major hurdle. By explicitly modeling normal context, they can better "push away" normal features from anomalous ones, leading to cleaner boundaries.
  • Learnable Prompts for Flexibility: Using learnable prompts, rather than fixed ones, allows the model to adapt and discover richer semantic representations tailored to the specific video data.
  • Two-Stage Training for Normalcy: The two-stage training for the Normal Context Prompt is a clever way to leverage the model's learned understanding of normal patterns without interfering with the primary anomaly detection task.

Key Results

The PE-MIL method achieved state-of-the-art (SOTA) performance across all three public benchmarks:

  • XD-Violence: Achieved an absolute gain of 2.54% in Average Precision (AP) compared to the best previous method when using the same I3D-RGB video and VGGish audio features. Ablation studies showed that APL contributed a 5.8% gain in AP, and NCP a 1.59% gain.
  • ShanghaiTech: Demonstrated superior performance in terms of Area Under the Curve (AUC) compared to existing methods.
  • UCF-Crime: Showed favorable performance, though the gains were less pronounced, which the authors attribute to the high degree of homogeneity in abnormal events within this dataset.

Qualitative results visualized anomaly scores and attention maps, showing that the proposed method effectively predicts precise anomaly scores, mitigates ambiguous boundaries and false alarms, and highlights abnormal features more clearly.

Limitations and Future Work

  • Dataset Specificity: While the method performs well, the authors note that for datasets like UCF-Crime, where abnormal events might be highly homogeneous, the gains from their approach are less significant. This suggests that the effectiveness of their semantic-driven approach might be more pronounced in datasets with greater diversity in anomaly types and contexts.
  • Computational Cost: While not explicitly detailed as a limitation, the use of transformer-based modules and multi-stage training can imply higher computational requirements.
  • Future Work: The paper implicitly suggests that exploring more sophisticated prompt learning strategies and further refining the event-context separation mechanisms could lead to even better performance. The success on multi-modal data also hints at potential for extending this approach to other modalities.

Summary updated

BibTeX
@misc{chen2024prompt,
  author = {Junxi Chen and Liang Li and Li Su and Zheng-Jun Zha and Qingming Huang},
  title = {{Prompt-Enhanced Multiple Instance Learning for Weakly Supervised Video Anomaly Detection}},
  year = {2024},
  url = {https://openreview.net/forum?id=2TlFvtUnxN},
  howpublished = {OpenReview},
}
Figure