《计算机应用》唯一官方网站 ›› 2024, Vol. 44 ›› Issue (4): 1121-1127.DOI: 10.11772/j.issn.1001-9081.2023050613
所属专题: 数据科学与技术
郭洁1, 林佳瑜2(), 梁祖红1,3, 罗孝波1, 孙海涛1
收稿日期:
2023-05-22
修回日期:
2023-07-07
接受日期:
2023-07-14
发布日期:
2023-08-01
出版日期:
2024-04-10
通讯作者:
林佳瑜
作者简介:
郭洁(1998—),女,湖南常德人,硕士研究生,CCF会员,主要研究方向:推荐系统、数据挖掘基金资助:
Jie GUO1, Jiayu LIN2(), Zuhong LIANG1,3, Xiaobo LUO1, Haitao SUN1
Received:
2023-05-22
Revised:
2023-07-07
Accepted:
2023-07-14
Online:
2023-08-01
Published:
2024-04-10
Contact:
Jiayu LIN
About author:
GUO Jie, born in 1998, M. S. candidate. Her research interests include recommendation system, data mining.Supported by:
摘要:
知识图谱(KG)作为一种辅助信息能够有效提高推荐模型的推荐质量,但现有的基于图神经网络(GNN)的知识感知推荐模型存在节点信息利用不均衡问题。为此,提出一种基于知识感知和跨层次对比学习的推荐方法(KCCL)。所提方法在GNN的知识感知推荐模型基础上引入对比学习范式,以缓解稀疏的交互数据和嘈杂的KG在信息聚合时节点间依赖的关系偏离真实表示导致节点信息利用不均衡的问题。首先,将用户?物品交互图和物品知识图整合为一个异质图,并通过基于图注意力机制的GNN实现用户和物品的节点表示;其次,在信息传播聚合层中加入一致的噪声进行数据增强,得到不同阶层的节点表示,并将获得的最外层节点表示与最内层节点表示进行跨层次对比学习;最后,联合优化推荐监督任务和对比学习辅助任务,得到最终各节点表示。在DBbook2014和MovieLens-1m数据集上的实验结果显示,相较于次优对比方法,KCCL的Recall@10分别提升了3.66%和0.66%,NDCG@10分别提升了3.57%和3.29%,验证了KCCL的有效性。
中图分类号:
郭洁, 林佳瑜, 梁祖红, 罗孝波, 孙海涛. 基于知识感知和跨层次对比学习的推荐方法[J]. 计算机应用, 2024, 44(4): 1121-1127.
Jie GUO, Jiayu LIN, Zuhong LIANG, Xiaobo LUO, Haitao SUN. Recommendation method based on knowledge‑awareness and cross-level contrastive learning[J]. Journal of Computer Applications, 2024, 44(4): 1121-1127.
数据集 | 用户数 | 物品数 | 交互数 | 稀疏率/% | 实体数 | 关系数 | 三元组数 |
---|---|---|---|---|---|---|---|
DBbook2014 | 5 576 | 2 680 | 65 961 | 99.60 | 13 882 | 13 | 34 511 |
MovieLens-1m | 6 040 | 3 240 | 998 539 | 94.90 | 14 708 | 20 | 434 189 |
表1 实验使用的数据集
Tab. 1 Datasets used for experiment
数据集 | 用户数 | 物品数 | 交互数 | 稀疏率/% | 实体数 | 关系数 | 三元组数 |
---|---|---|---|---|---|---|---|
DBbook2014 | 5 576 | 2 680 | 65 961 | 99.60 | 13 882 | 13 | 34 511 |
MovieLens-1m | 6 040 | 3 240 | 998 539 | 94.90 | 14 708 | 20 | 434 189 |
超参数名称 | 值 | 超参数名称 | 值 |
---|---|---|---|
用户、项目嵌入维度 | 64 | 学习率 | 0.001 |
实体、关系嵌入维度 | 64 | 批处理大小 | 13 882 |
优化器 | Adam | L2正则化系数 | 0.001 |
表2 KCCL的超参数设置
Tab. 2 Hyperparameters setting of KCCL
超参数名称 | 值 | 超参数名称 | 值 |
---|---|---|---|
用户、项目嵌入维度 | 64 | 学习率 | 0.001 |
实体、关系嵌入维度 | 64 | 批处理大小 | 13 882 |
优化器 | Adam | L2正则化系数 | 0.001 |
模型 | DBbook2014 | MovieLens-1m | ||
---|---|---|---|---|
Recall@10 | NDCG@10 | Recall@10 | NDCG@10 | |
BPR | 0.160 2 | 0.113 1 | 0.128 8 | 0.334 6 |
LightGCN | 0.204 6 | 0.144 6 | 0.137 2 | 0.340 8 |
CKE | 0.163 3 | 0.112 3 | 0.132 1 | 0.326 1 |
RippleNet | 0.092 9 | 0.059 5 | 0.086 5 | 0.240 8 |
KGCN | 0.144 0 | 0.096 2 | 0.126 5 | 0.318 6 |
KGAT | 0.188 0 | 0.119 8 | 0.132 1 | 0.322 4 |
KGIN | 0.196 7 | 0.132 0 | ||
CG-KGR | 0.130 5 | 0.319 7 | ||
KCCL | 0.220 9 | 0.153 8 | 0.151 9 | 0.357 9 |
表3 不同模型的实验结果
Tab. 3 Experimental results of different models
模型 | DBbook2014 | MovieLens-1m | ||
---|---|---|---|---|
Recall@10 | NDCG@10 | Recall@10 | NDCG@10 | |
BPR | 0.160 2 | 0.113 1 | 0.128 8 | 0.334 6 |
LightGCN | 0.204 6 | 0.144 6 | 0.137 2 | 0.340 8 |
CKE | 0.163 3 | 0.112 3 | 0.132 1 | 0.326 1 |
RippleNet | 0.092 9 | 0.059 5 | 0.086 5 | 0.240 8 |
KGCN | 0.144 0 | 0.096 2 | 0.126 5 | 0.318 6 |
KGAT | 0.188 0 | 0.119 8 | 0.132 1 | 0.322 4 |
KGIN | 0.196 7 | 0.132 0 | ||
CG-KGR | 0.130 5 | 0.319 7 | ||
KCCL | 0.220 9 | 0.153 8 | 0.151 9 | 0.357 9 |
模型 | DBbook2014 | MovieLens-1m | ||
---|---|---|---|---|
Recall@10 | NDCG@10 | Recall@10 | NDCG@10 | |
KCCL | 0.220 9 | 0.153 8 | 0.151 9 | 0.357 9 |
KCCL-CL | 0.218 0 | 0.147 0 | 0.143 6 | 0.351 8 |
KCCL-N | 0.218 5 | 0.147 7 | 0.144 1 | 0.352 0 |
表4 消融实验结果
Tab. 4 Results of ablation experiments
模型 | DBbook2014 | MovieLens-1m | ||
---|---|---|---|---|
Recall@10 | NDCG@10 | Recall@10 | NDCG@10 | |
KCCL | 0.220 9 | 0.153 8 | 0.151 9 | 0.357 9 |
KCCL-CL | 0.218 0 | 0.147 0 | 0.143 6 | 0.351 8 |
KCCL-N | 0.218 5 | 0.147 7 | 0.144 1 | 0.352 0 |
DBbook2014 | MovieLens-1m | |||
---|---|---|---|---|
Recall@10 | NDCG@10 | Recall@10 | NDCG@10 | |
1×10-1 | 0.193 8 | 0.143 9 | 0.146 5 | 0.325 7 |
1×10-2 | 0.220 9 | 0.153 8 | 0.151 9 | 0.357 9 |
1×10-3 | 0.217 8 | 0.149 3 | 0.145 7 | 0.351 8 |
1×10-4 | 0.212 0 | 0.142 4 | 0.143 4 | 0.351 8 |
表5 参数λ1对Recall和NDCG的影响
Tab. 5 Impact of parameter λ1 on Recall and NDCG
DBbook2014 | MovieLens-1m | |||
---|---|---|---|---|
Recall@10 | NDCG@10 | Recall@10 | NDCG@10 | |
1×10-1 | 0.193 8 | 0.143 9 | 0.146 5 | 0.325 7 |
1×10-2 | 0.220 9 | 0.153 8 | 0.151 9 | 0.357 9 |
1×10-3 | 0.217 8 | 0.149 3 | 0.145 7 | 0.351 8 |
1×10-4 | 0.212 0 | 0.142 4 | 0.143 4 | 0.351 8 |
DBbook2014 | MovieLens-1m | |||
---|---|---|---|---|
Recall@10 | NDCG@10 | Recall@10 | NDCG@10 | |
0.1 | 0.218 3 | 0.147 5 | 0.150 9 | 0.352 5 |
0.2 | 0.220 9 | 0.153 8 | 0.151 9 | 0.357 9 |
0.3 | 0.219 9 | 0.151 8 | 0.148 5 | 0.352 9 |
0.4 | 0.218 7 | 0.151 6 | 0.144 7 | 0.350 0 |
0.5 | 0.217 6 | 0.149 7 | 0.143 5 | 0.348 9 |
表6 参数τ对Recall和NDCG的影响
Tab. 6 Impact of parameter τ on Recall and NDCG
DBbook2014 | MovieLens-1m | |||
---|---|---|---|---|
Recall@10 | NDCG@10 | Recall@10 | NDCG@10 | |
0.1 | 0.218 3 | 0.147 5 | 0.150 9 | 0.352 5 |
0.2 | 0.220 9 | 0.153 8 | 0.151 9 | 0.357 9 |
0.3 | 0.219 9 | 0.151 8 | 0.148 5 | 0.352 9 |
0.4 | 0.218 7 | 0.151 6 | 0.144 7 | 0.350 0 |
0.5 | 0.217 6 | 0.149 7 | 0.143 5 | 0.348 9 |
DBbook2014 | MovieLens-1m | |||
---|---|---|---|---|
Recall@10 | NDCG@10 | Recall@10 | NDCG@10 | |
0.1 | 0.217 9 | 0.151 9 | 0.151 3 | 0.356 5 |
0.2 | 0.218 3 | 0.153 4 | 0.151 9 | 0.357 9 |
0.3 | 0.220 9 | 0.153 8 | 0.151 2 | 0.353 0 |
0.4 | 0.220 1 | 0.153 5 | 0.150 6 | 0.353 1 |
0.5 | 0.219 0 | 0.153 0 | 0.149 6 | 0.350 1 |
表7 参数p对Recall和NDCG的影响
Tab. 7 Impact of parameter p on Recall and NDCG
DBbook2014 | MovieLens-1m | |||
---|---|---|---|---|
Recall@10 | NDCG@10 | Recall@10 | NDCG@10 | |
0.1 | 0.217 9 | 0.151 9 | 0.151 3 | 0.356 5 |
0.2 | 0.218 3 | 0.153 4 | 0.151 9 | 0.357 9 |
0.3 | 0.220 9 | 0.153 8 | 0.151 2 | 0.353 0 |
0.4 | 0.220 1 | 0.153 5 | 0.150 6 | 0.353 1 |
0.5 | 0.219 0 | 0.153 0 | 0.149 6 | 0.350 1 |
模型 | 5%随机噪声 | 10%随机噪声 | ||
---|---|---|---|---|
Recall@10 | NDCG@10 | Recall@10 | NDCG@10 | |
KGAT | 0.131 1 | 0.319 3 | 0.125 9 | 0.316 8 |
KGIN | 0.148 7 | 0.342 1 | 0.144 8 | 0.340 2 |
KCCL | 0.149 6 | 0.353 5 | 0.149 3 | 0.351 7 |
表8 嘈杂的知识图谱对Recall和NDCG影响
Tab. 8 Influence of noisy knowledge graph on Recall and NDCG
模型 | 5%随机噪声 | 10%随机噪声 | ||
---|---|---|---|---|
Recall@10 | NDCG@10 | Recall@10 | NDCG@10 | |
KGAT | 0.131 1 | 0.319 3 | 0.125 9 | 0.316 8 |
KGIN | 0.148 7 | 0.342 1 | 0.144 8 | 0.340 2 |
KCCL | 0.149 6 | 0.353 5 | 0.149 3 | 0.351 7 |
1 | WANG Z H, HOU D Z. Research on book recommendation algorithm based on collaborative filtering and interest degree [J]. Wireless Communications & Mobile Computing, 2021, 2021: 7036357. 10.1155/2021/7036357 |
2 | MUSTO C, TRATTNER C, STARKE A, et al. Towards a knowledge-aware food recommender system exploiting holistic user models [C]// Proceedings of the 28th ACM Conference on User Modeling, Adaptation and Personalization. New York: ACM, 2020:333-337. 10.1145/3340631.3394880 |
3 | DARBAN Z Z, VALIPOUR M H. GHRS: graph-based hybrid recommendation system with application to movie recommendation [J]. Expert Systems with Applications, 2022, 200: 116850. 10.1016/j.eswa.2022.116850 |
4 | HANSEN C, HANSEN C, MAYSTRE L, et al. Contextual and sequential user embeddings for large-scale music recommendation [C]// Proceedings of the 14th ACM Conference on Recommender Systems. New York: ACM, 2020:53-62. 10.1145/3383313.3412248 |
5 | YU J, GAO M, LI J, et al. Adaptive implicit friends identification over heterogeneous network for social recommendation [C]// Proceedings of the 27th ACM International Conference on Information and Knowledge Management. New York : ACM, 2018:357-366. 10.1145/3269206.3271725 |
6 | LIU D, LI J, DU B, et al. DAML: dual attention mutual learning between ratings and reviews for item recommendation [C]// Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. New York: ACM, 2019:344-352. 10.1145/3292500.3330906 |
7 | WANG H, ZHAO M, XIE X, et al. Knowledge graph convolutional networks for recommender systems [C]// Proceedings of the 28th World Wide Web Conference. New York: ACM, 2019:3307-3313. 10.1145/3308558.3313417 |
8 | WANG H, ZHANG F, ZHANG M, et al. Knowledge-aware graph neural networks with label smoothness regularization for recommender systems [C]// Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. New York: ACM, 2019:968-977. 10.1145/3292500.3330836 |
9 | WANG X, HE X, CAO Y, et al. KGAT:knowledge graph attention network for recommendation [C]// Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. New York: ACM, 2019:950-958. 10.1145/3292500.3330989 |
10 | WANG X, HUANG T, WANG D, et al. Learning intents behind interactions with knowledge graph for recommendation [C]// Proceedings of the 2021 Word Wide Web Conference. New York: ACM, 2021:878-887. 10.1145/3442381.3450133 |
11 | CHEN Y, YANG Y, WANG Y, et al. Attentive knowledge-aware graph convolutional networks with collaborative guidance for personalized recommendation[C]// Proceedings of the 2022 IEEE 38th International Conference on Data Engineering. Piscataway: IEEE, 2022:299-311. 10.1109/icde53745.2022.00027 |
12 | 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. 10.1145/3404835.3462862 |
13 | 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. 10.1145/3477495.3531937 |
14 | 田萱, 陈杭雪. 推荐任务中知识图谱嵌入应用研究综述 [J]. 计算机科学与探索, 2022, 16(8): 1681-1705. 10.3778/j.issn.1673-9418.2112070 |
TIAN X, CHEN H X. Survey on applications of knowledge graph embedding in recommendation tasks [J]. Journal of Frontiers of Computer Science and Technology, 2022, 16(8): 1681-1705. 10.3778/j.issn.1673-9418.2112070 | |
15 | GUO Q, ZHUANG F, QIN C, et al. A survey on knowledge graph-based recommender systems [J]. IEEE Transactions on Knowledge and Data Engineering, 2020, 34(8): 3549-3568. |
16 | HUANG C, WANG X, HE X, et al. Self-supervised learning for recommender system [C]// Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2022:3440-3443. 10.1145/3477495.3532684 |
17 | VELIČKOVIĆ P, CUCURULL G, CASANOVA A, et al. Graph attention networks [EB/OL]. (2018-02-04) [2021-03-20]. . |
18 | CHEN J, DONG H, WANG X, et al. Bias and debias in recommender system: a survey and future directions [J]. ACM Transactions on Information Systems, 2023, 41(3): No. 67. 10.1145/3564284 |
19 | CHEN T, KORNBLITH S, NOROUZI M, et al. A simple framework for contrastive learning of visual representations [C]// Proceedings of the 37th International Conference on Machine Learning. New York: JMLR.org, 2020:1597-1607. |
20 | CAO Y, WANG X, HE X, et al. Unifying knowledge graph learning and recommendation: towards a better understanding of user preferences [C]// Proceedings of the 2019 World Wide Web Conference. New York: ACM, 2019:151-161. 10.1145/3308558.3313705 |
21 | LEHMANN J, ISELE R, JAKOB M, et al. Dbpedia — a large-scale, multilingual knowledge base extracted from Wikipedia [J]. Semantic Web, 2015, 6(2): 167-195. 10.3233/sw-140134 |
22 | ZHAO W X, MU S, HOU Y, et al. RecBole: towards a unified, comprehensive and efficient framework for recommendation algorithms [C]// Proceedings of the 30th ACM International Conference on Information & Knowledge Management. New York: ACM, 2021:4653-4664. 10.1145/3459637.3482016 |
23 | RENDLE S, FREUDENTHALER C, GANTNER Z, et al. BPR: Bayesian personalized ranking from implicit feedback [C]// Proceedings of the 25th Conference on Uncertainty in Artificial Intelligence. New York: ACM, 2009:452-461. |
24 | 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. 10.1145/3397271.3401063 |
25 | ZHANG F, YUAN N J, LIAN D, et al. Collaborative knowledge base embedding for recommender systems [C]// Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. New York: ACM, 2016:353-362. 10.1145/2939672.2939673 |
26 | WANG H, ZHANG F, WANG J, et al. RippleNet:propagating user preferences on the knowledge graph for recommender systems [C]// Proceedings of the 27th ACM International Conference on Information and Knowledge Management. New York: ACM, 2018:417-426. 10.1145/3269206.3271739 |
[1] | 唐廷杰, 黄佳进, 秦进. 基于图辅助学习的会话推荐[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2711-2718. |
[2] | 薛桂香, 王辉, 周卫峰, 刘瑜, 李岩. 基于知识图谱和时空扩散图卷积网络的港口交通流量预测[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2952-2957. |
[3] | 杜郁, 朱焱. 构建预训练动态图神经网络预测学术合作行为消失[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2726-2731. |
[4] | 杨兴耀, 陈羽, 于炯, 张祖莲, 陈嘉颖, 王东晓. 结合自我特征和对比学习的推荐模型[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2704-2710. |
[5] | 武杰, 张安思, 吴茂东, 张仪宗, 王从宝. 知识图谱在装备故障诊断领域的研究与应用综述[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2651-2659. |
[6] | 杨航, 李汪根, 张根生, 王志格, 开新. 基于图神经网络的多层信息交互融合算法用于会话推荐[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2719-2725. |
[7] | 杨帆, 邹窈, 朱明志, 马振伟, 程大伟, 蒋昌俊. 基于图注意力Transformer神经网络的信用卡欺诈检测模型[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2634-2642. |
[8] | 赵宇博, 张丽萍, 闫盛, 侯敏, 高茂. 基于改进分段卷积神经网络和知识蒸馏的学科知识实体间关系抽取[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2421-2429. |
[9] | 杨莹, 郝晓燕, 于丹, 马垚, 陈永乐. 面向图神经网络模型提取攻击的图数据生成方法[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2483-2492. |
[10] | 徐松, 张文博, 王一帆. 基于时空信息的轻量视频显著性目标检测网络[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2192-2199. |
[11] | 蒋小霞, 黄瑞章, 白瑞娜, 任丽娜, 陈艳平. 基于事件表示和对比学习的深度事件聚类方法[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1734-1742. |
[12] | 李健京, 李贯峰, 秦飞舟, 李卫军. 基于不确定知识图谱嵌入的多关系近似推理模型[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1751-1759. |
[13] | 林欣蕊, 王晓菲, 朱焱. 基于局部扩展社区发现的学术异常引用群体检测[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1855-1861. |
[14] | 于右任, 张仰森, 蒋玉茹, 黄改娟. 融合多粒度语言知识与层级信息的中文命名实体识别模型[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1706-1712. |
[15] | 汪炅, 唐韬韬, 贾彩燕. 无负采样的正样本增强图对比学习推荐方法PAGCL[J]. 《计算机应用》唯一官方网站, 2024, 44(5): 1485-1492. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||