Collaborative filtering method combining similarity and popularity
By combining similarity and popularity in the collaborative filtration method, and using the comparison loss function and weighted temperature coefficient, the problem of ignoring popularity in the prior art is solved, and more efficient recommendation performance and fairer recommendation results are achieved.
Patent Information
- Application Number
- CN202411560074.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-03-11
AI Technical Summary
The existing collaborative filtration methods ignore the impact of item popularity during the recommendation process, resulting in insufficient improvements in the recommendation system in mitigating popularity deviations.
A collaborative filtering method combining similarity and popularity is proposed. Through the comparison loss function, the similarity between users and items is effectively integrated with popularity, and the popularity calculation formula and weighted temperature coefficient are used to achieve scoring prediction and recommendation.
It improves the performance of collaborative recommendations, reduces the complexity of the training process, improves the fairness and accuracy of the recommendation system, and performs better when recommending unpopular items.
Smart Images

Figure CN119598032A_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the technical field of recommendation methods, in particular to the technical field of collaborative filtering methods. [Background technology]
[0002] Collaborative filtering (CF) is a popular recommendation strategy that can mine the intrinsic connections between similar user groups or items based on the user's past behavior or preferences, and then predict and recommend items that the user may be interested in. Among the many CF algorithms, the matrix factorization (Matrix Factorization Techniques for Recommender Systems) proposed by Y. Koren et al. (Y. Koren, R. Bell, and C. Volinsky, 'Matrix Factorization Techniques for Recommender Systems', Computer, vol. 42, no. 8, pp. 30–37, Aug. 2009, doi: 10.1109 / MC.2009.263.) The most classic one is the recommendation system factorization (MF). The MF method can first decompose the high-dimensional user-item rating matrix into two low-dimensional matrices (i.e., user latent feature matrix and item latent feature matrix), and then predict the user's rating of unrated items by the dot product of the user feature vector and the item feature vector. Due to its inherent simplicity and effectiveness, it has become one of the most popular technologies in the field of recommendation systems. However, the MF method only considers direct user-item interactions and ignores high-order interactions.
[0003] Graph Convolutional Network (GCN) can capture high-order proximity between nodes in a graph through a multi-layer propagation mechanism, which helps to discover deeper interactive relationships and user interest patterns; LightGCN (X. He, K. Deng, X. Wang, Y. Li, Y. Zhang, and M. Wang, 'LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation', in Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, in SIGIR'20. New York, NY, USA: Association for ComputingMachinery,Jul.2020,pp.639–648.doi:10.1145 / 3397271.3401063.) is the most popular graph convolution model, which can achieve good recommendation performance by simplifying the design of traditional graph convolutional networks (i.e., discarding linear transformations and nonlinear activation operations that are irrelevant to recommendation tasks); UltraGCN (K.Mao,J.Zhu,X.Xiao,B.Lu,Z.Wang,andX.He,'UltraGCN:Ultra Simplification of Graph Convolutional Networks forRecommendation',in Proceedings of the 30th ACM International Conference onInformation&Knowledge Management,in CIKM'21.New York,NY,USA:Association forComputing Machinery, Oct. 2021, pp. 1253–1262. doi: 10.1145 / 3459637.3482291.) The explicit graph convolution can be replaced by constrained loss to improve the training efficiency; although the GCN method shows good recommendation performance, its multi-layer convolution also brings high computational cost.
[0004] In recent years, contrastive learning (CL) has been widely used in recommendation systems and has achieved significant performance improvements. The core idea of CL is to train the model by constructing positive and negative sample pairs respectively, so as to maximize the similarity between positive sample pairs and minimize the similarity between negative sample pairs. Contrast learning strategy can help recommendation systems learn accurate user and item embedding representations, thereby improving the accuracy and personalization of recommendations. SGL (J.Wu et al., 'Self-supervised Graph Learning for Recommendation', in Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, in SIGIR'21. New York, NY, USA: Association for Computing Machinery, Jul. 2021, pp. 726–735. doi: 10.1145 / 3404835.3462862.) As a classic graph contrastive learning model, it can generate enhanced views and establish contrasts between different views by adopting a variety of graph augmentation methods (i.e., node dropout, edge dropout, and random walk); SimGCL (J. Yu, H. Yin, X. Xia, T. Chen, L. Cui, and QVH Nguyen, 'Are Graph Augmentations Necessary? Simple Graph Contrastive Learning for Recommendation', in Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval, in SIGIR'22. New York, NY, USA: Association for Computing Machinery, Jul. 2022, pp. 1294–1303. doi: 10.1145 / 3477495.3531937.) used noise enhancement instead of complex graph enhancement to improve running efficiency; XSimGCL (J. Yu, X. Xia, T. Chen, L. Cui, NQ V Hung, and H.Yin,'XSimGCL:Towards ExtremelySimple Graph Contrastive Learning for Recommendation',IEEE Trans.Knowl.DataEng.,vol.36,no.2,pp.913–926,Feb.2024,doi:10.1109 / TKDE.2023.3288135.) uses cross-layer contrast to further simplify the contrastive learning model; DirectAU (C.Wang et al.,'TowardsRepresentationAlignment and Uniformity in CollaborativeFiltering',inProceedings ofthe 28th ACM SIGKDD Conference on Knowledge Discovery and DataMining,in KDD'22.New York,NY,USA:Association for Computing Machinery, Aug. 2022, pp. 1816–1825. doi: 10.1145 / 3534678.3539253.) applies the new contrast loss to CF, providing a new idea for the application of contrast loss in recommendation systems; however, data augmentation is not the main reason for the effectiveness of contrastive learning; in addition, traditional CL methods usually use contrastive learning tasks as auxiliary tasks and optimize both recommendation loss and contrast loss at the same time, which requires additional hyperparameters to balance the weights of the two loss functions. .
[0005] As we all know, the similarity between user features and item features is crucial for recommendation; however, similarity matching alone is not enough to predict unknown interactions; this is because whether a user will interact with an item is also affected by the popularity of the item itself (in general, whether a user will visit an item depends not only on the similarity between user preferences and item features, but also on the popularity of the item itself, which is often ignored in the recommendation process); in the field of recommendation systems, current research on popularity focuses on alleviating popularity bias (popularity bias refers to the fact that in user-item interaction data, a few popular items occupy most of the interactions, while a large number of unpopular items are rarely paid attention to); in order to solve this problem, researchers have proposed a variety of methods to improve the fairness and accuracy of recommendation systems; PopGo (A. Zhang, W. Ma, J. Zheng, X. Wang, and T.-S. Chua, 'Robust Collaborative Filtering to Popularity Distribution Shift', ACM Trans InfSyst,vol.42,no.3,p.80:1-80:25,Jan.2024,doi:10.1145 / 3627159.) reveals latent preference and popularity semantics by discovering decoupled representations without making any assumptions about popularity distribution; PDA (Y.Zhang et al.,'CausalIntervention for Leveraging Popularity Bias in Recommendation',in Proceedingsof the 44th International ACM SIGIR Conference on Research and Development inInformation Retrieval,in SIGIR'21.New York,NY,USA:Association for ComputingMachinery, Jul. 2021, pp. 11–20. doi: 10.1145 / 3404835.3462875.) proposed a method to exploit popularity bias through causal intervention, removing confounding bias during training and introducing the desired popularity bias through causal intervention in the inference stage; BCLoss (A. Zhang, W. Ma, X. Wang, and T.-S.Chua,'Incorporating Bias-aware Margins into Contrastive Loss for Collaborative Filtering', Adv. Neural Inf. Process. Syst., vol. 35, pp. 7866–7878, Dec. 2022.) introduces bias-aware margins into contrastive loss, which improves the long-tail performance of recommender systems by quantifying the popularity bias at the interaction level and converting it into the angular distance between representations. . [Summary of the invention]
[0006] The purpose of the present invention is to solve the problems in the prior art and propose a collaborative filtering method that combines similarity and popularity. It uses contrast loss to capture the similarity between users and items, and can effectively combine the similarity and popularity indicators to complete rating prediction and recommendation, which can effectively improve the performance of collaborative recommendation.
[0007] To achieve the above object, the present invention proposes a collaborative filtering method combining similarity and popularity, comprising the following steps:
[0008] Step 1: Popularity calculation:
[0009] Formula (5) and Formula (6) are used to define the popularity of users and items based on the user-item interaction relationship;
[0010]
[0011] In the formula, represents the popularity of item i in the nth layer; represents the popularity of item i in the n-1th layer; represents the popularity of user u in the nth layer; represents the popularity of user u in the n-1th layer; represents the set of users who interact with item i; represents the set of items visited by user u; and Initialization is 1;
[0012] Use formula (7) to normalize and fine-tune the popularity information of the item and get the popularity index of the item;
[0013]
[0014] In the formula, represents the popularity of item i in the nth layer after normalization and fine-tuning; represents the popularity of item i in the nth layer; represents the average popularity of all items in the nth layer; b represents the popularity deviation;
[0015] Step 2: Combine popularity and similarity for collaborative recommendation:
[0016] First, a contrast loss function is constructed based on InfoNCE to maximize the similarity between positive sample pairs and minimize the similarity between negative sample pairs. Then, the predicted score is calculated by the cosine similarity of user embedding and item embedding.
[0017] Preferably, in step 1, n is set to 1-9, and b is set to 0-8.
[0018] Furthermore, in step 1, n is set to 1-4, and b is set to 2-4.
[0019] Preferably, in step 2, formula (8) is used to construct a contrast loss function, and then formula (9) is used to combine similarity and popularity and predict the user's rating of the project;
[0020]
[0021] In the formula, represents the loss function; sim(u,i) represents the similarity between user u and item i; sim(u,j) represents the similarity between user u and item j; similarity sim is calculated using cosine similarity; (u,i) and (v,j) both represent the same batch u and v represent users, i and j represent items; (u, i) is used as a training positive sample and (u, j) is used as a random negative sample; τ represents the temperature coefficient; Represents the predicted rating of user u for item i; Represents the popularity index of item i.
[0022] Preferably, in step 2, formula (12) is used to construct a contrast loss function, and then formula (13) is used to combine similarity and popularity and predict the user's rating of the project;
[0023]
[0024] In the formula, represents the loss function with the weighted temperature coefficient; sim(u,i) represents the similarity between user u and item i; sim(v,i) represents the similarity between user v and item i; the similarity sim is calculated using cosine similarity; (u,i) and (v,j) both represent the same batch u and v represent users, i and j represent items; τ iirepresents the temperature coefficient of the positive sample pair; τ ji represents the temperature coefficient of random negative sample pairs; It represents the predicted rating of user u for item i.
[0025] Furthermore, in step 2, the weighted temperature coefficient is defined to satisfy both condition 1 and condition 2, and the temperature coefficient is obtained according to formula (10) and formula (11);
[0026] Condition 1 is that when the positive sample pair is fixed, the temperature coefficient is proportional to the popularity of the negative sample item;
[0027] Condition 2 is that the temperature coefficients corresponding to all positive sample pairs are the same;
[0028]
[0029] In the formula, τ ij Indicates the temperature coefficient when item i is a positive sample and item j is a negative sample; τ ik Indicates the temperature coefficient corresponding to item i as a positive sample and item k as a negative sample; τ ii represents the temperature coefficient corresponding to the positive sample pair when item i is used as a positive sample; τ represents the temperature coefficient corresponding to the positive sample pair; represents the popularity of item i; represents the popularity of item j; represents the popularity of item k.
[0030] Preferably, in step 2, τ is set to 0.5-2.
[0031] Furthermore, in step 2, τ is set to 1 to 1.5.
[0032] Beneficial effects of the present invention:
[0033] The present invention proposes an iterative calculation method for item popularity that introduces high-order information, and constructs a contrast loss function to achieve an effective fusion of similarity and popularity. Experimental studies conducted on three public datasets show that the model of the present invention has obvious advantages over mainstream collaborative recommendation methods in terms of recommendation performance and operating efficiency. The details are as follows:
[0034] 1) Compared with the GCN method, the present invention innovatively separates the calculation of high-order information from the training process, greatly reducing the complexity of the training process, so that the model has both the lightweight features of MF and the good performance of GCN;
[0035] 2) This invention abandons the method of using two enhanced samples as positive sample pairs in traditional CL, and directly regards user-item interaction pairs as positive sample pairs, which not only reduces the additional overhead of data enhancement, but also can more directly learn the similarity between users and items, and uses contrast loss as the only optimization target, thereby reducing hyperparameters and speeding up model training;
[0036] 3) During the calculation process, the present invention can assign different importance weights to each interaction, and on this basis, cleverly integrate similarity and popularity to achieve rating prediction and recommendation. Experimental studies have shown that this approach greatly improves the recommendation performance.
[0037] The features and advantages of the present invention will be described in detail through embodiments in conjunction with the accompanying drawings.
Brief Description of the Drawings
[0038] Figure 1 This is the effect of parameter b on the recommendation of cold items in Example 3;
[0039] Figure 2 This is the effect of parameter b on model performance in comparison example 3;
[0040] Figure 3 This is the effect of parameter τ on performance in comparative example 4;
[0041] Figure 4 This is the popularity distribution under different iteration numbers in Example 5. [Specific implementation method]
[0042] Embodiment 1:
[0043] First, the following preliminary knowledge is given about collaborative filtering, matrix decomposition and contrast loss:
[0044] The research on collaborative filtering mainly includes two major areas: implicit CF and explicit CF. The implicit CF model focuses on extracting information from implicit feedback data such as user clicks, visits and purchases, while the explicit CF model relies on direct and clear user feedback data such as ratings. In this paper, we focus on implicit CF. In implicit CF, the matrix R is used to represent the interaction between users and items, and R ui =1 means user u interacts with item i (on the contrary, R ui =0).
[0045] The core idea of the matrix decomposition MF recommendation algorithm is to approximately decompose the user-item rating matrix R into two low-dimensional matrices E U and E I As shown in formula (1), by minimizing the score matrix R and the predicted score matrix The error between them is used to learn the latent feature matrix EU and E I As shown in formula (2), in the present invention, we use the MF method to learn the latent feature matrix of users and items, and transform the latent feature vector e of user u into u and the latent feature vector e of item i i The dot product of is normalized to obtain the similarity s between user u and item i ui ;
[0046]
[0047] In the formula, E U and E I Represent the potential feature matrices of users and items respectively; e u represents the potential feature vector of user u; e i represents the potential feature vector of item i; s ui Represents the similarity between user u and item i.
[0048] As shown in formula (3), InfoNCE (A. van den Oord, Y Li, and O. Vinyals, 'Representation Learning with Contrastive Predictive Coding', Jan. 22, 2019, arXiv: arXiv:1807.03748.doi:10.48550 / arXiv.1807.03748.) is a commonly used loss function in contrastive learning, which can maximize the similarity between positive sample pairs and minimize the similarity between negative sample pairs, so that the model can learn effective data representation;
[0049]
[0050] In the formula, represents the InfoNCE loss function; (x,x + ) represents a positive sample pair and x j represents randomly sampled negative samples.
[0051] The collaborative filtering method combining similarity and popularity of the present invention comprises the following steps:
[0052] Step 1: Popularity calculation:
[0053] In the field of recommendation systems, whether a user interacts with an item depends not only on the similarity between the user and the item, but also on the popularity of the item. Therefore, defining the popularity of an item becomes an important issue. As shown in formula (4), a naive idea is to directly define the popularity of an item based on the number of interactions.
[0054]
[0055] In the formula, p i represents the popularity of item i; Represents the set of users who interact with item i.
[0056] However, this simple method regards the importance of each interaction as the same, which is obviously different from the actual situation. Therefore, the present invention proposes an improved formula for popularity calculation (i.e., formula (5) and formula (6)), so as to use formula (5) and formula (6) to define the popularity of users and items respectively based on the user-item interaction relationship.
[0057]
[0058] In the formula, represents the popularity of item i in the nth layer; represents the popularity of item i in the n-1th layer; represents the popularity of user u in the nth layer; represents the popularity of user u in the n-1th layer; represents the set of users who interact with item i; represents the set of items visited by user u; and Initialization is 1;
[0059] Formula (5) and Formula (6) iteratively calculate and update the popularity of users and items based on the user-item interaction relationship, and the popularity of the nth layer incorporates the popularity information of the nth-order neighbors; it should be noted that in the process of iterative calculation of popularity, the present invention takes the popularity p of the previous layer as (n-1) Divided by its corresponding number of interactions, this measure reflects the different contributions of nodes with different numbers of interactions to the popularity calculation (for example, when a user who often watches movies and a user who rarely watches movies both watch a movie, the two users have different impacts on the popularity of the movie; a movie can attract users who rarely watch movies to watch it, giving us more reason to believe that the popularity of the movie is high, so nodes with fewer interactions are given higher weights in the calculation process).
[0060] Furthermore, the present invention uses formula (7) to normalize and fine-tune the popularity information of the item and obtain the popularity index of the item;
[0061]
[0062] In the formula, represents the popularity of item i in the nth layer after normalization and fine-tuning; represents the popularity of item i in the nth layer; represents the average popularity of all items in the nth layer; b represents the popularity deviation (a larger value means a smaller difference between popular items and unpopular items);
[0063] Step 2: Combine popularity and similarity for collaborative recommendation:
[0064] In this step, we achieve the effective fusion of similarity and popularity by constructing a contrast loss function, and generate two different recommendation methods (i.e., method 1 and method 2) according to different merging methods;
[0065] Method 1: Similarity and Popularity Matrix Factorization (SPMF):
[0066] First, as shown in formula (8), a contrast loss function is constructed based on InfoNCE to maximize the similarity between positive sample pairs and minimize the similarity between negative sample pairs. Then, as shown in formula (9), the predicted score is calculated by the cosine similarity of user embedding and item embedding (i.e., formula (9) is used to combine similarity and popularity and predict the user's score for the item to achieve collaborative recommendation).
[0067]
[0068] In the formula, represents the loss function; sim(u,i) represents the similarity between user u and item i; sim(u,j) represents the similarity between user u and item j; similarity sim is calculated using cosine similarity; (u,i) and (v,j) both represent the same batch u and v represent users, i and j represent items; (u, i) is used as a training positive sample and (u, j) is used as a random negative sample; τ represents the temperature coefficient; Represents the predicted rating of user u for item i; Represents the popularity index of item i.
[0069] Method 2: Popularity Weighted Temperature Coefficient (PWTC):
[0070] J. Wu et al. (J. Wu, J. Chen, J. Wu, W. Shi, X. Wang, and X. He, 'Understanding Contrastive Learning via Distributionally Robust Optimization', Adv. Neural Inf. Process. Syst., vol. 36, pp. 23297-23320, Dec. 2023.) explored the effect of temperature coefficient on contrastive learning tasks and found that the lower the temperature coefficient, the more the model focuses on optimizing difficult negative samples; then, it is a reasonable idea to introduce popularity indicators into the temperature coefficient (since popular items are likely to interact with users in the future, the probability of becoming false negatives will be greater); in order to make the model more tolerant to popular negative samples, a larger temperature coefficient should be set; based on this, the present invention proposes a method for controlling the temperature coefficient by popularity (i.e., PWTC);
[0071] Based on the above theoretical derivation and subsequent experimental research, it is shown that the weighted temperature coefficient should simultaneously meet condition 1 (when the positive sample pair is fixed, the temperature coefficient is proportional to the popularity of the negative sample item) and condition 2 (the temperature coefficients corresponding to all positive sample pairs are the same); according to the above conditions, formula (10) can be listed first, and then formula (11) can be derived based on formula (10);
[0072]
[0073] In the formula, τ ij Indicates the temperature coefficient when item i is a positive sample and item j is a negative sample; τ ik Indicates the temperature coefficient corresponding to item i as a positive sample and item k as a negative sample; τ ii represents the temperature coefficient corresponding to the positive sample pair when item i is used as a positive sample; τ represents the temperature coefficient corresponding to the positive sample pair; represents the popularity of item i; represents the popularity of item j; represents the popularity of item k; in addition, the weighted temperature coefficient τ ij Corresponding to the similarity sim(u, j), τ ij The first parameter i and the first parameter u of sim(u, j) are a pair of interacting items and users, and the second parameter j is in τ ij and sim(u, j) both represent the same item.
[0074] Next, as shown in formula (12), a contrast loss function is constructed based on InfoNCE to maximize the similarity between positive sample pairs and minimize the similarity between negative sample pairs. Then, as shown in formula (13), the predicted score is calculated by the cosine similarity between user embedding and item embedding.
[0075]
[0076] In the formula, represents the loss function with the weighted temperature coefficient; sim(u,i) represents the similarity between user u and item i; sim(v,i) represents the similarity between user v and item i; the similarity sim is calculated using cosine similarity; (u,i) and (v,j) both represent the same batch u and v represent users, i and j represent items; τ ii represents the temperature coefficient of the positive sample pair; τ ji represents the temperature coefficient of random negative sample pairs; It represents the predicted rating of user u for item i.
[0077] In addition, in this embodiment, n is set to 2, b is set to 3, and τ is set to 1.0, 1.5, and 1.2 on the amazon-book, yelp2018, and gowalla datasets, respectively.
[0078] Comparative Example 1:
[0079] The recommendation performance and running time of this method are compared with common baseline models, and the details are as follows:
[0080] As shown in Table 1, for fairness in comparison, this comparison uses the same dataset as LightGCN (i.e., Gowalla, Yelp2018, and Amazon-Book).
[0081] Table 1 Dataset statistics
[0082]
[0083] This comparative example uses the SELFRec framework (J.Yu, H.Yin, X.Xia, T.Chen, J.Li, and Z.Huang, 'Self-Supervised Learning for Recommender Systems: A Survey', IEEE Trans. Knowl. Data Eng., vol.36, no.1, pp.335–355, Jan.2024, doi:10.1109 / TKDE.2023.3282907.) to fairly compare various recommendation methods, and selects Adam (DP Kingma and J.Ba, 'Adam: AMethod for Stochastic Optimization', Jan. 29, 2017, arXiv:arXiv:1412.6980.doi:10.48550 / arXiv.1412.6980.) as the optimizer (the maximum number of epochs is set to 50); the embedding size of all methods in this comparison is set to 64, the learning rate is set to 1e-3, and the batch size is set to 2048; in addition, all learnable hyperparameters are set by Xavier (X. Glorot and Y. Bengio, 'Understanding the difficulty of training deep feedforward neural networks', in Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, JMLR Workshop and Conference Proceedings, Mar. 2010, pp. 249–256. Accessed: May 27, 2024.[Online].Available:https: / / proceedings.mlr.press / v9 / glorot10a.html.) is initialized, and the hyperparameters of the baseline method are tuned within the range suggested by the original paper.
[0084] In this comparative example, the baseline models compared with the present invention include the following two categories:
[0085] (1) MF-based methods:
[0086] BPR-MF (S. Rendle, C. Freudenthaler, Z. Gantner, and L. Schmidt-Thieme, 'BPR: Bayesian personalized ranking from implicit feedback', in Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, in UAI'09. Arlington, Virginia, USA: AUAIPress, Jun. 2009, pp. 452–461.): Optimizing MF using Bayesian Personalized Ranking (BPR) has become one of the most commonly used loss functions in recommendation systems;
[0087] ENMF (C. Chen, M. Zhang, Y. Zhang, Y. Liu, and S. Ma, 'Efficient Neural Matrix Factorization without Sampling for Recommendation', ACM Trans. Inf. Syst., vol. 38, no. 2, p. 14: 1-14: 28, Jan. 2020, doi: 10.1145 / 3373807.): adopts a full data learning strategy to avoid the bias caused by sampling;
[0088] CCL-MF (K. Mao et al., 'SimpleX: A Simple and Strong Baseline for Collaborative Filtering', in Proceedings of the 30th ACM International Conference on Information & Knowledge Management, in CIKM'21. New York, NY, USA: Association for Computing Machinery, Oct. 2021, pp. 1243–1252. doi: 10.1145 / 3459637.3482297.): Cosine Contrastive Loss (CCL) is applied to MF and achieves good performance;
[0089] (2) GNN-based methods:
[0090] LightGCN: uses a simplified GCN for recommendation and is currently the most popular graph model.
[0091] DGCF (S. Rendle, C. Freudenthaler, Z. Gantner, and L. Schmidt-Thieme, 'BPR: Bayesian personalized ranking from implicit feedback', in Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, in UAI'09. Arlington, Virginia, USA: AUAIPress, Jun. 2009, pp. 452–461.): Models the intent distribution of each user-item interaction, effectively extracts information related to each intent, and enhances the interpretability of the model;
[0092] LT-OCF (J. Choi, J. Jeon, and N. Park, 'LT-OCF: Learnable-Time ODE-based Collaborative Filtering', in Proceedings of the 30th ACM International Conference on Information & Knowledge Management, in CIKM'21. New York, NY, USA: Association for Computing Machinery, Oct. 2021, pp. 251–260. doi: 10.1145 / 3459637.3482449.): Improved linear GCN based on Neural Ordinary Differential Equation (NODE);
[0093] SGL-ED: The classic graph contrastive learning model SGL. We selected SGL-ED with the best performance and performed data augmentation by deleting edges on the graph to change the graph structure.
[0094] SimGCL: Uses noise augmentation instead of complex graph augmentation, greatly simplifying graph contrast learning;
[0095] XSimGCL: Uses cross-layer comparison to achieve excellent performance with a simple structure.
[0096] The recommendation performance of different models on the three datasets is shown in Table 2 below (the best performance is marked in bold, and the best performance among the baseline methods is underlined).
[0097] Table 2 Overall performance comparison
[0098]
[0099]
[0100] It can be seen from Table 2 above that the GNN-based methods are generally better than the MF-based methods (this is because the GNN method obtains more accurate user and item embeddings through the propagation and aggregation of high-order information, thereby improving the recommendation accuracy); among the MF-based methods, the method combined with contrastive learning (CCL-MF) performs better, which fully demonstrates that contrastive learning plays a positive role in the recommendation process; among the GNN-based methods, SimGCL performs best (the reason is that this method simultaneously considers similarity and contrastive learning strategies); finally, one of the methods proposed in the present invention, SPMF, is significantly better than other models on all data sets, and another method, PWTC, is also better than other models in most cases, but the performance of the best existing model on the Gowalla data set is comparable; in summary, the present invention separates the calculation of high-order information from the training process, which not only reduces the complexity of the training process, but also achieves good recommendation performance; in short, the model of the present invention has both the high efficiency of the MF model and the high precision of the GNN model.
[0101] In addition, the model of the present invention is theoretically as lightweight as the traditional MF model. To this end, this comparative example also tests the actual running time of the model and compares it with the benchmark model. In the experiment, this comparative example selects Amazon-Books, which is the largest of the three data sets, and conducts the experiment on a workstation with an Intel(R) Core(TM) i9-14900KF CPU and an NVIDIA GeForceRTX 4090GPU. The experimental results are specifically shown in Table 3 below.
[0102] Table 3. Comparison of running time
[0103]
[0104] It can be seen from Table 3 above that the running time of the model of the present invention is the shortest; compared with BPR-MF, the model of the present invention has a shorter time per Epoch (this is because no additional negative sampling is required); compared with LightGCN, which is the most efficient GNN-based method, the training speed and convergence speed of the model of the present invention are faster (this is because the graph convolution operation in LightGCN is more complex, and the model of the present invention can separate the calculation of high-order information from the training process, thereby greatly reducing the complexity without losing high-order information); finally, by comparing the two models of the present invention, it can be seen that the time consumption of PWTC is slightly greater than that of SPMF (this is because the calculation of the weighted temperature coefficient takes extra time, but generally speaking it is still within an acceptable range).
[0105] Comparative Example 2:
[0106] In order to explore the impact of the temperature coefficient of positive and negative samples on the model performance, this comparative example removes these two constraints and conducts experiments, and the experimental results are shown in Table 4 below; ij " indicates the temperature coefficient that considers both positive and negative sample information, "withτ j ” only considers the temperature coefficient of the indicator of negative samples, while “withτ” means that the temperature coefficient of all samples is the same.
[0107] Table 4 Comparison of temperature coefficient calculation methods
[0108]
[0109] It can be seen from Table 4 above that using the popularity index of positive and negative samples to weight the temperature coefficient is better than using only the popularity index of negative samples and a fixed temperature coefficient. Therefore, it is necessary for the model of the present invention to consider the popularity index of positive and negative samples at the same time.
[0110] Comparative Example 3:
[0111] This comparative example explores the influence of the popularity deviation parameter b on the model performance of the present invention; Figure 1 As shown in Figure 2, an increase in the popularity bias parameter b will narrow the gap between popular items and unpopular items; specifically, Figure 1 The left part of the figure shows the change in the proportion of unpopular items (interaction times less than 15 times) to the total number of recommended items as b increases (as b increases, the probability of unpopular items being recommended increases); Figure 1 The right part of the figure shows the change in the number of recommended item types as b increases (as b increases, the number of recommended item types increases); in summary, by adjusting the parameter b, the impact of the Matthew effect can be reduced, and the exposure rate of unpopular items and the diversity of recommendations can be increased.
[0112] In addition, further adjusting the parameter b can also obtain Figure 2 The experimental results shown; from Figure 2 It can be seen that when b increases from 0 to 8, the recommendation performance first increases and then decreases (this is because when b is too small, the model overemphasizes popular items and ignores the personalized needs of different users; when b is too large, the model ignores the impact of popularity on user choices); when the value of b is around 3, the model can achieve good performance on different data sets.
[0113] Comparative Example 4:
[0114] This comparative example tests the influence of the temperature coefficient τ on the performance of the model of the present invention on three data sets, and the experimental results are as follows: Figure 3 shown; from Figure 3 It can be seen that at the beginning, as the temperature coefficient τ increases, the model performance will gradually improve, and then decrease after reaching the peak; in addition, the model performance is optimal when τ is between 1 and 1.5.
[0115] Comparative Example 5:
[0116] This comparative example explores the effect of the number of iterations n on the performance of the model of the present invention; specifically, this comparative example selects the classic graph model LightGCN as a reference, tests the effect of the number of iterations n on the performance of the model of the present invention, and the experimental results are shown in Table 5 below;
[0117] Table 5 Performance comparison of different iteration times
[0118]
[0119] It can be seen from Table 5 above that the number of iterations required for the model to reach the optimum is different on different data sets. In general, when n is equal to 2, the model can achieve good performance on most data sets. When n is equal to 4, the model of the present invention does not suffer from significant performance degradation due to high-order noise (this result indicates that the model of this paper has good robustness).
[0120] In addition, when the number of iterations n is too large, the popularity will aggregate a lot of high-order information, so that the node's own information is weakened or covered, resulting in the popularity of all nodes tending to be the same; Figure 4 Shows the different values of n From the distribution of the data, we can clearly see that the larger the n value, the more concentrated the distribution of popularity.
[0121] The above embodiments are intended to illustrate the present invention, not to limit the present invention. Any solution that is a simple transformation of the present invention belongs to the protection scope of the present invention.
Claims
1. A collaborative filtering method combining similarity and popularity, characterized in that: The steps include: Step 1: Popularity calculation: Formula (5) and Formula (6) are used to define the popularity of users and items based on the user-item interaction relationship; In the formula, represents the popularity of item i in the nth layer; represents the popularity of item i in the n-1th layer; represents the popularity of user u in the nth layer; represents the popularity of user u in the n-1th layer; represents the set of users who interact with item i; represents the set of items visited by user u; and Initialization is 1; Use formula (7) to normalize and fine-tune the popularity information of the item and get the popularity index of the item; In the formula, represents the popularity of item i in the nth layer after normalization and fine-tuning; represents the popularity of item i in the nth layer; represents the average popularity of all items in the nth layer; b represents the popularity deviation; Step 2: Combine popularity and similarity for collaborative recommendation: First, a contrast loss function is constructed based on InfoNCE to maximize the similarity between positive sample pairs and minimize the similarity between negative sample pairs. Then, the predicted score is calculated by the cosine similarity of user embedding and item embedding.
2. The collaborative filtering method combining similarity and popularity as claimed in claim 1, characterized in that: In step 1, n is set to 1-9, and b is set to 0-8.
3. The collaborative filtering method combining similarity and popularity as claimed in claim 2, characterized in that: In step 1, n is set to 1-4, and b is set to 2-4.
4. The collaborative filtering method combining similarity and popularity as claimed in claim 1, characterized in that: In step 2, formula (8) is used to construct a contrast loss function, and then formula (9) is used to combine similarity and popularity and predict the user's rating of the project; In the formula, represents the loss function; sim(u,i) represents the similarity between user u and item i; sim(u,j) represents the similarity between user u and item j; similarity sim is calculated using cosine similarity; (u,i) and (v,j) both represent the same batch There are user-item pairs with interactions in ; u and v represent users, i and j represent items; 9u,i) are used as training positive samples and (u,j) are used as random negative samples; τ represents the temperature coefficient; Represents the predicted rating of user u for item i; Represents the popularity index of item i.
5. The collaborative filtering method combining similarity and popularity as claimed in claim 1, characterized in that: In step 2, formula (12) is used to construct a contrast loss function, and then formula (13) is used to combine similarity and popularity and predict the user's rating of the project; In the formula, represents the loss function with the weighted temperature coefficient; sim(u,i) represents the similarity between user u and item i; sim(v,i) represents the similarity between user v and item i; similarity sim is calculated using cosine similarity; (u,i) and (v,j) both represent the same batch u and v represent users, i and j represent items; τ ii represents the temperature coefficient of the positive sample pair; τ ji represents the temperature coefficient of random negative sample pairs; It represents the predicted rating of user u for item i.
6. The collaborative filtering method combining similarity and popularity as claimed in claim 5, characterized in that: In step 2, the weighted temperature coefficient is defined to satisfy both condition 1 and condition 2, and the temperature coefficient is obtained according to formula (10) and formula (11); Condition 1 is that when the positive sample pair is fixed, the temperature coefficient is proportional to the popularity of the negative sample item; Condition 2 is that the temperature coefficients corresponding to all positive sample pairs are the same; In the formula, τ ij Indicates the temperature coefficient when item i is a positive sample and item j is a negative sample; τ ik Indicates the temperature coefficient corresponding to item i as a positive sample and item k as a negative sample; τ ii represents the temperature coefficient corresponding to the positive sample pair when item i is used as a positive sample; τ represents the temperature coefficient corresponding to the positive sample pair; represents the popularity of item i; represents the popularity of item j; represents the popularity of item k.
7. The collaborative filtering method combining similarity and popularity as claimed in any one of claims 4 to 6, characterized in that: In step 2, τ is set to 0.5-2.
8. The collaborative filtering method combining similarity and popularity as claimed in claim 7, characterized in that: In step 2, τ is set to 1-1.5.
Citation Information
Cited By
Noise robust recommendation system optimization method based on adaptive margins
CN121051300A