Bipartite graph link prediction system based on edge weight guided comparative learning and recommendation method of bipartite graph link prediction system

By adopting a comparison learning method based on edge weight guidance in the recommendation system, using the weight guidance edge attention mechanism and a two-layer contrast learning framework, the problem that the existing methods fail to make full use of edge weight information is solved, and higher quality representation learning and recommendation performance are achieved.

CN119829844AActive Publication Date: 2025-04-15LIAONING UNIVERSITY

Patent Information

Application Number
CN202510028963.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-04-15
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

The existing recommended methods fail to fully play their role in guiding representation learning when utilizing edge weight information in the two-part graph, and it is difficult to capture complex user-item interaction modes in sparse networks.

Method used

The comparison learning method based on edge weight guidance is adopted, and the accuracy of link prediction is improved through the weight guidance edge attention mechanism, a double-layer comparison learning framework, and a negative sampling strategy of weight-degree balance.

Benefits of technology

Effectively utilize edge weight information to improve the quality of representation learning, can perform well in sparse networks, and significantly improve the performance of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829844A_ABST
    Figure CN119829844A_ABST
Patent Text Reader

Abstract

The invention discloses a bipartite graph link prediction system based on edge weight guided comparative learning and a recommendation method thereof, and relates to the technical field of recommendation systems. The system comprises a data preprocessing unit, an embedding unit, a weight-guided side attention unit, a double-layer contrast learning unit, a fusion learning unit and a prediction unit. Based on the system, neighbor information is dynamically aggregated through a weight-guided side attention mechanism, so that the model can adaptively pay attention to an important connection relationship; a double-layer contrast learning framework is adopted, and local interaction modes and global structure similarity are comprehensively captured; a weight-degree balance negative sampling strategy is provided, high-quality negative samples are generated, and the negative samples are excellent in performance in the sparse network; a unified learning framework is provided, classification and comparison learning targets are fused, and optimization of local and global structures is realized. The method effectively improves the accuracy and efficiency of a recommendation system, is suitable for large-scale and sparse user-article interaction data, and has a wide application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of recommendation systems, and in particular to a bipartite graph link prediction system based on edge weight guided contrastive learning and a recommendation method thereof. Background Art

[0002] Recommendation systems are widely used in e-commerce, social networks and other fields. In practical applications, recommendation systems usually use a bipartite graph structure to describe the interaction between users and items, where users and items constitute two types of nodes in the bipartite graph, and users' ratings and clicks on items constitute weighted edges. Accurately predicting new interactions that may occur between users and items is of great significance for personalized recommendations.

[0003] Traditional recommendation methods are mainly based on the principle of collaborative filtering, which predicts possible future interactions by analyzing users' historical behavior patterns. Such methods have problems such as data sparsity and cold start in practical applications. With the development of deep learning technology, recommendation methods based on graph neural networks have gradually become a research hotspot. Such methods learn the representation of user and item nodes through message passing mechanisms, which can effectively utilize the structural information of the graph. However, most existing methods simplify user-item interactions into binary relationships, ignoring the important information of interaction intensity, and it is difficult to distinguish different degrees of user preferences.

[0004] Recent studies have shown that introducing self-supervised learning, especially contrastive learning, into recommendation systems can significantly improve model performance. Such methods usually construct training samples through data augmentation or negative sampling. However, in practical applications, simple data augmentation strategies may destroy the original semantics of user-item interactions in bipartite graphs, and uniform random negative sampling often produces low-quality negative samples, affecting the learning effect of the model.

[0005] User behavior data in e-commerce platforms naturally contain edge weight information, such as ratings, purchase quantity, browsing time, etc. These weights reflect the strength of user preferences for items and are of great value for accurately understanding user interests. However, existing recommendation methods mainly use simple weighting or feature concatenation to utilize these weight information, which fails to give full play to the guiding role of weights in representation learning. At the same time, due to the differences in user activity and item popularity, the degree distribution of nodes in bipartite graphs often presents long-tail characteristics, which poses a challenge to effective negative sample sampling.

[0006] Therefore, there is an urgent need for a bipartite graph recommendation method that can effectively utilize edge weight information and improve the quality of representation learning. This method should not only fully utilize the interaction strength information to guide representation learning, but also combine the node degree distribution characteristics to perform high-quality negative sample sampling, thereby improving the performance of the recommendation system. Summary of the invention

