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

Computer Engineering & Science ›› 2026, Vol. 48 ›› Issue (5): 914-924.doi: 10.3969/j.issn.1007-130X.2026.05.015

• Artificial Intelligence and Data Mining • Previous Articles     Next Articles

Time series anomaly detection based on variational Transformer

XUE Anrong,CHEN Jie   

  1. (School of Computer Science and Communication Engineering,Jiangsu University,Zhenjiang  212013,China)
  • Received:2024-03-27 Revised:2024-09-30 Online:2026-05-25 Published:2026-05-21

Abstract: Time series anomaly detection can identify anomalies in monitoring systems, allowing for timely measures to reduce failures and ensure system security. However, existing time series anomaly detection models struggle to effectively handle the nonlinear associations between time series data. To address this issue, a dual-branch learning model based on variational Transformer and Gaussian kernel is proposed, which constructs sequence associations and local associations separately. The difference metric between reconstruction errors and the two associations is used as the anomaly score, and the k-means algorithm is employed to automatically determine the anomaly threshold. Additionally, the position encoding in the Transformer is calibrated to reduce reconstruction errors. Comparative experimental results against nine baseline models on five public datasets  indicate on various datasets, which the proposed model outperforms baseline models in most cases and is the only model that achieves an F1 -score exceeding 90% across all five datasets, with an average F1 -score on various datasets, which is 2.27 percentage points higher than that of the best baseline model. This indicates that the proposed model has significant advantages in correctness and can effectively improve the reliability and precision of time series anomaly detection.


Key words: anomaly detection, multi-dimensional time series analysis, Transformer model, Gaussian kernel function, variational auto-encoder