计算机科学 ›› 2026, Vol. 53 ›› Issue (6A): 250900103-8.doi: 10.11896/jsjkx.250900103

• 大数据&数据科学 • 上一篇    下一篇

基于HAN的GNN-Transformer协同对比学习框架优化研究

张自豪, 吴泽忠   

  1. 成都信息工程大学 成都 610000
  • 出版日期:2026-06-16 发布日期:2026-06-12
  • 通讯作者: 吴泽忠(zezhongwu@cuit.edu.cn)
  • 作者简介:(2636404618@qq.com)
  • 基金资助:
    国家社会科学基金年度项目“成渝地区双城经济圈县乡村物流配送体系数字化转型机理与实现路径研究”(24XGLO28)

Optimization of HAN-based GNN-Transformer Collaborative Contrastive Learning Framework

ZHANG Zihao, WU Zezhong   

  1. Chengdu University of Information Technology,Chengdu 610000,China
  • Published:2026-06-16 Online:2026-06-12
  • About author:ZHANG Zihao,born in 2001,master.His main research interest is graph neural networks.
    WU Zezhong,born in 1970,Ph.D,professor.His main research interests include optimization theory and algorithms and swarm intelligence algorithms and applications.
  • Supported by:
    National Social Science Fund Annual Project “the Mechanism and Pathways of Digital Transformation of County-Village Logistics Distribution System in the Chengdu-Chongqing Economic Circle”(24XGLO28).

摘要: 图神经网络(Graph Neural Networks,GNNs)因其消息传递机制在图表示学习领域中展现出了强大的性能,但其在处理异构图时面临着过平滑问题和多跳邻居信息捕捉不足的挑战。GNN-Transformer协同对比学习框架(GTC)利用GNN的局部信息聚合能力和Transformer的全局信息建模能力,采用跨视图对比学习的方式实现了自监督的异构图表示学习,有效消除了 GNN在聚合邻居信息时所面临的过平滑问题。基于异构图注意力网络(HAN),利用其节点级注意力和语义级注意力机制在GNN-Transformer协同对比学习框架的GNN分支上进行优化,在聚合邻居信息时能够更好地捕捉异构图中不同类型节点和边的信息。在ACM数据集上的实验证明,改进后的GNN-Transformer协同对比学习框架模型在节点分类任务和节点聚类任务中的表现更加优秀。在节点分类任务上,对于20,40,60个标记节点的AUC值,宏平均F1值和微平均F1值分别平均提升了0.52%,3.07%和3.14%;在节点聚类任务上,NMI,ARI分别提升了6.57%和6.38%,验证了HAN的层次化注意力机制在异构图表示学习中可以实现更精细的邻居信息聚合与元路径语义融合,为解决GNN的过平滑问题提供了新的思路。

关键词: 图神经网络, 异构图, 对比学习, 注意力机制, 自监督

Abstract: GNNs have demonstrated strong performance in graph representation learning due to their message-passing mechanism.However,they encounter challenges such as over-smoothing and insufficient capture of multi-hop neighbor information when processing heterogeneous graphs.The GNN-Transformer collaborative contrastive learning framework(GTC) combines the local information aggregation capability of GNNs with the global information modeling capability of Transformers.This framework implements self-supervised heterogeneous graph representation learning through cross-view contrastive learning,effectively mitigating the over-smoothing problem that GNNs experience during neighbor information aggregation.This study enhances the GNN branch of the GNN-Transformer collaborative contrastive learning framework by incorporating the node-level and semantic-level attention mechanisms from the heterogeneous graph attention network(HAN).This optimization enables more effective capture of information from different node and edge types in heterogeneous graphs during neighbor aggregation.Experiments on the ACM dataset demonstrate that the improved GNN-Transformer collaborative contrastive learning framework achieves superior performance in node classification and node clustering tasks.For node classification,with 20,40,and 60 labeled nodes,the mo-del exhibits average improvements of 0.52%,3.07%,and 3.14% in AUC,macro-F1,and micro-F1 scores,respectively.In node clustering,normalized mutual information(NMI) and adjusted rand index(ARI) increase by 6.57% and 6.38%,respectively.These results confirm that HAN's hierarchical attention mechanism enables finer neighbor aggregation and metapath semantic fusion in heterogeneous graph representation learning,offering a novel approach to alleviating the over-smoothing problem in GNNs.

