• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2024, Vol. 46 ›› Issue (05): 826-835.

• 计算机网络与信息安全 • 上一篇    下一篇

基于双层注意力和深度自编码器的时间序列异常检测模型

尹春勇,赵峰   

  1. (南京信息工程大学计算机学院、网络空间安全学院,江苏 南京 210044)

  • 收稿日期:2023-04-03 修回日期:2023-07-23 接受日期:2024-05-25 出版日期:2024-05-25 发布日期:2024-05-30

An anomaly detection model of time series based on dual attention and deep autoencoder

YIN Chun-yong,ZHAO Feng   

  1. (School of Computer Science,School of Cyber Science and Engineering,
    Nanjing University of Information Science & Technology,Nanjing 210044,China)
  • Received:2023-04-03 Revised:2023-07-23 Accepted:2024-05-25 Online:2024-05-25 Published:2024-05-30

摘要: 目前时间序列通常具有弱周期性以及高度复杂的相关性特征,传统的时间序列异常检测方法难以检测此类异常。针对这一问题,提出了一种新的无监督时间序列异常检测模型(DA-CBG-AE)。首先,使用新型滑动窗口方法,针对时间序列周期性设置滑动窗口大小;其次,采用卷积神经网络提取时间序列高维度空间特征;然后,提出具有堆叠式Dropout双向门循环单元网络作为自编码器的基本结构,从而捕捉时间序列的相关性特征;最后,引入双层注意力机制,进一步提取特征,选择更加关键的时间序列,从而提高异常检测准确率。为了验证该模型的有效性,将DA-CBG-AE与6种基准模型在8个数据集上进行比较。最终的实验结果表明,DA-CBG-AE获得了最优的F1值(0.863),并且其检测性能相比最新的基准模型Tad-GAN高出25.25%。

关键词: 异常检测, 双层注意力机制, 自编码器, 卷积神经网络, 双向门循环单元

Abstract: Currently, time series data often exhibit weak periodicity and highly complex correlation features, making it challenging for traditional time series anomaly detection methods to detect such anomalies. To address this issue, a novel unsupervised time series anomaly detection model (DA-CBG-AE) is proposed. Firstly, a novel sliding window approach is used to set the window size for time series periodicity. Secondly, convolutional neural networks are employed to extract high-dimensional spatial features from the time series. Then, a bidirectional gated recurrent unit network with stacked Dropout is proposed as the basic architecture of the autoencoder to capture the correlation features of the time series. Finally, a dual-layer attention mechanism is introduced to further extract features and select more critical time series, thereby improving the accuracy of anomaly detection. To validate the effectiveness of the model, DA-CBG-AE is compared with six benchmark models on eight datasets. The experimental results show that DA-CBG-AE achieves the optimal F1 value (0.863) and outperforms the latest benchmark model Tad-GAN by 25.25% in terms of detection performance.


Key words: anomaly detection, dual-layer attention mechanism, autoencoder, convolutional neural networks, bidirectional-gated recurrent unit ,