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

• Big Data & Data Science • Previous Articles     Next Articles

Self-supervised TCN-Transformer Framework with Adaptive Masking and Bounded Anomaly Loss for Time Series Anomaly Detection

HUANG Haoran1, LI Baowei1, WANG Shaopeng1, LI Shuyue2, XU Yicheng2, ZHANG Jianjun2, CHEN Bolin2   

  1. 1 XJ Electric Corporation,Xuchang,Henan 461000,China
    2 School of Computer Science,Northwestern Polytechnical University,Xi’an 710072,China
  • Online:2026-11-16 Published:2026-11-16
  • About author:HUANG Haoran,born in 1975,master,senior engineer.His main research interests include power system automation,real-time data processing.
    CHEN Bolin,born in 1984,Ph.D,asso-ciate professor,Ph.D supervisor,is a senior member of CCF(No.49257S).His main research interests include data mining,machine learning,and bioinformatics.
  • Supported by:
    This work was supported by the Horizontal Cooperation Project(D5204250559) and Fundamental Research Funds for the Central Universities(D5000250279).

Abstract: Time series anomaly detection technology is capable of promptly identifying and diagnosing anomalous patterns within time series data,and it possesses irreplaceable application value across a multitude of domains,including industrial production and public services.Nevertheless,current methodologies encounter two primary bottlenecks in practical applications.Firstly,variables within multivariate time series frequently demonstrate distinct periodic characteristics,necessitating precise modeling that accounts for multi scale temporal dependencies for effective anomaly detection.However,within the prevailing Global/Local architecture,the Global branch is susceptible to noise interference when capturing long term dependencies,resulting in an excessive focus on local regions and hindering the comprehensive characterization of global temporal patterns.Secondly,anomalous samples are typically scarce and incur high labeling costs in real world settings,leading many approaches to employ anomalous data augmentation as a workaround.Nonetheless,even after implementing anomalous data augmentation,these methods still find it challenging to enable the model to precisely delineate the discriminative boundary between normal and anomalous samples.To overcome these challenges,this paper introduces a self supervisedTCN-Transformer anomaly detection framework that integrates adaptive masking and bounded anomaly loss.To mitigate the issue of global attention and long-term temporal dependencies being vulnerable to noise interference,an adaptive masking mechanism is incorporated into the Global branch.Through a differentiated analysis of various variable dimensions,this mechanism effectively suppresses noise interference in long-term dependency modeling while preserving crucial periodic information.To address the challenge of learning the discriminative boundary between samples,a bounded anomaly loss function is devised based on anomalous insertion and sample reconstruction,thereby enhancing the discriminative learning between normal and anomalous samples.Experimental results indicate that the proposed method demonstrates superior detection performance across multiple public datasets,significantly outperforming mainstream baseline models.

Key words: Time series, Anomaly detection, Self-supervised, Reconstruction, Transformer

CLC Number: 

  • TP181
