计算机科学 ›› 2025, Vol. 52 ›› Issue (6): 106-117.doi: 10.11896/jsjkx.240600001

• 数据库&大数据&数据科学 • 上一篇    下一篇

DCDAD:考虑上下文依赖差异化的时间序列异常检测模型

廖思睿1, 黄飞虎1, 战鹏祥1, 彭舰1, 张凌浩2   

  1. 1 四川大学计算机学院 成都 610065
    2 国网四川省电力公司电力科学研究院 成都 610000
  • 收稿日期:2024-06-03 修回日期:2024-09-01 出版日期:2025-06-15 发布日期:2025-06-11
  • 通讯作者: 黄飞虎(hd808080@126.com)
  • 作者简介:(2022223045124@stu.scu.edu.cn)
  • 基金资助:
    四川省重点研发计划(2023YFG0112,2023YFG0115);国家自然科学基金(12401682,62072320);四川省重点实验室开放课题(SCITLAB-20001);四川大学宜宾市合作项目(2020CDYB-30);四川大学自贡市合作项目(2022CDZG-6)

DCDAD:Differentiated Context Dependency for Time Series Anomaly Detection Method

LIAO Sirui1, HUANG Feihu1, ZHAN Pengxiang1, PENG Jian1, ZHANG Linghao2   

  1. 1 College of Computer Science,Sichuan University,Chengdu 610065,China
    2 State Grid Sichuan Electric Power Research Institute,Chengdu 610000,China
  • Received:2024-06-03 Revised:2024-09-01 Online:2025-06-15 Published:2025-06-11
  • About author:LIAO Sirui,born in 2000,master candidate.His main research interests include spatio-temporal data mining and anomaly detection.
    HUANG Feihu,born in 1990,Ph.D,lecturer.His main research interests include spatio-temporal data mining,prognostics and health management and so on.
  • Supported by:
    Sichuan Science and Technology Program(2023YFG0112,2023YFG0115),National Natural Science Foundation of China(12401682,62072320),Intelligent Terminal Key Laboratory of Sichuan Province(SCITLAB-20001),Cooperative Program of Sichuan University,Yibin(2020CDYB-30) and Cooperative Program of Sichuan University,Zigong(2022CDZG-6).

摘要: 时间序列异常检测旨在检测时间序列中与正常数据不符的时间点或片段。如何充分利用时间序列中的上下文信息以提升检测精度,是目前构建异常检测模型的关键。然而,现有方法未充分考虑数据中上下文依赖关系的差异性,也缺乏对异常样本的建模,导致正常和异常样本区分度不明显,检测效果欠佳。因此,提出了一种考虑上下文依赖差异化的异常检测(Diffe-rentiated Context Dependency for Time Series Anomaly Detection,DCDAD)模型用于时序异常检测。DCDAD模型通过自注意力捕捉时间维度的上下文依赖,并在聚类过程中学习用于区分正、异常样本的超球面。采用异常注入思想对数据集进行扩充,解决异常样本稀缺的问题,并针对性地设计了差异化学习的目标函数,扩大正、异常样本的差异性,进而提升异常检测性能。在5个真实时序数据集上进行了大量实验,在F1分数上相比于现有最先进的算法提升了约1.2%,证实了以差异化方式学习上下文依赖关系可提升模型的异常检测效果,同时参数敏感性分析和消融实验的结果也验证了DCDAD模型的稳定性以及有效性。

关键词: 时序异常检测, 差异化表示学习, 上下文依赖关系, 超球面

Abstract: Time series anomaly detection aims to identify data points or segments in a time series that deviate from normal patterns.Enhancing detection accuracy by effectively utilizing contextual information in time series is a key role in constructing anomaly detection models.However,existing methods inadequately consider the differential context dependency in the data and lack explicit modeling of anomalous samples,resulting in poor discrimination between normal and anomalous samples and suboptimal detection performance.Therefore,this paper proposes a model that considers differential context dependency for time series anomaly detection(DCDAD),which enhances to learn the differential representations of context dependency.The DCDAD model captures temporal context dependency using self-attention mechanisms and learns hyperspheres for discriminating between normal and anomalous samples during the clustering process.By adopting the concept of anomaly injection,the dataset is augmented to address the issue of limited anomalous samples.Additionally,a targeted objective function for differentiated learning is designed to amplify the differences between normal and anomalous samples,thereby improving the anomaly detection performance.Extensive experiments conduct on five real-world time series datasets,and the results show an improvement of approximately 1.2% in terms of the F1 score compared to state-of-the-art algorithms,validating the effectiveness of learning context dependency in a differentiated manner for improving the anomaly detection performance of the model.Furthermore,sensitivity analysis of parameters and ablation experiments validate the stability and effectiveness of the proposed model.

