Skip to main content
QUICK REVIEW

[Paper Review] CLIP-TSA: CLIP-Assisted Temporal Self-Attention for Weakly-Supervised Video Anomaly Detection

Hyekang Kevin Joo, Khoa Vo|arXiv (Cornell University)|Dec 9, 2022
Anomaly Detection Techniques and ApplicationsComputer Science7 citations
TL;DR

This paper proposes CLIP-TSA, a novel weakly-supervised video anomaly detection framework that leverages CLIP-encoded visual features and a Temporal Self-Attention (TSA) mechanism to improve anomaly localization. By replacing conventional C3D/I3D backbones with CLIP features and applying differentiable top-κ attention to highlight anomalous snippets, CLIP-TSA achieves state-of-the-art performance on UCF-Crime, ShanghaiTech Campus, and XD-Violence, outperforming prior methods by significant margins.

ABSTRACT

Video anomaly detection (VAD) -- commonly formulated as a multiple-instance learning problem in a weakly-supervised manner due to its labor-intensive nature -- is a challenging problem in video surveillance where the frames of anomaly need to be localized in an untrimmed video. In this paper, we first propose to utilize the ViT-encoded visual features from CLIP, in contrast with the conventional C3D or I3D features in the domain, to efficiently extract discriminative representations in the novel technique. We then model temporal dependencies and nominate the snippets of interest by leveraging our proposed Temporal Self-Attention (TSA). The ablation study confirms the effectiveness of TSA and ViT feature. The extensive experiments show that our proposed CLIP-TSA outperforms the existing state-of-the-art (SOTA) methods by a large margin on three commonly-used benchmark datasets in the VAD problem (UCF-Crime, ShanghaiTech Campus, and XD-Violence). Our source code is available at https://github.com/joos2010kj/CLIP-TSA.

Motivation & Objective

  • Address the challenge of weakly-supervised video anomaly detection (VAD) where only video-level labels are available, reducing annotation burden.
  • Overcome limitations of conventional backbones (e.g., C3D, I3D) that are pre-trained on action recognition and suffer from domain gap in anomaly detection.
  • Improve localization of anomalous snippets in untrimmed videos by modeling temporal coherence and identifying salient abnormal patterns.
  • Develop a differentiable top-κ attention mechanism to effectively select the most abnormal snippets under the MIL framework.
  • Demonstrate the effectiveness of combining CLIP’s vision-language features with a novel temporal attention mechanism for anomaly detection.

Proposed method

  • Utilize CLIP’s ViT-based visual encoder to extract rich, discriminative features from the middle frame of each snippet, replacing traditional action recognition backbones.
  • Divide each video into fixed-length (δ=16) snippets and represent each as a 512-dimensional feature vector using CLIP, forming a sequence of T=32 snippets per video.
  • Introduce Temporal Self-Attention (TSA) to reweight snippet features based on their abnormality score, enhancing attention on anomalous snippets while suppressing normal ones.
  • Apply a differentiable top-κ function to select the κ most abnormal snippets (κ = 0.7×T) using hard attention, enabling end-to-end training under the MIL setting.
  • Train the model using a Difference Maximization Trainer that encourages higher attention on positive (anomalous) videos and lower attention on negative (normal) videos.
  • Use an MLP scorer network to predict anomaly scores and optimize the entire model end-to-end with Adam optimizer, learning rate 0.001, and batch size 16.

Experimental results

Research questions

  • RQ1Can CLIP-encoded visual features improve representation learning for video anomaly detection compared to action recognition-based backbones like C3D and I3D?
  • RQ2Does the proposed Temporal Self-Attention (TSA) mechanism effectively localize anomalous snippets under weak supervision with only video-level labels?
  • RQ3How does the combination of CLIP features and TSA compare to state-of-the-art methods on standard VAD benchmarks?
  • RQ4To what extent does the differentiable top-κ attention mechanism enhance model performance in weakly-supervised anomaly detection?
  • RQ5Can the proposed method generalize across diverse datasets with varying anomaly types and temporal patterns?

Key findings

  • CLIP-TSA achieves an AUC@ROC of 87.58% on UCF-Crime, outperforming the previous SOTA by 3.5 percentage points.
  • On ShanghaiTech Campus, CLIP-TSA achieves 98.32% AUC@ROC, a 1.11% improvement over the runner-up method and a 12.89% improvement over earlier SOTA methods.
  • On XD-Violence, CLIP-TSA achieves 82.19% AUC@PR, significantly outperforming all vision-only baselines and matching or exceeding multimodal SOTA methods.
  • Ablation studies confirm that both CLIP features and TSA contribute significantly: removing TSA reduces performance by up to 1.5% on UCF-Crime and 1.2% on ShanghaiTech.
  • Replacing CLIP with C3D or I3D reduces performance by 3.5–4.5 percentage points on UCF-Crime and ShanghaiTech, demonstrating the superiority of CLIP features.
  • The differentiable top-κ function effectively identifies the most abnormal snippets, with the model consistently attending to anomalous regions even in complex scenes.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.