Zhengkai Wang , Hui Liu , Longjing Kuang , Xueliang Zhang , Xiude Chen , Junzhao Du
{"title":"基于掩蔽策略和对比学习的时频域时间序列异常检测","authors":"Zhengkai Wang , Hui Liu , Longjing Kuang , Xueliang Zhang , Xiude Chen , Junzhao Du","doi":"10.1016/j.engappai.2025.112775","DOIUrl":null,"url":null,"abstract":"<div><div>Anomalies in time series often indicate underlying issues or system failures. Timely detection is critical to avoid severe consequences like system crashes and traffic accidents. Although some high-performing time series anomaly detection models already exist, several challenges remain: (1) Training Bias: Unsupervised anomaly detection models are typically trained on clean normal data. If the training data contains noise or potential anomalies, it can cause the model parameters to deviate from the ideal state during optimization, hindering accurate anomaly detection. (2) Distribution Shift: Time series exhibit periodicity and trends, and the training and testing data may have different distribution patterns. This may cause the model to incorrectly classify normal data as anomalies during testing. Therefore, we propose an anomaly detection network called TFCLNet, which utilizes a time–frequency domain masking strategy combined with contrastive learning. Since the frequency domain reveals potential periodicity and frequency variations, a dual-branch structure is adopted to simultaneously process time-domain and frequency-domain features. Additionally, we employ targeted masking strategies in both domains to reduce the impact of noise and address training bias, thereby learning the core data patterns of time series. Furthermore, unlike traditional contrastive learning strategies based on raw features, we minimize the distribution differences between the reconstructed time–frequency domain features through a contrastive objective function, mitigating the negative impact of distribution shifts in the original data on detection performance. Finally, adversarial training is incorporated to prevent overfitting. Experimental results on five real-world datasets demonstrate that TFCLNet outperforms all baseline models and achieves state-of-the-art performance.</div></div>","PeriodicalId":50523,"journal":{"name":"Engineering Applications of Artificial Intelligence","volume":"162 ","pages":"112775"},"PeriodicalIF":8.0000,"publicationDate":"2025-10-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Time series anomaly detection based on time–frequency domain with masking strategy and contrastive learning\",\"authors\":\"Zhengkai Wang , Hui Liu , Longjing Kuang , Xueliang Zhang , Xiude Chen , Junzhao Du\",\"doi\":\"10.1016/j.engappai.2025.112775\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>Anomalies in time series often indicate underlying issues or system failures. Timely detection is critical to avoid severe consequences like system crashes and traffic accidents. Although some high-performing time series anomaly detection models already exist, several challenges remain: (1) Training Bias: Unsupervised anomaly detection models are typically trained on clean normal data. If the training data contains noise or potential anomalies, it can cause the model parameters to deviate from the ideal state during optimization, hindering accurate anomaly detection. (2) Distribution Shift: Time series exhibit periodicity and trends, and the training and testing data may have different distribution patterns. This may cause the model to incorrectly classify normal data as anomalies during testing. Therefore, we propose an anomaly detection network called TFCLNet, which utilizes a time–frequency domain masking strategy combined with contrastive learning. Since the frequency domain reveals potential periodicity and frequency variations, a dual-branch structure is adopted to simultaneously process time-domain and frequency-domain features. Additionally, we employ targeted masking strategies in both domains to reduce the impact of noise and address training bias, thereby learning the core data patterns of time series. Furthermore, unlike traditional contrastive learning strategies based on raw features, we minimize the distribution differences between the reconstructed time–frequency domain features through a contrastive objective function, mitigating the negative impact of distribution shifts in the original data on detection performance. Finally, adversarial training is incorporated to prevent overfitting. Experimental results on five real-world datasets demonstrate that TFCLNet outperforms all baseline models and achieves state-of-the-art performance.</div></div>\",\"PeriodicalId\":50523,\"journal\":{\"name\":\"Engineering Applications of Artificial Intelligence\",\"volume\":\"162 \",\"pages\":\"112775\"},\"PeriodicalIF\":8.0000,\"publicationDate\":\"2025-10-20\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Engineering Applications of Artificial Intelligence\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0952197625028064\",\"RegionNum\":2,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"AUTOMATION & CONTROL SYSTEMS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Engineering Applications of Artificial Intelligence","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0952197625028064","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AUTOMATION & CONTROL SYSTEMS","Score":null,"Total":0}
Time series anomaly detection based on time–frequency domain with masking strategy and contrastive learning
Anomalies in time series often indicate underlying issues or system failures. Timely detection is critical to avoid severe consequences like system crashes and traffic accidents. Although some high-performing time series anomaly detection models already exist, several challenges remain: (1) Training Bias: Unsupervised anomaly detection models are typically trained on clean normal data. If the training data contains noise or potential anomalies, it can cause the model parameters to deviate from the ideal state during optimization, hindering accurate anomaly detection. (2) Distribution Shift: Time series exhibit periodicity and trends, and the training and testing data may have different distribution patterns. This may cause the model to incorrectly classify normal data as anomalies during testing. Therefore, we propose an anomaly detection network called TFCLNet, which utilizes a time–frequency domain masking strategy combined with contrastive learning. Since the frequency domain reveals potential periodicity and frequency variations, a dual-branch structure is adopted to simultaneously process time-domain and frequency-domain features. Additionally, we employ targeted masking strategies in both domains to reduce the impact of noise and address training bias, thereby learning the core data patterns of time series. Furthermore, unlike traditional contrastive learning strategies based on raw features, we minimize the distribution differences between the reconstructed time–frequency domain features through a contrastive objective function, mitigating the negative impact of distribution shifts in the original data on detection performance. Finally, adversarial training is incorporated to prevent overfitting. Experimental results on five real-world datasets demonstrate that TFCLNet outperforms all baseline models and achieves state-of-the-art performance.
期刊介绍:
Artificial Intelligence (AI) is pivotal in driving the fourth industrial revolution, witnessing remarkable advancements across various machine learning methodologies. AI techniques have become indispensable tools for practicing engineers, enabling them to tackle previously insurmountable challenges. Engineering Applications of Artificial Intelligence serves as a global platform for the swift dissemination of research elucidating the practical application of AI methods across all engineering disciplines. Submitted papers are expected to present novel aspects of AI utilized in real-world engineering applications, validated using publicly available datasets to ensure the replicability of research outcomes. Join us in exploring the transformative potential of AI in engineering.