TL;DR
AnomalyCLIP is the first framework to combine Large Language and Vision (LLV) models like CLIP with Multiple Instance Learning to not only detect if an anomaly is happening in a video but also what kind of anomaly it is (e.g., fighting vs. arson). By re-centering the CLIP latent space around a "normality prototype," the model effectively separates abnormal events from the background, achieving state-of-the-art results across major benchmarks.
What Problem Does This Paper Address?
Video Anomaly Detection (VAD) has traditionally been a binary task: is this video frame normal or abnormal? However, for real-world applications like smart surveillance, knowing the type of anomaly—Video Anomaly Recognition (VAR)—is just as critical.
The challenge lies in the data. Anomalies are rare and sporadic (extreme data imbalance), and most datasets only provide "weak supervision" (labels at the video level, not the frame level). While foundation models like CLIP are great at general image understanding, they struggle with VAD/VAR out of the box because the visual difference between a "normal" frame and an "abnormal" one in the same environment is often too subtle for the standard latent space to distinguish.
Methods
The authors introduce AnomalyCLIP, which features three primary innovations:
- Latent Space Re-centering: This is the core "aha" moment. The authors found that in standard CLIP space, normal and abnormal features are clustered too closely. They calculate a "normality prototype" (the average feature vector of all normal frames) and subtract it from every frame. In this new re-centered space, the origin represents "normal." The magnitude of a vector now represents the degree of anomaly, while its direction represents the anomaly type.
- Learnable Prompt Directions (CoOp): Instead of using static text prompts (like "a video of a fight"), the model uses prompt learning to find the optimal directions in the latent space that correspond to specific anomaly classes (e.g., "abuse," "explosion," "robbery").
- Dual-Model Architecture:
- Selector Model: Uses the re-centered space to identify which video segments are most likely to be anomalous (Multiple Instance Learning).
- Temporal Model: An Axial Transformer that captures both short-term (between adjacent frames) and long-term (across the whole video) dependencies to refine the final anomaly scores.
Datasets
The model was evaluated on three major, diverse benchmarks:
- ShanghaiTech: 13 scenes with 17 anomaly classes; known for being a "saturated" but standard benchmark.
- UCF-Crime: A large-scale dataset of real-world surveillance containing 13 categories of anomalies.
- XD-Violence: A massive dataset focused on violence detection with 6 categories, including audio signals (though this paper focuses on the visual aspect).
Key Insights and Ideas
- The Power of the Prototype: Simply re-centering the feature space makes the model significantly more sensitive. Without this, the directions for different anomalies (like "arrest" vs. "vandalism") are too similar to be distinguished.
- Magnitude as a Proxy for Severity: By shifting the origin to "normal," the distance from the origin becomes a mathematically elegant way to measure how "weird" a frame is.
- Efficiency via Axial Attention: Using an Axial Transformer instead of a standard one allowed the model to handle long video sequences more efficiently while being less prone to overfitting—a common issue in weakly-supervised tasks.
Key Results
AnomalyCLIP set new state-of-the-art (SOTA) benchmarks for both detection (VAD) and recognition (VAR):
- ShanghaiTech: Achieved 98.07% AUC for detection and 96.46% mAUC for recognition, a massive improvement over zero-shot CLIP (+45.44%).
- UCF-Crime: Reached 90.66% mAUC for recognition, outperforming the previous best method (SSRL) by nearly 2%.
- XD-Violence: Achieved 49.41% mAP for recognition, significantly higher than the 43.04% of previous baselines.
Qualitatively, the model showed a remarkable ability to "stay high" on anomaly scores even in the aftermath of an event (like the smoke following a car accident), providing more actionable insights than models that only flicker on during the peak of the action.
Limitations and Future Work
Despite its success, the authors note a few hurdles:
- Subtle Anomalies: The model still struggles with anomalies that look very similar to normal behavior, such as "shoplifting," where the visual difference is a tiny movement rather than a dramatic scene change.
- Open-Set Scenarios: Currently, the model can only recognize anomaly types it was trained on. The authors suggest that future work should explore "open-set" recognition to identify novel, unseen types of abnormal behavior.
- Multi-Modal Expansion: While this paper focused on video, the authors see potential in incorporating other sensors (like audio) to further improve recognition accuracy.
Summary updated