Rule-Guided Evolution of Hierarchical Reasoning for Explainable Video Anomaly Detection
Abstract
Video anomaly detection (VAD) is challenging as anomaly is inherently context-dependent and requires hierarchical reasoning over scene context, object dynamics, and their consistency with environment-specific norms. Although Vision-Language Models (VLMs) provide strong priors, they are mainly optimized for generic tasks rather than anomaly reasoning. Existing VLM-based VAD methods typically rely on parameter tuning, auxiliary modules, or prompt rephrasing, but do not explicitly improve the hierarchical reasoning process required for anomaly understanding. We propose PRIME (Prompt Refinement via Iterative Module-wise Evolution), a framework that adapts VLMs to VAD via rule-guided, module-wise optimization of hierarchical prompts. PRIME decomposes the prompt into Scene, Object, and Reasoning modules for contextual grounding, event-level evidence extraction, and norm-aware decision making. This design replaces holistic prompt rewriting with constrained module-wise refinement, enabling clearer error attribution and more stable optimization. Building on this structure, PRIME first distills execution traces and diagnostic feedback on training data into a compact rule memory, and then uses the induced rules to guide targeted updates over a population of candidate prompts. To preserve complementary strengths across prompts, PRIME retains non-dominated candidates via Pareto-based selection. After training, PRIME yields a single deployable prompt together with the learned rules, enabling efficient inference without model tuning. Experiments on UCF-Crime and XD-Violence demonstrate its strong explainable VAD performance, with 89.14% AUC and 82.41% AP, and promising cross-dataset generalization.