Skip to main content
Log in

HAN-CAD: hierarchical attention network for context anomaly detection in multivariate time series

  • Published:
World Wide Web Aims and scope Submit manuscript

Abstract

Anomaly Detection in multivariate time series (MTS) plays an important role in many real-world Web services such as the Web traffic monitoring system. With abundant MTS data, exploiting the relationships among different variables, i.e., inter-variable relationships, is crucial for detecting anomalies. Recent studies have made substantial efforts to promote relationship learning from graph neural network. However, existing methods mostly neglect the distinctive characteristics of inter-variable relationships under different contexts, i.e., dynamics of inter-variable relationships. Therefore, we propose a “Hierarchical Attention Networks for Context Anomaly Detection” (HAN-CAD) model to fully exploit the inter-variable relationships and their dynamics. More concretely, we model each time series segment (context sequence) as a graph, where variables in the sequence are nodes and edges denote correlation patterns among variables. Then, the first graph attention layer is built on this graph to obtain the variable representation, which captures the relationships among different variables. Thereafter, the second attention layer outputs the sequence representation by integrating inter-variable relationships within the current context sequence. Finally, anomalies can be detected based on the reconstruction model, i.e., AutoEncoder. Extensive experiments on real-world datasets demonstrate that the proposed method can effectively detect anomalies in MTS and outperforms recent state-of-the-art methods.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

Data availability

The “ASD” dataset that supports the findings of this study is publicly available in “https://github.com/zhhlee/InterFusion”. And the “SMD” and “’WADI” datasets are available “https://itrust.sutd.edu.sg/itrust-labs_datasets/”.

