无监督图表示学习因无需人工标注,成为当前研究的热点方向.图对比学习通过正负样本对构建,实现结构与语义一致性的多视角建模,成为主流方法之一.针对现有异质图对比学习依赖人工元路径设计、难以灵活适应多元结构与语义的局限,本文通过边分类器动态预测边的同质或异质属性,并据此构建同质视图与异质视图,并结合双视图交叉对比学习实现结构与语义的统一建模,提升表示的判别性与鲁棒性.在5个同质图和4个异质图数据集上的实验表明,带有边分类器的图对比学习(graph contrastive learning with edge classifier,ECGCL)在同质图上性能与主流基线方法持平;在异质图上,节点分类准确率较同质方法最高提升26.3%,较异质基线方法最高提升4.8%,验证了其有效性与泛化能力.
Abstract
Unsupervised graph representation learning has become a research hotspot because it does not require manual annotation. Graph contrastive learning has become one of the mainstream methods by constructing positive and negative sample pairs to achieve multi-view modeling of structural and semantic consistency. However, existing heterogeneous graph contrastive learning methods rely on manual meta-path design and struggle to flexibly adapt to diverse structural and semantic limitations. The homogeneous or heterogeneous properties of edges were dynamically predicted through an edge classifier, based on which a homogeneous view and a heterogeneous view were constructed. By integrating cross-view contrastive learning between these dual views, unified modeling of structural and semantic information was achieved, thereby enhancing the discriminativeness and robustness of the learned representations. Experiments on five homogeneous and four heterogeneous graph datasets show that ECGCL(graph contrastive learning with edge classifier) achieves performance comparable to mainstream baselines on homogeneous graphs, and on heterogeneous graphs, it improves node classification accuracy by up to 26.3% over homogeneous methods and up to 4.8% over heterogeneous baselines, demonstrating its effectiveness and generalization ability.
现有无监督图表示学习中,结构编码用于增强图神经网络模型对结构感知的能力,其核心目标是为图中的每个节点生成一个能够反映其在整个图结构中所处位置的向量表示,从而弥补图神经网络仅通过局部邻域聚合所造成的结构表达能力不足的问题.现有研究获取结构编码的方式通常依赖于全局的随机游走扩散矩阵或节点对之间的相似性直接计算.然而,这种全局性方法在处理具有复杂结构的异质图时可能导致较高的计算成本和信息提取不充分的问题.在本文算法中提出一种基于邻居采样的随机游走策略(neighborhood sampling based random walk strategy,NSRW),通过结合局部邻居采样与随机游走扩散编码的策略来优化结构编码 si 的生成过程,如式(1)所示:
AlemanyJ, ValE D, García-FornesA. A review of privacy decision-making mechanisms in online social networks[J]. ACM Computing Surveys, 2022, 55(2): 1-32.
[2]
SharmaK, LeeY C, NambiS, et al. A survey of graph neural networks for social recommender systems[J]. ACM Computing Surveys, 2024, 56(10): 1-34.
ZhaoLin-lin, WuAn-biao, YuanYe, et al. Graph representation learning on location-based social networks [J]. Chinese Journal of Computers, 2022, 45(4): 838-857.
[5]
FangY, ZhangQ, ZhangN, et al. Knowledge graph-enhanced molecular contrastive learning with functional prompt[J]. Nature Machine Intelligence, 2023, 5(5): 542-553.
[6]
ZhangS, HuZ, SubramonianA, et al. Motif-driven contrastive learning of graph representations [EB/OL]. (2020-12-23) [2025-03-24].
[7]
ChenJ Y, GengY X, ChenZ, et al. Zero-shot and few-shot learning with knowledge graphs: a comprehensive survey[J]. Proceedings of the IEEE, 2023, 111(6): 653-685.
[8]
YangJ W, XuH W, MirzoyanS, et al. Poisoning medical knowledge using large language models [J]. Nature Machine Intelligence, 2024, 6:1156-1168.
ZhangYu-jiao, XuJian, Wudi. A knowledge graph temporal reasoning model based on graph representation learning [J]. Journal of University of Jinan (Science and Technology, 2025, 39(2): 272-277.
[11]
JuW, QinY F, QiaoZ Y, et al. Kernel-based substructure exploration for next POI recommendation[C]// 2022 IEEE International Conference on Data Mining (ICDM). Orlando, 2022: 221-230.
[12]
QinY F, JuW, WuH J, et al. Learning graph ODE for continuous-time sequential recommendation[J]. IEEE Transactions on Knowledge and Data Engineering, 2024, 36(7): 3224-3236.
[13]
WuS W, SunF, ZhangW T, et al. Graph neural networks in recommender systems: a survey[J]. ACM Computing Surveys, 2022, 55: 1-37.
[14]
HamiltonW L. Graph representation learning[M]. San Rafael: Morgan & Claypool Publishers, 2020.
[15]
ZhuJ, YanY J, ZhaoL X, et al. Beyond homophily in graph neural networks: current limitations and effective designs[J]. Advances in Neural Information Processing Systems, 2020, 33: 7793-7804.
[16]
LiuY, AoX, FengF L, et al. UD-GNN: uncertainty-aware debiased training on semi-homophilous graphs[C]// Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. Washington, DC, 2022: 1131-1140.
[17]
PeiH, WeiB, ChangK C C, et al. Geom-GCN: geometric graph convolutional networks [EB/OL]. (2020-02-13) [2025-03-24].
[18]
SenP, NamataG, BilgicM, et al. Collective classification in network data[J]. AI Magazine, 2008, 29(3): 93-106.
[19]
ShchurO, MummeM, BojchevskiA, et al. Pitfalls of graph neural network evaluation [EB/OL]. (2018-11-14) [2025-03-24].
PerozziB, Al-RfouR, SkienaS. DeepWalk: online learning of social representations[C]// Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. New York: ACM, 2014: 701-710.