《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (4): 1053-1060.DOI: 10.11772/j.issn.1001-9081.2024040419
收稿日期:
2024-04-10
修回日期:
2024-07-15
接受日期:
2024-07-18
发布日期:
2025-04-08
出版日期:
2025-04-10
通讯作者:
景明利
作者简介:
田仁杰(2000—),男,陕西渭南人,硕士研究生,主要研究方向:推荐系统基金资助:
Renjie TIAN1, Mingli JING1(), Long JIAO2, Fei WANG1
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.Supported by:
摘要:
对比学习(CL)具有可从原始数据中提取自监督信号的特性,为推荐系统解决数据稀疏问题提供了有力支持。然而,现有的CL推荐算法大多着眼于改进模型结构和数据增强方法,忽视了提升推荐任务中的负样本质量以及挖掘用户与项目之间潜在隐性关系的重要性。针对此问题,提出一种基于混合负采样的图对比学习推荐算法(HSGCL)。首先,与均匀采样方法从真实数据中采样不同,所提算法使用正样本混合方法将正样本信息融入负样本中;其次,通过跳跃混合方法创造富含信息的难负样本;同时,通过使用节点丢弃(ND),改变图结构以生成多个视图,并在嵌入空间中引入可控的均匀噪声平滑调整学习表示的均匀性;最后,将推荐主任务与CL任务进行联合训练。在Douban-Book、Yelp2018和Amazon-Kindle这3个公共数据集上的数值实验结果表明,相较于基线模型——轻量化图卷积网络(LightGCN),所提算法在召回率(Recall@20)上分别提升了23%、13%和7%,在归一化折损累积增益(NDCG@20)上分别提升了32%、14%和5%,且在提升负样本嵌入信息多样性方面表现优异。可见,所提算法从负采样方法和数据增强两方面进行改进,提高了负样本质量、表示分布的均匀性和推荐算法的准确性。
中图分类号:
田仁杰, 景明利, 焦龙, 王飞. 基于混合负采样的图对比学习推荐算法[J]. 计算机应用, 2025, 45(4): 1053-1060.
Renjie TIAN, Mingli JING, Long JIAO, Fei WANG. Recommendation algorithm of graph contrastive learning based on hybrid negative sampling[J]. Journal of Computer Applications, 2025, 45(4): 1053-1060.
数据集 | 用户数 | 项目数 | 交互数 | 密集度/% |
---|---|---|---|---|
Douban-Book | 13 024 | 22 347 | 792 062 | 0.272 |
Yelp2018 | 31 668 | 38 048 | 1 561 406 | 0.130 |
Amazon-Kindle | 138 333 | 98 572 | 1 909 965 | 0.014 |
表1 3个数据集的统计信息
Tab. 1 Statistical information of three datasets
数据集 | 用户数 | 项目数 | 交互数 | 密集度/% |
---|---|---|---|---|
Douban-Book | 13 024 | 22 347 | 792 062 | 0.272 |
Yelp2018 | 31 668 | 38 048 | 1 561 406 | 0.130 |
Amazon-Kindle | 138 333 | 98 572 | 1 909 965 | 0.014 |
算法 | Douban-Book | Yelp2018 | Amazon-Kindle | |||
---|---|---|---|---|---|---|
R@20 | N@20 | R@20 | N@20 | R@20 | N@20 | |
LightGCN | 0.150 1 | 0.128 2 | 0.063 9 | 0.052 5 | 0.205 7 | 0.131 5 |
SGL | 0.173 2 | 0.155 1 | 0.067 5 | 0.055 5 | 0.210 5 | 0.135 1 |
DNN+SSL | 0.136 6 | 0.114 8 | 0.048 3 | 0.038 2 | 0.152 0 | 0.098 9 |
BUIR | 0.112 7 | 0.089 3 | 0.048 7 | 0.040 4 | 0.092 2 | 0.052 8 |
MSGCL | 0.176 3 | 0.158 0 | 0.068 8 | 0.055 8 | 0.210 1 | 0.128 3 |
MixGCF | 0.173 1 | 0.155 2 | 0.071 3 | 0.058 4 | 0.212 8 | 0.132 7 |
SimGCL | 0.177 1 | 0.158 1 | 0.210 2 | 0.136 5 | ||
AdaGCL | 0.071 5 | 0.059 4 | ||||
HSGCL | 0.184 1 (+23%) | 0.169 3 (+32%) | 0.071 9 (+13%) | 0.059 9 (+14%) | 0.219 5 (+7%) | 0.137 6 (+5%) |
表2 不同算法的整体性能比较
Tab. 2 Overall performance comparison of different algorithms
算法 | Douban-Book | Yelp2018 | Amazon-Kindle | |||
---|---|---|---|---|---|---|
R@20 | N@20 | R@20 | N@20 | R@20 | N@20 | |
LightGCN | 0.150 1 | 0.128 2 | 0.063 9 | 0.052 5 | 0.205 7 | 0.131 5 |
SGL | 0.173 2 | 0.155 1 | 0.067 5 | 0.055 5 | 0.210 5 | 0.135 1 |
DNN+SSL | 0.136 6 | 0.114 8 | 0.048 3 | 0.038 2 | 0.152 0 | 0.098 9 |
BUIR | 0.112 7 | 0.089 3 | 0.048 7 | 0.040 4 | 0.092 2 | 0.052 8 |
MSGCL | 0.176 3 | 0.158 0 | 0.068 8 | 0.055 8 | 0.210 1 | 0.128 3 |
MixGCF | 0.173 1 | 0.155 2 | 0.071 3 | 0.058 4 | 0.212 8 | 0.132 7 |
SimGCL | 0.177 1 | 0.158 1 | 0.210 2 | 0.136 5 | ||
AdaGCL | 0.071 5 | 0.059 4 | ||||
HSGCL | 0.184 1 (+23%) | 0.169 3 (+32%) | 0.071 9 (+13%) | 0.059 9 (+14%) | 0.219 5 (+7%) | 0.137 6 (+5%) |
变体 | Douban-Book | Yelp2018 | Amazon-Kindle | |||
---|---|---|---|---|---|---|
R@20 | N@20 | R@20 | N@20 | R@20 | N@20 | |
HSGCLa | 0.162 2 | 0.147 5 | 0.059 8 | 0.049 5 | 0.129 2 | 0.081 0 |
HSGCLp | 0.182 1 | 0.167 4 | 0.070 2 | 0.058 2 | 0.216 3 | 0.135 9 |
HSGCLg | 0.183 9 | 0.169 0 | 0.071 2 | 0.058 7 | 0.218 2 | 0.137 1 |
表 3 不同噪声形态的性能比较
Tab. 3 Performance comparison of different noise patterns
变体 | Douban-Book | Yelp2018 | Amazon-Kindle | |||
---|---|---|---|---|---|---|
R@20 | N@20 | R@20 | N@20 | R@20 | N@20 | |
HSGCLa | 0.162 2 | 0.147 5 | 0.059 8 | 0.049 5 | 0.129 2 | 0.081 0 |
HSGCLp | 0.182 1 | 0.167 4 | 0.070 2 | 0.058 2 | 0.216 3 | 0.135 9 |
HSGCLg | 0.183 9 | 0.169 0 | 0.071 2 | 0.058 7 | 0.218 2 | 0.137 1 |
变体 | Douban-Book | Yelp2018 | Amazon-Kindle | |||
---|---|---|---|---|---|---|
R@20 | N@20 | R@20 | N@20 | R@20 | N@20 | |
HSGCL/m | 0.173 2 | 0.150 0 | 0.067 0 | 0.055 2 | 0.210 0 | 0.132 0 |
HSGCL/d | 0.175 0 | 0.152 4 | 0.067 9 | 0.055 7 | 0.213 0 | 0.133 4 |
HSGCL/n | 0.176 9 | 0.155 8 | 0.068 6 | 0.056 3 | 0.215 2 | 0.134 8 |
表4 HSGCL关键模块的消融实验结果
Tab. 4 Ablation experimental results of key modules in HSGCL
变体 | Douban-Book | Yelp2018 | Amazon-Kindle | |||
---|---|---|---|---|---|---|
R@20 | N@20 | R@20 | N@20 | R@20 | N@20 | |
HSGCL/m | 0.173 2 | 0.150 0 | 0.067 0 | 0.055 2 | 0.210 0 | 0.132 0 |
HSGCL/d | 0.175 0 | 0.152 4 | 0.067 9 | 0.055 7 | 0.213 0 | 0.133 4 |
HSGCL/n | 0.176 9 | 0.155 8 | 0.068 6 | 0.056 3 | 0.215 2 | 0.134 8 |
1 | ZHANG S, TONG H, XU J, et al. Graph convolutional networks: a comprehensive review[J]. Computational Social Networks, 2019, 6: No.11. |
2 | 于蒙,何文涛,周绪川,等. 推荐系统综述[J]. 计算机应用, 2022, 42(6): 1898-1913. |
YU M, HE W T, ZHOU X C, et al. Review of recommendation system[J]. Journal of Computer Applications, 2022, 42(6): 1898-1913. | |
3 | 孙轩宇,史艳翠. 融合项目影响力的图神经网络会话推荐模型[J]. 计算机应用, 2023, 43(12): 3689-3696. |
SUN X Y, SHI Y C. Session-based recommendation model by graph neural network fused with item influence[J]. Journal of Computer Applications, 2023, 43(12): 3689-3696. | |
4 | 潘润超,虞启山,熊泓霏,等. 基于深度图神经网络的协同推荐算法[J]. 计算机应用, 2023, 43(9): 2741-2746. |
PAN R C, YU Q S, XIONG H F, et al. Collaborative recommendation algorithm based on deep graph neural network[J]. Journal of Computer Applications, 2023, 43(9): 2741-2746. | |
5 | WANG X, HE X, WANG M, et al. Neural graph collaborative filtering[C]// Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2019: 165-174. |
6 | HE X, DENG K, WANG X, et al. LightGCN: simplifying and powering graph convolution network for recommendation[C]// Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2020: 639-648. |
7 | LIU Z, MA Y, OUYANG Y, et al. Contrastive learning for recommender system[EB/OL]. [2024-04-01].. |
8 | YIN Y, WANG Q, HUANG S, et al. AutoGCL: automated graph contrastive learning via learnable view generators[C]// Proceedings of the 36th AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2022: 8892-8900. |
9 | 韩滕跃,牛少彰,张文. 基于对比学习的多模态序列推荐算法[J]. 计算机应用, 2022, 42(6): 1683-1688. |
HAN T Y, NIU S Z, ZHANG W. Multimodal sequential recommendation algorithm based on contrastive learning[J]. Journal of Computer Applications, 2022, 42(6): 1683-1688. | |
10 | SHEN X, SUN D, PAN S, et al. Neighbor contrastive learning on learnable graph augmentation[C]// Proceedings of the 37th AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2023: 9782-9791. |
11 | ZHAO Q, WU Z, ZHANG Z, et al. Long-tail augmented graph contrastive learning for recommendation[C]// Proceedings of the 2023 Joint European Conference on Machine Learning and Knowledge Discovery in Databases, LNCS 14172. Cham: Springer, 2023: 387-403. |
12 | LIANG K, LIU Y, ZHOU S, et al. Knowledge graph contrastive learning based on relation-symmetrical structure[J]. IEEE Transactions on Knowledge and Data Engineering, 2023, 36(1): 226-238. |
13 | CHEN M, HUANG C, XIA L, et al. Heterogeneous graph contrastive learning for recommendation[C]// Proceedings of the 16th ACM International Conference on Web Search and Data Mining. New York: ACM, 2023: 544-552. |
14 | WU J, WANG X, FENG F, et al. Self-supervised graph learning for recommendation[C]// Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2021: 726-735. |
15 | CAI X, HUANG C, XIA L, et al. LightGCL: simple yet effective graph contrastive learning for recommendation[EB/OL]. [2024-04-01].. |
16 | YU J, YIN H, XIA X, et al. Are graph augmentations necessary? simple graph contrastive learning for recommendation[C]// Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2022: 1294-1303. |
17 | YU J, XIA X, CHEN T, et al. XSimGCL: towards extremely simple graph contrastive learning for recommendation[J]. IEEE Transactions on Knowledge and Data Engineering, 2024, 36(2): 913-926. |
18 | HUANG T, DONG Y, DING M, et al. MixGCF: an improved training method for graph neural network-based recommender systems[C]// Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. New York: ACM, 2021: 665-674. |
19 | LIN Z, TIAN C, HOU Y, et al. Improving graph collaborative filtering with neighborhood-enriched contrastive learning[C]// Proceedings of the ACM Web Conference 2022. New York: ACM, 2022: 2320-2329. |
20 | JIANG Y, HUANG C, HUANG L. Adaptive graph contrastive learning for recommendation[C]// Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. New York: ACM, 2023: 4252-4261. |
21 | ZHOU K, WANG H, ZHAO W X, et al. S3-Rec: self-supervised learning for sequential recommendation with mutual information maximization[C]// Proceedings of the 29th ACM International Conference on Information and Knowledge Management. New York: ACM, 2020: 1893-1902. |
22 | WEI Y, WANG X, LI Q, et al. Contrastive learning for cold-start recommendation[C]// Proceedings of the 29th ACM International Conference on Multimedia. New York: ACM, 2021: 5382-5390. |
23 | QIU R, HUANG Z, YIN H, et al. Contrastive learning for representation degeneration problem in sequential recommendation[C]// Proceedings of the 15th ACM International Conference on Web Search and Data Mining. New York: ACM, 2022: 813-823. |
24 | YOU Y, CHEN T, SUI Y, et al. Graph contrastive learning with augmentations[C]// Proceedings of the 34th International Conference on Neural Information Processing Systems. Red Hook: Curran Associates Inc., 2020: 5812-5823. |
25 | 范伟,周魏,文俊浩. 基于异构图的双通道交叉自适应对比学习推荐[J]. 电子学报, 2023, 51(7):1929-1938. |
FAN W, ZHOU W, WEN J H. Recommendation based on heterogeneous graph using dual channel cross-adaptive contrastive learning[J]. Acta Electronica Sinica, 2023, 51(7): 1929-1938. | |
26 | YANG Z, DING M, ZHOU C, et al. Understanding negative sampling in graph representation learning[C]// Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. New York: ACM, 2020: 1666-1676. |
27 | 黄河源,慕彩红,方云飞,等. 使用图负采样的图卷积神经网络推荐算法[J]. 西安电子科技大学学报, 2024, 51(1):86-99. |
HUANG H Y, MU C H, FANG Y F, et al. Graph convolution neural network for recommendation using graph negative sampling[J]. Journal of Xidian University, 2024, 51(1):86-99. | |
28 | KALANTIDIS Y, SARIYILDIZ M B, PION N, et al. Hard negative mixing for contrastive learning[C]// Proceedings of the 34th International Conference on Neural Information Processing Systems. Red Hook: Curran Associates Inc., 2020: 21798-21809. |
29 | ZHANG H, CISSE M, DAUPHIN Y N, et al. mixup: Beyond empirical risk minimization[EB/OL]. [2024-04-01].. |
30 | ZHANG W, CHEN T, WANG J, et al. Optimizing top-N collaborative filtering via dynamic negative item sampling[C]// Proceedings of the 36th International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2013: 785-788. |
31 | GUTMANN M, HYVÄRINEN A. Noise-contrastive estimation: a new estimation principle for unnormalized statistical models[C]// Proceedings of the 13th International Conference on Artificial Intelligence and Statistics. New York: JMLR.org, 2010: 297-304. |
32 | YAO T, YI X, CHENG D Z, et al. Self-supervised learning for large-scale item recommendations[C]// Proceedings of the 30th ACM International Conference on Information and Knowledge Management. New York: ACM, 2021: 4321-4330. |
33 | LEE D, KANG S, JU H, et al. Bootstrapping user and item representations for one-class collaborative filtering[C]// Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2021: 317-326. |
34 | 袁琮淇,刘渊,刘静文. 基于混合采样的图对比学习推荐算法[J]. 计算机应用研究, 2023, 40(5): 1346-1351. |
YUAN C Q, LIU Y, LIU J W. Graph contrastive learning recommendation algorithm based on mixed sampling[J]. Application Research of Computers, 2023, 40(5): 1346-1351. |
[1] | 王聪, 史艳翠. 基于多视角学习的图神经网络群组推荐模型[J]. 《计算机应用》唯一官方网站, 2025, 45(4): 1205-1212. |
[2] | 游兰, 张雨昂, 刘源, 陈智军, 王伟, 曾星, 何张玮. 基于协作贡献网络的开源项目开发者推荐[J]. 《计算机应用》唯一官方网站, 2025, 45(4): 1213-1222. |
[3] | 孙海涛, 林佳瑜, 梁祖红, 郭洁. 结合标签混淆的中文文本分类数据增强技术[J]. 《计算机应用》唯一官方网站, 2025, 45(4): 1113-1119. |
[4] | 党伟超, 温鑫瑜, 高改梅, 刘春霞. 基于多视图多尺度对比学习的图协同过滤[J]. 《计算机应用》唯一官方网站, 2025, 45(4): 1061-1068. |
[5] | 王元龙, 刘亭华, 张虎. 基于跨模态对比学习的常识问答模型[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 732-738. |
[6] | 盛坤, 王中卿. 基于大语言模型和数据增强的通感隐喻分析[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 794-800. |
[7] | 孙晨伟, 侯俊利, 刘祥根, 吕建成. 面向工程图纸理解的大语言模型提示生成方法[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 801-807. |
[8] | 陈维, 施昌勇, 马传香. 基于多模态数据融合的农作物病害识别方法[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 840-848. |
[9] | 杨晟, 李岩. 面向目标检测的对比知识蒸馏方法[J]. 《计算机应用》唯一官方网站, 2025, 45(2): 354-361. |
[10] | 严雪文, 黄章进. 基于对比学习的小样本图像分类方法[J]. 《计算机应用》唯一官方网站, 2025, 45(2): 383-391. |
[11] | 蔡启健, 谭伟. 语义图增强的多模态推荐算法[J]. 《计算机应用》唯一官方网站, 2025, 45(2): 421-427. |
[12] | 马汉达, 吴亚东. 多域时空层次图神经网络的空气质量预测[J]. 《计算机应用》唯一官方网站, 2025, 45(2): 444-452. |
[13] | 富坤, 应世聪, 郑婷婷, 屈佳捷, 崔静远, 李建伟. 面向小样本节点分类的图数据增强方法[J]. 《计算机应用》唯一官方网站, 2025, 45(2): 392-402. |
[14] | 余肖生, 王智鑫. 基于多层次图对比学习的序列推荐模型[J]. 《计算机应用》唯一官方网站, 2025, 45(1): 106-114. |
[15] | 程子栋, 李鹏, 朱枫. 物联网威胁情报知识图谱中潜在关系的挖掘[J]. 《计算机应用》唯一官方网站, 2025, 45(1): 24-31. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||