[1] WU X,QIU X,LI Z,et al.CATCH:Channel Aware multivariate Time Series Anomaly Detection via Frequency Patching[C]//13th International Conference on Learning Representations(ICLR).2025:56894-56922.
[2] LI M X,LIU K,CHEN H Y,et al.TSINR:Capturing Temporal Continuity via Implicit Neural Representations for Time Series Anomaly Detection [C]//Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining(KDD).ACM,2025:671-682.
[3] SHENTU Q,LI B,ZHAO K,et al.Towards A General Time Series Anomaly Detectorwith Adaptive Bottlenecks and Dual Adversarial Decoders[C]//13th International Conference on Learning Representations(ICLR).2025:18810-18833.
[4] YU L,LU Q,XUE Y.DTAAD:Dual TCN-attention networks for anomaly detection in multivariate time series data[J].Knowledge Based Systems,2024,295:111849.
[5] ZERVEAS G,JAYARAMAN S,PATEL D,et al.A transfor-mer-based framework for multivariate time series representation learning[C]//Proceedings of the 27th ACMSIGKDD Conference on Knowledge Discovery & Data Mining.2021:2114-2124.
[6] 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.
[7] ZONG B,SONG Q,MIN M R,et al.Deep autoencoding gaussian mixture model for unsupervised anomaly detection [C]//International Conference on Learning Representations.2018.
[8] SU Y,ZHAO Y,NIU C,et al.Robust anomaly detection for multivariate time series through stochastic recurrent neural network[C]//Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining.2019:2828-2837.
[9] LI D,CHEN D,JIN B,et al.MAD-GAN:Multivariate anomaly detection for time series data with generative adversarial networks[C]//International Conference on Artificial Neural Networks.Cham:Springer International Publishing,2019:703-716.
[10] ZHAO H,WANG Y,DUAN J,et al.Multivariate time-seriesanomaly detection via graph attention network[C]//2020 IEEE International Conference on Data Mining(ICDM).IEEE,2020:841-850.
[11] AUDIBERT J,MICHIARDI P,GUYARD F,et al.Usad:Unsupervised anomaly detection on multivariate time series[C]//Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining.2020:3395-3404.
[12] ZHANG Y,CHEN Y,WANG J,et al.Unsupervised deep anomaly detection for multi-sensor time-series signals[J].IEEE Transactions on Knowledge and Data Engineering,2021,35(2):2118-2132.
[13] DENG A,HOOI B.Graph neural networkbased anomaly detection in multivariate time series[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2021:4027-4035.
[14] VASWANI A,SHAZEER N,PARMAR N,et al.Attention isall you need[J].Advances in Neural Information Processing Systems,2017,30.
[15] TULI S,CASALE G,JENNINGS N R.Tranad:Deep trans-former networks for anomaly detection in multivariate time series data[J].arXiv:2201.07284,2022.
[16] XU J,WU H,WANG J,et al.Anomaly transformer:Time series anomaly detection with association discrepancy[C]//10th International Conference on Learning Representations(ICLR),2022:1-20.
[17] JEONG Y,YANG E,RYU J H,et al.Anomalybert:Self-supervised transformer for time series anomaly detection using data degradation scheme[J].arXiv:2305.04468,2023.
[18] DARBAN Z Z,YANG Y,WEBB G I,et al.DACAD:Domain adaptation contrastive learning for anomaly detection in multivariate time series[J].IEEE Transactions on Knowledge and Data Engineering,2025.
[19] SIFFER A,FOUQUE P A,TERMIER A,et al.Anomaly detection in streams with extreme value theory[C]//Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.2017:1067-1075.
[20] LAI K H,ZHA D,XU J,et al.Revisiting time series outlier detection:Definitions and benchmarks[C]//Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track(round 1).2021.
[21] HU S,ZHAO K,QIU X,et al.Multirc:Joint learning for time series anomaly prediction and detection with multi-scale reconstructive contrast[J].arXiv:2410.15997,2024.
[22] MALHOTRA P,VIG L,SHROFF G,et al.Long short term memory networks for anomaly detection in time series [C]//Proceedings of European Symposium on Artificial Neural Networks(ESANN).2015,89(9):94.
[23] GONG D,LIU L,LE V,et al.Memorizing normality to detectanomaly:Memoryaugmented deep autoencoder for unsupervised anomaly detection[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision.2019:1705-1714.
[24] PARK H,NOH J,HAM B.Learning memoryguided normality for anomaly detection[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2020:14372-14381.
[25] LAVIN A,AHMAD S.Evaluating real-time anomaly detection algorithms-the Numenta anomaly benchmark[C]//2015 IEEE 14th International Conference on Machine Learning and Applications(ICMLA).IEEE,2015:38-44.
[26] MOODY G B,MARK R G.The impact of the MIT-BIH arrhythmia database[J].IEEE Engineering in Medicine and Biology Magazine,2001,20(3):45-50.
[27] GOH J,ADEPU S,JUNEJO K N,et al.A dataset to support research in the design of secure water treatment systems[C]//International Conference on Critical Information Infrastructures Security.Cham:Springer International Publishing,2016:88-99.
[1] ZHANG Rongjie, PANG Xiongwen, WANG Fengling. Review of Large Language Model-based Time Series Modeling via Fine-tuning and AgentArchitecture [J]. Computer Science, 2026, 53(9): 55-70.
[2] XU Jianjun, BI Ying, CHEN Mingming, LIANG Jing. Survey of Molecular Pre-training Models and Their Applications in Drug Discovery [J]. Computer Science, 2026, 53(9): 110-123.
[3] ZOU Jing, WANG Pingxin. Structural Deep Clustering with Fuzzy C-means Refinement and Rollback Gating [J]. Computer Science, 2026, 53(9): 173-179.
[4] TAO Zekun, CHEN Di, ZHU Kaijie, XIA Yi, ZHANG Yichen, CHEN Yue. BGP Anomaly Detection and Localization via Multi-view Neighborhood Perturbation Awareness [J]. Computer Science, 2026, 53(9): 365-374.
[5] LIU Yanze, HAN Bo, YUAN Jidong, SU Dongliang, REN Jia, CAI Zhiming, WANG Zhihai. Anomaly Detection in Time Series Based on Time-Frequency Contrastive Learning [J]. Computer Science, 2026, 53(8): 20-28.
[6] WANG Yuqi, ZHANG Yangsen, GUO Yalong, KANG Jing, WANG Yalun. Time Series Language Model for Continuous Glucose Monitoring Interpretation [J]. Computer Science, 2026, 53(8): 29-39.
[7] CAI Yi, WANG Xiaobin, CHEN Ruili, XU Jinfeng. Handwriting Gender Recognition Method Based on Multi-scale Directional Attention Transformer [J]. Computer Science, 2026, 53(8): 156-164.
[8] LING Yun, LI Haodong. Localization of Diffusion-based Image Editing via Inversion-Reconstruction [J]. Computer Science, 2026, 53(8): 182-190.
[9] WANG Yifan, YANG Peixuan, LU Yuansuo, LIU Mengjun. Teacher Trajectory Recognition and Reconstruction in Smart Classrooms via Multi-source Fusion [J]. Computer Science, 2026, 53(8): 191-200.
[10] REN Yanzhang, GAO Tai, LI Ying, WANG Bin. Gated Bidirectional Mamba Multimodal Feature Fusion Framework for Drug-Target InteractionPrediction [J]. Computer Science, 2026, 53(8): 326-335.
[11] JI Wendi, WANG Yongquan. Autoregressive Sequence Reconstruction for Unsupervised Anomaly Detection in Medical Insurance [J]. Computer Science, 2026, 53(7): 298-307.
[12] WANG Jia, GAN Yongqiang. Multivariate Mimic Voting Method Based on Anomaly Perception [J]. Computer Science, 2026, 53(7): 414-421.
[13] CHEN Yifan, DING Cong, CAO Min. Image Anomaly Detection Based on Masked Convolutional Kernel [J]. Computer Science, 2026, 53(7): 45-53.
[14] XU Jian, CHEN Shijie, FENG Jiancong, YANG Geng. CBT-AD:CNN-BiLSTM-Transformer Hybrid Model for Time Series Anomaly Detection [J]. Computer Science, 2026, 53(7): 230-241.
[15] XIAO Yanxue, DENG Li, REN Zhengwei, WU Mengxin. iDSRformer:Node Load Prediction Model for High-performance Computing Cluster [J]. Computer Science, 2026, 53(7): 251-261.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!