Graph-Level Anomaly Detection via Hierarchical Memory Networks

  • Conference paper
  • First Online:
Machine Learning and Knowledge Discovery in Databases: Research Track (ECML PKDD 2023)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 14169))

Abstract

Graph-level anomaly detection aims to identify abnormal graphs that exhibit deviant structures and node attributes compared to the majority in a graph set. One primary challenge is to learn normal patterns manifested in both fine-grained and holistic views of graphs for identifying graphs that are abnormal in part or in whole. To tackle this challenge, we propose a novel approach called Hierarchical Memory Networks (HimNet), which learns hierarchical memory modules—node and graph memory modules—via a graph autoencoder network architecture. The node-level memory module is trained to model fine-grained, internal graph interactions among nodes for detecting locally abnormal graphs, while the graph-level memory module is dedicated to the learning of holistic normal patterns for detecting globally abnormal graphs. The two modules are jointly optimized to detect both locally- and globally-anomalous graphs. Extensive empirical results on 16 real-world graph datasets from various domains show that i) HimNet significantly outperforms the state-of-art methods and ii) it is robust to anomaly contamination. Codes are available at: https://github.com/Niuchx/HimNet.

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

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (Brazil)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (Brazil)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (Brazil)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    All the graph datasets are available on https://chrsmrrs.github.io/datasets/docs/datasets/ except hERG which is obtained from https://tdcommons.ai/single_pred_tasks/tox/.