Key words: Time series anomaly detection, Differentiated representation learning, Context dependency, Hypersphere

中图分类号: 

  • TP183
[1]BLÁZQUEZ-GARCÍA A,CONDE A,MORI U,et al.A review on outlier anomaly detection in time series data[J].ACM Computing Surveys,2021,54(3):1-33.
[2]CHOI K,YI J H,PARK C,et al.Deep learning for anomaly detection in time-series data:review,analysis,and guidelines[J].IEEE Access,2021,9:120043-120065.
[3]GREFF K,SRIVASTAVA R K,KOUTNÍK J,et al.LSTM:A search space odyssey[J].IEEE Transactions on Neural Networks and Learning Systems,2016,28(10):2222-2232.
[4]ZHANG G H,YAN X F,GUAN D H.Anomaly Detection of Time-series Based on Multi-modal Feature Fusion[J/OL].https://www.jsjkx.com/CN/article/openArticlePDF.jsp?id=21650.
[5]BREUNIG M M,KRIEGEL H P,NG R T,et al.LOF:identifying density-based local outliers[C]//Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data.New York:ACM,2000:93-104.
[6]LIU F T,TING K M,ZHOU Z H.Isolation-based anomaly detection[J].ACM Transactions on Knowledge Discovery from Data,2012,6(1):1-39.
[7]SCHÖLKOPF B,PLATT J C,SHAWE-TAYLOR J,et al.Estimating the support of a high-dimensional distribution.[J] Neural Computation,2001,13(7):1443-1471.
[8]RUFF L,VANDERMEULEN R,GOERNITZ N,et al.Deepone-class classification[C]//Proceedings of The 37th International Conference on Machine Learning.PMLR,2018:4393-4402.
[9]PARK D,HOSHI Y,KEMP C C.A multimodal anomaly detector for robot-assisted feeding using an lstm-based variational autoencoder[J].IEEE Robotics and Automation Letters,2018,3(3):1544-1551.
[10]TAO T,ZHOU X,MA B,et al.Abnormal time series data detection of gas station by Seq2Seq model based on bidirectional long short-term memory[J].Computer Applications,2019,39(3):924-929.
[11]ZHOU B,LIU S H,HOOI B,et al.Beatgan:Anomalous rhythm detection using adversarially generated time series[C]//Proceedings of the 28th International Joint Conferences on Artificial Intelligence.AAAI,2019:4433-4439.
[12]SU Y,ZHAO Y J,NIU C H,et al.Robust anomaly detection formultivariate time series through stochastic recurrent neural network[C]//Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining.ACM,2019:2828-2837.
[13]WANG L,ZHANG X Y,XV B W,et al.InterFusion:Inter-action-based 4D radar and LiDAR fusion for 3D object detection[C]//2022 IEEE/RSJ International Conference on Intelligent Robots and Systems.IEEE,2022:12247-12253.
[14]SHEN L F,LI Z C,KWOK J.Timeseries anomaly detection using temporal hierarchical one-class network[J].Advances in Neural Information Processing Systems,2020,33:13016-13026.
[15]XU J H,WU H X,WANG J M,et al.Anomaly Transformer:Time Series Anomaly Detection with Association Discrepancy[C]//Proceedings of the 10th International Conference on Learning Representations(Virtual).2022:1-20.
[16]YANG Y Y,ZHANG C L,ZHOU T,et al.DCdetector:DualAttention Contrastive Representation Learning for Time Series Anomaly Detection[C]//Proceedings of the 29th ACM SIGKDD International Conference on Knowledge Discovery & Data Mi-ning.ACM,2023:3033-3045.
[17]TARIQ S,LEE S,SHIN Y,et al.Detecting anomalies in space using multivariate convolutional LSTM with mixtures of probabilistic PCA[C]//Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining.ACM,2019:2123-2133.
[18]CARMONA C U,AUBET F X,FLUNKERT V,et al.Neural contextual anomaly detection for time series[C]//Proceedings of the 31st International Joint Conferences on Artificial Intelligence.2022:4433-4439.
[19]HENDRYCKS D,MAZEIKA M,DIETTERICH T.Deep ano-maly detection with outlier exposure[J].arXiv:1812.04606,2018.
[20]RUFF L,VANDERMEULEN R A,FRANKS B J,et al.Rethinking assumptions in deep anomaly detection[J].arXiv:2006.00339,2020.
[21]ZONG B,SONG Q,MIN M R,et al.Deep autoencoding gaussian mixture model for unsupervised anomaly detection[C]//Proceedings of the 6th International Conference on Learning Representations.2018:1-19.
[22]YAIRI T,TAKEISHI N,ODA T,et al.A data-driven healthmonitoring method for satellite housekeeping data based on probabilistic clustering and dimensionality reduction[J].IEEE Transactions on Aerospace and Electronic Systems,2017,53(3):1384-1401.
[23]ANDERSON O D.Time-Series[J] Journal of the Royal Statistical Society Series D:The Statistician,1976,25(4):308-310.
[24]CHO K,VAN MERRIENBOER B,GULCEHRE C,et al.Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation[C]//Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing.2014:1724.
[25]YIN C Y,ZHOU L W.Unsupervised time series anomaly detection model based on re-encoding[J].Journal of Computer Applications.2023,43(3):804-811.
[26]ZHAO H,WANG Y J,DUAN J Y,et al.Multivariate time-series anomaly detection via graph attention network[C]//Proceedings of the 2020 IEEE International Conference on Data Mining. 2020:841-850.
[27]ZENG W R,WU J,YAN F.Time Series Anomaly DetectionModel Based on Hierarchical Temporal Memory[J].Acta Electronica Sinica,2018,46(2):325-332.
[28]ZHANG S Q,ZHANG Z Y,JIANG Y,et al.Time Series Theoryand Algorithm of Predictable Learnability Based on Error Truncation Assumption[J].Chinese Journal of Computers,2022,45(11):2279-2289.
[29]GOODFELLOW I J,POUGET-ABADIE J,MIRZA M,et al.Generative adversarial networks[J].Communications of the ACM,2014,63:139-144.
[30]KINGMA D P,WELLING M.Auto-encoding variational Bayes[J].arXiv:1312.6114,2013.
[31]LI D,CHEN D C,JIN B H,et al.MAD-GAN:Multivariateanomaly detection for time series data with generative adversarialnetworks[C]//Proceedings of the 28th International Conference on Artificial Neural Networks.2019:703-716.
[32]CHEN Z K,CHEN D S,ZHANG X,et al.Learning graph structures with transformer for multivariate time-series anomaly detection in IoT[J].IEEE Internet of Things Journal,2021,9(12):9179-9189.
[33]TULI S,CASALE G,JENNINGS N R.TranAD:deep trans-former networks for anomaly detection in multivariate time series data[J].Proceedings of the VLDB Endowment,2022,15(6):1201-1214.
[34]NIE Y,NGUYEN N H,SINTHONG P,et al.A Time Series is Worth 64 Words:Long-term Forecasting with Transformers[C]//Proceedings of the 11th International Conference on Learning Representations.2023:1-24.
[35]ABDULAAL A,LIU Z,LANCEWICKI T.Practical approach to asynchronous multivariate time series anomaly detection and localization[C]//Proceedings of the 27th ACM SIGKDD Confe-rence on Knowledge Discovery & Data Mining.2021:2485-2494.
[36]ENTEKHABI D,NJOKU E G,O'NEILL P E,et al.The soilmoisture active passive(SMAP) mission[J].Proceedings of the IEEE,2010,98(5):704-716.
[37]HUNDMAN K,CONSTANTINOU V,LAPORTE C,et al.Detecting spacecraft anomalies using lstms and nonparametric dynamic thresholding[C]//Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mi-ning.2018:387-395.
[38]GOH J,ADEPU S,JUNEJO K N,et al.A dataset to support research in the design of secure water treatment systems[C]//Proceedings of the 11th International Conference on Critical Information Infrastructures Security.2016:88-99.
[39]XU H W,CHEN W X,ZHAO N W,et al.Unsupervised anomaly detection via variational auto-encoder for seasonal kpis in web applications[C]//Proceedings of the 2018 World Wide Web Conference.2018:187-196.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!