Configurable Spatial-Temporal Hierarchical Analysis for Flexible Video Anomaly Detection

Kai Cheng, Xinhua Zeng, Yang Liu, Tian Wang, Chengxin Pang, Jing Teng, Zhaoyang Xia, Jing LiuarXiv 2023 · DOI

Introduction

Video Anomaly Detection (VAD) is a critical task in automated surveillance, aimed at identifying "abnormal" events within video streams. However, a significant challenge in VAD is that the definition of an "anomaly" is often subjective and context-dependent. For instance, a bicycle on a sidewalk might be flagged as an anomaly in a high-security pedestrian zone but considered normal in a public park.

Traditional VAD models are typically static; if security requirements change, the entire model must often be retrained from scratch, which is computationally expensive and time-consuming. This paper introduces CVAD (Configurable Video Anomaly Detection), a framework designed to adapt to changing "Degrees of Tolerance" (DoT) through a hierarchical architecture and a novel multi-scale memory mechanism.

The CVAD Framework: Configurable Hierarchy

To address the need for flexibility, the authors propose a hierarchical block structure. Instead of a single monolithic model, CVAD utilizes a stack of modular blocks. Each block is designed to handle a specific level of security requirement or DoT.

The CVAD framework (a) utilizes a hierarchical stack of blocks that can be flexibly added or removed to meet different security requirements. Each individual block (b) contains an encoder, the MS2M module, and a decoder.

When a new requirement is introduced, the system does not discard previous knowledge. Instead, existing blocks are "frozen," and only a new, relatively small block is added and trained to learn the specific differences required by the new task. This incremental learning approach prevents "catastrophic forgetting" and significantly reduces the training overhead required for adaptation.

Multi-Scale Memory with Selective Mechanism (MS2M)

At the core of each block is the Multi-Scale Memory with Selective Mechanism (MS2M). This module is specifically engineered to capture the spatial-temporal coherence of objects—how their appearance and motion change naturally over time (e.g., an object scaling down as it moves further from the camera).

The MS2M module performs multi-scale feature selection to handle varying object sizes and interacts with a memory bank of "normal patterns" to identify deviations.

The MS2M module consists of two primary components:

  1. Feature Selection: Utilizing a series of depth-wise convolutions, the module expands its receptive field to capture features at multiple scales without the high computational cost of standard large kernels. This allows the model to dynamically select the most appropriate scale for an object regardless of its distance from the lens.
  2. Memory Bank: The module maintains a repository of latent vectors representing "normal patterns." During inference, the model compares incoming video features against these stored patterns. A high discrepancy between the current frame and the stored normality triggers an anomaly flag.

Experimental Results and Performance

The CVAD framework was evaluated on three benchmark datasets: UCSD Ped2, CUHK Avenue, and ShanghaiTech. It achieved state-of-the-art (SOTA) accuracy across the board, notably reaching 99.2% AUC on UCSD Ped2 and 90.7% on CUHK Avenue.

To test the system's configurability, the authors introduced ped2DoT, a modified dataset where certain objects (like non-motorized vehicles) transition between "normal" and "abnormal" status. The results were striking: CVAD reached peak performance on new requirements in just 2 epochs of training. In comparison, training a standard model from scratch to reach the same level of accuracy required 40 epochs, representing a 20x speedup in adaptation time.

Conclusion

CVAD offers a robust solution for real-world video surveillance where security needs are rarely static. By combining a configurable hierarchical structure with a multi-scale memory mechanism, the framework provides both high detection accuracy and the ability to adapt to new rules with minimal computational cost. Future work may look toward "zero-shot" adaptation to eliminate the brief training phase entirely, allowing for instantaneous rule changes in live environments.

Summary updated

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
UCSD Ped2STHAframe-level AUC98.0%+0.6 vs baselineblocks=2 Block-s · stacks=1 · total-patterns=100
Source quote
L187: STHA (ours) │ 98.0% │ 88.9% │ 74.0%
CUHK AvenueSTHAframe-level AUC88.9%+1.1 vs baselineblocks=1 Block-s, 2 Block-m · stacks=1 · total-patterns=150
Source quote
L187: STHA (ours) │ 98.0% │ 88.9% │ 74.0%
ShanghaiTechSTHAframe-level AUC74.0%+0.2 vs baselineblocks=1 Block-m, 2 Block-l · stacks=1 · total-patterns=250
Source quote
L187: STHA (ours) │ 98.0% │ 88.9% │ 74.0%
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
UCSD Ped2BiP baselineframe-level AUC97.4%Reported in Table 2's comparison; baseline-specific protocol is not stated.
Source quote
L186: BiP \cite{b34} │ 97.4% │ 86.7% │ 73.6%
CUHK AvenueSTC-Net baselineframe-level AUC87.8%Reported in Table 2's comparison; baseline-specific protocol is not stated.
Source quote
L184: STC-Net \cite{b33} │ 96.7% │ 87.8% │ 73.1%
ShanghaiTechSTCEN baselineframe-level AUC73.8%Reported in Table 2's comparison; baseline-specific protocol is not stated.
Source quote
L178: STCEN \cite{hao2022spatiotemporal} │ 96.9% │ 86.6% │ 73.8%
BibTeX
@misc{cheng2023configurable,
  author = {Kai Cheng and Xinhua Zeng and Yang Liu and Tian Wang and Chengxin Pang and Jing Teng and Zhaoyang Xia and Jing Liu},
  title = {{Configurable Spatial-Temporal Hierarchical Analysis for Flexible Video Anomaly Detection}},
  year = {2023},
  eprint = {2305.07328},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.07328},
}
Figure