References

  1. Aggarwal, C.C., Wang, H.: Graph data management and mining: a survey of algorithms and applications. In: Managing and Mining Graph Data, pp. 13–68. Springer, Boston (2010). https://doi.org/10.1007/978-1-4419-6045-0_2

  2. Akoglu, L., Tong, H., Koutra, D.: Graph based anomaly detection and description: a survey. Data Mining Knowl. Discov. 29, 626–688 (2015)

    Article  MathSciNet  Google Scholar 

  3. Bengio, Y., Lamblin, P., Popovici, D., Larochelle, H.: Greedy layer-wise training of deep networks. Adv. Neural Inf. Process. Syst. 19 (2006)

    Google Scholar 

  4. Breunig, M.M., Kriegel, H.P., Ng, R.T., Sander, J.: Lof: identifying density-based local outliers. In: Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, pp. 93–104 (2000)

    Google Scholar 

  5. Campos, G.O., et al.: On the evaluation of unsupervised outlier detection: measures, datasets, and an empirical study. Data Mining Knowl. Discov. 30, 891–927 (2016)

    Google Scholar 

  6. Chen, J., Sathe, S., Aggarwal, C., Turaga, D.: Outlier detection with autoencoder ensembles. In: Proceedings of the 2017 SIAM International Conference on Data Mining, pp. 90–98. SIAM (2017)

    Google Scholar 

  7. Ding, K., Li, J., Agarwal, N., Liu, H.: Inductive anomaly detection on attributed networks. In: Proceedings of the Twenty-Ninth International Conference on International Joint Conferences on Artificial Intelligence, pp. 1288–1294 (2021)

    Google Scholar 

  8. Gong, D., et al.: Memorizing normality to detect anomaly: memory-augmented deep autoencoder for unsupervised anomaly detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 1705–1714 (2019)

    Google Scholar 

  9. **, M., Liu, Y., Zheng, Y., Chi, L., Li, Y.F., Pan, S.: Anemone: graph anomaly detection with multi-scale contrastive learning. In: Proceedings of the 30th ACM International Conference on Information & Knowledge Management, pp. 3122–3126 (2021)

    Google Scholar 

  10. Kim, Y., Kim, M., Kim, G.: Memorization precedes generation: learning unsupervised GANs with memory networks. In: International Conference on Learning Representations (2018)

    Google Scholar 

  11. Kingma, D.P., Welling, M.: Auto-encoding variational bayes. ar**v preprint ar**v:1312.6114 (2013)

  12. Kipf, T.N., Welling, M.: Variational graph auto-encoders. ar**v preprint ar**v:1611.07308 (2016)

  13. Kipf, T.N., Welling, M.: Semi-supervised classification with graph convolutional networks. In: International Conference on Learning Representations (2017)

    Google Scholar 

  14. Kumagai, A., Iwata, T., Fujiwara, Y.: Semi-supervised anomaly detection on attributed graphs. In: 2021 International Joint Conference on Neural Networks (IJCNN), pp. 1–8. IEEE (2021)

    Google Scholar 

  15. Lee, C.Y., Chen, Y.P.P.: Descriptive prediction of drug side-effects using a hybrid deep learning model. Int. J. Intell. Syst. 36(6), 2491–2510 (2021)

    Article  MathSciNet  Google Scholar 

  16. Li, C., Zhu, J., Zhang, B.: Learning to generate with memory. In: International Conference on Machine Learning, pp. 1177–1186. PMLR (2016)

    Google Scholar 

  17. Liu, F.T., Ting, K.M., Zhou, Z.H.: Isolation forest. In: 2008 Eighth IEEE International Conference on Data Mining, pp. 413–422. IEEE (2008)

    Google Scholar 

  18. Liu, Y., Ding, K., Liu, H., Pan, S.: Good-d: on unsupervised graph out-of-distribution detection. In: Proceedings of the Sixteenth ACM International Conference on Web Search and Data Mining, pp. 339–347 (2023)

    Google Scholar 

  19. Liu, Y., Li, Z., Pan, S., Gong, C., Zhou, C., Karypis, G.: Anomaly detection on attributed networks via contrastive self-supervised learning. IEEE Trans. Neural Netw. Learn. Syst. 33(6), 2378–2392 (2021)

    Article  MathSciNet  Google Scholar 

  20. Luo, X., et al.: Deep graph level anomaly detection with contrastive learning. Sci. Rep. 12(1), 19867 (2022)

    Google Scholar 

  21. Ma, R., Pang, G., Chen, L., van den Hengel, A.: Deep graph-level anomaly detection by glocal knowledge distillation. In: The Fifteenth ACM International Conference on Web Search and Data Mining (WSDM 2022) (2022)

    Google Scholar 

  22. Narayanan, A., Chandramohan, M., Venkatesan, R., Chen, L., Liu, Y., Jaiswal, S.: graph2vec: learning distributed representations of graphs. ar**v preprint ar**v:1707.05005 (2017)

  23. Neumann, M., Garnett, R., Bauckhage, C., Kersting, K.: Propagation kernels: efficient graph kernels from propagated information. Mach. Learn. 102, 209–245 (2016)

    Article  MathSciNet  MATH  Google Scholar 

  24. Pang, G., Shen, C., Cao, L., Hengel, A.V.D.: Deep learning for anomaly detection: a review. ACM Comput. Surv. 54(2), 1–38 (2021)

    Article  Google Scholar 

  25. Pang, G., Shen, C., van den Hengel, A.: Deep anomaly detection with deviation networks. In: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 353–362 (2019)

    Google Scholar 

  26. Pang, G., Ting, K.M., Albrecht, D.: Lesinn: detecting anomalies by identifying least similar nearest neighbours. In: 2015 IEEE International Conference on Data Mining Workshop (ICDMW), pp. 623–630. IEEE (2015)

    Google Scholar 

  27. Park, H., Noh, J., Ham, B.: Learning memory-guided normality for anomaly detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14372–14381 (2020)

    Google Scholar 

  28. Qiao, H., Pang, G.: Truncated affinity maximization: one-class homophily modeling for graph anomaly detection. ar**v preprint ar**v:2306.00006 (2023)

  29. Qiu, C., Kloft, M., Mandt, S., Rudolph, M.: Raising the bar in graph-level anomaly detection. ar**v preprint ar**v:2205.13845 (2022)

  30. Ruff, L., et al.: Deep one-class classification. In: International Conference on Machine Learning, pp. 4393–4402. PMLR (2018)

    Google Scholar 

  31. Schölkopf, B., Williamson, R.C., Smola, A., Shawe-Taylor, J., Platt, J.: Support vector method for novelty detection. Adv. Neural Inf. Process. Syst. 12 (1999)

    Google Scholar 

  32. Shervashidze, N., Schweitzer, P., Van Leeuwen, E.J., Mehlhorn, K., Borgwardt, K.M.: Weisfeiler-lehman graph kernels. J. Mach. Learn. Res. 12(9) (2011)

    Google Scholar 

  33. Sun, F.Y., Hoffman, J., Verma, V., Tang, J.: Infograph: unsupervised and semi-supervised graph-level representation learning via mutual information maximization. In: International Conference on Learning Representations (2020)

    Google Scholar 

  34. Veličković, P., Cucurull, G., Casanova, A., Romero, A., Lió, P., Bengio, Y.: Graph attention networks. In: International Conference on Learning Representations (2018)

    Google Scholar 

  35. Wang, Q., Pang, G., Salehi, M., Buntine, W., Leckie, C.: Cross-domain graph anomaly detection via anomaly-aware contrastive alignment. ar**v preprint ar**v:2212.01096 (2022)

  36. Weston, J., Chopra, S., Bordes, A.: Memory networks. In: International Conference on Learning Representations (2015)

    Google Scholar 

  37. Woolson, R.F.: Wilcoxon signed-rank test. In: Wiley Encyclopedia of Clinical Trials, pp. 1–3 (2007)

    Google Scholar 

  38. Wu, Z., **ong, Y., Yu, S.X., Lin, D.: Unsupervised feature learning via non-parametric instance discrimination. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3733–3742 (2018)

    Google Scholar 

  39. Wu, Z., Pan, S., Chen, F., Long, G., Zhang, C., Philip, S.Y.: A comprehensive survey on graph neural networks. IEEE Trans. Neural Netw. Learn. Syst. 32(1), 4–24 (2020)

    Article  MathSciNet  Google Scholar 

  40. Xu, K., Hu, W., Leskovec, J., Jegelka, S.: How powerful are graph neural networks? In: International Conference on Learning Representations (2019)

    Google Scholar 

  41. Zhai, S., Cheng, Y., Lu, W., Zhang, Z.: Deep structured energy based models for anomaly detection. In: International Conference on Machine Learning, pp. 1100–1109. PMLR (2016)

    Google Scholar 

  42. Zhang, M., Chen, Y.: Link prediction based on graph neural networks. Adv. Neural Inf. Process. Syst. 31 (2018)

    Google Scholar 

  43. Zhang, M., Cui, Z., Neumann, M., Chen, Y.: An end-to-end deep learning architecture for graph classification. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol. 32 (2018)

    Google Scholar 

  44. Zhang, Z., Cui, P., Zhu, W.: Deep learning on graphs: a survey. IEEE Trans. Knowl. Data Eng. 34(1), 249–270 (2020)

    Article  Google Scholar 

  45. Zhao, L., Akoglu, L.: On using classification datasets to evaluate graph outlier detection: peculiar observations and new insights. Big Data (2021)

    Google Scholar 

  46. Zhou, C., Paffenroth, R.C.: Anomaly detection with robust deep autoencoders. In: Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 665–674 (2017)

    Google Scholar 

  47. Zong, B., et al.: Deep autoencoding gaussian mixture model for unsupervised anomaly detection. In: International Conference on Learning Representations (2018)

    Google Scholar 

