Enhanced Graph Autoencoder for Graph Anomaly Detection Using Subgraph Information
Abstract
1. Introduction
2. Backgrounds
2.1. Graph Neural Networks
2.2. Graph Anomaly Detection
2.3. Graph Structure Learning
3. Proposed Method
3.1. Problem Definition
3.2. Overall Model Framework
- (1)
- The subgraph preprocessing stage, which extracts k-hop subgraphs for each node in the graph to generate enhanced embeddings and the node–subgraph similarity matrix seamlessly.
- (2)
- The attributed network encoding stage, where two graph encoders (GCNs) are utilized, one with the original adjacency matrix and one with the node–subgraph similarity matrix, to encode the enhanced node embeddings generated in stage (1) for parallel representation learning. Then, the two encoded embeddings are concatenated together and passed through a fully connected layer to obtain the final hidden embeddings.
- (3)
- The attribute and structure decoding stage, where dedicated GCNs reconstruct the original node attributes with the learned node embeddings, together with a simple graph structure learning layer that reconstructs the graph topology from the learned hidden node embeddings.
- (4)
- The anomaly scoring stage, which, after training, utilizes node neighborhood selection to optimize the reconstructed adjacency matrix, assigns anomaly scores to nodes in the graph based on the combined reconstruction errors, and ranks them accordingly.
3.3. Subgraph Preprocessing Stage
3.4. Attributed Network Encoding Stage
3.5. Attribute and Structure Decoding Stage
3.6. Anomaly Scoring
4. Experiments
4.1. Datasets
4.2. Baselines
- -
- DOMINANT [24]: This is an unsupervised anomaly detection framework that relies on graph autoencoders to learn representations and seamlessly reconstruct node attributes and graph topology. The model evaluates anomalies through the sum of both attribute reconstruction error and structure reconstruction error.
- -
- CoLA [26]: This model extracts node–subgraph pairs to train a GNN-based contrastive learning model for the purposes of representation learning and anomaly detection.
- -
- ComGA [1]: This is a graph autoencoder-based anomaly detector that incorporates an additional deep neural network to learn the modularity matrix and capture community structures within graphs.
- -
- ANEMONE [27]: This multi-scale contrastive learning model captures anomalies through patch-level and context-level contrast aspects.
- -
4.3. Experimental Settings and Evaluation Metrics
4.4. Result Analysis
4.5. Parameter Sensitivity
4.5.1. Effect of Balancing Parameter
4.5.2. Effect of the Pooling Method Used
4.5.3. Effect of Embedding Dimension
4.6. Ablation Study
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- 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, Tempe, AZ, USA, 21–25 February 2022; pp. 657–665. [Google Scholar]
- Fan, W.; Ma, Y.; Li, Q.; He, Y.; Zhao, E.; Tang, J.; Yin, D. Graph neural networks for social recommendation. In Proceedings of the World Wide Web Conference (WWW ‘19), San Francisco, CA, USA, 13–17 May 2019; pp. 417–426. [Google Scholar]
- Xiong, J.; Xiong, Z.; Chen, K.; Jiang, H.; Zheng, M. Graph neural networks for automated de novo drug design. Drug Discov. Today 2021, 26, 1382–1393. [Google Scholar] [CrossRef] [PubMed]
- Wu, Z.; Pan, S.; Long, G.; Jiang, J.; Chang, X.; Zhang, C. Connecting the dots: Multivariate time series forecasting with graph neural networks. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Virtual Event, 6–10 July 2020; pp. 753–763. [Google Scholar]
- Bruna, J.; Zaremba, W.; Szlam, A.; LeCun, Y. Spectral networks and locally connected networks on graphs. arXiv 2013, arXiv:1312.6203. [Google Scholar]
- Niepert, M.; Ahmed, M.; Kutzkov, K. Learning convolutional neural networks for graphs. In Proceedings of the International Conference on Machine Learning, New York, NY, USA, 19–24 June 2016; pp. 2014–2023. [Google Scholar]
- Welling, M.; Kipf, T.N. Semi-supervised classification with graph convolutional networks. In Proceedings of the 5th International Conference on Learning Representations, ICLR, Toulon, France, 24–26 April 2017. [Google Scholar]
- Veličković, P.; Cucurull, G.; Casanova, A.; Romero, A.; Liò, P.; Bengio, Y. Graph Attention Networks. In Proceedings of the 6th International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Hamilton, W.; Ying, Z.; Leskovec, J. Inductive representation learning on large graphs. In Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS’17), Long Beach, CA, USA, 4–9 December 2017; pp. 1025–1035. [Google Scholar]
- Xu, K.; Hu, W.; Leskovec, J.; Jegelka, S. How powerful are graph neural networks? In Proceedings of the International Conference on Learning Representations, New Orleans, LA, USA, 6–9 May 2019. [Google Scholar]
- Kipf, T.N.; Welling, M. Variational graph auto-encoders. arXiv 2016, arXiv:1611.07308. [Google Scholar]
- Dou, Y.; Liu, Z.; Sun, L.; Deng, Y.; Peng, H.; Yu, P.S. Enhancing graph neural network-based fraud detectors against camouflaged fraudsters. In Proceedings of the 29th ACM International Conference on Information & Knowledge Management, Virtual Event, 19–23 October 2020; pp. 315–324. [Google Scholar]
- Bian, T.; Xiao, X.; Xu, T.; Zhao, P.; Huang, W.; Rong, Y.; Huang, J. Rumor detection on social media with bi-directional graph convolutional networks. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020; Volume 34, pp. 549–556. [Google Scholar]
- Liu, Y.; Ao, X.; Qin, Z.; Chi, J.; Feng, J.; Yang, H.; He, Q. Pick and choose: A GNN-based imbalanced learning approach for fraud detection. In Proceedings of the Web Conference 2021, Virtual Event/Ljubljana, Slovenia, 19–23 April 2021; pp. 3168–3177. [Google Scholar]
- Yang, Y.; Yang, R.; Li, Y.; Cui, K.; Yang, Z.; Wang, Y.; Xu, J.; Xie, H. RoSGAS: Adaptive social bot detection with reinforced self-supervised GNN architecture search. ACM Trans. Web 2023, 17, 1–31. [Google Scholar] [CrossRef]
- Alsughayyir, B.; Qamar, A.M.; Khan, R. Developing a network attack detection system using deep learning. In Proceedings of the 2019 International Conference on Computer and Information Sciences (ICCIS), Beijing, China, 17–19 June 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 1–5. [Google Scholar]
- Ma, S.H.; Wang, J.K.; Liu, Z.G.; Jiang, H.Y. Density-based distributed elliptical anomaly detection in wireless sensor networks. Appl. Mech. Mater. 2013, 249, 226–230. [Google Scholar] [CrossRef]
- Budalakoti, S.; Srivastava, A.N.; Akella, R.; Turkov, E. Anomaly detection in large sets of high-dimensional symbol sequences. In Proceedings of the 2006 SLAM International Conference on Data Mining, Las Vegas, NV, USA, 26–29 June 2006. No. NASA/TM-2006-214553. [Google Scholar]
- Schölkopf, B.; Platt, J.C.; Shawe-Taylor, J.; Smola, A.J.; Williamson, R.C. Estimating the support of a high-dimensional distribution. Neural Comput. 2001, 13, 1443–1471. [Google Scholar] [CrossRef] [PubMed]
- Zhang, J.; Wang, H. Detecting outlying subspaces for high-dimensional data: The new task, algorithms, and performance. Knowl. Inf. Syst. 2006, 10, 333–355. [Google Scholar] [CrossRef]
- Peng, Z.; Luo, M.; Li, J.; Liu, H.; Zheng, Q. ANOMALOUS: A Joint Modeling Approach for Anomaly Detection on Attributed Networks. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence (IJCAI), Stockholm, Sweden, 13–19 July 2018; pp. 3513–3519. [Google Scholar]
- Li, J.; Dani, H.; Hu, X.; Liu, H. Radar: Residual analysis for anomaly detection in attributed networks. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence (IJCAI), Melbourne, Australia, 19–25 August 2017; Volume 17, pp. 2152–2158. [Google Scholar]
- Pei, Y.; Huang, T.; van Ipenburg, W.; Pechenizkiy, M. ResGCN: Attention-based deep residual modeling for anomaly detection on attributed networks. In Proceedings of the 2021 IEEE 8th International Conference on Data Science and Advanced Analytics (DSAA), Porto, Portugal, 6–9 October 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 1–2. [Google Scholar]
- Ding, K.; Li, J.; Bhanushali, R.; Liu, H. Deep anomaly detection on attributed networks. In Proceedings of the 2019 SIAM International Conference on Data Mining, Calgary, AB, Canada, 2–4 May 2019; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 2019; pp. 594–602. [Google Scholar]
- Fan, H.; Zhang, F.; Li, Z. Anomalydae: Dual autoencoder for anomaly detection on attributed networks. In Proceedings of the ICASSP 2020—2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain, 4–8 May 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 5685–5689. [Google Scholar]
- 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. 2021, 33, 2378–2392. [Google Scholar] [CrossRef] [PubMed]
- Jin, 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, Gold Coast, QLD, Australia, 1–5 October 2021; pp. 3122–3126. [Google Scholar]
- Wang, X.; Jin, B.; Du, Y.; Cui, P.; Tan, Y.; Yang, Y. One-class graph neural networks for anomaly detection in attributed networks. Neural Comput. Appl. 2021, 33, 12073–12085. [Google Scholar] [CrossRef]
- Zhou, S.; Tan, Q.; Xu, Z.; Huang, X.; Chung, F.L. Subtractive aggregation for attributed network anomaly detection. In Proceedings of the 30th ACM International Conference on Information & Knowledge Management, Gold Coast, QLD, Australia, 1–5 October 2021; pp. 3672–3676. [Google Scholar]
- Zhu, Y.; Xu, W.; Zhang, J.; Du, Y.; Zhang, J.; Liu, Q.; Yang, C.; Wu, S. A survey on graph structure learning: Progress and opportunities. arXiv 2021, arXiv:2103.03036. [Google Scholar]
- Fox, J.; Rajamanickam, S. How robust are graph neural networks to structural noise? arXiv 2019, arXiv:1912.10206. [Google Scholar]
- Dai, E.; Jin, W.; Liu, H.; Wang, S. Towards robust graph neural networks for noisy graphs with sparse labels. In Proceedings of the Fifteenth ACM International Conference on Web Search and Data Mining, Virtual Event, 21–25 February 2022; pp. 181–191. [Google Scholar]
- Deng, A.; Hooi, B. Graph neural network-based anomaly detection in multivariate time series. Proc. AAAI Conf. Artif. Intell. 2021, 35, 4027–4035. [Google Scholar] [CrossRef]
- Chen, Y.; Wu, L.; Zaki, M. Iterative deep graph learning for graph neural networks: Better and robust node embeddings. Adv. Neural Inf. Process. Syst. 2020, 33, 19314–19326. [Google Scholar]
- Shang, C.; Chen, J.; Bi, J. Discrete graph structure learning for forecasting multiple time series. In Proceedings of the International Conference on Learning Representations, Vienna, Austria, 3–7 May 2021. [Google Scholar]
- Zhuang, Z.; Ting, K.M.; Pang, G.; Song, S. Subgraph Centralization: A Necessary Step for Graph Anomaly Detection. In Proceedings of the 2023 SIAM International Conference on Data Mining (SDM), St. Paul Twin Cities, MN, USA, 27–29 April 2023; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 2023; pp. 703–711. [Google Scholar]
- Zhang, M.; Li, P. Nested graph neural networks. Adv. Neural Inf. Process. Syst. 2021, 34, 15734–15747. [Google Scholar]
- Alsentzer, E.; Finlayson, S.; Li, M.; Zitnik, M. Subgraph neural networks. Adv. Neural Inf. Process. Syst. 2020, 33, 8017–8029. [Google Scholar]
- Alvarez-Gonzalez, N.; Kaltenbrunner, A.; Gómez, V. Beyond 1-WL with Local Ego-Network Encodings (Extended Abstract). In Proceedings of the First Learning on Graphs Conference (LoG 2022), Virtual Event, 9–12 December 2022. [Google Scholar]
- Pan, C.H.; Qu, Y.; Yao, Y.; Wang, M.J.S. HybridGNN: A Self-Supervised Graph Neural Network for Efficient Maximum Matching in Bipartite Graphs. Symmetry 2024, 16, 1631. [Google Scholar] [CrossRef]
- Togninalli, M.; Ghisu, E.; Llinares-López, F.; Rieck, B.; Borgwardt, K. Wasserstein weisfeiler-lehman graph kernels. In Proceedings of the 32nd Annual Conference on Neural Information Processing Systems (NeurIPS 2019), Vancouver, BC, Canada, 8–14 December 2019. [Google Scholar]
- Li, G.; Muller, M.; Thabet, A.; Ghanem, B. Deepgcns: Can GCNs go as deep as CNNs? In Proceedings of the IEEE International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 9267–9276. [Google Scholar]
- Hassani, K.; Khasahmadi, A.H. Contrastive multi-view representation learning on graphs. In Proceedings of the International Conference on Machine Learning, Virtual Event, 13–18 July 2020; pp. 4116–4126. [Google Scholar]
- Jin, W.; Derr, T.; Wang, Y.; Ma, Y.; Liu, Z.; Tang, J. Node similarity preserving graph convolutional networks. In Proceedings of the 14th ACM International Conference on Web Search and Data Mining, Virtual Event, 8–12 March 2021; pp. 148–156. [Google Scholar]
- Sen, P.; Namata, G.; Bilgic, M.; Getoor, L.; Galligher, B.; Eliassi-Rad, T. Collective classification in network data. AI Mag. 2008, 29, 93–106. [Google Scholar] [CrossRef]
- Tang, L.; Liu, H. Relational learning via latent social dimensions. In Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Paris, France, 28 June–1 July 2009; pp. 817–826. [Google Scholar]
- Tang, J.; Zhang, J.; Yao, L.; Li, J.; Zhang, L.; Su, Z. Arnetminer: Extraction and mining of academic social networks. In Proceedings of the 14th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Las Vegas, NV, USA, 24–27 August 2008; pp. 990–998. [Google Scholar]
- Ting, K.M.; Xu, B.C.; Washio, T.; Zhou, Z.H. Isolation distributional kernel: A new tool for kernel based anomaly detection. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Virtual Event, 6–10 August 2020; pp. 198–206. [Google Scholar]
- Xu, Z.; Huang, X.; Zhao, Y.; Dong, Y.; Li, J. Contrastive attributed network anomaly detection with data augmentation. In Pacific-Asia Conference on Knowledge Discovery and Data Mining; Springer International Publishing: Cham, Switzerland, 2022; pp. 444–457. [Google Scholar]
- Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. In Proceedings of the 3rd International Conference for Learning Representations—ICLR 2015, San Diego, CA, USA, 7–9 May 2015. [Google Scholar]




