作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2026, Vol. 52 ›› Issue (7): 131-142. doi: 10.19678/j.issn.1000-3428.0070335

• 计算智能与模式识别 • 上一篇    下一篇

融合改进VAE与BiLSTM的无监督时序数据异常检测方法

张春昊1, 解滨2, 张佳豪2   

  1. 1. 中国地质科学院水文地质环境地质研究所, 河北 石家庄 050061;
    2. 河北师范大学计算机与网络空间安全学院, 河北 石家庄 050024
  • 收稿日期:2024-09-06 修回日期:2024-11-11 出版日期:2026-07-15 发布日期:2024-12-26
  • 作者简介:张春昊(CCF学生会员),男,研究实习员、硕士,主研方向为数据挖掘、人工智能数学基础;解滨(通信作者),教授、博士,E-mail:xiebin_hebtu@126.com;张佳豪,硕士研究生。
  • 基金资助:
    国家自然科学基金(62476078);中央科研院所基本科研业务费专项资金(SK202324);河北省中央引导地方科技发展资金项目(236Z0104G)。

Hybrid Method of Improved VAE and BiLSTM for Unsupervised Time Series Anomaly Detection

ZHANG Chunhao1, XIE Bin2, ZHANG Jiahao2   

  1. 1. Institute of Hydrogeology and Environmental Geology, Chinese Academy of Geological Sciences, Shijiazhuang 050061, Hebei, China;
    2. College of Computer and Cyber Security, Hebei Normal University, Shijiazhuang 050024, Hebei, China
  • Received:2024-09-06 Revised:2024-11-11 Online:2026-07-15 Published:2024-12-26

摘要: 时序数据异常检测在金融、医疗、工业监控等领域具有重要意义,然而,传统方法在处理时序数据时常常面临特征提取能力有限、泛化能力差且实时性不佳等挑战,甚至忽视了数据之间的时序关系。为充分考虑数据的时间依赖性,进一步提高时序数据异常检测能力,提出了一种无监督时序数据异常检测方法β-VAE-BiLSTM。首先,在重新设计变分自编码器(VAE)模块网络结构以使其更适用于数据重构异常检测任务的基础上,通过引入超参数β控制证据下界中KL(Kullback-Leibler)散度项的权重,从而增强编码器模块对于潜在空间的解耦性和表达能力,获取更有力的数据潜在表示。然后,采用双向长短期记忆网络(BiLSTM)模块估计潜在表示的长期相关性,捕捉其前向和后向的依赖关系,并对其进行时序预测。最后,对预测结果进行平均融合并重构解码器,从而计算重构误差,通过网格搜索最优阈值来检测时序异常。实验结果表明,该方法在多个公开时序数据集上具有优越的异常检测性能,能够有效提取时间相关的复杂数据特征,实现高效计算和实时异常检测,识别异常点和异常区域,提高了检测精确率和鲁棒性,减少了误报和漏报。

关键词: 异常检测, 时间序列, 自编码器, 长短期记忆网络, 无监督学习

Abstract: Time series anomaly detection is a critical task in the finance, medical treatment, and industrial monitoring fields. However, when handling time series data, traditional methods often face challenges such as limited feature extraction ability, poor generalization ability, and poor real-time performance. These methods may even ignore the temporal relationships between data. To fully consider the temporal dependencies in time series data and further enhance the ability to detect anomalies, this paper proposes an unsupervised time series anomaly detection method called β-VAE-BiLSTM. First, the Variational Autoencoder (VAE) network structure is customized for data reconstruction in anomaly detection. Next, a hyperparameter, β, is introduced to control the weight of the Kullback-Leibler (KL) divergence term in the evidence lower bound, enhancing the encoder module's disentanglement and expressive capabilities in the latent space and obtaining more robust data representations. Then, Bidirectional Long Short-Term Memory (BiLSTM) is used to estimate the long-term correlations of the latent representations, capturing their forward and backward dependencies and performing temporal predictions. Finally, the reconstruction error is calculated by averaging the fusion of the prediction results and the decoder reconstruction. The optimal threshold for anomaly detection is determined through grid search. Experimental results show that the proposed method has superior anomaly detection performance on multiple public time series datasets. It can effectively extract complex temporal data features, achieve efficient computation and real-time anomaly detection, identify anomalous points and regions, improve detection accuracy and robustness, and reduce false positives and false negatives.

Key words: anomaly detection, time series, autoencoder, Long Short-Term Memory (LSTM), unsupervised learning

中图分类号: