Abstract
Frame reconstruction based on Auto-Encoder (AE) is a popular method for video anomaly detection. With models trained on the normal data, the reconstruction errors of anomalous scenes are usually much larger than those of normal ones. Previous methods introduced the memory bank into AE for encoding diverse normal patterns across the training videos. However, they are memory consuming and cannot cope with unseen new scenarios in the testing data. In this work, we propose a self-attention prototype unit (APU) to encode the normal latent space as prototypes in real time, free from extra memory cost. In addition, we introduce a circulative attention mechanism to our backbone to form a novel feature extracting learner, namely Circulative Attention Unit (CAU). It enables fast adaptation capability on new scenes by only consuming a few iterations of update. Extensive experiments demonstrate the superior performance of our method over the state-of-the-art.
Introduction: The Challenge of Video Anomaly Detection
Video Anomaly Detection (VAD) is a critical task in surveillance, aimed at identifying rare or suspicious events within vast amounts of normal footage. Traditional approaches utilize Auto-Encoders (AEs) trained exclusively on normal data, operating on the principle that anomalies will result in high reconstruction errors.
However, existing state-of-the-art methods face two significant hurdles. First, the reliance on large "memory banks" to store normal patterns is computationally expensive and lacks flexibility when encountering new environments. Second, modern deep learning models often over-generalize, inadvertently reconstructing anomalous frames too well and thus failing to flag them. This research introduces a leaner, more adaptable architecture designed to overcome these limitations through dynamic prototype generation.
Proposed Architecture: APU and CAU
The core of the proposed system is the Attention Prototype Network (APN), which replaces static memory banks with dynamic components.
1. Attention Prototype Unit (APU)
The APU utilizes a self-attention mechanism to encode the latent space into a set of prototypes in real-time. By aggregating features from consecutive frames based on attention weights, the model creates a dynamic representation of "normalcy." To ensure these prototypes are effective, the authors employ three specific loss functions:
- Compactness: Encourages prototypes to be tight, representative clusters.
- Diversity: Prevents prototypes from becoming redundant or identical.
- Covariance: Ensures independence between different prototypes.
2. Circulative Attention Unit (CAU)
To address the computational intensity of standard dense attention ($O(N^2)$), the researchers developed the CAU. This unit employs a recurrent, sparse attention mechanism that processes information horizontally and then vertically. This reduction to $O(N)$ complexity allows for significantly faster inference while maintaining global context. Furthermore, this structure facilitates "Fast Adaptation," allowing the model to quickly tune itself to new camera angles or scenes with minimal iterations.
Experimental Evaluation
The model was rigorously tested on several benchmark datasets, including UCSD Ped1 & Ped2, CUHK Avenue, ShanghaiTech, and UCF Crime. These datasets cover a wide range of scenarios, from simple pedestrian walkways to complex multi-scene environments and real-world criminal activities. The researchers also performed cross-dataset testing to prove the model's robustness and adaptation capabilities.
Key Results and Performance
The Attention Prototype Network (APN) demonstrates superior performance and efficiency compared to existing methods.
- State-of-the-Art Accuracy: On the UCSD Ped2 dataset, the model achieved a peak AUC of 98.2% when utilizing multi-scale features, surpassing previous memory-based competitors.
- High-Speed Inference: The architecture is optimized for real-time applications, reaching 122.3 FPS on modern hardware (NVIDIA RTX 3090), which is orders of magnitude faster than some generative approaches like rGAN (2.1 FPS).
- Efficiency: The APU module is remarkably lightweight, adding only 14.68K parameters to the base model, making it much leaner than traditional memory bank approaches.
- Robustness: The system achieved 77.5% AUC on the difficult ShanghaiTech dataset, proving its capability in complex, multi-scene environments.
Conclusion
The Attention Prototype Network represents a significant shift from static to dynamic learning in video anomaly detection. By moving away from bulky memory banks and adopting efficient circulative attention, the model achieves state-of-the-art results while remaining fast enough for real-world deployment. While the number of prototypes requires careful tuning to avoid noise, the APN's ability to adapt quickly to new scenarios makes it a robust solution for modern surveillance challenges.
Summary updated