Heterogeneous Graph Structure Optimization with Dual-View Contrastive Learning for Fraud Detection
Abstract
1. Introduction
- We propose a type-aware heterogeneous graph structure optimization mechanism that constructs feature similarity graphs and feature propagation graphs for each relation type, and fuses them with the original adjacency through channel attention, effectively reducing structural noise and recovering potentially missing connections.
- We design a dual-view contrastive learning framework that combines a network schema view encoder with a meta-path view encoder, enhanced by meta-path-guided cross-view consistency constraints, to learn robust and discriminative node representations.
- We formulate an end-to-end joint optimization objective that unifies supervised classification, graph structure regularization, and contrastive alignment, enabling the graph optimization and representation learning modules to collaboratively improve fraud detection performance.
- We conduct experiments on two public multi-relational fraud detection benchmarks, showing that HGSO-DVCL achieves strong and competitive performance across multiple evaluation metrics, with ablation and sensitivity analyses supporting the contribution of its main components.
2. Related Work
2.1. Machine Learning-Based Fraud Detection
2.2. Deep Learning-Based Fraud Detection
2.3. Graph-Based Fraud Detection
3. Preliminaries
3.1. Financial Fraud Pattern
3.2. Heterogeneous Information Networks
3.3. Problem Formulation
4. Methodology
4.1. Overview
4.2. Heterogeneous Graph Structure Optimization
4.3. Dual-View Contrastive Learning
4.4. Joint Collaborative Optimization
| Algorithm 1: Training Procedure of HGSO-DVCL |
![]() |
5. Experiments and Results
5.1. Datasets
5.2. Experimental Setup
- RQ1: Can HGSO-DVCL achieve competitive fraud detection performance compared with representative baseline methods on public benchmark datasets?
- RQ2: Are the graph structure optimization module, the dual-view contrastive learning module, and the joint collaborative optimization strategy all effective in improving model performance?
- RQ3: How stable is HGSO-DVCL under different hyperparameter settings and meta-path configurations in terms of detection performance?
- General GNN methods: The GAT and GraphSAGE serve as standard message-passing baselines to examine the applicability boundaries of attention-based and sampling-based aggregation mechanisms for fraud detection.
5.3. RQ1: Comparison Study
5.4. RQ2: Ablation Study
5.5. RQ3: Sensitivity Analysis Study
5.6. Discussion
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Appendix A. Summary of Notations
| Notation | Description |
|---|---|
| Heterogeneous graph | |
| , | Node set and edge set |
| , | Node type set and relation type set |
| , | Node type mapping function and edge type mapping function |
| Original node feature matrix | |
| Original feature vector of node v | |
| Projected common-space representation of node v | |
| Original adjacency matrix of relation type r | |
| Feature similarity graph under relation type r | |
| , | Head-side and tail-side feature similarity graphs under relation type r |
| , | Head-side and tail-side feature propagation graphs under relation type r |
| Fused feature-driven graph under relation type r | |
| Optimized adjacency matrix of relation type r | |
| Optimized heterogeneous graph | |
| , , | Learnable relation-specific feature weighting parameters |
| , | Sparsity thresholds for similarity graph construction |
| Set of predefined meta-paths | |
| Neighbor set of node v with node type t | |
| Meta-path-constrained neighbor set of node v under meta-path | |
| Network schema view embedding of node v | |
| Meta-path view embedding of node v | |
| Node-level attention coefficient between node v and neighbor u of type t | |
| Type-level attention weight of neighbor type t | |
| Semantic attention weight of meta-path | |
| Meta-path connection strength between nodes and | |
| , | Positive and negative sample sets for anchor node |
| K | Number of positive samples selected for contrastive learning |
| Temperature coefficient in the contrastive loss | |
| Predicted fraud probability of node v | |
| Supervised classification loss | |
| Graph structure regularization loss | |
| Cross-view contrastive loss | |
| , | Balancing coefficients for structure regularization and contrastive loss |
Appendix B. Runtime and Memory Cost
| Dataset | Avg. Time Per Epoch | Total Training Time | Peak GPU Memory |
|---|---|---|---|
| YelpChi | 1383.33 ms | 977.16 s | 23.82 GB |
| Amazon | 16,490.67 ms | 10,931.13 s | 22.15 GB |
References
- Sun, G.; Ling, Z.; Li, Y.; Xie, C. Artificial intelligence and financial fraud. Pac.-Basin Financ. J. 2025, 93, 102830. [Google Scholar] [CrossRef] [Scilit]
- Motie, S.; Raahemi, B. Financial fraud detection using graph neural networks: A systematic review. Expert Syst. Appl. 2024, 240, 122156. [Google Scholar] [CrossRef] [Scilit]
- Cheng, D.; Zou, Y.; Xiang, S.; Jiang, C. Graph neural networks for financial fraud detection: A review. Front. Comput. Sci. 2025, 19, 199609. [Google Scholar] [CrossRef] [Scilit]
- Xu, Y.; Fang, Y.; Huang, C.; Liu, Z.; Cao, W. Hacker group identification based on dynamic heterogeneous graph node update. Appl. Soft Comput. 2024, 158, 111587. [Google Scholar] [CrossRef] [Scilit]
- Xu, Y.; Zhang, Q.; Deng, H.; Liu, Z.; Yang, C.; Fang, Y. Unknown web attack threat detection based on large language model. Appl. Soft Comput. 2025, 173, 112905. [Google Scholar] [CrossRef] [Scilit]
- Duan, M.; Zheng, T.; Gao, Y.; Wang, G.; Feng, Z.; Wang, X. Dga-gnn: Dynamic grouping aggregation gnn for fraud detection. In Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 20–27 February 2024; Volume 38, pp. 11820–11828. [Google Scholar]
- Amiram, D.; Bozanic, Z.; Cox, J.D.; Dupont, Q.; Karpoff, J.M.; Sloan, R. Financial reporting fraud and other forms of misconduct: A multidisciplinary review of the literature. Rev. Account. Stud. 2018, 23, 732–783. [Google Scholar] [CrossRef] [Scilit]
- Ashton, J.; Burnett, T.; Diaz-Rainey, I.; Ormosi, P. Known unknowns: How much financial misconduct is detected and deterred? J. Int. Financ. Mark. Instit. Money 2021, 74, 101389. [Google Scholar] [CrossRef] [Scilit]
- Beggs, W.; Harvison, T. Fraud and abuse in the paycheck protection program? Evidence from investment advisory firms. J. Bank. Financ. 2023, 147, 106444. [Google Scholar] [CrossRef] [Scilit]
- Mugerman, Y.; Hecht, Y.; Wiener, Z. On the failure of mutual fund industry regulation. Emerg. Mark. Rev. 2019, 38, 51–72. [Google Scholar] [CrossRef] [Scilit]
- Talukder, M.A.; Hossen, R.; Uddin, M.A.; Uddin, M.N.; Acharjee, U.K. Securing transactions: A hybrid dependable ensemble machine learning model using IHT-LR and grid search. Cybersecurity 2024, 7, 32. [Google Scholar] [CrossRef] [Scilit]
- Khalid, A.R.; Owoh, N.; Uthmani, O.; Ashawa, M.; Osamor, J.; Adejoh, J. Enhancing credit card fraud detection: An ensemble machine learning approach. Big Data Cogn. Comput. 2024, 8, 6. [Google Scholar] [CrossRef] [Scilit]
- Bala, B.S.; Yadav, P.P.; Reddy, M.R. An intelligent approach to detect and predict online fraud transaction using XGBoost algorithm. Indones. J. Electr. Eng. Comput. Sci. 2024, 35, 1491–1498. [Google Scholar] [CrossRef] [Scilit]
- Chen, J. LightGBM model for detecting fraud in online financial transactions. Highlights Sci. Eng. Technol. 2024, 93, 363–371. [Google Scholar] [CrossRef] [Scilit]
- Wijaya, M.G.; Pinaringgi, M.F.; Zakiyyah, A.Y. Comparative analysis of machine learning algorithms and data balancing techniques for credit card fraud detection. Procedia Comput. Sci. 2024, 245, 677–688. [Google Scholar] [CrossRef] [Scilit]
- Xia, P.; Zhu, X.; Charles, V.; Zhao, Z.; Peng, M. A novel heuristic-based selective ensemble prediction method for digital financial fraud risk. IEEE Trans. Eng. Manag. 2024, 71, 8002–8018. [Google Scholar] [CrossRef] [Scilit]
- Lim, Z.Y.; Pang, Y.H.; Kamarudin, K.Z.B.; Ooi, S.Y.; Hiew, F.S. Bayesian optimization driven strategy for detecting credit card fraud with extremely randomized trees. MethodsX 2024, 13, 103055. [Google Scholar] [CrossRef] [Scilit]
- Tayebi, M.; El Kafhali, S. A novel approach based on XGBoost classifier and Bayesian optimization for credit card fraud detection. Cyber Secur. Appl. 2025, 3, 100093. [Google Scholar] [CrossRef] [Scilit]
- El-Kenawy, E.S.M.; Zaki, A.M.; Lim, W.H.; Ibrahim, A.; Eid, M.M.; Osman, A.M.; Elshewey, A.M. Credit card fraud detection based on deep learning models. Mesopotamian J. Comput. Sci. 2024, 2024, 204–213. [Google Scholar] [CrossRef] [Scilit]
- Yu, C.; Xu, Y.; Cao, J.; Zhang, Y.; Jin, Y.; Zhu, M. Credit card fraud detection using advanced transformer model. In Proceedings of the 2024 IEEE International Conference on Metaverse Computing, Networking, and Applications (MetaCom); IEEE: New York, NY, USA, 2024; pp. 343–350. [Google Scholar]
- Mienye, I.D.; Swart, T.G. A hybrid deep learning approach with generative adversarial network for credit card fraud detection. Technologies 2024, 12, 186. [Google Scholar] [CrossRef] [Scilit]
- Du, H.; Lv, L.; Wang, H.; Guo, A. A novel method for detecting credit card fraud problems. PLoS ONE 2024, 19, e0294537. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Koo, K.; Park, M.; Yoon, B. A suspicious financial transaction detection model using autoencoder and risk-based approach. IEEE Access 2024, 12, 68926–68939. [Google Scholar] [CrossRef] [Scilit]
- DeLise, T. Deep semi-supervised anomaly detection for finding fraud in the futures market. arXiv 2023, arXiv:2309.00088. [Google Scholar] [CrossRef] [Scilit]
- Duan, Y.; Zhang, G.; Wang, S.; Peng, X.; Wang, Z.; Mao, J.; Wu, H.; Jiang, X.; Wang, K. CaT-GNN: Enhancing credit card fraud detection via causal temporal graph neural networks. arXiv 2024, arXiv:2402.14708. [Google Scholar]
- Wang, Y.; Zhang, J.; Huang, Z.; Li, W.; Feng, S.; Ma, Z.; Sun, Y.; Yu, D.; Dong, F.; Jin, J. Label information enhanced fraud detection against low homophily in graphs. In Proceedings of the ACM Web Conference 2023; ACM: New York, NY, USA, 2023; pp. 406–416. [Google Scholar]
- Wan, F.; Li, P. A novel money laundering prediction model based on a dynamic graph convolutional neural network and long short-term memory. Symmetry 2024, 16, 378. [Google Scholar] [CrossRef] [Scilit]
- Wang, Y.; Zheng, Q.; Li, X.; Wang, L.; Lin, L. CoSemiGNN: Blockchain fraud detection with dynamic graph neural networks based on co-association of semi-supervised. Expert Syst. Appl. 2025, 298, 129853. [Google Scholar] [CrossRef] [Scilit]
- Pan, J.; Liu, Y.; Zheng, X.; Zheng, Y.; Liew, A.W.-C.; Li, F.; Pan, S. A label-free heterophily-guided approach for unsupervised graph fraud detection. In Proceedings of the AAAI Conference on Artificial Intelligence, Philadelphia, PA, USA, 25 February–4 March 2025; Volume 39, pp. 12443–12451. [Google Scholar]
- Zou, Y.; Xiang, S.; Miao, Q.; Cheng, D.; Jiang, C. Subgraph patterns enhanced graph neural network for fraud detection. In Database Systems for Advanced Applications; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2024; Volume 14855, pp. 375–384. [Google Scholar]
- Wu, B.; Yao, X.; Zhang, B.; Chao, K.M.; Li, Y. SplitGNN: Spectral graph neural network for fraud detection against heterophily. In Proceedings of the 32nd ACM International Conference on Information and Knowledge Management; ACM: New York, NY, USA, 2023; pp. 2737–2746. [Google Scholar]
- Aschi, M.; Bonura, S.; Masi, N.; Messina, D.; Profeta, D. Cybersecurity and fraud detection in financial transactions. In Big Data and Artificial Intelligence in Digital Finance: Increasing Personalization and Trust in Digital Finance Using Big Data and AI; Springer: Berlin/Heidelberg, Germany, 2022; pp. 269–278. [Google Scholar]
- Xu, Y.; Zhang, Q.; Wang, K.; Liu, Z.; Huang, C.; Fang, Y. Web Page Tampering Detection Based on Dynamic Temporal Graph Pre-training. IEEE Trans. Dependable Secur. Comput. 2025, 23, 2012–2029. [Google Scholar] [CrossRef] [Scilit]
- Outemzabet, L.; Gaud, N.; Bertaux, A.; Nicolle, C.; Gerart, S.; Vachenc, S. Harnessing heterogeneous information networks: A systematic literature review. Comput. Sci. Rev. 2024, 52, 100633. [Google Scholar] [CrossRef] [Scilit]
- Altman, E.; Blanuša, J.; Von Niederhäusern, L.; Egressy, B.; Anghel, A.; Atasu, K. Realistic synthetic financial transactions for anti-money laundering models. Adv. Neural Inf. Process. Syst. 2023, 36, 29851–29874. [Google Scholar]
- Zhang, J.; Xu, Z.; Lv, D.; Shi, Z.; Shen, D.; Jin, J.; Dong, F. DiG-In-GNN: Discriminative feature guided GNN-based fraud detector against inconsistencies in multi-relation fraud graph. In Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 20–27 February 2024; Volume 38, pp. 9323–9331. [Google Scholar]
- Zhang, Q.; Wang, S.; Cao, L.; Lian, D.; Zhang, H.; Lu, W. Semantic Relation Guided Dual-view Contrastive Learning for Session-based Recommendations. ACM Trans. Inf. Syst. 2025, 43, 1–36. [Google Scholar] [CrossRef] [Scilit]
- Yi, M.; Lee, V.C.; Yang, P.; Li, P.; Zhang, Y.; Wei, W.; Gao, H. The distributed intelligent collaboration to uav-assisted vec: Joint position optimization and task scheduling. IEEE Internet Things J. 2025, 12, 21473–21487. [Google Scholar] [CrossRef] [Scilit]
- Rayana, S.; Akoglu, L. Collective opinion spam detection: Bridging review networks and metadata. In Proceedings of the 21th ACM Sigkdd International Conference on Knowledge Discovery and Data Mining, Sydney, NSW, Australia, 10–13 August 2015; pp. 985–994. [Google Scholar]
- McAuley, J.J.; Leskovec, J. From amateurs to connoisseurs: Modeling the evolution of user expertise through online reviews. In Proceedings of the 22nd International Conference on World Wide Web, Rio de Janeiro, Brazil, 13–17 May 2013; pp. 897–908. [Google Scholar]
- Wang, X.; Ji, H.; Shi, C.; Wang, B.; Ye, Y.; Cui, P.; Yu, P.S. Heterogeneous graph attention network. In Proceedings of the WWW ’19: The World Wide Web Conference, San Francisco, CA, USA, 13–17 May 2019; pp. 2022–2032. [Google Scholar]
- Ding, Y.; Yao, Q.; Zhao, H.; Zhang, T. Diffmg: Differentiable meta graph search for heterogeneous graph neural networks. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, Online, 14–18 August 2021; pp. 279–288. [Google Scholar]
- Vijayvargiya, A.; Kumar, R.; Sharma, P. PC-GNN: Pearson correlation-based graph neural network for recognition of human lower limb activity using sEMG signal. IEEE Trans. Hum. Mach. Syst. 2023, 53, 945–954. [Google Scholar] [CrossRef] [Scilit]
- 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, Online, 19–23 October 2020; pp. 315–324. [Google Scholar]
- Shi, F.; Cao, Y.; Shang, Y.; Zhou, Y.; Zhou, C.; Wu, J. H2-fdetector: A gnn-based fraud detector with homophilic and heterophilic connections. In Proceedings of the ACM Web Conference 2022, Online, 25–29 April 2022; pp. 1486–1494. [Google Scholar]
- Ding, K.; Zhou, Q.; Tong, H.; Liu, H. Few-shot network anomaly detection via cross-network meta-learning. In Proceedings of the Web Conference 2021, Online, 19–23 April 2021; pp. 2448–2456. [Google Scholar]
- Tang, J.; Li, J.; Gao, Z.; Li, J. Rethinking graph neural networks for anomaly detection. In Proceedings of the International Conference on Machine Learning; PMLR: Cambridge, MA, USA, 2022; pp. 21076–21089. [Google Scholar]








