Journal of Computer Applications ›› 2025, Vol. 45 ›› Issue (4): 1053-1060.DOI: 10.11772/j.issn.1001-9081.2024040419

• Artificial intelligence • Previous Articles     Next Articles

Recommendation algorithm of graph contrastive learning based on hybrid negative sampling

Renjie TIAN1, Mingli JING1(), Long JIAO2, Fei WANG1   

  1. 1.School of Electronic Engineering,Xi’an Shiyou University,Xi’an Shaanxi 710065,China
    2.College of Chemical Engineering,Xi’an Shiyou University,Xi’an Shaanxi 710065,China
  • Received:2024-04-10 Revised:2024-07-15 Accepted:2024-07-18 Online:2025-04-08 Published:2025-04-10
  • Contact: Mingli JING
  • About author:TIAN Renjie, born in 2000, M. S. candidate. His research interests include recommendation system.
    JIAO Long, born in 1980, Ph. D., professor. His research interests include chemometrics, pattern recognition.
    WANG Fei, born in 1985, Ph. D., lecturer. His research interests include image processing, signal processing, algorithm optimization.
    First author contact:JING Mingli, born in 1977, Ph. D., associate professor. His research interests include sparse low-rank recovery in compressive sensing, numerical optimization algorithm, image processing, machine learning.
  • Supported by:
    National Natural Science Foundation of China(22373075);Key Research and Development Program of Shaanxi Province(2022GY-435);Xi’an Shiyou University Graduate Innovation and Practical Ability Cultivation Program(YCS23114145)

基于混合负采样的图对比学习推荐算法

田仁杰1, 景明利1(), 焦龙2, 王飞1   

  1. 1.西安石油大学 电子工程学院,西安 710065
    2.西安石油大学 化工学院,西安 710065
  • 通讯作者: 景明利
  • 作者简介:田仁杰(2000—),男,陕西渭南人,硕士研究生,主要研究方向:推荐系统
    焦龙(1980—),男,陕西西安人,教授,博士,主要研究方向:化学计量学、模式识别
    王飞(1985—),男,陕西宝鸡人,讲师,博士,主要研究方向:图像处理、信号处理、算法优化。
    第一联系人:景明利(1977—),男,陕西长武人,副教授,博士,主要研究方向:压缩感知中的稀疏低秩恢复、数值优化算法、图像处理、机器学习
  • 基金资助:
    国家自然科学基金资助项目(22373075);陕西省重点研发计划项目(2022GY-435);西安石油大学研究生创新与实践能力培养计划项目(YCS23114145)

Abstract:

Contrastive Learning (CL) has the ability to extract self-supervised signals from raw data, providing strong support for addressing data sparsity in recommender systems. However, most existing CL-based recommendation algorithms focus on improving model structures and data augmentation methods, and ignoring the importance of enhancing negative sample quality and uncovering potential implicit relationships between users and items in recommendation tasks. To address this issue, a Hybrid negative Sampling-based Graph Contrastive Learning recommendation algorithm (HSGCL) was proposed. Firstly, differing from the uniform sampling method to sample from real data, a positive sample hybrid method was used by the proposed algorithm to integrate positive sample information into negative samples. Secondly, informative hard negative samples were created through a skip-mix method. Meanwhile, multiple views were generated by altering the graph structure using Node Dropout (ND), and controlled uniform noise smoothing was introduced in the embedding space to adjust the uniformity of learning representations. Finally, the main recommendation task and CL task were trained jointly. Numerical experiments were conducted on three public datasets: Douban-Book, Yelp2018, and Amazon-Kindle. The results show that compared to the baseline model Light Graph Convolution Network (LightGCN), the proposed algorithm improves the Recall@20 by 23%, 13%, and 7%, respectively, and Normalized Discounted Cumulative Gain (NDCG@20) by 32%, 14%, and 5%, respectively, and performs excellently in enhancing the diversity of negative sample embedding information. It can be seen that by improving negative sampling method and data augmentation, the proposed algorithm improves negative sample quality, the uniformity of representation distribution, and accuracy of the recommendation algorithm.

Key words: Graph Neural Network (GNN), Contrastive Learning (CL), recommender system, negative sampling, data augmentation

摘要:

对比学习(CL)具有可从原始数据中提取自监督信号的特性,为推荐系统解决数据稀疏问题提供了有力支持。然而,现有的CL推荐算法大多着眼于改进模型结构和数据增强方法,忽视了提升推荐任务中的负样本质量以及挖掘用户与项目之间潜在隐性关系的重要性。针对此问题,提出一种基于混合负采样的图对比学习推荐算法(HSGCL)。首先,与均匀采样方法从真实数据中采样不同,所提算法使用正样本混合方法将正样本信息融入负样本中;其次,通过跳跃混合方法创造富含信息的难负样本;同时,通过使用节点丢弃(ND),改变图结构以生成多个视图,并在嵌入空间中引入可控的均匀噪声平滑调整学习表示的均匀性;最后,将推荐主任务与CL任务进行联合训练。在Douban-Book、Yelp2018和Amazon-Kindle这3个公共数据集上的数值实验结果表明,相较于基线模型——轻量化图卷积网络(LightGCN),所提算法在召回率(Recall@20)上分别提升了23%、13%和7%,在归一化折损累积增益(NDCG@20)上分别提升了32%、14%和5%,且在提升负样本嵌入信息多样性方面表现优异。可见,所提算法从负采样方法和数据增强两方面进行改进,提高了负样本质量、表示分布的均匀性和推荐算法的准确性。

关键词: 图神经网络, 对比学习, 推荐系统, 负采样, 数据增强

CLC Number: