A Graph Neural Network Social Recommendation Algorithm Integrating the Multi-Head Attention Mechanism
Abstract
:1. Introduction
- Based on user interaction information and social information, the graph neural network is introduced to extract the latent feature representation of users and items.
- In the process of learning user embedding vector representation, the multi-head attention mechanism is introduced to assign different weights to the trusted friends of the target user, which can increase the importance of friends with high influence, so as to obtain the interest preference of the target user more accurately.
- We design a social recommendation algorithm based on the graph neural network and multi-head attention mechanism and conduct experiments on the Epinions dataset to demonstrate the effectiveness of the proposed algorithm. Experimental results show that the proposed algorithm is better than similar algorithms.
2. Related Work
2.1. Recommendations Based on Social Network
2.2. Recommendations Based on Graph Neural Network
2.3. Recommendations Integrating Attention Mechanism
3. Background
3.1. Recommendation Model of Graph Neural Network
3.2. Multi-Head Attention Mechanism
4. Proposed Algorithm
4.1. Preliminaries
4.2. User Embedding Vector Representation Integrating Interaction Information and Social Information
- (1)
- User embedding vector representation based on the user-item interaction graph
Algorithm 1 User embedding vector representation based on the user-item interaction graph |
Input: user-item interaction graph , user rating Output: user embedded representation Begin 1 For do 2 3 For do 4 5 End 6 End 7 End |
- (2)
- User embedding vector representation with MAM based on the social network graph
- (3)
- User embedding vector representation UEV_IS
Algorithm 2 User embedding vector representation UEV_IS |
Inputs: user-item interaction graph , user social network Output: user-embedded vector representation Begin 1 2 For do 3 For do 4 5 End 6 For do 7 8 9 10 End 11 End 12 13 14 End |
4.3. Item Embedding Vector Representation Based on the User-Item Interaction Graph
4.4. Algorithm GNNSR_MAM
Algorithm 3 Algorithm GNNSR_MAM |
Inputs: user-item interaction graph , social network graph and user rating data , embedding dimension , regularization coefficient , number of propagation layers Output: predicted rate Begin 1 , , 2 3 For do 4 For do 5 6 7 End 8 For do 9 10 11 End 12 13 End 14 15 16 For ui ∈ T do 17 18 19 End 20 21 22 Return End |
5. Experimental Results and Analysis
5.1. Dataset
5.2. Evaluation Metrics
5.3. Model Parameter Analysis
5.4. Performance Analysis
5.4.1. Comparative Analysis of Mainstream Algorithms
- CDRec [25]: A collaborative filtering recommendation algorithm based on a multi-relational social network. The algorithm divides the community structure based on trust relationships and rating information to improve the recommendation efficiency.
- NGCF [44]: A collaborative filtering recommendation algorithm based on the graph neural network. This algorithm applies GCN to the recommendation algorithm and obtains the prediction rating by extracting the embedding relationship between users and items.
- SAMN [45]: Social recommendation algorithm based on attentional memory networks. This algorithm uses the attention mechanism to distinguish the importance of friends in social recommendation.
5.4.2. Comparative Analysis of Attention Mechanisms
- The algorithm GNNSR_AM is obtained by replacing the multi-head attention mechanism adopted by our proposed algorithm with the attention mechanism.
- The algorithm GNNSR is obtained by removing the multi-head attention mechanism adopted by our proposed algorithm.
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Gosh, S.; Nahar, N.; Wahab, M.A.; Biswas, M.; Hossain, M.S.; Andersson, K. Recommendation System for E-commerce Using Alternating Least Squares (ALS) on Apache Spark. In Proceedings of the Intelligent Computing and Optimization, Hua Hin, Thailand, 8–9 October 2020; pp. 880–893. [Google Scholar]
- Park, S.-J.; Kang, C.-U.; Byun, Y.-C. Extreme Gradient Boosting for Recommendation System by Transforming Product Classification into Regression Based on Multi-Dimensional Word2Vec. Symmetry 2021, 13, 758. [Google Scholar] [CrossRef]
- Urdaneta-Ponte, M.C.; Mendez-Zorrilla, A.; Oleagordia-Ruiz, I. Recommendation Systems for Education: Systematic Review. Electronics 2021, 10, 1161. [Google Scholar] [CrossRef]
- Roy, D.; Dutta, M. A systematic review and research perspective on recommender systems. J. Big Data 2022, 9, 59. [Google Scholar] [CrossRef]
- Gu, L.; Yang, P.; Dong, Y. An dynamic-weighted collaborative filtering approach to address sparsity and adaptivity issues. In Proceedings of the 2014 IEEE Congress on Evolutionary Computation (CEC), Beijing, China, 6–11 July 2014; pp. 3044–3050. [Google Scholar]
- Koren, Y.; Bell, R. Advances in Collaborative Filtering. In Recommender Systems Handbook; Ricci, F., Rokach, L., Shapira, B., Eds.; Springer: Boston, MA, USA, 2015; pp. 77–118. [Google Scholar]
- Salah, A.; Rogovschi, N.; Nadif, M. A dynamic collaborative filtering system via a weighted clustering approach. Neurocomputing 2016, 175, 206–215. [Google Scholar] [CrossRef]
- Polatidis, N.; Georgiadis, C.K. A multi-level collaborative filtering method that improves recommendations. Expert Syst. Appl. 2016, 48, 100–110. [Google Scholar] [CrossRef] [Green Version]
- Zhang, J.; Tang, J.; Liang, B.; Yang, Z.; Wang, S.; Zuo, J.; Li, J. Recommendation over a Heterogeneous Social Network. In Proceedings of the 2008 The Ninth International Conference on Web-Age Information Management, Zhangjiajie, China, 20–22 July 2008; pp. 309–316. [Google Scholar]
- Qian, X.; Feng, H.; Zhao, G.; Mei, T. Personalized Recommendation Combining User Interest and Social Circle. IEEE Trans. Knowl. Data Eng. 2014, 26, 1763–1777. [Google Scholar] [CrossRef]
- Ma, H.; Jia, M.; Zhang, D.; Lin, X. Combining Tag Correlation and User Social Relation for Microblog Recommendation. Inf. Sci. 2017, 385, 325–337. [Google Scholar] [CrossRef]
- Gong, C.; Sun, G.; Chen, C.-C.; Bin, S. Matrix Decomposition Recommendation Algorithm Based on Multiple Social Relationships. In Proceedings of the 2020 IEEE 2nd Eurasia Conference on Biomedical Engineering, Healthcare and Sustainability (ECBIOS), Tainan, Taiwan, 29–31 May 2020; pp. 197–200. [Google Scholar]
- Xin, M.; Chen, S.; Zang, C. A Graph Neural Network-Based Algorithm for Point-of-Interest Recommendation Using Social Relation and Time Series. Int. J. Web Serv. Res. 2021, 18, 51–74. [Google Scholar] [CrossRef]
- Ahmadian, S.; Joorabloo, N.; Jalili, M.; Meghdadi, M.; Afsharchi, M.; Ren, Y. A temporal clustering approach for social recommender systems. In Proceedings of the 2018 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining, Barcelona, Spain, 28–31 August 2018; pp. 1139–1144. [Google Scholar]
- Yu, J.; Yin, H.; Li, J.; Gao, M.; Huang, Z.; Cui, L. Enhancing Social Recommendation With Adversarial Graph Convolutional Networks. IEEE Trans. Knowl. Data Eng. 2022, 34, 3727–3739. [Google Scholar] [CrossRef]
- Jamali, M.; Ester, M. A matrix factorization technique with trust propagation for recommendation in social networks. In Proceedings of the RecSys’10: Fourth ACM Conference on Recommender Systems, Barcelona, Spain, 26–30 September 2010; pp. 135–142. [Google Scholar]
- Ma, H.; Zhou, D.; Liu, C.; Lyu, M.R.; King, I. Recommender systems with social regularization. In Proceedings of the WSDM’11: Fourth ACM International Conference on Web Search and Data Mining, Hong Kong, China, 9–12 February 2011; pp. 287–296. [Google Scholar]
- Zhou, J.; Cui, G.; Hu, S.; Zhang, Z.; Yang, C.; Liu, Z.; Wang, L.; Li, C.; Sun, M. Graph neural networks: A review of methods and applications. AI Open 2020, 1, 57–81. [Google Scholar] [CrossRef]
- Ying, R.; He, R.; Chen, K.; Eksombatchai, P.; Hamilton, W.L.; Leskovec, J. Graph Convolutional Neural Networks for Web-Scale Recommender Systems. arXiv 2018, arXiv:1806.01973. [Google Scholar]
- Pletnev, A.; Rivera-Castro, R.; Burnaev, E. Graph Neural Networks for Model Recommendation using Time Series Data. arXiv 2020, arXiv:2009.03474. [Google Scholar]
- Huang, B.; Bi, Y.; Wu, Z.; Wang, J.; Xiao, J. UBER-GNN: A User-Based Embeddings Recommendation based on Graph Neural Networks. arXiv 2020, arXiv:2008.02546. [Google Scholar]
- Wang, G.; Guo, Z.; Li, X.; Yin, D.; Ma, S. SceneRec: Scene-Based Graph Neural Networks for Recommender Systems. arXiv 2021, arXiv:2102.06401. [Google Scholar]
- Ma, H.; Yang, H.; Lyu, M.R.; King, I. SoRec: Social recommendation using probabilistic matrix factorization. In Proceedings of the CIKM08: Conference on Information and Knowledge Management, Napa Valley, CA, USA, 26–30 October 2008; pp. 931–940. [Google Scholar]
- Zhu, L.; Xu, C.; Guan, J.; Zhang, H. SEM-PPA: A semantical pattern and preference-aware service mining method for personalized point of interest recommendation. J. Netw. Comput. Appl. 2017, 82, 35–46. [Google Scholar] [CrossRef]
- Bin, S.; Sun, G. Collaborative Filtering Recommendation Algorithm Based on Multi-relationship Social Network. Comput. Sci. 2019, 46, 56–62. [Google Scholar] [CrossRef] [Green Version]
- Jia, J.; Liu, P.; Chen, W. Improved Matrix Factorization Algorithm Using Social Information for Recommendation. Comput. Eng. 2021, 47, 97–105. [Google Scholar] [CrossRef]
- Guo, G.; Zhang, J.; Yorke-Smith, N. TrustSVD: Collaborative Filtering with Both the Explicit and Implicit Influence of User Trust and of Item Ratings. In Proceedings of the AAAI’15: Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence, Austin, TX, USA, 25–30 January 2015; pp. 123–129. [Google Scholar]
- Yang, B.; Lei, Y.; Liu, J.; Li, W. Social Collaborative Filtering by Trust. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1633–1647. [Google Scholar] [CrossRef]
- Chen, Z.; Li, H.; Du, J. Research on Recommendation Algorithm Based on Heterogeneous Graph neural Network. J. Hunan Univ. Nat. Sci. 2021, 48, 137–144. [Google Scholar] [CrossRef]
- Bi, Z.; Jing, L.; Shan, M.; Dou, S.; Wang, S.; Yang, X. Hierarchical Social Recommendation Model Based on a Graph Neural Network. Wirel. Commun. Mob. Comput. 2021, 2021, 9107718. [Google Scholar] [CrossRef]
- Zhou, H.; Liu, J.; Wang, H. A Social Movie Recommendation Model Based on Graph Neural Network and Tag Overlapping Community. Inf. Stud. Theory Appl. 2021, 44, 164–170. [Google Scholar] [CrossRef]
- Chang, J.; Gao, C.; Zheng, Y.; Hui, Y.; Niu, Y.; Song, Y.; Jin, D.; Li, Y. Sequential Recommendation with Graph Neural Networks. In Proceedings of the SIGIR’21: The 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, Online. 11–15 July 2021; pp. 378–387. [Google Scholar]
- Yu, Z.; Lian, J.; Mahmoody, A.; Liu, G.; Xie, X. Adaptive User Modeling with Long and Short-Term Preferences for Personalized Recommendation. In Proceedings of the IJCAI’19: The 28th International Joint Conference on Artificial Intelligence, Macao, China, 10–16 August 2019; pp. 4213–4219. [Google Scholar]
- Peng, D.; Yuan, W.; Liu, C. HARSAM: A Hybrid Model for Recommendation Supported by Self-Attention Mechanism. IEEE Access 2019, 7, 12620–12629. [Google Scholar] [CrossRef]
- Pang, G.; Wang, X.; Hao, F.; Wang, L.; Wang, X. Efficient point-of-interest recommendation with hierarchical attention mechanism. Appl. Soft Comput. 2020, 96, 106536. [Google Scholar] [CrossRef]
- Zhuo, J.; Lei, J.; Zhou, X. AGRU-GNN Graph Network for Social Recommendation. Comput. Syst. Appl. 2021, 30, 219–227. [Google Scholar] [CrossRef]
- Tao, Z.; Wei, Y.; Wang, X.; He, X.; Huang, X.; Chua, T.-S. MGAT: Multimodal Graph Attention Network for Recommendation. Inf. Process. Manag. 2020, 57, 102277. [Google Scholar] [CrossRef]
- Huang, W.; Wei, W.; Zhang, J.; Deng, Z. Recommendation Method Based on Attention Mechanism and Review Text Deep Model. Comput. Eng. 2019, 45, 176–182. [Google Scholar] [CrossRef]
- Vijaikumar, M.; Shevade, S.; Murty, M.N. GRAM-SMOT: Top-N Personalized Bundle Recommendation via Graph Attention Mechanism and Submodular Optimization. In Proceedings of the Joint European Conference on Machine Learning and Knowledge Discovery in Databases, Ghent, Belgium, 14–18 September 2020; pp. 297–313. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention Is All You Need. arXiv 2017, arXiv:1706.03762. [Google Scholar]
- Wang, C.-S.; Chen, B.-S.; Chiang, J.-H. TDD-BPR: The topic diversity discovering on Bayesian personalized ranking for personalized recommender system. Neurocomputing 2021, 441, 202–213. [Google Scholar] [CrossRef]
- Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
- Massa, P.; Avesani, P. Trust-aware recommender systems. In Proceedings of the 2007 ACM conference on Recommender systems, Minneapolis, MN, USA, 19–20 October 2007; pp. 17–24. [Google Scholar]
- Wang, X.; He, X.; Wang, M.; Feng, F.; Chua, T.-S. Neural Graph Collaborative Filtering. In Proceedings of the SIGIR’19: The 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, Paris, France, 21–25 July 2019; pp. 165–174. [Google Scholar]
- Chen, C.; Zhang, M.; Liu, Y.; Ma, S. Social Attentional Memory Network: Modeling Aspect- and Friend-Level Differences in Recommendation. In Proceedings of the WSDM’19: The Twelfth ACM International Conference on Web Search and Data Mining, Melbourne, VIC, Australia, 11–15 February 2019; pp. 177–185. [Google Scholar]
Dataset | Epinions |
---|---|
Number of users | 49,290 |
Number of items | 139,738 |
Number of ratings | 664,824 |
Social links | 487,181 |
Parameter | Parameter Value |
---|---|
User and item embedding dimension | |
Regularization coefficient | |
Batch size | 128 |
Learning rate | 0.01 |
Optimizer | Adam |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Yi, H.; Liu, J.; Xu, W.; Li, X.; Qian, H. A Graph Neural Network Social Recommendation Algorithm Integrating the Multi-Head Attention Mechanism. Electronics 2023, 12, 1477. https://doi.org/10.3390/electronics12061477
Yi H, Liu J, Xu W, Li X, Qian H. A Graph Neural Network Social Recommendation Algorithm Integrating the Multi-Head Attention Mechanism. Electronics. 2023; 12(6):1477. https://doi.org/10.3390/electronics12061477
Chicago/Turabian StyleYi, Huawei, Jingtong Liu, Wenqian Xu, Xiaohui Li, and Huihui Qian. 2023. "A Graph Neural Network Social Recommendation Algorithm Integrating the Multi-Head Attention Mechanism" Electronics 12, no. 6: 1477. https://doi.org/10.3390/electronics12061477
APA StyleYi, H., Liu, J., Xu, W., Li, X., & Qian, H. (2023). A Graph Neural Network Social Recommendation Algorithm Integrating the Multi-Head Attention Mechanism. Electronics, 12(6), 1477. https://doi.org/10.3390/electronics12061477