Computer Science ›› 2026, Vol. 53 ›› Issue (11A): 260400165-434.doi: 10.11896/jsjkx.260400165

• Image Processing & Multimedia Technology • Previous Articles     Next Articles

Video Anomaly Detection Method with Text Guidance and Context-aware Prompt Tuning

GENG Jianxun, XU Chengjie, MENG Siyu, WANG Rong   

  1. College of Information and Cyber Security,People’s Public Security University of China,Beijing 100038,China
  • Online:2026-11-16 Published:2026-11-16
  • About author:GENG Jianxun,born in 2000,postgra-duate,is a student member of CCF(No.A50998G).His main research interests include video anomaly detection and computer vision.
    WANG Rong,born in 1971,professor,Ph.Dsupervisor,is a member of CCF(No.C4366M).Her main research interests include pattern recognition and computer vision.
  • Supported by:
    This work was supported by the National Natural Science Foundation of China(62076246) and Fundamental Research Funds for the Central Universities of Ministry of Education of China(2024JKF11).

Abstract: In weakly supervised video anomaly detection,contrastive language-image pre-training(CLIP),a neural network built upon multimodal contrastive learning,has exhibited remarkable advantages.However,most existing video anomaly detection methods rely on shallow combinations of text and video features,failing to capture deep semantic associations.To address this issue,this paper proposes a video anomaly detection method based on text-guided temporal attention and context-aware prompt tuning.Firstly,it designs a text-guided temporal attention module that generates multi-scale temporal attention through cross-modal matching of static text semantics and temporal visual features,enhancing responses to anomaly-related segments with a resi-dual gating mechanism.Meanwhile ituses a graph convolutional network to model the spatiotemporal relationships between segments.Secondly,it introduces a context-aware prompt tuning mechanism that dynamically modulates text prompts by extracting video-specific visual context,thereby achieving scene-adaptive adjustment of the prompts.Finally,a dual-branch framework is adopted:static text features guide the temporal attention,while scene-adaptive dynamic text features are used for the final anomaly classification.This design effectively balances training stability and inference adaptability.Extensive experiments on two public benchmarks,UCF-Crime and XD-Violence,demonstrate that theproposed method achieves an AUC of 88.32% on UCF-Crime and an average precision(AP) of 85.37% on XD-Violence,surpassing state-of-the-art approaches and significantly boosting detection performance.

Key words: Video anomaly detection, Text guidance, Weakly supervised learning, CLIP, Prompt tuning

CLC Number: 

  • TP391