[0007] The technical problem to be solved by the present invention is to provide a bipartite graph link prediction system and method based on edge weight guided contrastive learning in view of the deficiencies in the prior art. The edge weights in the bipartite graph contain the intensity information of the interaction between users and items. Existing methods usually regard links as simple binary relationships, ignoring the difference in interaction intensity reflected by the edge weights. At the same time, it is difficult to capture complex user-item interaction patterns in sparse networks. Therefore, the present invention proposes a contrastive learning method based on edge weight guidance, which effectively improves the accuracy of link prediction through a weight-guided edge attention mechanism, a two-layer contrastive learning framework, and a weight-degree balanced negative sampling strategy.

[0008] The technical solution adopted by the present invention is as follows: On the one hand, the present invention provides a bipartite graph link prediction system based on edge weight guided contrastive learning, including a data preprocessing unit, an embedding unit, a weight-guided edge attention unit, a two-layer contrastive learning unit, a fusion learning unit and a prediction unit. The specific functions of each unit are as follows:

[0009] Data Preprocessing UnitThis unit includes three key components:Data Loader: It is specially used to process raw user-item interaction data. Its core function is to read user ID, item ID and interaction score information, and build an efficient compressed sparse row (CSR) matrix storage structure. This storage structure significantly reduces memory usage and improves data processing efficiency.Weight Normalizer: It performs special normalization processing on user-item interaction scores. The quantile transformation and beta distribution adjustment methods are used to ensure that the normalized weight values ​​not only maintain the original order relationship, but also highlight the discrimination of high-score interactions. This processing is crucial to accurately capture the strength of user preferences.Negative Sampler: Based on an innovative sampling strategy, negative samples are dynamically generated during training. By considering the degree distribution of item nodes, representative negative sample items are selected for each positive sample user-item pair to ensure the quality and diversity of negative samples.

[0010] The embedding unit consists of two specialized embedders: User embedder: Generates low-dimensional dense vector representations for user nodes in the bipartite graph, mapping discrete user IDs to continuous embedding space. Item embedder: Similarly, generates corresponding embedding representations for item nodes, ensuring that users and items can be effectively calculated in the same vector space.

[0011] The weight-guided edge attention unit consists of three components that work together: Attention calculator: Through the designed multi-layer perceptron network, the embeddings of the user node and the item nodes with which it has interacted historically are jointly calculated to obtain an initial attention score that reflects the strength of the relationship between the nodes. Weight integrator: Innovatively multiply and integrate the user-item interaction score with the initial attention score to generate an attention score that incorporates the interaction strength information. Information aggregator: Softmax normalizes the integrated attention score, and aggregates the historical interaction item information through weighted summation, ultimately obtaining a rich user-item interaction representation vector.

[0012] The two-layer contrastive learning unit contains two complementary contrastive learners: Node-level contrastive learner: Based on the locality sensitive hashing (LSH) algorithm, it efficiently identifies user nodes with similar behavior patterns and treats them as positive samples, while treating other user nodes in the batch as negative samples. Edge-level contrastive learner: It implements an importance weighting mechanism of weight-degree balance for the sampled negative sample items, effectively improving the influence of high-quality negative samples in the contrastive learning process.

[0013] The fusion learning unit contains two loss calculators: Classification loss calculator: calculates the cross entropy loss for the user-item interaction prediction task. Contrastive loss calculator: calculates the contrastive loss for node-level and edge-level contrastive learning, and performs weighted fusion with the classification loss through an adjustable weight parameter.

[0014] The prediction unit consists of two core components: Feature integrator: concatenates the user-item interaction representation vector with the respective node embeddings to form a complete feature representation. Predictor: Through a carefully designed multi-layer neural network, the integrated feature vector is nonlinearly transformed and finally outputs the predicted probability of the user's interaction rating on the item.

[0015] On the other hand, the present invention also provides a recommendation method based on the above system, which specifically includes six key stages:

[0016] Step 1: Data preprocessing phase This phase aims to build a high-quality training data foundation. First, the original user-item interaction data is organized into a compact graph structure G = (U, V, E, W), where the edge weight W reflects the interaction strength. In order to highlight the impact of high-quality interactions, a three-step weight normalization process is designed:

[0017] Step 101: Load the original interaction data and extract the user ID, item ID and rating information. This information will form the basic structure of the bipartite graph, and the rating value will be used as the initial weight of the edge.

