Logical Consistency Optimization for Few-Shot Weakly Supervised Video Anomaly Detection

Hantao Zheng, Ning Han, Yawen Zeng, Hegui Zhu, Hao ChenCVPR 2026 Findings 2026

TL;DR

The Logical Consistency Optimization (LCO) framework introduces an explicit knowledge validation loop to tackle the issue of spurious correlations in few-shot weakly supervised video anomaly detection. By leveraging large language models (LLMs) to iteratively generate, score, and refine human-interpretable anomaly guidelines, LCO filters out unreliable associations caused by data scarcity. Combined with a novel temporal smoothing mechanism (WeightedEMA), it achieves state-of-the-art performance on major benchmarks even when trained on minimal data.

What Problem Does This Paper Address?

Weakly supervised video anomaly detection (WSVAD) allows models to identify frame-level anomalies using only video-level labels during training, significantly lowering annotation costs. However, standard WSVAD relies heavily on massive training datasets. When shifted to a data-scarce, few-shot setting, models become highly susceptible to learning spurious correlations instead of actual logical patterns. For example, if the only few training videos of arson happen at night, a model might mistakenly learn that "darkness" is the key feature of the anomaly.

While recent Vision-Language Models (VLMs) offer explainable outputs, they typically operate under an "implicit capability elicitation" paradigm—meaning they blindly trust the internal reasoning of the foundation model. If the underlying model picks up a spurious correlation, its generated text will simply provide a plausible-sounding rationalization for an incorrect conclusion.

Figure 1. Confronting spurious correlations in few-shot WSVAD. (a) Implicit Trust: Opaque reasoning learns a spurious and fragile decision rule. (b) Explicit Validation: Our LCO framework builds a robust and logically consistent guideline.

Methods

To ensure that learned knowledge is both valid and logically coherent, the authors propose the Logical Consistency Optimization (LCO) framework, which shifts the paradigm toward explicit knowledge validation.

The pipeline consists of two main phases:

  1. Guideline Generation:
  2. Visual Parsing: Sampled frames from few-shot videos are processed by a VLM (LLaVA-Next-7B) to generate concise, anomaly-focused textual descriptions ($D$).
  3. Initial Guideline Generation: An LLM uses these descriptions to distill preliminary, human-readable anomaly hypotheses ($G_{gen}$) across three facets: human activities, human states, and scene context.
  4. LCO Self-Validation Loop:
  5. Logical Reasoning: The LLM generates a textual reasoning trace ($L_{reason}$) justifying the link between the video description and the guideline.
  6. Consistency Scoring: The LLM acts as an evaluator, assigning a discrete belief score ($S_{belief}$) using a validated 5-bin scheme (from "Confidently Correct" to "No Direct Answer").
  7. Conditional Refinement: If the score falls below a threshold, the LLM is prompted to refine the guideline ($G_{refine}$) by incorporating the feedback from the logical justification. This loop repeats iteratively to filter out spurious associations.
  8. Guideline Aggregation & Inference: Validated guidelines are consolidated into a refined set ($G_{agg}$), and keywords are extracted. During inference, new video descriptions are matched against these keywords for preliminary frame-level classification.
  9. Temporal Smoothing via WeightedEMA: To clean up frame-level prediction noise and temporal jitter, the authors introduce a dual-strategy smoothing mechanism. It first applies a linearly increasing weighted average within a sliding window, thresholds the decision, and then applies an Exponential Moving Average (EMA) to reinforce long-term trend consistency.
Figure 2. An overview of our proposed framework, structured into a learning and an inference phase. In the Few-shot Learning phase (top), a Vision-Language Model first performs Visual Parsing to generate textual descriptions D of the video. An LLM then conducts Guideline Generation to produce initial anomaly guidelines Ggen. Our core LCO module initiates a meta-reasoning loop: it performs Logical Consistency Optimization to validate the guidelines, assigns a belief score Sbelief, and refines them into Grefine if necessary. The final, optimized guidelines are consolidated via Guideline Aggregation. During Inference (bottom), new video descriptions are matched against keywords from the aggregated guidelines for preliminary Anomaly Identification. The resulting binary predictions are then temporally smoothed by our WeightedEMA module to produce the final, robust anomaly scores.

Datasets

The framework was evaluated on two challenging, standard VAD benchmarks under a few-shot weakly supervised protocol (using only 1 randomly selected video per anomaly category over 5 independent runs):

  • UCF-Crime: Evaluated using frame-level Area Under the ROC Curve (AUC %).
  • XD-Violence: Evaluated using Average Precision (AP %).
  • CUVA: Used additionally to test the model's generalization capabilities in complex scenes.

Key Insights and Ideas

  • Explicit Validation over Implicit Trust: Instead of accepting an LLM's initial output, LCO forces the model to externalize its reasoning steps and grade its own logic. This meta-reasoning loop acts as a highly effective filter against coincidental patterns in small datasets.
  • Robustness to LLM Choice: Interestingly, the framework does not strictly rely on massive proprietary models like GPT-4o. When evaluated using a smaller, local model (Llama-3.1-8B-Instruct), LCO still outperformed competing VLM methods, proving that the validation structure itself drives the performance gains.
  • Synergy of Semantics and Time: The authors demonstrate that semantic grounding (LCO) and temporal smoothing (WeightedEMA) are deeply codependent. Without LCO, WeightedEMA would just smooth out noisy, meaningless signals; without WeightedEMA, logically sound predictions would lack temporal coherence.

Key Results

LCO achieved new state-of-the-art results in the few-shot setting, significantly outperforming both traditional methods and recent VLM-based approaches:

  • UCF-Crime: Reached 84.56% AUC, outperforming the recent implicit-trust VLM method VERA (75.16%) by +9.40%*.
  • XD-Violence: Reached 73.20% AP, outperforming traditional few-shot methods like DMU* (52.48%) by a wide margin.
  • Efficiency: In terms of inference speed, LCO demonstrated competitive practical efficiency, clocking in at 27.06 ms/video on the XD-Violence dataset.
Qualitative results comparing LCO against the baseline on sample videos.

Limitations and Future Work

The primary bottleneck of the LCO framework stems from the initial visual parsing stage. Because the framework translates video frames into text before reasoning, it is fundamentally bounded by the VLM's description capabilities. In heavily occluded or ambiguous scenes, the VLM can misinterpret context (e.g., associating a normal tanker truck with an explosion risk, triggering a false positive). Similarly, subtle anomalies might be missed entirely if they aren't captured in the initial text.

The authors note that future work will focus on enhancing this visual-to-text transformation and extending the LCO validation loop directly to multi-modal inputs.

Summary updated

BibTeX
@inproceedings{zheng2026logical,
  author = {Hantao Zheng and Ning Han and Yawen Zeng and Hegui Zhu and Hao Chen},
  title = {{Logical Consistency Optimization for Few-Shot Weakly Supervised Video Anomaly Detection}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=qbyJSfZV8D},
}
Figure