Skip to main content
QUICK REVIEW

[Paper Review] Follow the Rules: Reasoning for Video Anomaly Detection with Large Language Models

Yuchen Yang, Kwonjoon Lee|arXiv (Cornell University)|Jul 14, 2024
Anomaly Detection Techniques and ApplicationsComputer Science3 citations
TL;DR

This paper proposes AnomalyRuler, a novel rule-based reasoning framework for video anomaly detection (VAD) that leverages large language models (LLMs) through an induction-deduction pipeline. By using only a few normal reference frames to induce domain-specific rules and then applying them to detect anomalies, AnomalyRuler achieves state-of-the-art performance without full-shot fine-tuning, enabling fast, trustworthy, and adaptable deployment across diverse real-world VAD scenarios.

ABSTRACT

Video Anomaly Detection (VAD) is crucial for applications such as security surveillance and autonomous driving. However, existing VAD methods provide little rationale behind detection, hindering public trust in real-world deployments. In this paper, we approach VAD with a reasoning framework. Although Large Language Models (LLMs) have shown revolutionary reasoning ability, we find that their direct use falls short of VAD. Specifically, the implicit knowledge pre-trained in LLMs focuses on general context and thus may not apply to every specific real-world VAD scenario, leading to inflexibility and inaccuracy. To address this, we propose AnomalyRuler, a novel rule-based reasoning framework for VAD with LLMs. AnomalyRuler comprises two main stages: induction and deduction. In the induction stage, the LLM is fed with few-shot normal reference samples and then summarizes these normal patterns to induce a set of rules for detecting anomalies. The deduction stage follows the induced rules to spot anomalous frames in test videos. Additionally, we design rule aggregation, perception smoothing, and robust reasoning strategies to further enhance AnomalyRuler's robustness. AnomalyRuler is the first reasoning approach for the one-class VAD task, which requires only few-normal-shot prompting without the need for full-shot training, thereby enabling fast adaption to various VAD scenarios. Comprehensive experiments across four VAD benchmarks demonstrate AnomalyRuler's state-of-the-art detection performance and reasoning ability. AnomalyRuler is open-source and available at: https://github.com/Yuchen413/AnomalyRuler

Motivation & Objective

  • To address the lack of interpretability in existing video anomaly detection (VAD) methods, which only output scores without rationale, undermining trust in real-world deployment.
  • To overcome the mismatch between general-world knowledge in LLMs and specific VAD application needs, such as treating 'skateboarding' as anomalous in restricted zones.
  • To develop a few-shot prompting framework that enables fast adaptation to new VAD scenarios without full fine-tuning or retraining.
  • To integrate robust reasoning strategies—rule aggregation, perception smoothing, and rechecking—to mitigate perception and reasoning errors in LLM-based VAD.
  • To establish the first reasoning-based approach for one-class VAD that combines inductive rule learning with deductive anomaly detection.

Proposed method

  • AnomalyRuler employs a two-stage framework: induction, where the LLM generates normality rules from few-shot visual descriptions of normal frames, and deduction, where these rules are applied to detect anomalies in test videos.
  • Visual descriptions are generated via a Vision-Language Model (VLM) to bridge vision and language modalities for LLM input.
  • Rule aggregation via randomized smoothing reduces errors from noisy or inconsistent rule induction by averaging multiple rule sets.
  • Perception smoothing uses Exponential Majority Smoothing (EMS) to enhance temporal consistency and reduce frame-level perception errors in video sequences.
  • A recheck mechanism improves reasoning robustness by validating and refining LLM outputs through iterative verification.
  • The framework is prompted with structured few-shot examples, enabling zero-shot adaptation to new domains with minimal data.

Experimental results

Research questions

  • RQ1Can LLMs be effectively leveraged for video anomaly detection without full fine-tuning, using only a few normal reference frames?
  • RQ2How can LLMs be steered to align with domain-specific anomaly definitions, such as treating 'skateboarding' as anomalous in safety-critical zones?
  • RQ3What strategies are most effective in mitigating perception and reasoning errors in LLM-based VAD pipelines?
  • RQ4Does a rule-based reasoning framework outperform direct LLM prompting or traditional self-supervised VAD methods in terms of both accuracy and interpretability?
  • RQ5Can the proposed framework generalize across diverse VAD benchmarks with minimal domain-specific adaptation?

Key findings

  • AnomalyRuler achieves state-of-the-art performance across four VAD benchmarks, with an average AUC of 84.5% on the ShT dataset when all strategies are used.
  • Removing the 'Normal and Anomaly' rule reference during induction reduces AUC by 18.8 percentage points, demonstrating its critical role in reducing false positives and missed detections.
  • Rule aggregation and perception smoothing each improve AUC by over 15 percentage points, with perception smoothing showing optimal performance at a padding size of p=5 and EMA weight α=0.33.
  • The ablation study confirms that rule quality is most sensitive to the inclusion of both normal and anomaly rules, as their absence leads to significant performance degradation.
  • The framework maintains strong domain adaptability, showing consistent performance across datasets without retraining, thanks to few-shot prompting and rule-based reasoning.
  • Hyperparameter ablation reveals that excessive reference frames (e.g., m > 10) or high batch counts (n > 20) degrade performance due to redundant context, with optimal performance at n=10, m=5.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.