References

  1. Ahmad, S., Lavin, A., Purdy, S., Agha, Z.: Unsupervised real-time anomaly detection for streaming data. Neurocomputing 262, 134–147 (2017)

    Article  Google Scholar 

  2. Blázquez-García, A., Conde, A., Mori, U., Lozano, J.A.: A review on outlier/anomaly detection in time series data. ACM Comput. Surv. (CSUR) 54(3), 1–33 (2021)

    Article  Google Scholar 

  3. Bontemps, L., Cao, V.L., McDermott, J., Le-Khac, N.-A.: Collective anomaly detection based on long short-term memory recurrent neural networks. In: International Conference on Future Data and Security Engineering, pp. 141–152. Springer (2016)

  4. Canizo, M., Triguero, I., Conde, A., Onieva, E.: Multi-head cnn-rnn for multi-time series anomaly detection: An industrial case study. Neurocomputing 363, 246–260 (2019)

    Article  Google Scholar 

  5. Chandola, V., Banerjee, A., Kumar, V.: Anomaly detection: A survey. ACM Comput. Surv. (CSUR) 41(3), 1–58 (2009)

    Article  Google Scholar 

  6. Chung, J., Gulcehre, C., Cho, K., Bengio, Y.: Empirical evaluation of gated recurrent neural networks on sequence modeling. (2014). arXiv preprint arXiv:1412.3555

  7. Dani, M.-C., Jollois, F.-X., Nadif, M., Freixo, C.: Adaptive threshold for anomaly detection using time series segmentation. In: International Conference on Neural Information Processing, pp. 82–89. Springer (2015)

  8. Deng, A., Hooi, B.: Graph neural network-based anomaly detection in multivariate time series. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol. 35, pp. 4027–4035. (2021)

  9. Evangelou, M., Adams, N.M.: An anomaly detection framework for cyber-security data. Comput. Secur. 97, 101941 (2020)

    Article  Google Scholar 

  10. Gugulothu, N., Malhotra, P., Vig, L., Shroff, G.: Sparse neural networks for anomaly detection in high-dimensional time series. In: AI4IOT Workshop in Conjunction with ICML, IJCAI and ECAI, pp. 1551–3203. (2018)

  11. Hu, M., Feng, X., Ji, Z., Yan, K., Zhou, S.: A novel computational approach for discord search with local recurrence rates in multivariate time series. Inf. Sci. 477, 220–233 (2019)

    Article  Google Scholar 

  12. Huang, L., Zhu, Y., Gao, Y., Liu, T., Chang, C., Liu, C., Tang, Y., Wang, C.-D.: Hybrid-order anomaly detection on attributed networks. IEEE Trans. Knowl. Data Eng. (2021). https://doi.org/10.1109/TKDE.2021.3117842

  13. Hundman, K., Constantinou, V., Laporte, C., Colwell, I., Soderstrom, T.: Detecting spacecraft anomalies using lstms and nonparametric dynamic thresholding. In: Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 387–395. (2018)

  14. Jones, M., Nikovski, D., Imamura, M., Hirata, T.: Exemplar learning for extremely efficient anomaly detection in real-valued time series. Data Min. Knowl. Discov. 30(6), 1427–1454 (2016)

    Article  MathSciNet  Google Scholar 

  15. Kieu, T., Yang, B., Jensen, C.S.: Outlier detection for multidimensional time series using deep neural networks. In: 2018 19th IEEE International Conference on Mobile Data Management (MDM), pp. 125–134. IEEE (2018)

  16. Li, D., Chen, D., Jin, B., Shi, L., Goh, J., Ng, S.-K.: Mad-gan: Multivariate anomaly detection for time series data with generative adversarial networks. In: International Conference on Artificial Neural Networks, pp. 703–716. Springer (2019)

  17. Li, Z., Zhao, Y., Han, J., Su, Y., Jiao, R., Wen, X., Pei, D.: Multivariate time series anomaly detection and interpretation using hierarchical inter-metric and temporal embedding. In: Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pp. 3220–3230. (2021)

  18. Li, S., Pandey, A., Hooi, B., Faloutsos, C., Pileggi, L.: Dynamic graph-based anomaly detection in the electrical grid. IEEE Trans. Power Syst. 37(5), 3408–3422 (2021)

  19. Luo, X., Wu, J., Beheshti, A., Yang, J., Zhang, X., Wang, Y., Xue, S.: Comga: Community-aware attributed graph anomaly detection. In: Proceedings of the Fifteenth ACM International Conference on Web Search and Data Mining, pp. 657–665. (2022)

  20. Ma, X., Wu, J., Xue, S., Yang, J., Zhou, C., Sheng, Q.Z., Xiong, H., Akoglu, L.: A comprehensive survey on graph anomaly detection with deep learning. IEEE Trans. Knowl. Data Eng. 1 (2021). https://doi.org/10.1109/TKDE.2021.3118815

  21. Malhotra, P., Ramakrishnan, A., Anand, G., Vig, L., Agarwal, P., Shroff, G.: Lstm-based encoder-decoder for multi-sensor anomaly detection. (2016). arXiv preprint arXiv:1607.00148

  22. Malhotra, P., Vig, L., Shroff, G., Agarwal, P., et al.: Long short term memory networks for anomaly detection in time series. In: Proceedings, vol. 89, pp. 89–94. (2015)

  23. Nelson, B.K.: Time series analysis using autoregressive integrated moving average (arima) models. Acad. Emerg. Med. 5(7), 739–744 (1998)

    Article  Google Scholar 

  24. Pawar, K., Attar, V.: Deep learning approaches for video-based anomalous activity detection. World Wide Web 22(2), 571–601 (2019)

    Article  Google Scholar 

  25. Sadouk, L.: Cnn approaches for time series classification. Time Ser. Anal.-Data Methods Appl. 5, 1–23 (2018)

  26. Siami-Namini, S., Tavakoli, N., Namin, A.S.: The performance of lstm and bilstm in forecasting time series. In: 2019 IEEE International Conference on Big Data (Big Data), pp. 3285–3292. IEEE (2019)

  27. Su, Y., Zhao, Y., Niu, C., Liu, R., Sun, W., Pei, D.: Robust anomaly detection for multivariate time series through stochastic recurrent neural network. In: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 2828–2837. (2019)

  28. Tuli, S., Casale, G., Jennings, N.R.: Tranad: Deep transformer networks for anomaly detection in multivariate time series data. (2022). arXiv preprint arXiv:2201.07284

  29. Visser, I.: Seven things to remember about hidden markov models: A tutorial on markovian models for time series. J. Math. Psychol. 55(6), 403–415 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  30. Wang, K., Gou, C., Duan, Y., Lin, Y., Zheng, X., Wang, F.-Y.: Generative adversarial networks: introduction and outlook. IEEE/CAA J. Autom. Sin. 4(4), 588–598 (2017)

    Article  MathSciNet  Google Scholar 

  31. Wang, X., Lin, J., Patel, N., Braun, M.: Exact variable-length anomaly detection algorithm for univariate and multivariate time series. Data Min. Knowl. Discov. 32(6), 1806–1844 (2018)

    Article  MathSciNet  MATH  Google Scholar 

  32. Xiang, H., Zhang, X.: Edge computing empowered anomaly detection framework with dynamic insertion and deletion schemes on data streams. World Wide Web 25, 2163–2183 (2022)

  33. Yin, C., Zhang, S., Wang, J., Xiong, N.N.: Anomaly detection based on convolutional recurrent autoencoder for iot time series. IEEE Trans. Syst. Man Cybern. Syst. 52(1), 112–122 (2020)

    Article  Google Scholar 

  34. Zeyer, A., Doetsch, P., Voigtlaender, P., Schlüter, R., Ney, H.: A comprehensive study of deep bidirectional lstm rnns for acoustic modeling in speech recognition. In: 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 2462–2466. IEEE (2017)

  35. Zhang, C., Song, D., Chen, Y., Feng, X., Lumezanu, C., Cheng, W., Ni, J., Zong, B., Chen, H., Chawla, N.V.: A deep neural network for unsupervised anomaly detection and diagnosis in multivariate time series data. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol. 33, pp. 1409–1416. (2019)

  36. Zhao, H., Wang, Y., Duan, J., Huang, C., Cao, D., Tong, Y., Xu, B., Bai, J., Tong, J., Zhang, Q.: Multivariate time-series anomaly detection via graph attention network. In: 2020 IEEE International Conference on Data Mining (ICDM), pp. 841–850. IEEE (2020)

  37. Zhou, Y., Arghandeh, R., Spanos, C.J.: Online learning of contextual hidden markov models for temporal-spatial data analysis. In: 2016 IEEE 55th Conference on Decision and Control (CDC), pp. 6335–6341. IEEE (2016)

  38. Zhou, B., Liu, S., Hooi, B., Cheng, X., Ye, J.: Beatgan: Anomalous rhythm detection using adversarially generated time series. In: IJCAI, pp. 4433–4439. (2019)

  39. Zhou, K., Li, J., Xiao, Y., Yang, J., Cheng, J., Liu, W., Luo, W., Liu, J., Gao, S.: Memorizing structure-texture correspondence for image anomaly detection. IEEE Trans. Neural Netw. Learn. Syst. 33(6), 2335–2349 (2022)

  40. Zong, B., Song, Q., Min, M.R., Cheng, W., Lumezanu, C., Cho, D., Chen, H.: Deep autoencoding gaussian mixture model for unsupervised anomaly detection. In: International Conference on Learning Representations (2018)

Download references

Funding

This research is partially supported by the Key Program of National Natural Science Foundation of China under grant 92046026, in part by the Natural Science Foundation of the Higher Education Institutions of Jiangsu Province under grant 21KJB520034.

Author information

Authors and Affiliations

Authors

Contributions

Haicheng Tao and Jie cao designed the model, drafted the work and wrote the main manuscript text. Jiawei Miao, Haicheng Tao, Lin Zhao and Zhenyu Zhang analysed the data and carried out the experiment. Shuming Feng and Shu Wang contributed to the interpretation of the results. All authors provided critical feedback and helped shape the research, analysis and manuscript.

Corresponding author

Correspondence to Jie Cao.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Tao, H., Miao, J., Zhao, L. et al. HAN-CAD: hierarchical attention network for context anomaly detection in multivariate time series. World Wide Web 26, 2785–2800 (2023). https://doi.org/10.1007/s11280-023-01171-1

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11280-023-01171-1

Keywords

Navigation