Download references

Acknowledgment

This work is partially supported by Australian Research Council under Grant DP210101347.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Guansong Pang .

Editor information

Editors and Affiliations

Ethics declarations

Ethical Statement

In this work, we study the problem of graph-level anomaly detection which aims to identify abnormal graphs that exhibit unusual patterns in comparison to the majority in a graph set. Since graphs are widely used in various domains, anomaly detection on graphs has broad applications, such as identifying toxic molecules from chemical compound graphs and recognizing abnormal internet activity graphs. To capture the hierarchical normal patterns of graph data, we propose hierarchical memory networks to learn node and graph memory modules. The proposed method enables the detection of both locally and globally anomalous graphs. For all the used data sets in this paper, there is no private personally identifiable information or offensive content. However, when using the proposed method for solving realistic problems, it is essential to ensure that appropriate measures are taken to protect the privacy of individuals. This may include anonymizing data, limiting access to sensitive information, or obtaining informed consent from individuals before collecting their data.

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Niu, C., Pang, G., Chen, L. (2023). Graph-Level Anomaly Detection via Hierarchical Memory Networks. In: Koutra, D., Plant, C., Gomez Rodriguez, M., Baralis, E., Bonchi, F. (eds) Machine Learning and Knowledge Discovery in Databases: Research Track. ECML PKDD 2023. Lecture Notes in Computer Science(), vol 14169. Springer, Cham. https://doi.org/10.1007/978-3-031-43412-9_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-43412-9_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-43411-2

  • Online ISBN: 978-3-031-43412-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics

Navigation