| Dataset | Nodes | Edge Type | Edge Count | Imbalance |
|---|---|---|---|---|
| YelpChi | 45,954 | R-U-R | 49,315 | 6:1 |
| R-S-R | 3,402,743 | |||
| R-T-R | 573,516 | |||
| Amazon | 11,944 | U-S-U | 3,566,479 | 10.5:1 |
| U-V-U | 1,036,737 | |||
| U-P-U | 175,608 |
| Item | Details |
|---|---|
| Operating System | Ubuntu 24.04 LTS |
| CPU | Intel Core i7-13600KF |
| RAM | 64 GB |
| GPU | NVIDIA RTX 3090 |
| Programming Language | Python 3.9.12 |
| Deep Learning Framework | PyTorch 1.13.1 |
| Graph Learning Library | PyTorch Geometric 2.3.1 |
| Method | YelpChi | Amazon | ||||
|---|---|---|---|---|---|---|
| F1-Macro | AUC | G-Mean | F1-Macro | AUC | G-Mean | |
| GAT | 49.03 ± 2.21 | 57.08 ± 0.31 | 16.82 ± 7.74 | 64.52 ± 3.94 | 80.96 ± 1.83 | 66.61 ± 13.58 |
| GraphSAGE | 54.51 ± 0.26 | 44.21 ± 1.58 | 42.04 ± 0.37 | 75.76 ± 0.45 | 64.30 ± 0.81 | 59.61 ± 3.52 |
| HAN | 55.63 ± 1.04 | 74.19 ± 0.10 | 64.29 ± 1.05 | 69.95 ± 1.23 | 84.22 ± 0.67 | 66.41 ± 1.12 |
| DiffMG | 73.18 ± 1.36 | 88.11 ± 1.50 | 78.57 ± 1.55 | 88.36 ± 0.51 | 92.90 ± 0.44 | 88.50 ± 0.60 |
| PC-GNN | 62.96 ± 2.03 | 79.84 ± 0.14 | 71.68 ± 1.22 | 89.67 ± 0.72 | 95.85 ± 0.14 | 90.36 ± 0.42 |
| CARE-GNN | 63.09 ± 0.90 | 76.65 ± 2.86 | 67.68 ± 3.45 | 86.76 ± 1.79 | 90.74 ± 1.63 | 70.52 ± 0.20 |
| H2-FDetector | 74.52 ± 2.37 | 89.36 ± 1.21 | 79.04 ± 2.61 | 87.05 ± 0.98 | 95.97 ± 0.71 | 91.63 ± 0.49 |
| GDN | 75.99 ± 0.62 | 90.24 ± 0.73 | 80.85 ± 0.09 | 90.71 ± 0.44 | 97.08 ± 0.14 | 90.78 ± 0.12 |
| BWGNN | 77.05 ± 0.90 | 90.51 ± 0.43 | 76.94 ± 1.10 | 91.84 ± 0.81 | 97.42 ± 0.42 | 90.07 ± 0.35 |
| HGSO-DVCL | 80.62 ± 0.88 | 92.96 ± 0.52 | 79.41 ± 0.46 | 91.12 ± 0.67 | 98.01 ± 0.24 | 92.44 ± 0.39 |
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. |
© 2026 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.
Share and Cite
Wu, Y.; Hao, C.; Xu, Y.; Hu, Y.; Liu, Z. Heterogeneous Graph Structure Optimization with Dual-View Contrastive Learning for Fraud Detection. Appl. Sci. 2026, 16, 5485. https://doi.org/10.3390/app16115485
Wu Y, Hao C, Xu Y, Hu Y, Liu Z. Heterogeneous Graph Structure Optimization with Dual-View Contrastive Learning for Fraud Detection. Applied Sciences. 2026; 16(11):5485. https://doi.org/10.3390/app16115485
Chicago/Turabian StyleWu, Yan, Chengling Hao, Yijia Xu, Yaofeng Hu, and Zhonglin Liu. 2026. "Heterogeneous Graph Structure Optimization with Dual-View Contrastive Learning for Fraud Detection" Applied Sciences 16, no. 11: 5485. https://doi.org/10.3390/app16115485
APA StyleWu, Y., Hao, C., Xu, Y., Hu, Y., & Liu, Z. (2026). Heterogeneous Graph Structure Optimization with Dual-View Contrastive Learning for Fraud Detection. Applied Sciences, 16(11), 5485. https://doi.org/10.3390/app16115485


