A graph hybrid learning friend recommendation method for sparse social networks
By generating diverse and denoised comparative views for comparative learning, combining graph convolutional models to update feature embeddings, and filtering reliable pseudo-link sets, the problem of inaccurate recommendations in sparse social networks is solved, achieving more efficient friend recommendations.
Patent Information
- Application Number
- CN202510775387.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-06-11
AI Technical Summary
Existing technologies struggle to fully uncover potential friend relationships in sparse social networks, resulting in inaccurate recommendation results.
By generating diverse social network comparison views and denoised comparison views for comparative learning, and combining graph convolutional models to update feature embeddings, reliable pseudo-link sets are selected, and model parameters are iteratively optimized.
It improves the accuracy of friend recommendations in sparse social network environments, effectively mines users' social and interest features, optimizes model parameters, and enhances recommendation performance.
Smart Images

Figure CN120655448B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of friend recommendation in social networks, and specifically to a graph hybrid learning friend recommendation method for sparse social networks. Background Technology
[0002] In today's digital age, social networks have become an integral part of people's lives, serving as a crucial platform for information dissemination, interpersonal communication, and social interaction. Friend recommendations, as a key element in the formation and evolution of social networks, are increasingly important. They not only help users discover potential friends, expand their social circles, and access more information resources, but also help social platforms increase user activity and engagement.
[0003] In the real world, social networks typically exhibit highly sparse characteristics. When constructing a social relationship graph using users as nodes and their friend relationships as edges, it often results in a sparse graph with only a few links; simultaneously, some users' interactions with items are also extremely limited. Although existing hybrid friend recommendation methods have achieved some success, they still struggle to fully uncover potential friend relationships, leading to inaccurate recommendation results. Summary of the Invention
[0004] This invention provides a graph hybrid learning friend recommendation method for sparse social networks, which solves the problems of insufficient potential friend relationships and inaccurate recommendation results in the face of sparse social networks in the prior art, and achieves the goal of better adapting to the friend recommendation needs in sparse social network environment.
[0005] This invention is achieved through the following technical solution:
[0006] A graph hybrid learning friend recommendation method for sparse social networks includes the following steps:
[0007] S1. Establish an original graph structure dataset, which includes user-user relationships and user-item relationships;
[0008] S2. Based on the original graph structure dataset, generate diverse social network comparison views and denoised comparison views respectively;
[0009] S3. Based on the diverse social network comparison view and the denoised comparison view, perform comparative learning to obtain an initial feature embedding representation; the initial feature embedding representation includes a social embedding representation and an interest embedding representation;
[0010] S4. Update the initial feature embedding using a graph convolution model to obtain the updated feature embedding representation;
[0011] S5. Integrate the updated feature embedding representation to establish a user node link probability prediction model;
[0012] S6. Use the user node link probability prediction model to predict friends for all users in the original graph structure dataset, and generate several user-user pseudo links; remove existing user-user relationships to obtain a candidate pseudo link set;
[0013] S7. Perform reliability screening on the candidate pseudo-link set to obtain the final pseudo-link set;
[0014] S8. Add the final pseudo-link set to the original graph structure dataset to obtain a new graph structure dataset;
[0015] S9. Replace the original graph structure dataset with a new graph structure dataset, return to step S1, until no more new user-user pseudo links can be generated; perform friend recommendation using the current graph structure dataset.
[0016] During their research, the inventors discovered that existing technologies often fail to fully leverage their advantages when dealing with sparse social networks, and may even introduce unnecessary noise, thus affecting the learning performance of recommendation models and hindering the full exploitation of potential friend relationships, leading to inaccurate recommendation results. To overcome these problems, this invention proposes a graph hybrid learning friend recommendation method for sparse social networks. This method first establishes an original graph structure dataset including user-user relationships and user-item relationships, then generates two different comparison views: a diversified social network comparison view and a denoised comparison view. Then, based on contrastive learning techniques, initial feature embedding representations including social embeddings and interest embeddings are obtained. Next, graph convolutional layers are used to propagate and update the user's social and interest embeddings respectively, resulting in updated feature embedding representations. Then, the original graph structure dataset is used to train the user friend recommendation model, obtaining the initial model. Subsequently, friend prediction is performed on users, i.e., predicting the probability of links between user nodes, generating several user-user pseudo-links. Since not all pseudo-links are reliable, this application also performs reliability screening on these pseudo-links to obtain the final pseudo-link set. If the final pseudo-link set is empty, then the graph structure dataset at this point is used as the friend recommendation dataset; otherwise, the final pseudo-link set is added to the original graph structure dataset to form new user-user relationship and user-item relationship graphs, and the iterative training of the model continues.
[0017] Compared to existing technologies, this application: by generating two different comparison views and performing comparative learning based on these two views, it can better empower friend recommendations; in the feature embedding part, it fully considers the multi-dimensional interaction of features between users and between users and items; in the continuous iteration process of "training-prediction-pseudo-link selection", the model adds pseudo-links with high confidence to the training data, thereby continuously optimizing the model parameters. Experiments conducted by the inventors' team have verified that this application has better recommendation accuracy than existing technologies in sparse social network environments.
[0018] Furthermore, step S2 specifically includes:
[0019] S201. Extract the dataset containing user-user relationships from the original graph structure dataset, and define it as a dataset. ;
[0020] S202, Transfer the dataset Input into the graph generator to obtain diverse comparative views of social networks;
[0021] S203, Transfer the dataset Input the data into the image denoiser to obtain a denoised comparison view.
[0022] This solution can be understood as employing a graph generator and a graph denoiser together to form a comparison view generator, thereby obtaining the desired comparison view. The graph generator and graph denoiser can be implemented using existing technologies, and no specific limitations are imposed here. Specifically, the graph generator is responsible for generating a comparison view of diverse social network structures through specific enhancement strategies to enrich the data representation and enhance the model's generalization ability; the graph denoiser is responsible for removing noisy edges by learning parameters, generating a cleaner comparison view.
[0023] Furthermore, the graph generator uses the following formula to determine the loss function:
[0024]
[0025]
[0026]
[0027] In the formula: The loss function for the graph generator; This is the first BPR loss; To repair the damage; Represents a weighted sum; This is a ratio factor used to control the number of retained samples; The weights for the regularization terms; Represents the regularization term; This represents the dataset enhanced by the graph generator; u represents users; v represents items; , Representing positive and negative sample nodes respectively; function This indicates sorting and selecting the first X values; Represents the sigmoid activation function; On behalf of users For positive sample nodes Predicted score; On behalf of users For negative sample nodes Predicted score; Representative dataset The set of nodes; represent A subset of; Represents the original enhanced features; This represents the enhanced features after masking operations; This is the scaling factor.
[0028] Those skilled in the art should understand that positive sample nodes refer to other nodes that have similar structures, attributes, or semantic relationships with the current node, while negative sample nodes are nodes that differ significantly from the current node in structure and semantics. This scheme explicitly defines the loss function of the graph generator and uses enhanced supervision signals. Optimizing the loss can improve the model's understanding of user preferences and the accuracy of recommendation results, while preventing overfitting.
[0029] Furthermore, the graph denoiser uses the following formula to determine the loss function:
[0030]
[0031]
[0032]
[0033] In the formula: The loss function of the graph denoiser; For noise reduction loss; This is the second BPR loss; This represents the strength of weight decay regularization used to control the intensity of the regularization. Represents the regularization term; Represents the dataset The number of layers in the diagram; l represents the node at layer l; Represents the dataset Middle node and Connected edges; express The set of edges in the middle; Indicates the first Layer nodes and The score of the edge between them; represent The cumulative distribution function, Represents the sigmoid activation function. Representing the The model parameters corresponding to the layer; Represents a triple used to describe a user For items and items Preference relationships; , Representing users respectively For items The rating.
[0034] Those skilled in the art should understand that model parameters These parameters refer to the parameters used by the model at each layer to calculate the probability of user and item interactions. The model's predictive quality is then evaluated based on these parameters, allowing for model adjustments to improve its learning. This solution explicitly defines the loss function of the graph denoiser, enabling it to better combat noisy data and provide high-quality training signals.
[0035] Furthermore, during the comparative learning process, the objective function is determined using the following formula:
[0036]
[0037]
[0038]
[0039] In the formula: This represents the objective function for contrastive learning; The contrast loss represents the user node; The comparative loss representing the item node; Represents the i-th user node; represent The user set in; Represents the cosine similarity function; , All are temperature parameters; Represents positive sample pairs of users; Indicates a user's negative sample pair; Represents the i-th item node; represent A collection of items in; Representative item positive sample pair; This represents a negative sample pair of items.
[0040] This scheme combines the contrastive loss of user nodes with the contrastive loss of item nodes to obtain the modeling objective function for contrastive learning. The temperature parameter is used to control the smoothness of the function's structure distribution, thus avoiding the vanishing or exploding gradient problems.
[0041] Furthermore, step S4 specifically includes:
[0042] S401. Input the initial feature embedding into the graph convolution model and perform normalization processing;
[0043] S402. Input the normalized features into the Bi-Li+ module to obtain the first feature vector;
[0044] S403. Input the normalized features into the SENet+ module and perform compression, activation, reweighting and fusion operations in sequence to obtain the second feature vector.
[0045] S404, Concatenate the first feature vector and the second feature vector;
[0046] S405. Propagate the concatenated feature vectors through several graph convolutional layers to obtain the updated feature embedding representation.
[0047] In the propagation of user social embeddings and interest embeddings, this scheme allows neighbor nodes to undergo feature cross-referencing during aggregation, which can more effectively capture high-order interaction information between user and item features. Specifically:
[0048] Normalization of the input feature embeddings enhances the stability of model training.
[0049] Next, the eigenvectors are processed by the Bi-Li+ module to obtain the first eigenvector. The Bi-Li+ module replaces the Hadamard product with the inner product, reducing the parameters of feature interaction from a d-dimensional vector to a 1-dimensional vector, thereby reducing the model size.
[0050] The SENet+ module is used to dynamically learn the importance of features, and the output is obtained through four stages: compression, activation, reweighting, and fusion. This serves as the second feature vector. The compression operation provides the foundation for subsequent feature weight learning. The activation operation improves domain-level attention to a finer-grained bit-level attention, using two fully connected layers to learn weights. The model learns more detailed weights for each dimension of the features, thus more accurately determining feature importance. The reweighting operation increases the weights of important features and decreases the weights of unimportant features. The fusion operation provides richer information for subsequent feature interactions and model predictions.
[0051] Finally, the outputs of Bi-Li+ and SENet+ are concatenated to obtain the updated feature embedding representation q. u ,Right now .
[0052] This solution fully considers the multi-dimensional interactions between users and between users and items, which helps improve the accuracy of friend recommendations.
[0053] Furthermore, the user node link probability prediction model is as follows:
[0054]
[0055] In the formula: a and b represent users respectively. ,user ; On behalf of users and The probability that a link exists between them; Represents the sigmoid activation function; Represents a weighted sum; Represents the dot product; On behalf of users Social embedding representation; On behalf of users Interest embedding representation; On behalf of users Social embedding representation; On behalf of users Interest embedding representation.
[0056] After updating the social embedding and interest embedding representations in the initial feature embedding through step S4, updated social embedding and interest embedding representations are obtained. To predict the link probability between users, these two representations need to be effectively fused. After comparing various fusion methods, the weighted summation strategy showed the best results, thus yielding the user node link probability prediction model defined in this scheme.
[0057] Furthermore, step S7 specifically includes:
[0058] S701. Perform in-instance link selection on the users in the candidate pseudo-link set to obtain an in-instance candidate pseudo-link set.
[0059] S702. Perform inter-instance link selection on the users in the candidate pseudo-link set to obtain an inter-instance candidate pseudo-link set;
[0060] S703. Based on the candidate pseudo-link set within the instance and the candidate pseudo-link set between instances, the final pseudo-link set is obtained.
[0061] This scheme proposes an adaptive strategy for reliability screening of candidate pseudolink sets. It employs two steps: intra-instance link selection and inter-instance link selection, progressively filtering out high-quality pseudolinks. Its beneficial effects include: ① Ensuring the inclusion of real links: Intra-instance link selection is based on the predicted confidence of each unlabeled instance, adding potential links sequentially from high to low until the cumulative confidence exceeds a threshold. This ensures that links with higher confidence are prioritized for each instance, increasing the likelihood of real links being included in the candidate pseudolink set. ② Improving link estimation accuracy: Intra-instance link selection makes the links in the candidate set almost equal in confidence score, ensuring that each sample's candidate pseudolinks have a comparable level of link estimation accuracy, reducing the number of low-confidence links in the candidate pseudolink set, and improving overall link quality. ③ Enhancing category balance: Inter-instance link selection, from a category perspective, ranks all instances in each category by confidence and selects a certain proportion of instances as candidate pseudolinks for that category. This ensures that each category has a sufficient number of samples selected, avoiding the situation where some categories are over-selected due to excessively high confidence, while other categories are ignored. ④ Enhances model learning ability; by combining intra-instance link selection and inter-instance link selection, unlabeled data is filtered and utilized from different perspectives, providing the model with richer and more diverse learning samples, enabling the model to learn more comprehensive feature representations and semantic information from multiple dimensions. ⑤ Achieves diversified and fair learning; this method ensures the diversified and fair distribution of candidate pseudo-links, avoiding excessive influence of certain dominant categories or high-confidence links on the model during the learning process, thus enabling the model to learn balanced knowledge from a wider range of data.
[0062] Furthermore, the candidate pseudo-link set within the instance is calculated using the following formula:
[0063]
[0064] In the formula: This is the set of candidate pseudo-links within the instance. This represents a function that returns the smallest set; j is the candidate user number; Indicates user For users Confidence level of interest; The threshold is used to determine which links have sufficiently high confidence; it can be adaptively updated as the model is trained.
[0065] The set of candidate pseudo-links between instances is calculated using the following formula:
[0066]
[0067] In the formula: This is a set of candidate pseudo-links between instances; This represents the value used to return a given quantile. A function of vector values; This represents a function that sorts vectors in ascending order. A confidence score vector representing all instances.
[0068] Furthermore, the final set of pseudo-links is obtained using the following formula:
[0069]
[0070] In the formula: For the final set of pseudo-links; This is the intersection operator.
[0071] Compared with the prior art, the present invention has at least the following advantages and beneficial effects:
[0072] 1. This invention provides a graph hybrid learning friend recommendation method for sparse social networks. By generating two different comparison views and performing comparative learning based on these two views, it can better empower friend recommendation.
[0073] 2. The present invention provides a graph hybrid learning friend recommendation method for sparse social networks, which fully considers the multi-dimensional interaction of features between users and between users and items in the feature embedding part.
[0074] 3. The present invention provides a graph hybrid learning friend recommendation method for sparse social networks. In the continuous iteration process of "training-prediction-pseudo-link selection", the model adds pseudo-links with high confidence to the training data, thereby continuously optimizing the model parameters.
[0075] 4. This invention provides a graph hybrid learning friend recommendation method for sparse social networks, which can effectively mine users' social and interest features, improve the accuracy of friend recommendations, and effectively alleviate the problem of sparse social networks. Attached Figure Description
[0076] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:
[0077] Figure 1 This is a flowchart illustrating a specific embodiment of the present invention;
[0078] Figure 2 This is a schematic diagram of the original graph structure dataset in a specific embodiment of the present invention;
[0079] Figure 3 This is a schematic diagram of a new graph structure dataset in a specific embodiment of the present invention. Detailed Implementation
[0080] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments and accompanying drawings. The illustrative embodiments and descriptions of this invention are for explaining the invention only and are not intended to limit the invention. In the description of this application, it should be understood that terms such as "front," "rear," "left," "right," "upper," "lower," "vertical," "horizontal," "high," "low," "inner," and "outer," indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description. They do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as limiting the scope of protection of this application.
[0081] Example 1:
[0082] like Figure 1 The graph hybrid learning friend recommendation method shown includes the following steps:
[0083] Step 1: Establish the original graph structure dataset, which includes user-user relationships and user-item relationships; for example... Figure 2 As shown.
[0084] Step 2: Based on the original graph structure dataset, generate diverse social network comparison views and denoised comparison views using a comparison view generator.
[0085] Specifically:
[0086] S201. Extract the dataset containing user-user relationships from the original graph structure dataset, and define it as a dataset. ;
[0087] S202, Transfer the dataset Input into the graph generator to obtain a diverse social network comparison view, View1.
[0088] S203, Transfer the dataset Input the data into the image denoiser to obtain the denoised comparison view, View2.
[0089] The comparison view generator in this embodiment consists of a graph generator and a graph denoiser. The graph generator is responsible for generating a comparison view of diverse social network structures through specific enhancement strategies to enrich the data representation and enhance the model's generalization ability; the graph denoiser is responsible for removing noisy edges by learning parameters to generate a cleaner comparison view.
[0090] This embodiment's graph generator employs the LLMRec model's user profiling and item enhancement strategies to improve the model's understanding of user preferences and the accuracy of recommendation results. The dataset enhanced by the LLMRec model is represented as follows: Using enhanced monitoring signals To optimize the loss function:
[0091]
[0092]
[0093]
[0094] In the formula: The loss function for the graph generator; This is the first BPR loss; To repair the damage; Represents a weighted sum; This is a ratio factor used to control the number of retained samples; The weights for the regularization terms; Represents the regularization term; This represents the dataset enhanced by the graph generator; u represents the user; v represents the item; , These represent positive and negative sample nodes, respectively. Positive sample nodes are other nodes that share similar structures, attributes, or semantic relationships with the current node, while negative sample nodes are nodes that differ significantly from the current node in structure and semantics. (Function) This indicates sorting and selecting the first X values; Represents the sigmoid activation function; On behalf of users For positive sample nodes Predicted score; On behalf of users For negative sample nodes Predicted score; Representative dataset The set of nodes; represent A subset of; Represents the original enhanced features; This represents the enhanced features after masking operations; This is the scaling factor.
[0095] The graph denoising function in this embodiment uses the AdaGCL model and the following loss function:
[0096]
[0097]
[0098]
[0099] In the formula: The loss function of the graph denoiser; For noise reduction loss; This is the second BPR loss; This represents the strength of weight decay regularization used to control the intensity of the regularization. Represents the regularization term; Represents the dataset The number of layers in the diagram; l represents the node at layer l; Represents the dataset Middle node and Connected edges; express The set of edges in the middle; Indicates the first Layer nodes and The score of the edge between them; represent The cumulative distribution function, Represents the sigmoid activation function. Representing the The model parameters corresponding to the layer; Represents a triple used to describe a user For items and items Preference relationships; , Representing users respectively For items The rating.
[0100] Step 3: Based on the diverse social network comparison view and the denoised comparison view, perform comparative learning to obtain the initial feature embedding representation; the initial feature embedding representation includes social embedding representation and interest embedding representation.
[0101] In the comparative learning process, the objective function is:
[0102]
[0103]
[0104]
[0105] In the formula: This represents the objective function for contrastive learning; The contrast loss represents the user node; The comparative loss representing the item node; Represents the i-th user node; represent The user set in; Represents the cosine similarity function; , All are temperature parameters; Represents positive sample pairs of users; Indicates a user's negative sample pair; Represents the i-th item node; represent A collection of items in; Representative item positive sample pair; This represents a negative sample pair of items.
[0106] Step 4: Update the initial feature embedding using a graph convolution model to obtain the updated feature embedding representation; the updated feature embedding representation includes the updated social embedding representation and the updated interest embedding representation.
[0107] Specifically, the following steps are performed for social embedding representations and interest embedding representations respectively:
[0108] S401. Input the initial feature embedding into the graph convolutional model and perform normalization processing to enhance the stability of model training; use layer normalization for numerical features; use batch normalization for categorical features.
[0109] S402. Input the normalized features into the Bi-Li+ module to obtain the first feature vector. At the same time, a low-rank layer can be introduced to project the feature interaction from the sparse space to the low-rank space, which further significantly reduces the storage requirements.
[0110] S403. The normalized features are input into the SENet+ module, where compression, activation, reweighting, and fusion operations are performed sequentially to obtain the second feature vector. In the compression stage, each normalized feature embedding is divided into several groups, and the maximum and average values of each group are selected as "summary statistics" to capture global information about the features across different dimensions, providing a foundation for subsequent feature weight learning. In the activation stage, domain-level attention is improved to finer-grained bit-level attention, using two fully connected layers to learn weights. The model learns more detailed weights for each dimension of the features, thus more accurately determining feature importance. In the reweighting stage, element-wise multiplication is performed, reweighting the features based on the learned weights, increasing the weights of important features and decreasing the weights of unimportant features. In the fusion stage, the reweighted features are fused with the outputs of other modules, providing richer information for subsequent feature interactions and model predictions.
[0111] S404. Concatenate the first feature vector and the second feature vector.
[0112] S405. Propagate the concatenated feature vectors through several graph convolutional layers to obtain the updated feature embedding representation.
[0113] Step 5: Integrate the updated feature embedding representations to establish a user node link probability prediction model:
[0114]
[0115] In the formula: a and b represent users respectively. ,user ; On behalf of users and The probability that a link exists between them; Represents the sigmoid activation function; Represents a weighted sum; Represents the dot product; On behalf of users Social embedding representation; On behalf of users Interest embedding representation; On behalf of users Social embedding representation; On behalf of users Interest embedding representation.
[0116] Step 6: Use the user node link probability prediction model to predict friends for all users in the original graph structure dataset, generating several user-user pseudo links; remove existing user-user relationships to obtain a candidate pseudo link set.
[0117] Step 7: Perform reliability screening on the candidate pseudo-link set to obtain the final pseudo-link set; specifically including:
[0118] S701. Perform in-instance link selection on the users in the candidate pseudo-link set to obtain the in-instance candidate pseudo-link set:
[0119]
[0120] In the formula: This is the set of candidate pseudo-links within the instance. This represents a function that returns the smallest set; j is the candidate user number; Indicates user For users Confidence level of interest; The threshold value is used.
[0121] S702. Perform inter-instance link selection on the users in the candidate pseudo-link set to obtain the inter-instance candidate pseudo-link set:
[0122]
[0123] In the formula: This is a set of candidate pseudo-links between instances; This represents the value used to return a given quantile. A function of the vector value; This represents a function that sorts vectors in ascending order. A confidence score vector representing all instances.
[0124] S703. Based on the intra-instance candidate pseudo-link set and the inter-instance candidate pseudo-link set, the final pseudo-link set is obtained:
[0125]
[0126] In the formula: For the final set of pseudo-links; This is the intersection operator.
[0127] Step 8: Add the final set of pseudo-links to the original graph structure dataset to obtain a new graph structure dataset, such as... Figure 3 As shown;
[0128] Step 9: Replace the original graph structure dataset with the new graph structure dataset, return to step S1, until no more new user-user pseudo links can be generated; perform friend recommendation using the current graph structure dataset.
[0129] It should be noted that, in Figure 2 and Figure 3 In the diagram, circles represent "users" and squares represent "items".
[0130] Example 2:
[0131] To evaluate the effectiveness of the proposed method in different recommendation scenarios, this embodiment selects three representative public datasets from three scenarios for experimental evaluation: Ciao, Epinions, and Last.FM. The Ciao dataset records user interactions on e-commerce platforms, covering detailed data such as purchases, browsing, and user-friend relationships. The Epinions dataset contains user ratings and reviews of various products and services, as well as trust networks among users. The Last.FM dataset focuses on music platforms, including user listening records, tag information, and social relationships.
[0132] For all datasets used, this embodiment adopts a uniform ratio of training set, validation set and test set. 70% of the data is used for training, 10% of the data is used to validate the model's performance and tune hyperparameters, and the remaining 20% of the data is used to finally evaluate the model's generalization ability.
[0133] This embodiment compares several representative existing friend recommendation methods, including traditional matrix factorization, DNN-based recommendation models, and GNN-based recommendation models. The evaluation metric is recall (…). ), hit rate ( ) and normalized loss cumulative gain ( The top-10 users (i.e., k=10) were selected as the recommended users. The results of the comparative experiment are shown in Table 1, where the best performance is indicated by bold text and the second-best performance is indicated by underline:
[0134] Table 1 Comparative Experimental Results
[0135]
[0136] As shown in Table 1, the friend recommendation method proposed in this application outperforms other baseline models on all three datasets. Specifically, on the Ciao dataset, the Recall@10, HR@10, and NDCG@10 metrics of this application improve the performance of the second-best model by 2.5%, 2.5%, and 3.3%, respectively; on the Epinions dataset, the Recall@10, HR@10, and NDCG@10 metrics of this application improve the performance of the second-best model by 2.2%, 2.4%, and 2.6%, respectively; and on the Last.FM dataset, the Recall@10, HR@10, and NDCG@10 metrics of this application improve the performance of the second-best model by 3.1%, 3.1%, and 2.6%, respectively. This fully demonstrates the effectiveness and superiority of the friend recommendation method proposed in this application in sparse social network environments.
[0137] Example 3:
[0138] To verify the effectiveness of each core step in the friend recommendation method of this application and its impact on performance, this embodiment conducts ablation experiments on the complete method of this application and the following three variants to compare their performance:
[0139] (1) w / o CVG: Disable the comparison view generator, i.e., do not use steps two and three.
[0140] (2) w / o SM: Disable the self-training module, that is, do not implement step seven and do not perform reliability screening on the candidate pseudo-link set.
[0141] (3) w / o SLGN: The aggregation process of neighbor nodes in the graph convolution model is handled in the usual way, that is, the initial feature embedding is not updated in step four.
[0142] The results of the ablation experiment are shown in Table 2:
[0143] Table 2 Ablation Experiment Results
[0144]
[0145] As shown in Table 2, the friend recommendation method proposed in this application outperforms its variants on all datasets. Notably, the performance degradation is extremely significant after disabling the self-training module (w / o SM), indicating that reliability screening of the candidate pseudo-link set plays a crucial role in this method. It can find potential UU links through continuous iterative optimization, thereby expanding the social scope. The addition of a contrastive view generator effectively alleviates the problem of sparse social networks. By enhancing and denoising the contrastive view, it can more accurately learn user consistency characteristics, improving performance by 10.6%–13.9%, 11.1%–14.1%, and 11.5%–14.7% on Recall@10, HR@10, and NDCG@10, respectively. After optimizing the aggregation method of neighbor nodes in the graph convolutional layer, the performance was improved by 2.4%~6.4%, 4.4%~6.2%, and 4.9%~6% on Recall@10, HR@10, and NDCG@10, respectively. This shows that after updating the initial feature embedding, this application can learn the features of the nodes more deeply.
[0146] Example 4:
[0147] This application employs a specific method to aggregate features from neighboring nodes using a graph convolution model, thereby updating the initial feature embedding. To verify the effectiveness of this graph convolution model, this embodiment compares the performance of various existing feature cross-expansion strategies. The experimental results are shown in Table 3:
[0148] Table 3 Performance comparison of different methods for updating initial feature embeddings
[0149]
[0150] As can be seen from Table 3, when using the graph convolution model of this application, it is able to capture higher-order feature interactions in social networks more effectively, and its performance is superior to other existing methods.
[0151] In this embodiment, the hyperparameter of the graph convolution model, namely the number of graph convolution layers, is set to 4.
[0152] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0153] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Additionally, the term "connection" as used herein, unless otherwise specified, can refer to a direct connection or an indirect connection via other components.
Claims
1. A graph hybrid learning friend recommendation method for sparse social networks, characterized in that, Includes the following steps: S1. Establish an original graph structure dataset, which includes user-user relationships and user-item relationships; S2. Based on the original graph structure dataset, generate diverse social network comparison views and denoised comparison views respectively; S3. Based on the diverse social network comparison view and the denoised comparison view, perform comparison learning to obtain the initial feature embedding representation; The initial feature embedding representation includes social embedding representation and interest embedding representation; S4. Update the initial feature embedding using a graph convolution model to obtain the updated feature embedding representation; S5. Integrate the updated feature embedding representation to establish a user node link probability prediction model; S6. Use the user node link probability prediction model to predict friends for all users in the original graph structure dataset, and generate several user-user pseudo links; remove existing user-user relationships to obtain a candidate pseudo link set; S7. Perform reliability screening on the candidate pseudo-link set to obtain the final pseudo-link set; S8. Add the final pseudo-link set to the original graph structure dataset to obtain a new graph structure dataset; S9. Replace the original graph structure dataset with a new graph structure dataset and return to step S1 until no new user-user pseudo links can be generated. Friend recommendation is performed using the current graph-structured dataset.
2. The graph hybrid learning friend recommendation method for sparse social networks according to claim 1, characterized in that, Step S2 specifically includes: S201. Extract the dataset containing user-user relationships from the original graph structure dataset, and define it as a dataset. ; S202, Transfer the dataset Input into the graph generator to obtain diverse comparative views of social networks; S203, Transfer the dataset Input the data into the image denoiser to obtain a denoised comparison view.
3. The graph hybrid learning friend recommendation method for sparse social networks according to claim 2, characterized in that, The graph generator uses the following formula to determine the loss function: In the formula: The loss function for the graph generator; This is the first BPR loss; To repair the damage; Represents a weighted sum; This is a ratio factor used to control the number of retained samples; The weights for the regularization terms; Represents the regularization term; This represents the dataset enhanced by the graph generator; u represents the user; v represents an item; , These represent positive and negative sample nodes, respectively. Positive sample nodes are other nodes that share similar structures, attributes, or semantic relationships with the current node, while negative sample nodes are nodes that differ significantly from the current node in structure and semantics. (Function) This indicates sorting and selecting the first X values; Represents the sigmoid activation function; On behalf of users For positive sample nodes Predicted score; On behalf of users For negative sample nodes Predicted score; Representative dataset The set of nodes; represent A subset of; Represents the original enhanced features; This represents the enhanced features after masking operations; This is the scaling factor.
4. The graph hybrid learning friend recommendation method for sparse social networks according to claim 2, characterized in that, The graph denoiser uses the following formula to determine the loss function: In the formula: The loss function of the graph denoiser; For noise reduction loss; This is the second BPR loss; This represents the strength of weight decay regularization used to control the intensity of the regularization. Represents the regularization term; Represents the dataset The number of layers in the diagram; l represents the node at layer l; Represents the dataset Middle node and Connected edges; express The set of edges in the middle; Indicates the first Layer nodes and The score of the edge between them; represent The cumulative distribution function, Represents the sigmoid activation function. Representing the The model parameters corresponding to the layer; Represents a triple used to describe a user For items and items Preference relationships; , Representing users respectively For items The rating.
5. The graph hybrid learning friend recommendation method for sparse social networks according to claim 1, characterized in that, During the comparative learning process, the objective function is determined using the following formula: In the formula: This represents the objective function for contrastive learning; The contrast loss represents the user node; The comparative loss representing the item node; Represents the i-th user node; represent The user set in; Represents the cosine similarity function; , All are temperature parameters; Represents positive sample pairs of users; Indicates user negative sample pairs; Represents the i-th item node; represent A collection of items in; Representative item positive sample pair; This represents a negative sample pair of items.
6. The graph hybrid learning friend recommendation method for sparse social networks according to claim 1, characterized in that, Step S4 specifically includes: S401. Input the initial feature embedding into the graph convolution model and perform normalization processing; S402. Input the normalized features into the Bi-Li+ module to obtain the first feature vector; S403. Input the normalized features into the SENet+ module and perform compression, activation, reweighting and fusion operations in sequence to obtain the second feature vector. S404, Concatenate the first feature vector and the second feature vector; S405. Propagate the concatenated feature vectors through several graph convolutional layers to obtain the updated feature embedding representation.
7. The graph hybrid learning friend recommendation method for sparse social networks according to claim 1, characterized in that, The user node link probability prediction model is as follows: In the formula: a and b represent users respectively. ,user ; On behalf of users and The probability that a link exists between them; Represents the sigmoid activation function; Represents a weighted sum; Represents the dot product; On behalf of users Social embedding representation; On behalf of users Interest embedding representation; On behalf of users Social embedding representation; On behalf of users Interest embedding representation.
8. The graph hybrid learning friend recommendation method for sparse social networks according to claim 1, characterized in that, Step S7 specifically includes: S701. Perform in-instance link selection on the users in the candidate pseudo-link set to obtain an in-instance candidate pseudo-link set. S702. Perform inter-instance link selection on the users in the candidate pseudo-link set to obtain an inter-instance candidate pseudo-link set; S703. Based on the candidate pseudo-link set within the instance and the candidate pseudo-link set between instances, the final pseudo-link set is obtained.
9. The graph hybrid learning friend recommendation method for sparse social networks according to claim 8, characterized in that, The set of candidate pseudo-links within the instance is calculated using the following formula: In the formula: This is the set of candidate pseudo-links within the instance. This represents a function that returns the smallest set; j is the candidate user number; Indicates user For users Confidence level of interest; For threshold; The set of candidate pseudo-links between instances is calculated using the following formula: In the formula: This is a set of candidate pseudo-links between instances; This represents the value used to return a given quantile. A function of vector values; This represents a function that sorts vectors in ascending order. A confidence score vector representing all instances.
10. A graph hybrid learning friend recommendation method for sparse social networks according to claim 9, characterized in that, The final set of pseudo-links is obtained by the following formula: In the formula: For the final set of pseudo-links; This is the intersection operator.