Presented at AAAI 2023, the Magnitude-Contrastive Glance-and-Focus Network (MGFN) introduces a novel paradigm for identifying abnormal events in surveillance footage. By leveraging only video-level labels, MGFN addresses critical flaws in existing weakly-supervised video anomaly detection (VAD) frameworks, specifically regarding temporal context and the misleading nature of feature magnitudes.
The Challenges: Context Blindness and the Magnitude Trap
Detecting anomalies like robberies or accidents is inherently difficult because "abnormality" is context-dependent. A crowd running in a stadium is normal; a crowd running in a library is not. Existing models often suffer from two primary limitations:
- Context Blindness: Many models process short video snippets in isolation, failing to grasp the broader temporal narrative. Without "global awareness," they cannot establish a baseline for what constitutes "normal" for a specific scene.
- The Magnitude Trap: Previous state-of-the-art methods, such as RTFM, operated on the assumption that abnormal events always produce higher feature magnitudes (stronger signals) than normal ones. However, empirical evidence shows this is often false. A busy but normal street scene can generate a higher magnitude signal than a subtle, quiet anomaly, leading to frequent false alarms.
The MGFN Framework
MGFN mimics the human visual system's "glance-and-focus" mechanism to integrate global and local information through three key components:
1. Glance-and-Focus Architecture
- Glance Block: Utilizes a Video Clip-level Transformer (VCT) to observe the entire video sequence. This "glance" captures long-term global context, allowing the network to understand the scene's baseline activity.
- Focus Block: Employs Self-Attentional Convolution (SAC) to zoom in on local spatial-temporal details, refining detection within specific clips based on the global context established by the Glance block.
2. Feature Amplification Mechanism (FAM)
This module explicitly calculates the L2 norm (magnitude) of features and integrates it as a residual. This ensures that while the model moves away from absolute magnitude dependence, it still retains magnitude information as a useful discriminative cue when contextualized.
3. Magnitude Contrastive (MC) Loss
The core innovation of MGFN is the Magnitude Contrastive Loss. Instead of pushing all abnormal magnitudes higher, the MC loss encourages the model to learn a scene-adaptive distribution. It minimizes the distance between feature magnitudes of the same category (e.g., making all "normal" clips in a specific video look similar) while maximizing the distance between normal and abnormal clips within that context.
Experimental Results and Insights
The authors evaluated MGFN on two major benchmarks: UCF-Crime (1,900 videos of various crimes) and XD-Violence (a large-scale violence dataset). MGFN achieved new state-of-the-art results, reaching 86.98% AUC on UCF-Crime and 80.11% Average Precision (AP) on XD-Violence.
As shown in the comparative analysis, MGFN's MC loss significantly improves the model's ability to distinguish between "busy normal" scenes and actual anomalies. While previous models like RTFM struggled with magnitude inconsistencies, MGFN produces prediction probabilities that closely track the ground truth. Furthermore, t-SNE visualizations demonstrate that MGFN creates much clearer clusters for normal versus abnormal features, reducing the overlap that typically causes false positives.
Conclusion
MGFN represents a significant step forward in video anomaly detection by recognizing that anomalies are defined by their deviation from a local norm rather than absolute signal strength. By combining a global-local attention mechanism with a contrastive approach to feature magnitudes, the model achieves superior robustness against the complex "noise" of real-world surveillance environments.
Summary updated