| Notation | Description |
|---|---|
| n | Number of nodes in the graph. |
| d | Attribute dimension. |
| G | Attributed graph. |
| V = {v1, v2, …, vn} | Set of n nodes in the graph. |
| E | Set of m edges in the graph. |
| X | Attribute matrix for nodes in the graph. |
| Xi | Attribute information for node vi |
| A | Adjacency matrix of the graph. |
| I | Identity matrix. |
| Frobenius Norm. for as elements in . |
| Datasets | Cora | CiteSeer | Pubmed | BlogCatalog | Flickr | ACM |
|---|---|---|---|---|---|---|
| #Nodes | 2708 | 3327 | 19,717 | 5196 | 7575 | 16,484 |
| #Edges | 5429 | 4732 | 44,338 | 171,743 | 239,738 | 71,980 |
| #Attributes | 1433 | 3703 | 500 | 8189 | 12,074 | 8337 |
| #Anomalies | 150 | 150 | 600 | 300 | 450 | 600 |
| Dataset | Cora | CiteSeer | Pubmed | BlogCatalog | Flickr | ACM | |
|---|---|---|---|---|---|---|---|
| Model | |||||||
| DOMINANT | 0.893 ± 0.004 | 0.879 ± 0.005 | 0.872 ± 0.011 | 0.781 ± 0.001 | 0.751 ± 0.001 | 0.778 ± 0.006 | |
| CoLA | 0.903 ± 0.008 | 0.828 ± 0.006 | 0.929 ± 0.014 | 0.754 ± 0.003 | 0.735 ± 0.002 | 0.833 ± 0.010 | |
| ComGA | 0.889 ± 0.004 | 0.911 ± 0.010 | 0.921 ± 0.001 | 0.812 ± 0.003 | 0.792 ± 0.005 | 0.850 ± 0.004 | |
| ANEMONE | 0.917 ± 0.011 | 0.925 ± 0.004 | 0.952 ± 0.001 | 0.808 ± 0.002 | 0.762 ± 0.001 | 0.859 ± 0.005 | |
| GCAD | 0.906 ± 0.003 | 0.929 ± 0.004 | 0.920 ± 0.002 | 0.761 ± 0.005 | 0.747 ± 0.003 | 0.846 ± 0.002 | |
| Our Model | 0.942 ± 0.003 | 0.979 ± 0.001 | 0.950 ± 0.001 | 0.828 ± 0.001 | 0.806 ± 0.001 | 0.924 ± 0.001 | |
| Dataset | Cora | CiteSeer | Pubmed | BlogCatalog | Flickr | ACM | |
|---|---|---|---|---|---|---|---|
| Model | |||||||
| DOMINANT | 0.692 ± 0.002 | 0.684 ± 0.010 | 0.614 ± 0.015 | 0.624 ± 0.005 | 0.709 ± 0.002 | 0.699 ± 0.001 | |
| CoLA | 0.694 ± 0.013 | 0.627 ± 0.011 | 0.630 ± 0.008 | 0.589 ± 0.010 | 0.690 ± 0.009 | 0.667 ± 0.003 | |
| ComGA | 0.775 ± 0.005 | 0.802 ± 0.006 | 0.635 ± 0.002 | 0.620 ± 0.005 | 0.700 ± 0.004 | 0.680 ± 0.005 | |
| ANEMONE | 0.779 ± 0.011 | 0.812 ± 0.002 | 0.622 ± 0.008 | 0.613 ± 0.002 | 0.681 ± 0.002 | 0.650 ± 0.004 | |
| GCAD | 0.796 ± 0.009 | 0.795 ± 0.004 | 0.650 ± 0.006 | 0.630 ± 0.006 | 0.635 ± 0.004 | 0.629 ± 0.010 | |
| Our Model | 0.831 ± 0.002 | 0.833 ± 0.006 | 0.693 ± 0.002 | 0.644 ± 0.000 | 0.726 ± 0.001 | 0.747 ± 0.001 | |
| Dataset | Cora | CiteSeer | Pubmed | BlogCatalog | Flickr | ACM | |
|---|---|---|---|---|---|---|---|
| Variant | |||||||
| w/o e.e. | 0.933 ± 0.003 | 0.954 ± 0.001 | 0.943 ± 0.002 | 0.806 ± 0.003 | 0.797 ± 0.001 | 0.818 ± 0.004 | |
| w/o e.e. and e.v. | 0.931 ± 0.002 | 0.950 ± 0.001 | 0.943 ± 0.001 | 0.807 ± 0.001 | 0.798 ± 0.001 | 0.797 ± 0.010 | |
| w/o gsl | 0.937 ± 0.002 | 0.977 ± 0.000 | 0.947 ± 0.001 | 0.826 ± 0.001 | 0.805 ± 0.001 | 0.923 ± 0.003 | |
| w/o n.s. | 0.934 ± 0.001 | 0.961 ± 0.001 | 0.941 ± 0.001 | 0.827 ± 0.000 | 0.802 ± 0.001 | 0.923 ± 0.000 | |
| Our Model | 0.942 ± 0.003 | 0.979 ± 0.001 | 0.950 ± 0.001 | 0.828 ± 0.001 | 0.806 ± 0.001 | 0.924 ± 0.001 | |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhang, C.; Jung, J.-W. Enhanced Graph Autoencoder for Graph Anomaly Detection Using Subgraph Information. Appl. Sci. 2025, 15, 8691. https://doi.org/10.3390/app15158691
Zhang C, Jung J-W. Enhanced Graph Autoencoder for Graph Anomaly Detection Using Subgraph Information. Applied Sciences. 2025; 15(15):8691. https://doi.org/10.3390/app15158691
Chicago/Turabian StyleZhang, Chi, and Jin-Woo Jung. 2025. "Enhanced Graph Autoencoder for Graph Anomaly Detection Using Subgraph Information" Applied Sciences 15, no. 15: 8691. https://doi.org/10.3390/app15158691
APA StyleZhang, C., & Jung, J.-W. (2025). Enhanced Graph Autoencoder for Graph Anomaly Detection Using Subgraph Information. Applied Sciences, 15(15), 8691. https://doi.org/10.3390/app15158691
