Journal of Computer Applications

    Next Articles

Link Prediction in Graph Contrastive Learning via Diffusion-Based Multi-Level Negative Sampling

  

  • Received:2025-12-08 Revised:2026-04-09 Accepted:2026-04-09 Online:2026-04-23 Published:2026-04-23
  • Supported by:
    National Natural Science Foundation of Ningxia;National Natural Science Foundation of Ningxia;National Natural Science Foundation of China;National Natural Science Foundation of China

基于扩散多级负采样的图对比学习链路预测方法

牛晟宇1,胡怡君2,乃永强1,莫先2   

  1. 1. 宁夏大学
    2. 宁夏大学信息工程学院
  • 通讯作者: 莫先
  • 基金资助:
    宁夏自然科学基金;宁夏自然科学基金;国家自然科学基金;国家自然科学基金

Abstract: Link prediction, as a fundamental task in network analysis, has significant application value in areas such as e-commerce recommendations and social network analysis. However, the inability of existing methods to balance local structural features with global semantic dependencies, coupled with a lack of semantic hierarchy and controllable difficulty in negative sampling, has limited their overall expressive power and led to suboptimal recommendation performance. Therefore, a graph learning framework with synergistic optimization of generation and contrast is proposed. At its core, the approach re-conceptualizes the diffusion model as both a semantic generator and a difficulty regulator within contrastive learning.Specifically, a GNN-guided diffusion random walk mechanism was introduced for contrastive view generation. The structural features within the local neighborhood of a node and the global semantic dependencies were simultaneously captured by controlling the walk step length, thereby achieving a collaborative representation of local structure and global semantics. Moreover, multi-granularity negative samples with diverse semantic levels and controllable discrimination difficulty were automatically generated in the latent space by dynamically adjusting the time step during the diffusion denoising process. Subsequently, using the generated negative samples, the enhanced contrastive view representations are compared with the main view representations. Based on this, the contrastive learning loss function is used for backpropagation to update the model parameters and improve recommendation performance. Experiments on multiple public datasets demonstrate that the proposed method outperforms various baseline models. Notably, on the Citeseer dataset, significant improvements are achieved compared to the suboptimal model DMNS(Diffusion Multi-level Negative Sampling), with the MAP metric increasing by 7.22% and the NDCG@10 metric increasing by 5.36%.

Key words: link prediction, diffusion model, multi-level negative sampling, graph contrastive learning, graph neural network

摘要: 摘 要: 链路预测在电商推荐与社交网络分析等领域具有重要应用价值,但现有的方法难以同时兼顾局部结构特征与全局语义依赖,且在负样本构造上缺乏语义层次性和难度可控性,导致模型表达能力受限,影响推荐性能。为此,提出一种生成?对比协同优化的图学习架构,其核心在于将扩散模型重构为对比学习的“语义生成器”与“难度调节器”。具体而言,首先对目标节点随机游走邻居进行扩散,并利用目标节点提供扩散降噪训练信号,重构目标节点来生成对比视图。该方法通过控制游走步长,可同时捕获节点局部邻域的结构特征和全局语义依赖,从而实现局部结构与全局语义的协同表示。此外,通过在扩散去噪过程中动态调节时间步长,可在潜在空间中生成语义层次丰富且判别难度可控的多层级负样本。随后,利用生成的负样本,将增强的对比视图表示与主视图表示进行对比,根据对比学习损失函数进行反向传播更新模型参数并提升推荐性能。在多个公开数据集上的实验表明,该方法性能优于各类基线模型,特别地,在Citeseer数据集上,相较于次优模型DMNS(Diffusion Multi-level Negative Sampling),该方法性能取得了显著提升,其中MAP指标提升了7.22%,NDCG@10指标提升了5.36%。

关键词: 链路预测, 扩散模型, 多级负采样, 图对比学习, 图神经网络

CLC Number: