MoniTor: Exploiting Large Language Models with Instruction for Online Video Anomaly Detection

Shengtian Yang, Yue Feng, Yingshi Liu, Jingrou Zhang, Jie Qin

TL;DR

MoniTor is a novel, training-free framework that brings the reasoning power of Large Language Models (LLMs) to the challenging domain of real-time video anomaly detection. By employing a dual-memory gating system and a predictive scoring queue, it identifies security incidents in streaming video without requiring a single labeled training example, outperforming existing unsupervised methods on major benchmarks.

What Problem Does This Paper Address?

Video Anomaly Detection (VAD) is the "needle in a haystack" problem of computer vision: identifying rare, unpredictable events like robberies, fights, or accidents in hours of footage. While "offline" VAD (analyzing a video after it has been fully recorded) has seen significant success, online VAD—detecting events as they happen—remains incredibly difficult.

The challenges are three-fold:

  1. Temporal Context: Anomaly detection requires understanding what happened before the current frame to establish a baseline of normalcy.
  2. Data Scarcity: Anomalies are rare and diverse, making it hard to collect enough training data for every possible abnormal scenario.
  3. Real-time Constraints: Systems must process streaming data with minimal latency, ruling out many computationally heavy, global-analysis models.

Methods

The authors introduce MoniTor, which bypasses the traditional training phase entirely by leveraging pre-trained Vision-Language Models (VLMs) and LLMs. Its architecture consists of several cleverly integrated modules:

MoniTor Framework Architecture
  • Hierarchical Dual-Memory: Inspired by LSTMs, this module maintains a Long-Term Episodic Memory (a 10-frame window) and a Short-Term Working Memory (the last 2 frames). A "Forgetting Gate" uses cosine similarity to filter out irrelevant or noisy historical information, ensuring the LLM isn't misled by past data that no longer applies to the current scene.
  • Behavior Prediction: Instead of just reacting to the current frame, MoniTor asks the LLM to predict what will happen next. By comparing this expectation against the reality of the next incoming frame, the model becomes much more sensitive to sudden, emergent anomalies.
  • Standard Scoring Queue: To help the LLM stay consistent, the system maintains a queue of past frame descriptions categorized by their anomaly scores (e.g., "This is what a 0.1 score looks like vs. a 0.9 score"). This acts as a dynamic "instruction manual" for the LLM.
  • Knowledge Injection: The authors provide the LLM with "Anomaly Priors"—definitions of crimes and accidents pulled from encyclopedic sources like Wikipedia—to give the model a principled understanding of what constitutes an abnormal event.

Datasets

The model was evaluated on two massive, standard benchmarks for video anomaly detection:

  • UCF-Crime: 1,900 long, untrimmed real-world surveillance videos covering 13 anomaly categories (e.g., Abuse, Arson, Robbery).
  • XD-Violence: 4,754 videos from YouTube and movies, specifically focused on violent incident detection across 6 categories.

Key Insights and Ideas

  • LLMs as Zero-Shot Detectors: The core insight is that LLMs already "know" what a robbery or a fight looks like in text. By converting video frames into high-quality textual summaries, MoniTor turns a difficult computer vision problem into a natural language reasoning task.
Examples of MoniTor's captioning and scoring across different anomaly scenarios
  • The Importance of Forgetting: In a streaming scenario, old information can become "toxic." If a camera angle changes or a scene ends, holding onto old memories causes errors. The Dynamic Memory Gating Module is essential for maintaining a clean and relevant "mental state."
  • Contextual Anchoring: LLMs are prone to "prompt drift." The Scoring Queue provides a constant reference point, preventing the model's scoring criteria from shifting over the course of a long video.

Key Results

MoniTor achieves impressive results without any domain-specific training:

  • UCF-Crime: Achieved an 82.57% AUC, outperforming state-of-the-art unsupervised methods and even some training-free offline models.
  • XD-Violence: Reached 55.01% AP and 79.11% AUC, showing strong generalization even in non-surveillance (movie/YouTube) contexts.
  • Efficiency: The system generates anomaly scores at 0.6-second intervals with an end-to-end processing latency of roughly 5 seconds, making it viable for near-real-time monitoring.

Limitations and Future Work

The authors are transparent about primary hurdles:

  1. Abrupt Camera Transitions: When a video cuts suddenly between cameras, the memory module loses context, leading to roughly 60% of the system's total errors. Future work may involve "Experience Replay" to help the model recover context faster after a cut.
  2. Computational Heavy-Lifting: Relying on large VLMs and LLMs requires significant GPU resources. Deploying this on "edge" devices (like a smart camera itself) would currently require heavy model compression or quantization.
  3. Subtle Anomalies: The system still struggles with "concealed" crimes, such as shoplifting, where the visual difference between a normal action and a theft is too fine-grained for current text-based descriptions to capture.

Summary updated

BibTeX
@inproceedings{yang2025monitor,
  author = {Shengtian Yang and Yue Feng and Yingshi Liu and Jingrou Zhang and Jie Qin},
  title = {{MoniTor: Exploiting Large Language Models with Instruction for Online Video Anomaly Detection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=6Had86RHix},
}
Figure