《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (11): 3519-3528.DOI: 10.11772/j.issn.1001-9081.2024111665
• 人工智能 • 上一篇
收稿日期:2024-11-27
修回日期:2025-04-11
接受日期:2025-04-18
发布日期:2025-04-22
出版日期:2025-11-10
通讯作者:
朱小飞
作者简介:甘轲(2000—),男,四川广安人,硕士研究生,主要研究方向:自然语言处理、知识图谱推荐基金资助:
Ke GAN, Xiaofei ZHU(
), Jiawei CHENG
Received:2024-11-27
Revised:2025-04-11
Accepted:2025-04-18
Online:2025-04-22
Published:2025-11-10
Contact:
Xiaofei ZHU
About author:GAN Ke, born in 2000, M. S. candidate. His research interests include natural language processing, knowledge graph recommendation.Supported by:摘要:
基于知识图谱的推荐方法通过结合物品属性图和用户交互图中的关系连接学习用户和物品节点的表示,从而推荐合适的物品;然而,由于知识图谱同时包含噪声关系和优质关系,当前的主要挑战在于如何规避噪声关系并挖掘优质关系。现有方法通常基于全局的重构策略,通过裁剪噪声关系或挖掘优质关系的单一方式优化知识图谱关系,以此学习用户和物品的表示。然而,基于全局视角难以充分捕捉局部信息的细节,并且容易忽略局部信息与全局信息之间的潜在互补性;此外,仅依赖裁剪或增补策略难以同时规避噪声关系的干扰并全面挖掘优质关系。针对上述问题,提出一种基于多视角关系增强知识图谱的推荐方法(RMPREKG)。该方法利用物品混合关系对齐模块和交互混合关系增强模块减少物品属性图和用户交互图中噪声关系的影响,同时深入挖掘优质高阶关系。物品混合关系对齐模块通过重要性裁剪策略和高阶关系挖掘方法分别提取局部与全局关系,并采用一种知识对齐的方法协同两类信息,可有效提炼优质物品辅助信息;交互混合关系增强模块构建了局部混合裁剪关系图和全局混合增补关系图,并通过跨通道和跨层对比学习增强两者之间的信息互补性,从而全面学习用户和物品的表示。最后,采用层级门控自适应的方法融合多组用户与物品嵌入用于推荐。当推荐长度为20时,与VRKG4Rec(Virtual Relational Knowledge Graphs for Recommendation)相比,RMPREKG在Last.FM数据集的归一化折损累计增益(NDCG)提升了10.17%,在MovieLens-1M数据集的NDCG提升了1.13%。
中图分类号:
甘轲, 朱小飞, 程佳玮. 基于多视角关系增强知识图谱的推荐方法[J]. 计算机应用, 2025, 45(11): 3519-3528.
Ke GAN, Xiaofei ZHU, Jiawei CHENG. Recommendation method based on multi-perspective relation-enhanced knowledge graph[J]. Journal of Computer Applications, 2025, 45(11): 3519-3528.
| 数据集 | 用户数 | 物品数 | 交互数 | 密度 | 知识图谱 | ||
|---|---|---|---|---|---|---|---|
| 实体数 | 关系数 | 三元 组数 | |||||
| Last.FM | 1 872 | 3 846 | 42 346 | 0.005 9 | 9 366 | 60 | 15 518 |
| ML | 6 036 | 2 347 | 753 772 | 0.053 1 | 6 729 | 7 | 20 195 |
表1 数据集统计
Tab. 1 Dataset statistics
| 数据集 | 用户数 | 物品数 | 交互数 | 密度 | 知识图谱 | ||
|---|---|---|---|---|---|---|---|
| 实体数 | 关系数 | 三元 组数 | |||||
| Last.FM | 1 872 | 3 846 | 42 346 | 0.005 9 | 9 366 | 60 | 15 518 |
| ML | 6 036 | 2 347 | 753 772 | 0.053 1 | 6 729 | 7 | 20 195 |
| 数据集 | 模型 | Metric@1 | Metric@5 | Metric@10 | Metric@20 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Recall | NDCG | HR | Recall | NDCG | HR | Recall | NDCG | HR | Recall | NDCG | HR | ||
| Last.FM | NFM | 1.50 | 3.90 | 3.90 | 5.95 | 4.80 | 13.20 | 9.52 | 6.26 | 23.10 | 14.97 | 8.05 | 29.90 |
| CKE | 4.43 | 10.31 | 10.31 | 13.06 | 11.26 | 26.58 | 18.85 | 13.62 | 25.02 | 26.95 | 16.25 | 46.11 | |
| KGAT | 2.41 | 5.67 | 5.67 | 7.86 | 9.49 | 16.74 | 12.56 | 12.58 | 25.92 | 20.59 | 16.71 | 37.67 | |
| KGTN | 4.71 | 10.90 | 10.90 | 13.40 | 14.30 | 27.37 | 19.59 | 14.12 | 37.14 | 28.06 | 16.87 | 48.87 | |
| KGIN | 6.06 | 13.98 | 13.98 | 17.42 | 15.24 | 35.92 | 24.96 | 18.32 | 47.07 | 35.49 | 21.69 | 59.07 | |
| VRKG4Rec | |||||||||||||
| RMPREKG | 7.23 | 17.30 | 17.30 | 21.12 | 18.56 | 41.47 | 29.73 | 22.08 | 53.04 | 39.69 | 25.36 | 63.89 | |
| ML | NFM | 2.98 | 27.70 | 27.70 | 11.62 | 24.88 | 62.40 | 17.88 | 23.80 | 74.40 | 27.59 | 24.84 | 84.30 |
| CKE | 3.85 | 33.54 | 33.54 | 13.62 | 28.75 | 66.65 | 21.19 | 27.89 | 78.29 | 31.30 | 29.18 | 86.51 | |
| KGAT | 2.63 | 23.15 | 23.15 | 10.03 | 20.68 | 57.01 | 16.59 | 21.09 | 71.59 | 26.37 | 23.05 | 82.15 | |
| KGTN | 2.97 | 27.55 | 27.55 | 10.63 | 23.76 | 59.90 | 17.40 | 23.80 | 72.84 | 26.91 | 24.76 | 82.67 | |
| KGIN | 4.69 | 11.99 | 11.99 | 12.92 | 31.22 | 22.66 | 15.95 | 43.22 | 31.50 | 19.35 | 53.22 | ||
| VRKG4Rec | 4.29 | 15.01 | |||||||||||
| RMPREKG | 37.28 | 37.28 | 15.18 | 31.81 | 70.54 | 23.63 | 30.89 | 81.89 | 34.46 | 32.28 | 88.39 | ||
表2 不同推荐长度的性能对比 ( %)
Tab. 2 Performance comparison for different recommendation lengths
| 数据集 | 模型 | Metric@1 | Metric@5 | Metric@10 | Metric@20 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Recall | NDCG | HR | Recall | NDCG | HR | Recall | NDCG | HR | Recall | NDCG | HR | ||
| Last.FM | NFM | 1.50 | 3.90 | 3.90 | 5.95 | 4.80 | 13.20 | 9.52 | 6.26 | 23.10 | 14.97 | 8.05 | 29.90 |
| CKE | 4.43 | 10.31 | 10.31 | 13.06 | 11.26 | 26.58 | 18.85 | 13.62 | 25.02 | 26.95 | 16.25 | 46.11 | |
| KGAT | 2.41 | 5.67 | 5.67 | 7.86 | 9.49 | 16.74 | 12.56 | 12.58 | 25.92 | 20.59 | 16.71 | 37.67 | |
| KGTN | 4.71 | 10.90 | 10.90 | 13.40 | 14.30 | 27.37 | 19.59 | 14.12 | 37.14 | 28.06 | 16.87 | 48.87 | |
| KGIN | 6.06 | 13.98 | 13.98 | 17.42 | 15.24 | 35.92 | 24.96 | 18.32 | 47.07 | 35.49 | 21.69 | 59.07 | |
| VRKG4Rec | |||||||||||||
| RMPREKG | 7.23 | 17.30 | 17.30 | 21.12 | 18.56 | 41.47 | 29.73 | 22.08 | 53.04 | 39.69 | 25.36 | 63.89 | |
| ML | NFM | 2.98 | 27.70 | 27.70 | 11.62 | 24.88 | 62.40 | 17.88 | 23.80 | 74.40 | 27.59 | 24.84 | 84.30 |
| CKE | 3.85 | 33.54 | 33.54 | 13.62 | 28.75 | 66.65 | 21.19 | 27.89 | 78.29 | 31.30 | 29.18 | 86.51 | |
| KGAT | 2.63 | 23.15 | 23.15 | 10.03 | 20.68 | 57.01 | 16.59 | 21.09 | 71.59 | 26.37 | 23.05 | 82.15 | |
| KGTN | 2.97 | 27.55 | 27.55 | 10.63 | 23.76 | 59.90 | 17.40 | 23.80 | 72.84 | 26.91 | 24.76 | 82.67 | |
| KGIN | 4.69 | 11.99 | 11.99 | 12.92 | 31.22 | 22.66 | 15.95 | 43.22 | 31.50 | 19.35 | 53.22 | ||
| VRKG4Rec | 4.29 | 15.01 | |||||||||||
| RMPREKG | 37.28 | 37.28 | 15.18 | 31.81 | 70.54 | 23.63 | 30.89 | 81.89 | 34.46 | 32.28 | 88.39 | ||
| 模型 | Last.FM | ML | ||||
|---|---|---|---|---|---|---|
| Recall | NDCG | HR | Recall | NDCG | HR | |
| RMPREKG | 39.69 | 25.36 | 63.89 | 34.46 | 32.28 | 88.39 |
| w/o align | 39.09 | 24.76 | 62.68 | 33.74 | 31.65 | 87.63 |
| w/o mask | 39.43 | 24.83 | 63.08 | 34.33 | 32.17 | 88.23 |
| w/o ecl | 38.86 | 24.69 | 62.16 | 33.31 | 30.96 | 87.54 |
| w/o layer | 39.30 | 24.61 | 62.84 | 34.25 | 32.18 | 88.18 |
| w/o channel | 39.42 | 25.03 | 63.04 | 34.30 | 32.17 | 88.27 |
表3 消融实验结果 ( %)
Tab. 3 Ablation experimental results
| 模型 | Last.FM | ML | ||||
|---|---|---|---|---|---|---|
| Recall | NDCG | HR | Recall | NDCG | HR | |
| RMPREKG | 39.69 | 25.36 | 63.89 | 34.46 | 32.28 | 88.39 |
| w/o align | 39.09 | 24.76 | 62.68 | 33.74 | 31.65 | 87.63 |
| w/o mask | 39.43 | 24.83 | 63.08 | 34.33 | 32.17 | 88.23 |
| w/o ecl | 38.86 | 24.69 | 62.16 | 33.31 | 30.96 | 87.54 |
| w/o layer | 39.30 | 24.61 | 62.84 | 34.25 | 32.18 | 88.18 |
| w/o channel | 39.42 | 25.03 | 63.04 | 34.30 | 32.17 | 88.27 |
| 数据集 | 不同聚类簇数时的HR@20/% | |||||
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| Last.FM | 63.38 | 63.46 | 63.64 | 63.89 | 63.74 | 63.53 |
| ML | 88.17 | 88.22 | 88.25 | 88.29 | 88.39 | 88.28 |
表4 聚类簇数对HR@20的影响
Tab. 4 Impact of hyperparameter c on HR@20
| 数据集 | 不同聚类簇数时的HR@20/% | |||||
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| Last.FM | 63.38 | 63.46 | 63.64 | 63.89 | 63.74 | 63.53 |
| ML | 88.17 | 88.22 | 88.25 | 88.29 | 88.39 | 88.28 |
| 融合方式 | Last.FM | ML | ||
|---|---|---|---|---|
| Recall@20 | NDCG@20 | Recall@20 | NDCG@20 | |
| Concate | 26.97 | 15.73 | 29.96 | 27.02 |
| Average | 34.37 | 21.37 | 28.30 | 26.81 |
| Gated Fusion | 39.69 | 25.36 | 34.46 | 32.28 |
表5 不同融合方式性能对比 ( %)
Tab. 5 Performance comparison of different fusion methods
| 融合方式 | Last.FM | ML | ||
|---|---|---|---|---|
| Recall@20 | NDCG@20 | Recall@20 | NDCG@20 | |
| Concate | 26.97 | 15.73 | 29.96 | 27.02 |
| Average | 34.37 | 21.37 | 28.30 | 26.81 |
| Gated Fusion | 39.69 | 25.36 | 34.46 | 32.28 |
| [1] | 赵俊逸,庄福振,敖翔,等.协同过滤推荐系统综述[J].信息安全学报,2021,6(5):17-34. |
| ZHAO J Y, ZHUANG F Z, AO X, et al. Survey of collaborative filtering recommender systems[J]. Journal of Cyber Security, 2021, 6(5): 17-34. | |
| [2] | GUO Q, ZHUANG F, QIN C, et al. A survey on knowledge graph-based recommender systems[J]. IEEE Transactions on Knowledge and Data Engineering, 2022, 34(8): 3549-3568. |
| [3] | WANG H, ZHAO M, XIE X, et al. Knowledge graph convolutional networks for recommender systems[C]// Proceedings of the 2019 World Wide Web Conference. New York: ACM, 2019: 3307-3313. |
| [4] | JIANG Y, YANG Y, XIA L, et al. DiffKG: knowledge graph diffusion model for recommendation[C]// Proceedings of the 17th ACM International Conference on Web Search and Data Mining. New York: ACM, 2024: 313-321. |
| [5] | 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 and Data Mining. New York: ACM, 2019: 950-958. |
| [6] | WANG S, YANG L, GONG J, et al. MetaKRec: collaborative meta-knowledge enhanced recommender system[C]// Proceedings of the 2022 IEEE International Conference on Big Data. Piscataway: IEEE, 2022: 665-674. |
| [7] | ZHU X, DU Y, MAO Y, et al. Knowledge-refined denoising network for robust recommendation[C]// Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2023: 362-371. |
| [8] | LU L, WANG B, ZHANG Z, et al. VRKG4Rec: virtual relational knowledge graph for recommendation[C]// Proceedings of the 16th ACM International Conference on Web Search and Data Mining. New York: ACM, 2023: 526-534. |
| [9] | XIAO H, HUANG M, ZHU X. TransG: a generative mixture model for knowledge graph embedding[C]// Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg: ACL, 2016: 2316-2325. |
| [10] | BORDES A, USUNIER N, GARCIA-DURÁN A, et al. Translating embeddings for modeling multi-relational data[C]// Proceedings of the 27th International Conference on Neural Information Processing Systems — Volume 2. Red Hook: Curran Associates Inc., 2013: 2787-2795. |
| [11] | WANG Z, ZHANG J, FENG J, et al. Knowledge graph embedding by translating on hyperplanes[C]// Proceedings of the 28th AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2014: 1112-1119. |
| [12] | JI G, HE S, XU L, et al. Knowledge graph embedding via dynamic mapping matrix[C]// Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg: ACL, 2015: 687-696. |
| [13] | XIAO H, HUANG M, HAO Y, et al. TransA: an adaptive approach for knowledge graph embedding[EB/OL]. [2024-04-11]. . |
| [14] | 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. |
| [15] | CHEN H, LI Y, SUN X, et al. Temporal meta-path guided explainable recommendation[C]// Proceedings of the 14th ACM International Conference on Web Search and Data Mining. New York: ACM, 2021: 1056-1064. |
| [16] | ZOU D, WEI W, WANG Z, et al. Improving knowledge-aware recommendation with multi-level interactive contrastive learning[C]// Proceedings of the 31st ACM International Conference on Information and Knowledge Management. New York: ACM, 2022: 2817-2826. |
| [17] | ZOU D, WEI W, MAO X L, et al. Multi-level cross-view contrastive learning for knowledge-aware recommender system[C]// Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2022: 1358-1368. |
| [18] | YANG Y, HUANG C, XIA L, et al. Knowledge 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: 1434-1443. |
| [19] | 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. |
| [20] | 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. |
| [21] | TU K, CUI P, WANG D, et al. Conditional graph attention networks for distilling and refining knowledge graphs in recommendation[C]// Proceedings of the 30th ACM International Conference on Information and Knowledge Management. New York: ACM, 2021: 1834-1843. |
| [22] | YANG Y, HUANG C, XIA L, et al. Knowledge graph self-supervised rationalization for recommendation[C]// Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. New York: ACM, 2023: 3046-3056. |
| [23] | 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. |
| [24] | FAN Z, XU K, DONG Z, et al. Graph collaborative signals denoising and augmentation for recommendation[C]// Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2023: 2037-2041. |
| [25] | CAI X, HUANG C, XIA L, et al. LightGCL: simple yet effective graph contrastive learning for recommendation[EB/OL]. [2024-01-03]. . |
| [26] | HE W, SUN G, LU J, et al. Candidate-aware graph contrastive learning for recommendation[C]// Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2023: 1670-1679. |
| [27] | HE X, CHUA T S. Neural factorization machines for sparse predictive analytics[C]// Proceedings of the 40th International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 2017: 355-364. |
| [28] | 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. |
| [29] | ZOU D, WEI W, ZHU F, et al. Knowledge enhanced multi-intent transformer network for recommendation[C]// Companion Proceedings of the ACM Web Conference 2024. New York: ACM, 2024: 1-9. |
| [30] | WANG X, HUANG T, WANG D, et al. Learning intents behind interactions with knowledge graph for recommendation[C]// Proceedings of the Web Conference 2021. New York: ACM, 2021: 878-887. |
| [1] | 许志雄, 李波, 边小勇, 胡其仁. 对抗样本嵌入注意力U型网络的3D医学图像分割[J]. 《计算机应用》唯一官方网站, 2025, 45(9): 3011-3016. |
| [2] | 刘超, 余岩化. 融合降噪策略与多视图对比学习的知识感知推荐模型[J]. 《计算机应用》唯一官方网站, 2025, 45(9): 2827-2837. |
| [3] | 王祉苑, 彭涛, 杨捷. 分布外检测中训练与测试的内外数据整合[J]. 《计算机应用》唯一官方网站, 2025, 45(8): 2497-2506. |
| [4] | 谢劲, 褚苏荣, 强彦, 赵涓涓, 张华, 高勇. 用于胸片中硬负样本识别的双支分布一致性对比学习模型[J]. 《计算机应用》唯一官方网站, 2025, 45(7): 2369-2377. |
| [5] | 刘皓宇, 孔鹏伟, 王耀力, 常青. 基于多视角信息的行人检测算法[J]. 《计算机应用》唯一官方网站, 2025, 45(7): 2325-2332. |
| [6] | 王震洲, 郭方方, 宿景芳, 苏鹤, 王建超. 面向智能巡检的视觉模型鲁棒性优化方法[J]. 《计算机应用》唯一官方网站, 2025, 45(7): 2361-2368. |
| [7] | 姜超英, 李倩, 刘宁, 刘磊, 崔立真. 基于图对比学习的再入院预测模型[J]. 《计算机应用》唯一官方网站, 2025, 45(6): 1784-1792. |
| [8] | 余明峰, 秦永彬, 黄瑞章, 陈艳平, 林川. 基于对比学习增强双注意力机制的多标签文本分类方法[J]. 《计算机应用》唯一官方网站, 2025, 45(6): 1732-1740. |
| [9] | 刘爽, 刘大庆, 孟佳娜, 赵迪. 融合噪声过滤的超关系知识图谱补全方法[J]. 《计算机应用》唯一官方网站, 2025, 45(6): 1817-1826. |
| [10] | 颜文婧, 王瑞东, 左敏, 张青川. 基于风味嵌入异构图层次学习的食谱推荐模型[J]. 《计算机应用》唯一官方网站, 2025, 45(6): 1869-1878. |
| [11] | 龙雨菲, 牟宇辰, 刘晔. 基于张量化图卷积网络和对比学习的多源数据表示学习模型[J]. 《计算机应用》唯一官方网站, 2025, 45(5): 1372-1378. |
| [12] | 胡文彬, 蔡天翔, 韩天乐, 仲兆满, 马常霞. 融合对比学习与情感分析的多模态反讽检测模型[J]. 《计算机应用》唯一官方网站, 2025, 45(5): 1432-1438. |
| [13] | 徐春, 吉双焱, 马欢, 孙恩威, 王萌萌, 苏明钰. 基于知识图谱和对话结构的问诊推荐方法[J]. 《计算机应用》唯一官方网站, 2025, 45(4): 1157-1168. |
| [14] | 党伟超, 温鑫瑜, 高改梅, 刘春霞. 基于多视图多尺度对比学习的图协同过滤[J]. 《计算机应用》唯一官方网站, 2025, 45(4): 1061-1068. |
| [15] | 徐梓芯, 易修文, 鲍捷, 李天瑞, 张钧波, 郑宇. 面向流行病学调查的知识图谱构建与应用[J]. 《计算机应用》唯一官方网站, 2025, 45(4): 1340-1348. |
| 阅读次数 | ||||||
|
全文 |
|
|||||
|
摘要 |
|
|||||