[1] YAO H L,HU X.A survey of video violence detection[J].Cy-ber-Physical Systems,2023,9(1):1-24.
[2] CAO Y,XU X,SUN C,et al.Towards Generic Anomaly Detec-tion and Understanding:Large-scale Visual-linguistic Model(GPT-4V) Takes the Lead[J].arXiv:2311.02782,2023.
[3] SUN C,JIA Y,HU Y,et al.Scene-aware context reasoning for unsupervised abnormal event detection in videos[C]//Procee-dings of the 28th ACM International Conference on Multimedia.2020:184-192.
[4] WANG J,CHERIAN A.Gods:Generalized one-class discriminative subspaces for anomaly detection.[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision.2019:8201-8211.
[5] WU P,LIU X T,LIU J.Weakly supervised audiovisual violencedetection[J].IEEE Transactions on Multimedia,2022,25:1674-1685.
[6] PU Y J,WU X Y,WANG S L,et al.Learning prompt-enhanced context features for weakly supervised video anomaly detection.[J].IEEE Transactions on Image Processing,2024,33:4923-4936.
[7] SULTANI W,CHEN C,SHAH M.Real-world Anomaly Detection in Surveillance Videos [C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2018:6479-6488.
[8] TIAN Y,PANG G,CHEN Y,et al.Weakly-supervised videoanomaly detection with robust temporal feature magnitude lear-ning[C]//Proceedings of the IEEE/CVF International Confe-rence on Computer Vision.2021:4975-4986.
[9] WU J C,HSIEH H Y,CHEN D J,et al,Self-supervised Sparse Representation for Video Anomaly Detection[C]//European Conference on Computer Vision.2022:729-745.
[10] ZHONG J X,LI N,KONG W,et al.Graph Convolutional Label Noise Cleaner:Train a Plug-And-Play Action Classifier for Anomaly Detection[C]//Proceedings of the IEEE/CVF Confe-rence on Computer Vision and Pattern Recognition.2019:1237-1246.
[11] CARREIRA J,ZISSERMAN A,QUO V.Action Recognition? A New Model and the Kinetics Dataset[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2017:6299-6308.
[12] TRAN D,BOURDEV L,FERGUS R,et al.Learning Spatiotemporal Features with 3D Convolutional Networks[C]//Procee-dings of the IEEE International Conference on Computer Vision.2015:4489-4497.
[13] RADFORD A,KIM J W,HALLACY C,et al.Learning Transferable Visual Models From Natural Language Supervision[C]//International Conference on Machine Learning.2021:8748-8763.
[14] WU P,ZHOU X,PANG G,et al.VadCLIP:Adapting Vision-Language Models for Weakly Supervised Video Anomaly Detection[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2024:6074-6082.
[15] SU Y,TAN Y,AN S,et al.Semantic-driven dual consistency learning for weakly supervised video anomaly detection[J].Pattern Recognit,2025,157:110898.
[16] YU J,LIU J,CHENG Y,et al.Modality-aware contrastive instance learning with self-distillation for weakly-supervised audio-visual violence detection[C]//Proceedings of the 30th ACM International Conference on Multimedia.2022:6278-6287.
[17] WEI D,LIU Y,ZHU X,et al.MSAF:multimodal supervise-attention enhanced fusion for video anomaly detection[J].IEEE Signal Process.Lett,2022,29:2178-2182.
[18] YANG Z,LIU J,WU P,Text Prompt with Normality Guidance for Weakly Supervised Video Anomaly Detection[C]//Procee-dings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2024:18899-18908.
[19] ZHOU Y,QU Y,XU X,et al.Batch Norm-based weakly supervised video anomaly detection[J].IEEE Transactions on Circuits and Systems for Video Technology,2024,34(12):13642-13654.
[20] WU P,ZHOU X,PANG G,et al.Weakly supervised videoanomaly detection and localization with spatio-temporal prompts[C]//Proceedings of the 32nd ACM International Conference on Multimedia.2024:9301-9310.
[21] WANG Y,CHEN S W.Learning event completeness for weakly supervised video anomaly detection[C]//Proceedings of the 42nd International Conference on Machine Learning.2025:62505-62517.
[22] MA X,ZHANG G,PAN L,et al.Weakly Supervised Video Anomaly Detection Based on Spatiotemporal Dual-Memory Enhancement and Contrastive Magnitude[C]//International Joint Conference on Neural Networks(IJCNN).Rome,Italy,2025:1-8.
[23] WUP,LIU J,SHI Y,et al.Not only look,but also listen:lear-ning multimodal violence detection under weak supervision[C]//Proceedings of the European Conference on Computer Vision.2020:322-339.
[24] TIANY,PANG G S,CHEN Y H,et al.Weakly-supervised video anomaly detection with robust temporal feature magnitude learning[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision.2021:4955-4966.
[25] LI S,LIU F,JIAO L.Self-training multi-sequence learning with transformer for weakly supervised video anomaly detection[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2022:1395-1403.
[26] ZHOU H,YU J,YANG W.Dual memory units with uncertainty regulation for weakly supervised video anomaly detection[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2023:3769-3777.
[27] LV H,YUE Z,SUN Q,et al.Unbiased multiple instance lear-ning for weakly supervised video anomaly detection[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2023:8022-8031.
[28] JOOH K,VO K,YAMAZAKI K,et al.CLIP-TSA:CLIP-assisted temporal self-attention for weakly supervised video anomaly detection[C]//IEEE International Conference on Image Processing.2023:3230-3234.
[29] FIGUEIREDO G N,BATISTA J.ESTER-VAR:Enhancing Semantic and Temporal Events Representation for Video Anomaly Recognition[C]//Proceedings of the14th International Sympo-sium on Image and Signal Processing and Analysis.2025:1-6.
[30] WU P,LIU X,LIU J.Weakly Supervised Audio-Visual Violence Detection[J].IEEE Transactions on Multimedia,2023,25:1674-1685.
[31] CHEN W,MA K T,YEW Z J,et al.TEVAD:improved videoanomaly detection with captions[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2023:5549-5559.
[1] ZHANG Yan, ZHOU Jian, HAN Lei, CHENG Chunling. Gate-controlled Agent Attention Mechanism-based Soft Prompt Transfer Method [J]. Computer Science, 2026, 53(7): 139-145.
[2] WEI Wei, LI Bicheng, ZHU Zhenshui, ZUO Jun. Semantic Modeling and Co-attention Mechanism for Multimodal Sarcasm Detection Method [J]. Computer Science, 2026, 53(6A): 250400127-6.
[3] HAN Lei, SHANG Haoyu, QIAN Xiaoyan, GU Yan, LIU Qingsong, WANG Chuang. Constrained Multi-loss Video Anomaly Detection with Dual-branch Feature Fusion [J]. Computer Science, 2026, 53(2): 236-244.
[4] MO Zhongrui, LIU Teli, ZHANG Yifan, LUO Qihang, ZENG Zhaolong. Weakly Supervised Video Anomaly Detection with Multi-branch Feature Fusion and Text-promptGuidance [J]. Computer Science, 2026, 53(11A): 251100007-462.
[5] HUANG Rong, TANG Yingchun, ZHOU Shubo , JIANG Xueqin. Composite Trigger Backdoor Attack Combining Visual and Textual Features [J]. Computer Science, 2026, 53(1): 382-394.
[6] YE Jiale, PU Yuanyuan, ZHAO Zhengpeng, FENG Jue, ZHOU Lianmin, GU Jinjing. Multi-view CLIP and Hybrid Contrastive Learning for Multimodal Image-Text Sentiment Analysis [J]. Computer Science, 2025, 52(6A): 240700060-7.
[7] GUO Fangyuan, JI Genlin. Video Anomaly Detection Method Based on Dual Discriminators and Pseudo Video Generation [J]. Computer Science, 2024, 51(8): 217-223.
[8] YU Bihui, TAN Shuyue, WEI Jingxuan, SUN Linzhuang, BU Liping, ZHAO Yiman. Vision-enhanced Multimodal Named Entity Recognition Based on Contrastive Learning [J]. Computer Science, 2024, 51(6): 198-205.
[9] ZHOU Wenhao, HU Hongtao, CHEN Xu, ZHAO Chunhui. Weakly Supervised Video Anomaly Detection Based on Dual Dynamic Memory Network [J]. Computer Science, 2024, 51(1): 243-251.
[10] GU Baocheng, LIU Li. Cross-modal Hash Retrieval Based on Text-guided Image Semantic Fusion [J]. Computer Science, 2023, 50(11A): 221100191-6.
[11] XU Wentao, WANG Binjun. Backdoor Defense of Horizontal Federated Learning Based on Random Cutting and GradientClipping [J]. Computer Science, 2023, 50(11): 356-363.
[12] ZHANG Wen-xuan, WU Qin. Fine-grained Image Classification Based on Multi-branch Attention-augmentation [J]. Computer Science, 2022, 49(5): 105-112.
[13] LENG Jia-xu, TAN Ming-pi, HU Bo, GAO Xin-bo. Video Anomaly Detection Based on Implicit View Transformation [J]. Computer Science, 2022, 49(2): 142-148.
[14] AO Tian-yu, LIU Quan. Upper Confidence Bound Exploration with Fast Convergence [J]. Computer Science, 2022, 49(1): 298-305.
[15] LI Li, ZHENG Jia-li, LUO Wen-cong, QUAN Yi-xuan. RFID Indoor Positioning Algorithm Based on Proximal Policy Optimization [J]. Computer Science, 2021, 48(4): 274-281.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!