Graph neural network recommendation algorithm fused with dual-channel attention and time encoding
-
摘要:
针对多数图神经网络推荐算法未结合时间信息导致信息浪费和推荐结果不准确的问题,提出融合双通道注意力和时间编码的图神经网络推荐算法GUITRec。该模型充分利用数据集中信息,将用户自身特征、物品信息及用户与物品交互行为建为图结构,通过图神经网络进行数据聚合以形成用户和物品表征行为,从而更全面地捕捉两者特征及关系。引入双通道注意力机制卷积块注意力模块(CBAM)为用户和物品表征行为赋予不同权重,使模型依据权重进行深度学习,更加关注重要特征信息。引入时间编码器模型对用户与物品交互时间及用户位置编码,新增日、周、月周期编码和位置编码,充分挖掘时间和位置信息,为推荐提供更丰富的上下文。在 Ciao 数据集上进行实验,在平均绝对误差(MAE)、均方误差(MSE)、均方根误差(RMSE)这3个评价指标上,GUITRec 均优于基线模型。
Abstract:In response to the problem that most graph neural network recommendation algorithms do not incorporate temporal information, leading to wasted information and inaccurate recommendations, this paper proposes a graph neural network recommendation algorithm, GUITRec, that fuses dual-channel attention with time encoding. Utilizing all of the data in the dataset, this model creates a graph structure based on the user’s attributes, the item’s details, and the user-item interaction behavior. Data aggregation is carried out using graph neural networks to create user and item representation behaviors, more thoroughly capturing the traits and connections of both. Secondly, the dual-channel attention mechanism convolutional block attention module (CBAM) is introduced to assign different weights to the user and item representation behaviors, enabling the model to learn according to those weights and pay more attention to important features. Finally, a time encoder model is introduced to encode the interaction time between the user and the item and the user’s location, and new daily, weekly, and monthly cycle encodings and location encodings are added to fully mine time and location information and provide a richer context for recommendations. Experiments on the Ciao dataset show that GUITRec is superior to the baseline model in terms of the three evaluation indicators of mean absolute error (MAE), mean squared error (MSE), and root mean square error (RMSE).
-
表 1 CBAM、SENet和Transformers的优势与不足
Table 1. Advantages and disadvantages of CBAM, SENet, and Transformers
特征 主要关注点 结构 复杂度 处理能力 对稀疏特征的处理能力 计算资源 优点 CBAM 通道和空间注意力 2个子模块:通道注意力 + 空间注意力 轻量级,计算成本低 捕获局部与全局信息
(通道和空间层次)较强,可以捕捉到物品或用户行为特征的空间依赖 较低,适合大规模应用 轻量级、灵活、多模态融合能力强 SENet 通道注意力 压缩与激励 较轻量,计算成本较低 主要捕获通道级别的
全局信息较强,但主要针对通道特征 较低,适合资源有限的应用 高效、轻量、适合处理高维稀疏特征 Transformers 自注意力 自注意力层 计算复杂度高 捕获长序列中的全局
依赖,适合长序列推荐对长序列的稀疏特征建模效果好,但计算开销较大 高,需要较强的硬件支持(尤其是内存和计算力) 强大的全局依赖建模能力,适合复杂数据处理 表 2 Ciao数据集的详细信息
Table 2. Details of the Ciao dataset
用户数量 物品数量 评分 评分密度 社交连接 社交密度 7317 104975 283320 0.0369 111781 0.2087 表 3 参数最佳值
Table 3. Optimal parameter values
嵌入维度 学习率 批次大小 Dropout率 64 0.0005 64 0.8 -
[1] Goldberg D, Nichols D, Oki B M, et al. Using collaborative filtering to weave an information tapestry[J]. Communications of the ACM, 1992, 35(12): 61-70. [2] 张磊, 陈俊亮, 孟祥武, 等. 基于BP神经网络的协作过滤推荐算法[J]. 北京邮电大学学报, 2009, 32(6): 42-46.Zhang L, Chen J L, Meng X W, et al. BP neural networks-based collaborative filtering recommendation algorithm[J]. Journal of Beijing University of Posts and Telecommunications, 2009, 32(6): 42-46(in Chinese). [3] 舒新峰, 曹望美, 王曙燕. 多特征融合的MOOC推荐模型[J]. 计算机工程与应用, 2023, 59(10): 123-133.Shu X F, Cao W M, Wang S Y. Multi-feature fusion based model for MOOC recommendation[J]. Computer Engineering and Applications, 2023, 59(10): 123-133(in Chinese). [4] Rendle S. Factorization machines[C]//Proceedings of the 2010 IEEE International Conference on Data Mining. Piscataway: IEEE Press, 2010: 995-1000. [5] Koren Y, Bell R, Volinsky C. Matrix factorization techniques for recommender systems[J]. Computer, 2009, 42(8): 30-37. [6] 唐宇, 吴贞东. 基于残差网络的轻量级图卷积推荐方法[J]. 计算机工程与应用, 2024, 60(3): 205-212.Tang Y, Wu Z D. Light graph convolution recommendation method based on residual network[J]. Computer Engineering and Applications, 2024, 60(3): 205-212(in Chinese). [7] 吴静, 谢辉, 姜火文. 图神经网络推荐系统综述[J]. 计算机科学与探索, 2022, 16(10): 2249-2263.Wu J, Xie H, Jiang H W. Survey of graph neural network in recommendation system[J]. Journal of Frontiers of Computer Science and Technology, 2022, 16(10): 2249-2263(in Chinese). [8] 闫阳, 王雷全, 李家瑞. 融合语义信息与注意力的图神经网络推荐算法[J]. 计算机系统应用, 2023, 32(4): 214-222.Yan Y, Wang L Q, Li J R. Graph neural network recommendation algorithm fused with semantic information and attention[J]. Computer Systems and Applications, 2023, 32(4): 214-222(in Chinese). [9] 潘润超, 虞启山, 熊泓霏, 等. 基于深度图神经网络的协同推荐算法[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(in Chinese). [10] 冯兴杰, 生晓宇. 基于图神经网络与深度学习的商品推荐算法[J]. 计算机应用研究, 2021, 38(12): 3617-3622.Feng X J, Sheng X Y. Item recommendation algorithm based on GNN and deep learning[J]. Application Research of Computers, 2021, 38(12): 3617-3622(in Chinese). [11] Zhong T, Zhang S M, Zhou F, et al. Hybrid graph convolutional networks with multi-head attention for location recommendation[J]. World Wide Web, 2020, 23(6): 3125-3151. [12] Scarselli F, Gori M, Tsoi A C, et al. The graph neural network model[J]. IEEE Transactions on Neural Networks, 2009, 20(1): 61-80. [13] Li Y J, Tarlow D, Brockschmidt M, et al. Gated graph sequence neural networks[C]//Proceedings of the 4th International Conference on Learning Representations. San Juan: ICLR, 2016. [14] Zhao L, Song Y J, Zhang C, et al. T-GCN: a temporal graph convolutional network for traffic prediction[J]. IEEE Transactions on Intelligent Transportation Systems, 2020, 21(9): 3848-3858. [15] Ma H, Yang H X, Lyu M R, et al. SoRec: social recommendation using probabilistic matrix factorization[C]//Proceedings of the 17th ACM Conference on Information and Knowledge Management. New York: ACM, 2008: 931-940. [16] 邬硕, 汪海涛, 姜瑛, 等. 融合图神经网络与长短期偏好的序列推荐算法[J]. 信息技术, 2024(2): 66-72.Wu S, Wang H T, Jiang Y, et al. Sequence recommendation algorithm based on Graph Neural Network and long short term prefer-ence[J]. Information Technology, 2024(2): 66-72(in Chinese). [17] 于健, 赵满坤, 高洁, 等. 基于高阶和时序特征的图神经网络社会化推荐算法研究[J]. 计算机科学, 2023, 50(3): 49-64.Yu J, Zhao M K, Gao J, et al. Study on graph neural networks social recommendation based on high-order and temporal features[J]. Computer Science, 2023, 50(3): 49-64(in Chinese). [18] 曾碧卿, 丁明浩, 宋逸云. 基于图卷积网络的知识感知对话生成[J]. 计算机系统应用, 2023, 32(7): 47-56.Zeng B Q, Ding M H, Song Y Y. Knowledge-aware conversation generation based on graph convolutional network[J]. Computer Systems and Applications, 2023, 32(7): 47-56(in Chinese). [19] 袁满, 褚润夫, 袁靖舒, 等. 融合上下文信息的图神经网络推荐模型研究[J]. 吉林大学学报(信息科学版), 2023, 41(4): 693-700.Yuan M, Chu R F, Yuan J S, et al. Research on graph neural network recommendation model of integrating context information[J]. Journal of Jilin University (Information Science Edition), 2023, 41(4): 693-700(in Chinese). [20] Azri A, Haddi A, Allali H. AutoTimeSVD++: a temporal hybrid recommender system based on Contractive autoencoder and Matrix factorization[C]//Proceedings of the Smart Applications and Data Analysis. Berlin: Springer International Publishing, 2022: 93-103. [21] He B W, He X, Zhang Y X, et al. Dynamically expandable graph convolution for streaming recommendation[C]//Proceedings of the ACM Web Conference 2023. New York: ACM, 2023: 1457-1467. [22] Woo S, Park J, Lee J Y, et al. CBAM: convolutional block attention module[C]//Proceedings of the Computer Vision-ECCV 2018. Berlin: Springer International Publishing, 2018: 3-19. [23] Yoo J, Choi S. Probabilistic matrix tri-factorization[C]//Proceedings of the 2009 IEEE International Conference on Acoustics, Speech and Signal Processing. Piscataway: IEEE Press, 2009: 1553-1556. [24] Lee M, Choi P, Woo Y. A hybrid recommender system combining collaborative filtering with neural network[C]//Proceedings of the Adaptive Hypermedia and Adaptive Web-Based Systems. Berlin: Springer, 2002: 531-534. [25] Bai T, Zhang Y J, Wu B, et al. Temporal graph neural networks for social recommendation[C]//Proceedings of the 2020 IEEE International Conference on Big Data (Big Data). Piscataway: IEEE Press, 2020: 898-903. -


下载: