Recommendation Model Based on Public Neighbor Sorting and Sampling of Knowledge Graph
-
摘要: 知识图谱作为辅助信息可以有效缓解传统推荐模型的冷启动问题。但在提取结构化信息时,现有模型都忽略了图谱中实体之间的邻居关系。针对这一问题,该文提出一种基于共同邻居排序采样的知识图谱卷积网络(KGCN-PN)推荐模型,该模型首先基于共同邻居数目对知识图谱中的每个实体邻域进行排序采样;其次利用图卷积神经网络沿着图谱中的关系路径将实体自身信息与接收域信息逐层融合;最后将用户特征向量与融合得到的实体特征向量送入预测函数中预测用户与实体项目交互的概率。实验结果表明该模型在数据稀疏场景下相较其他基线模型性能均获得了相应提升。Abstract: The knowledge graph as auxiliary information can effectively alleviate the cold start problem of traditional recommendation models. But when extracting structured information, the existing models ignore the neighbor relationship between entities in the graph. To solve this problem, a recommendation model based on KnowledgeGraph Convolutional Networke-Public Neighbor (KFCN-PN) sorting sampling is proposed. The model first sorts and samples each entity’s neighborhood in the knowledge graph based on the number of public neighbors; Secondly, it uses graph convolutional neural networks to integrate the entity’s own information and the receiving domain information along the graph’s relationship path layer by layer; Finally, the user feature vector and the entity feature vector obtained by the fusion are sent to the prediction function to predict the probability of the user interacting with the entity item. The experimental results show that the performance of this model is improved compared with other baseline models in data sparse scenarios.
-
表 1 基于共同邻居(PN)排序的实体采样算法(算法1)
输入:中心实体的直接邻居集合$ N\left(e\right) $ 输出:中心实体的单层接收域$ S\left(e\right) $ (1) Function Public-Neighbors-Sampling($ e $) (2) if $ l\left(e\right)< K $ (3) $ S\left(e\right)\leftarrow $ choose $ K $ entities from $ N\left(e\right) $ (4) else (5) for $i={0,1},\cdots ,l\left(e\right)-1$ do (6) $ L\left(e\right) $.append($ N\left(e\right)\left[i\right]\left[0\right] $) (7) $ T\left(e\right)\leftarrow {U}_{i \in L\left(e\right)}L\left(i\right)\cap L\left(e\right) $ (8) $ P\left(e\right)\leftarrow $do Merge Sort on $ T\left(e\right) $ (9) for $ e\in P\left(e\right)\left[l\left(e\right)-K:l\left(e\right)\right] $ do (10) $ I\left(e\right) $.append(the indices of $ e $ in $ T\left(e\right) $) (11) Remove duplicate index in $ I\left(e\right) $ (12) for $ i\in I\left(e\right) $ do (13) $ S\left(e\right) $.append($ N\left(e\right)\left[i\right]\left[0\right] $) (14) return $ S\left(e\right) $ 表 2 图卷积算法(算法2)
输入:交互矩阵$ {\boldsymbol Y} $;知识图谱$ G\left({\cal E},{\cal R}\right) $;接收域矩阵$ {\boldsymbol{S}} $; 训练参数:$ {\left\{u\right\}}_{u\in {\cal U}},{\left\{e\right\}}_{e\in {\cal E}},{\left\{r\right\}}_{r\in {\cal R}},{\left\{{W}_{i},{b}_{i}\right\}}_{i=1}^{L} $; 输出:预测函数$ {\overset{\frown} y}_{uv}={\cal{F}}(u,v|\theta ,{\boldsymbol{Y}},G)$ (1) while model does not converge do (2) for $ \left(u,v\right) $ in Y do (3) $ {\cal M}\left[0\right]\leftarrow v $ (4) for $ l={1,2},\cdots ,L $ do (5) $ {\cal M}\left[l\right]\leftarrow {\cal M}\left[l-1\right] $ (6) for $ e\in {\cal M}\left[l-1\right] $ do (7) $ {\cal M}\left[l\right]\leftarrow {\cal }{\cal }{\cal M}\left[l\right]\cup $Public-Neighbors-Sampling($ e $) (8) return $ {\left\{{\cal M}\left[i\right]\right\}}_{i=0}^{L} $ (9) $ {e}^{u}\left[0\right]\leftarrow e,\forall e\in {\cal M}\left[0\right] $ (10) for $l={1,2},\cdots ,L$ do (11) for $ e\in {\cal M}\left[l\right] $ do (12) ${e}_{S\left(e\right)}^{u}\left[l-1\right]\leftarrow \sum _{ {e}^{'}\in S\left(e\right)} {\tilde {f} }_{u}\left({r}_{v,{e}^{'} }\right){ {e}^{'{u} } }\left[l-1\right]$ (13) $ {e}^{u}\left[l\right]\leftarrow {\rm{agg}}\left({e}_{S\left(e\right)}^{u}\left[l-1\right],{e}^{u}\left[l-1\right]\right) $ (14) $ {v}^{u}\leftarrow {e}^{u}\left[L\right] $ (15) Calculate the probability of interaction: $ {\widehat{y}}_{uv} $ (16) Update $ \left(\theta ,W,b\right) $ in the direction of gradient descent (17) return ${\cal F}$ 表 3 实验数据集统计情况
MovieLens-20M Last.FM 用户数 138159 1872 项目数 16954 3846 交互次数 13501622 42346 实体数 102569 9366 关系种类 32 60 3元组数 499474 15518 表 4 不同模型在点击率预测场景下的AUC值
模型 Movie Music SVD 0.963 0.769 PER 0.832 0.633 CKE 0.924 0.744 Ripple-Net 0.960 0.770 KGCN-PN 0.979 0.804 表 5 KGCN-PN在不同接收域层数下的AUC值
K 1 2 3 4 MovieLens-20M 0.976 0.977 0.969 0.501 Last.FM 0.803 0.787 0.527 0.512 表 6 KGCN-PN在不同采样大小下的AUC值
K 2 4 8 16 32 64 MovieLens-20M 0.977 0.977 0.976 0.976 0.973 0.970 Last.FM 0.792 0.799 0.791 0.804 0.802 0.702 -
[1] ZHENG Guanjie, ZHANG Fuzheng, ZHENG Zihan, et al. DRN: A deep reinforcement learning framework for news recommendation[C]. The 2018 World Wide Web Conference, Lyon, France, 2018: 167–176. doi: 10.1145/3178876.3185994. [2] 司亚利, 张付志, 刘文远. 基于签到活跃度和时空概率模型的自适应兴趣点推荐方法[J]. 电子与信息学报, 2020, 42(3): 678–686. doi: 10.11999/JEIT190287SI Yali, ZHANG Fuzhi, and LIU Wenyuan. An adaptive point-of-interest recommendation method based on check-in activity and temporal-spatial probabilistic models[J]. Journal of Electronics &Information Technology, 2020, 42(3): 678–686. doi: 10.11999/JEIT190287 [3] KOREN Y. Factorization meets the neighborhood: A multifaceted collaborative filtering model[C]. The 14th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Las Vegas, USA, 2008: 426–434. doi: 10.1145/1401890.1401944. [4] 伊华伟, 张付志, 巢进波. 基于模糊核聚类和支持向量机的鲁棒协同推荐算法[J]. 电子与信息学报, 2017, 39(8): 1942–1949. doi: 10.11999/JEIT161154YI Huawei, ZHANG Fuzhi, and CHAO Jinbo. Robust collaborative recommendation algorithm based on fuzzy kernel clustering and support vector machine[J]. Journal of Electronics &Information Technology, 2017, 39(8): 1942–1949. doi: 10.11999/JEIT161154 [5] WANG Hongwei, ZHANG Fuzheng, HOU Min, et al. SHINE: Signed heterogeneous information network embedding for sentiment link prediction[C]. The Eleventh ACM International Conference on Web Search and Data Mining, Marina Del Rey, USA, 2018: 592–600. doi: 10.1145/3159652.3159666. [6] CHENG H T, KOC L, HARMSEN J, et al. Wide & deep learning for recommender systems[C]. The 1st Workshop on Deep Learning for Recommender Systems, Boston, USA, 2016: 7–10. doi: 10.1145/2988450.2988454. [7] WANG Hongwei, ZHANG Fuzheng, WANG Jialin, et al. RippleNet: Propagating user preferences on the knowledge graph for recommender systems[C]. The 27th ACM International Conference on Information and Knowledge Management, Torino, Italy, 2018: 417–426. doi: 10.1145/3269206.3271739. [8] ZHANG Fuzheng, YUAN N J, LIAN Defu, et al. Collaborative knowledge base embedding for recommender systems[C]. The 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, California, San Francisco, USA, 2016: 353–362. doi: 10.1145/2939672.2939673. [9] WANG Hongwei, ZHANG Fuzheng, XIE Xing, et al. DKN: Deep knowledge-aware network for news recommendation[C]. The 2018 World Wide Web Conference, Lyon, France, 2018: 1835–1844. doi: 10.1145/3178876.3186175. [10] WANG Hongwei, ZHANG Fuzheng, ZHAO Miao, et al. Multi-task feature learning for knowledge graph enhanced recommendation[C]. The World Wide Web Conference, San Francisco, USA, 2019: 2000–2010. doi: 10.1145/3308558.3313411. [11] HUANG Jin, ZHAO W X, DOU Hongjian, et al. Improving sequential recommendation with knowledge-enhanced memory networks[C]. The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, Ann Arbor, USA, 2018: 505–514. doi: 10.1145/3209978.3210017. [12] YU Xiao, REN Xiang, SUN Yizhou, et al. Personalized entity recommendation: A heterogeneous information network approach[C]. The 7th ACM International Conference on Web Search and Data Mining, New York, USA, 2014: 283–292. doi: 10.1145/2556195.2556259. [13] HU Binbin, SHI Chuan, ZHAO W X, et al. Leveraging meta-path based context for top- n recommendation with a neural co-attention model[C]. The 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, London, United Kingdom, 2018: 1531–1540. doi: 10.1145/3219819.3219965. [14] ZHAO Huan, YAO Quanming, LI Jianda, et al. Meta-graph based recommendation fusion over heterogeneous information networks[C]. The 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, Canada, 2017: 635–644. doi: 10.1145/3097983.3098063. [15] WANG Xiao, WANG Ruijia, SHI Chuan, et al. Multi-component graph convolutional collaborative filtering[J]. The AAAI Conference on Artificial Intelligence, 2020, 34(4): 6267–6274. doi: 10.1609/aaai.v34i04.6094 [16] WANG Xiang, HE Xiangnan, CAO Yixin, et al. KGAT: Knowledge graph attention network for recommendation[C]. The 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Anchorage, USA, 2019: 950–958. doi: 10.1145/3292500.3330989. [17] BORDES A, USUNIER N, GARCIA-DURÁN A, et al. Translating embeddings for modeling multi-relational data[C]. The 26th International Conference on Neural Information Processing Systems, Lake Tahoe, USA, 2013: 2787–2795.