Key words: Graph neural networks, Heterogeneous graphs, Contrastive learning, Attention mechanism, Self-supervised

中图分类号: 

  • TP183
[1] WU Z,PAN S,CHEN F,et al.A comprehensive survey ongraph neural networks[J].IEEE Transactions on Neural Networks and Learning Systems,2020,32(1):4-24.
[2] ZHANG L Y,SUN H H,SUN Y F,et al.Review of node classification methods based on graph convolutional neural networks[J].Computer Science,2024,51(4):95-105.
[3] YOU H,DING C F,MA L R,et al.Graph Transformer techno-logy and research progress:from fundamental theory to cutting-edge applications [J].Application Research of Computers,2025,42(4):975-986.
[4] SUN Y,ZHU D,WANG Y,et al.GTC:GNN-transformer co-contrastive learning for self-supervised heterogeneous graph representation[J].Neural Networks,2025,181:106645.
[5] SCHLICHTKRULL M,KIPF T N,BLOEM P,et al.Modeling relational data with graph convolutional networks[C]//Euro-pean Semantic Web Conference.Cham:Springer,2018:593-607.
[6] WANG X,JI H,SHI C,et al.Heterogeneous graph attention network[C]//The World Wide Web Conference.2019:2022-2032.
[7] XU B B,CEN K T,HUANG J J,et al.A survey on graph con-volutional neural network[J].Chinese Journal of Computers,2020,43(5):755-780.
[8] KIPF T N,WELLING M.Semi-supervised classification withgraph convolutional networks[J].arXiv:1609.02907,2016.
[9] HAMILTON W,YING Z,LESKOVEC J.Inductive representation learning on large graphs[C]//Advances in Neural Information Processing Systems.2017.
[10] VELICKOVIC P,CUCURULL G,CASANOVA A,et al.Graph attention networks[J].Stat,2017,1050(20):10-48550.
[11] BING R,YUAN G,ZHU M,et al.Heterogeneous graph neural networks analysis:a survey of techniques,evaluations and applications[J].Artificial Intelligence Review,2023,56(8):8003-8042.
[12] DONG Y,CHAWLA N V,SWAMI A.metapath2vec:Scalablerepresentation learning for heterogeneous networks[C]//Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.2017:135-144.
[13] FU T,LEE W C,LEI Z.Hin2vec:Explore meta-paths in heterogeneous information networks for representation learning[C]//Proceedings of the 2017 ACM on Conference on Information and Knowledge Management.2017:1797-1806.
[14] ZHANG C,SONG D,HUANG C,et al.Heterogeneous graph neural network[C]//Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mi-ning.2019:793-803.
[15] FU X,ZHANG J,MENG Z,et al.Magnn:Metapath aggregated graph neural network for heterogeneous graph embedding[C]//Proceedings of the Web Conference 2020.2020:2331-2341.
[16] LI X,LIU X P,LI W C,et al.Survey on contrastive learning research[J].Journal of Chinese Computer Systems,2023,44(4):787-797.
[17] OORD A,LI Y,VINYALS O.Representation learning with contrastive predictive coding[J].arXiv:1807.03748,2018.
[18] CEN K T,SHEN H W,CAO Q,et al.A survey on graph con-trastive learning[J].Journal of Chinese Information Processing,2023,37(5):1-2.
[19] WANG Y,SANG L,ZHANG Y,et al.Generative-contrastiveheterogeneous graph neural network[J].IEEE Transactions on Big Data,2025,11(6):3061-3073.
[20] ZHAO T,WANG Y,WANG J,et al.Hybrid-Collaborative Augmentation and Contrastive Sample Adaptive-Differential Awareness for Robust Attributed Graph Clustering[J].arXiv:2510.02731,2025.
[21] ZHAO T,WANG Y,XU S,et al.Dual-level Noise Augmentation for Graph Clustering with Triplet-wise Contrastive Lear-ning[J].Pattern Recognition,2025,172:112463.
[22] SCHROFF F,KALENICHENKO D,PHILBIN J.Facenet:A unified embedding for face recognition and clustering[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2015:815-823.
[23] VELICˇKOVIĆ P,FEDUS W,HAMILTON W L,et al.Deep graph infomax[J].arXiv:1809.10341,2018.
[24] WANG X,LIU N,HAN H,et al.Self-supervised heterogeneous graph neural network with co-contrastive learning[C]//Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining.2021:1726-1736.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!