[0018] Step 102: Encode and map user and item IDs to ensure index continuity.

[0019] Step 103: Construct the interaction matrix M uv ,

[0020] M uv ={w ij |(i,j)∈E}

[0021] where each non-zero element w ij Represents a weighted edge, reflecting the interaction strength between user i and item j. This matrix representation facilitates subsequent feature extraction and calculation.

[0022] Step 104: Use QuantileTransformer to perform quantile transformation, which maintains the relative order of the ratings

[0023] w′=QuantileTransform(w)

[0024] Step 105: Limit the transformed value to the interval [0.01, 0.99] to avoid the influence of extreme values

[0025] w″=clip(w′,0.01,0.99)

[0026] Step 106: Enhance the discrimination of high scores by power transformation, which is especially important for identifying high-quality interactions.

[0027] w″′=(w″)^0.5

[0028] Step 107: For each positive sample (u, v), select k negative samples according to the sampling probability P(v'|u):

[0029] P(v′|u)∝(log(1+d v′ )·w v′avg ) / Z

[0030] This sampling probability also takes into account the popularity of the item (through the degree d v′ ) and the interaction quality (by averaging the weight w v′avg ), which can generate more representative negative samples.

[0031] Step 108: Use logarithmic transformation log(1+d v′ ) can prevent highly ordered nodes from dominating the sampling process.

[0032] Step 2: Embedding Representation Phase This phase generates initial vector representations for user and item nodes. Through a carefully designed embedding strategy, we ensure that the node representation can fully capture the graph structure information:

[0033] Step 201: Use Xavier uniform distribution to initialize the embedding parameters. This initialization method helps to stabilize the training. For each user u and item v, generate the corresponding embedding vector:

[0034]

[0035] Here, the embedding dimensions of users and items are uniformly set to d to ensure that they are in the same vector space, which is convenient for subsequent similarity calculation and feature interaction. Xavier initialization can keep the variance consistent during forward propagation and accelerate model convergence.

[0036] Step 3: Weight-guided Edge Attention Calculation Phase This phase is one of the core innovations of the present invention, which dynamically integrates interactive information through the attention mechanism:

[0037] Step 301: Attention score calculation takes the user embedding as the query vector Q u =h u

[0038] Step 302: Item embedding as key-value vector K v =h v .

[0039] Step 303: Perform a joint transformation on them through a multi-layer perceptron:

[0040] e ij =MLP([Q u |K v ])

[0041] This design allows the model to adaptively learn the correlations between users and items. Multilayer perceptrons are able to capture nonlinear interaction patterns and are more expressive than simple inner product operations.

[0042] Step 304: Weight-guided Information Aggregation First, the edge weight is multiplied by the attention score:

[0043] Step 305: Normalize by softmax:

[0044]

[0045] Step 306: Use batch matrix multiplication (BMM) for efficient information aggregation:

[0046] e uv =BMM(α ij ,K v )

[0047] This weight-guided attention mechanism can adaptively aggregate neighbor information according to the interaction intensity, so that important interaction patterns receive more attention. The use of batch matrix multiplication significantly improves computational efficiency, enabling the model to process large-scale graph data.

[0048] Step 4: Two-layer contrastive learning phase In this phase, contrastive learning at both the node level and the edge level is performed to fully capture the structural information in the graph:

[0049] Step 401: Node-level contrastive learning, first generate a signature vector for each user node: s u =LSH(h u )

[0050] Step 402: Identify users with similar structures based on Locality Sensitive Hashing (LSH):

[0051] Nstruct(u)={u′∈U|LSH(s u )=LSH(s u′ )}

[0052] This LSH-based similar user discovery method is efficient and scalable.

[0053] Step 403: Calculate node-level contrast loss:

[0054]

[0055] Where τ is the temperature parameter, which controls the smoothness of the similarity distribution. represents the embedding of similar users, u - Represents the negative users in the batch.

[0056] Step 404: Edge-level contrastive learning calculates the cosine similarity between edge representations:

[0057] sim(e1,e2)=e1 T e2 / (||e1||·||e2||)

[0058] Step 405: Apply weight-degree balancing to negative sample items and calculate edge-level contrast loss:

[0059]

[0060] This two-layer contrastive learning design can simultaneously consider the global structural similarity of nodes and the local interaction patterns of edges, enhancing the representation ability of the model.

[0061] Step 5: Fusion learning phase This phase unifies the classification objectives with the contrastive learning objectives:

[0062] Step 501: Loss calculation and fusion First, calculate the cross entropy classification loss of interactive prediction:

[0063]

[0064] Step 502: weighted fusion with contrastive learning loss: L = L cls +λ(L edge +L node )

[0065] Where λ is a balance parameter used to adjust the relative importance of the classification task and the contrastive learning task. This multi-task learning framework can learn more discriminative feature representations.

[0066] Step 6: Prediction phase This phase integrates all the above information to generate the final prediction result:

[0067] Step 601: Feature integration and prediction First, concatenate the user-item interaction representation with the node embedding: x = [e uv ||h u ||h v ]

[0068] Step 602: Through the dimension reduction layer and nonlinear transformation: x′=ReLU(Wx+b)

[0069] Step 603: Apply Dropout for regularization: x″=Dropout(x′)

[0070] Step 604: Output the predicted probability through the sigmoid function:

[0071] Step 605: Determine the prediction result: According to the prediction probability The final prediction result is determined by comparing with the preset threshold θ:

[0072]

[0073] The threshold θ is usually set to 0.5, but it can also be adjusted according to the specific application scenario to balance the precision and recall rate.

[0074] This multi-layer prediction structure makes full use of the representation information of edges and the embedding information of nodes to improve the prediction accuracy of the model.

[0075] The beneficial effects created by the present invention are as follows: a novel contrastive learning method based on edge weight guidance is proposed, which can better utilize the interaction strength information in the bipartite graph and improve the accuracy of link prediction. A weight-guided edge attention mechanism is designed to dynamically aggregate neighbor information so that the model can adaptively focus on important connection relationships. A two-layer contrastive learning framework is adopted to comprehensively capture local interaction patterns and global structural similarities, thereby enhancing the effect of representation learning. A weight-degree balanced negative sampling strategy is proposed to generate high-quality negative samples, which performs well in sparse networks. A unified learning framework is proposed to integrate classification and contrastive learning objectives to achieve local and global structural optimization. In general, the present invention can significantly improve the accuracy of link prediction in various application scenarios, such as e-commerce recommendations, social analysis, etc., and is an innovative solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 is a flow chart of the method of the present invention;

[0077] Figure 2 is a structural diagram of the link prediction model of the present invention; DETAILED DESCRIPTION

[0078] The technical solutions in the embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. The following embodiments are applicable to the present invention, but are not intended to limit the scope of the present invention.

[0079] like Figure 2 As shown in the figure, the system structure of this method includes a data preprocessing unit, an embedding unit, a weight-guided edge attention unit, a two-layer contrastive learning unit, a fusion learning unit, and a prediction unit. The specific functions of each unit are as follows:

[0080] Data Preprocessing UnitThis unit includes three key components:Data Loader: It is specially used to process raw user-item interaction data. Its core function is to read user ID, item ID and interaction score information, and build an efficient compressed sparse row (CSR) matrix storage structure. This storage structure significantly reduces memory usage and improves data processing efficiency.Weight Normalizer: It performs special normalization processing on user-item interaction scores. The quantile transformation and beta distribution adjustment methods are used to ensure that the normalized weight values ​​not only maintain the original order relationship, but also highlight the discrimination of high-score interactions. This processing is crucial to accurately capture the strength of user preferences.Negative Sampler: Based on an innovative sampling strategy, negative samples are dynamically generated during training. By considering the degree distribution of item nodes, representative negative sample items are selected for each positive sample user-item pair to ensure the quality and diversity of negative samples.

[0081] The embedding unit consists of two specialized embedders: User embedder: Generates low-dimensional dense vector representations for user nodes in the bipartite graph, mapping discrete user IDs to continuous embedding space. Item embedder: Similarly, generates corresponding embedding representations for item nodes, ensuring that users and items can be effectively calculated in the same vector space.

[0082] The weight-guided edge attention unit consists of three components that work together: Attention calculator: Through the designed multi-layer perceptron network, the embeddings of the user node and the item nodes with which it has interacted historically are jointly calculated to obtain an initial attention score that reflects the strength of the relationship between the nodes. Weight integrator: Innovatively multiply and integrate the user-item interaction score with the initial attention score to generate an attention score that incorporates the interaction strength information. Information aggregator: Softmax normalizes the integrated attention score, and aggregates the historical interaction item information through weighted summation, ultimately obtaining a rich user-item interaction representation vector.

[0083] The two-layer contrastive learning unit contains two complementary contrastive learners: Node-level contrastive learner: Based on the locality sensitive hashing (LSH) algorithm, it efficiently identifies user nodes with similar behavior patterns and treats them as positive samples, while treating other user nodes in the batch as negative samples. Edge-level contrastive learner: It implements an importance weighting mechanism of weight-degree balance for the sampled negative sample items, effectively improving the influence of high-quality negative samples in the contrastive learning process.

[0084] The fusion learning unit contains two loss calculators: Classification loss calculator: calculates the cross entropy loss for the user-item interaction prediction task. Contrastive loss calculator: calculates the contrastive loss for node-level and edge-level contrastive learning, and performs weighted fusion with the classification loss through an adjustable weight parameter.

[0085] The prediction unit consists of two core components: Feature integrator: concatenates the user-item interaction representation vector with the respective node embeddings to form a complete feature representation. Predictor: Through a carefully designed multi-layer neural network, the integrated feature vector is nonlinearly transformed and finally outputs the predicted probability of the user's interaction rating on the item.

[0086] like Figure 1 As shown, it is a flow chart of the method of the present invention, which mainly comprises the following steps:

[0087] Step 1: Data preprocessing stage

[0088] Step 101: Extract the user ID set U = [u1, u2, ..., u i ]、item ID set V=[v1,v2,...,v j] and the corresponding interaction weight matrix W = [w 11 ,w 12 ,...,w ij ].

[0089] Step 102: Encode and map the user ID and item ID to ensure that the index is continuous.

[0090] Step 103: Construct a user-item interaction matrix M, where each non-zero element w ij Represents the interaction weight between user i and item j.

[0091] Step 104: Use QuantileTransformer to transform the weight value w ij Perform quantile transformation to maintain relative order.

[0092] Step 105: Limit the transformed weight value to the interval [0.01, 0.99] to avoid the influence of extreme values.

[0093] Step 106: Further enhance the distinction of high-quality interactions through power transformation, and highlight the impact of important interactions.

[0094] Step 107: Calculate the negative sampling probability P(v′|u) of each positive sample (u, v) according to the degree and average weight of the item. Use k negative sample items v′ sampled according to this probability.

[0095] Step 108: Perform a logarithmic transformation on the degrees of negative sample items to prevent high-degree nodes from dominating the sampling process.

[0096] Step 2: Embedding Representation Phase

[0097] Step 201: Initialize the parameters of user embedding and item embedding using Xavier uniform distribution to ensure consistent variance during forward propagation: - Generate a d-dimensional embedding vector for each user u - Generate a d-dimensional embedding vector for each item v

[0098] Step 202: The embedding dimension d of users and items is uniformly set to ensure that they are in the same vector space to facilitate subsequent similarity calculation and feature interaction.

[0099] Step 3: Weight-guided Edge Attention Calculation Phase

[0100] Step 301: Take the embedding representation of user u as the query vector Q.

[0101] Step 302: The embedded representation of the item v that has a history of interaction with the user u is used as the key-value vector Keys.

[0102] Step 303: Perform a joint transformation on Q and Keys through the designed multi-layer perceptron to obtain the initial attention score eij:

[0103] The user-item interaction weight w ij With the initial attention score e ij Multiply them together to get the attention score that incorporates the interaction strength:

[0104]

[0105] right Perform softmax normalization to obtain the final attention weight:

[0106] Use batch matrix multiplication (BMM) to efficiently aggregate item embeddings to obtain the interaction representation between user u and item v:

[0107] e ij =BMM(α ij ,Keys)

[0108] Step 4: Two-layer contrastive learning phase

[0109] Step 401: Generate a signature vector s for each user u u , identifying structurally similar users through Locality Sensitive Hashing (LSH):

[0110] Nstruct(u)={u′∈U|LSH(s u )=LSH(s u′ )}

[0111] Compute node-level contrastive loss:

[0112]

[0113] in is the embedding of similar users, is the embedding of negative sample users, and τ is the temperature parameter.

[0114] Step 402: Calculate edge representation e ij Cosine similarity: sim(e ij ,e ij ′)=e ij ·e ij ′ / (||e ij ||*||e ij ′||)

[0115] According to the item degree and average weight, the weight-degree balanced importance weighting is applied to the negative sample item v', and the edge-level contrast loss is calculated:

[0116]

[0117] Step 5: Fusion learning phase

[0118] Step 501: Calculate the cross entropy classification loss L for interactive prediction cls .

[0119]

[0120] Step 502: Set the classification loss L cls Weighted fusion with node-level contrast loss Lnode and edge-level contrast loss Ledge:

[0121] L=L cls +λ(L edge +L node )

[0122] Where λ is an adjustable balance parameter.

[0123] Step 6: Prediction Phase

[0124] Step 601: Represent the user-item interaction ij Embed h with user u and item embedding hv as the feature vector.

[0125] Step 602: Transformation through a dimensionality reduction layer and a nonlinear activation function.

[0126] Step 603: Apply Dropout for regularization.

[0127] Step 604: Through the final output layer, use the sigmoid function to output the predicted probability of interaction between user u and item v uv.

[0128] Step 605: Based on the predicted probability The final prediction result is determined by comparing it with the preset threshold θ (usually 0.5).

Claims

1. A bipartite graph link prediction system based on edge weight guided contrastive learning, characterized by: It includes data preprocessing unit, embedding unit, weight-guided edge attention unit, two-layer contrastive learning unit, fusion learning unit and prediction unit; The data preprocessing unit includes a data loader, a weight normalizer, and a negative sampler; The embedding unit includes a user embedder and an item embedder; The weight-guided edge attention unit includes an attention calculator, a weight integrator, and an information aggregator; The two-layer contrastive learning unit includes a node-level contrastive learner and an edge-level contrastive learner; the node-level contrastive learner is used to identify user nodes with similar behavior patterns as positive samples based on the locality sensitive hashing algorithm, and other user nodes in the batch are used as negative samples; the edge-level contrastive learner is used to weight the importance of the sampled negative sample items with a weight-degree balance to enhance the contrastive learning effect of high-quality negative samples; The fusion learning unit includes a classification loss calculator and a contrast loss calculator; the classification loss calculator is used to calculate the cross entropy loss of user-item interaction prediction; the contrast loss calculator is used to calculate the contrast loss of node-level and edge-level contrast learning, and perform weighted fusion with the classification loss; The prediction unit includes a feature integrator and a predictor; the feature integrator is used to concatenate the user-item interaction representation vector with the embedding vectors of the user and the item; the predictor is used to transform the concatenated feature vector through a multi-layer neural network and output the predicted probability of the user's interaction score for the item.

2. The bipartite graph link prediction system based on edge weight guided contrastive learning according to claim 1, characterized in that: The data loader is used to read user ID, item ID and interaction score information from the original user-item interaction data and construct a compressed sparse row matrix storage structure; the weight normalizer is used to perform quantile transformation and beta distribution adjustment on the user-item interaction score to obtain a normalized weight value to enhance the discrimination of high-score interactions; the negative sampler is used to perform sampling based on the degree distribution of item nodes during the training phase to generate a specified number of negative sample items for each positive sample user-item pair.

3. The bipartite graph link prediction system based on edge weight guided contrastive learning according to claim 1, characterized in that: The user embedder is used to generate an initial embedding representation vector for the user node in the bipartite graph; the item embedder is used to generate an initial embedding representation vector for the item node in the bipartite graph.

4. The bipartite graph link prediction system based on edge weight guided contrastive learning according to claim 1, characterized in that: The attention calculator is used to calculate the embedding of the user node and its historical interaction item node through a multi-layer perceptron to obtain an initial attention score; the weight integrator is used to multiply and integrate the user-item interaction score with the initial attention score to obtain an attention score that takes into account the interaction intensity; the information aggregator is used to perform softmax normalization on the attention score and aggregate the historical interaction item information to obtain a representation vector of the user-item interaction.

5. A bipartite graph recommendation method based on edge weight guided contrastive learning, implemented by using the bipartite graph link prediction system based on edge weight guided contrastive learning according to claim 1, characterized in that: The steps are: Step 1: In the data preprocessing stage, the original user-item interaction data is loaded, data cleaning, encoding mapping, and interaction matrix are constructed. Through weight normalization and negative sampling, data is prepared for the subsequent recommendation process. Step 2: Embedding representation stage: Initialize the embedding table of user and item nodes, set embedding parameters and dimensions, and generate initial embedding representations for nodes in the bipartite graph for subsequent feature interaction and calculation; Step 3: Weight-guided edge attention calculation phase, calculate the attention score between the user node and the item node, integrate the interaction score and the attention score, and obtain the representation vector of the user-item interaction through softmax normalization and weighted summation; Step 4: In the two-layer comparative learning stage, node-level and edge-level comparative learning is performed to generate signature vectors, apply LSH to identify structurally similar users, and calculate the degree and importance weight of negative sample items; Step 5: In the fusion learning phase, the classification loss and contrast loss are calculated, and the adjustable weight parameters are used for weighted balance to obtain the final loss function used to guide model training; Step 6: In the prediction phase, the user-item interaction representation vector is concatenated with the user node embedding and the item node embedding. The concatenated vector is mapped to the specified dimension through the dimensionality reduction layer. After the ReLU activation function and Dropout regularization, the interaction score prediction probability is output through the linear layer to generate the user's predicted score for the item.

6. The bipartite graph recommendation method based on edge weight guided contrastive learning according to claim 5, characterized in that: In the step 1, the specific method is: Step 101: Read the original user-item interaction data file and extract the user ID, item ID and rating information; Step 102: Encode and map the user ID and item ID and convert them into continuous integer indexes; Step 103: construct a user-item interaction matrix using a compressed sparse row matrix storage structure; Step 104: Use QuantileTransformer to perform quantile transformation on the original scores to maintain the order of the scores; Step 105: Limit the transformed score value to the interval [0.01, 0.99]; Step 106: Perform a power transformation on the restricted score values ​​to increase the discrimination of high scores; Step 107: Calculate the degree of each item node, that is, the number of users who have interacted with the item; Step 108: construct a sampling probability distribution according to the degree distribution of the item nodes; Step 109: For each positive sample user-item pair, a specified number of negative sample items are sampled from the item set according to probability distribution.

7. The bipartite graph recommendation method based on edge weight guided contrastive learning according to claim 5, characterized in that: In the step 2, the specific method is: Step 201: Create randomly initialized embedding tables for user and item nodes respectively; Step 202: Initialize embedding parameters using Xavier uniform distribution; Step 203: Set the embedding dimensions to the same value for subsequent feature interaction.

8. The bipartite graph recommendation method based on edge weight guided contrastive learning according to claim 5, characterized in that: In the step 3, the specific method is: Step 301: Embed the user node as a query vector; Step 302: embed the item nodes of the user's historical interactions as a key-value vector; Step 303: Perform a joint transformation on the query vector and the key-value vector through a multi-layer perceptron to obtain an initial attention score. Step 304: Perform softmax normalization on the attention score; Step 305: Use the normalized attention weights to perform weighted summation on the item node information; Step 306: Implement parallel computing through batch matrix multiplication to obtain a representation vector of the user-item interaction.

9. The bipartite graph recommendation method based on edge weight guided contrastive learning according to claim 5, characterized in that: In the step 4, the specific method is: Step 401: Generate a signature vector according to the user's interaction mode; Step 402: Apply a locality-sensitive hash function to the signature vector; Step 403: Users with the same hash value are regarded as users with similar structures. Step 404: Calculate the degree of each negative sample item; Step 405: performing logarithmic transformation on the degree of negative sample items; Step 406: Use the transformed degree as the importance weight.

10. The bipartite graph recommendation method based on edge weight guided contrastive learning according to claim 5, characterized in that: In the step 5, the specific method is: The specific steps of the fusion learning stage include: Step 501: calculating the similarity score of the positive sample pair; Step 502: Calculate the similarity score of the negative sample pair; Step 503: Calculate the contrast loss using the InfoNCE loss function; Step 504: Calculate the cross entropy loss of user-item interaction prediction; Step 505: Use an adjustable weight parameter λ to perform a weighted balance between the classification loss and the contrast loss.

Citation Information

Patent Citations

  • Personalized recommendation method for reconstructing proximity based on interactive bipartite graph

    CN116108260A

  • Multi-behavior graph contrast learning recommendation method and system fused with self-attention mechanism

    CN117851687A

  • Method for enhancing recommendation algorithm framework based on multi-level comparative learning of knowledge graph

    CN118503445A

  • Graph neutral networks with attention

    WO2019220128A1

Cited By

  • Gene regulation network inference method, system and equipment based on edge level contrast learning

    CN122334510A

  • Recommendation method for denoising of multi-modal recommendation semantic enhanced article graph and medium

    CN122489843A