A bipartite graph link prediction system and recommendation method based on edge weight-guided contrastive learning

By employing a contrastive learning method guided by edge weights, this approach addresses the issues of neglecting interaction strength and low-quality negative samples in existing recommendation methods, achieving more accurate link prediction and improved recommendation system performance.

CN119829844BActive Publication Date: 2025-10-31LIAONING UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing recommendation methods ignore edge weight information when utilizing user-item interactions in bipartite graphs, making it difficult to accurately predict interaction strength and capture complex interaction patterns in sparse networks, resulting in low-quality negative samples.

Method used

We employ a contrastive learning method guided by edge weights, which improves the accuracy of link prediction through a weight-guided edge attention mechanism, a two-layer contrastive learning framework, and a weight-degree balancing negative sampling strategy.

Benefits of technology

By effectively utilizing interaction strength information and dynamically aggregating neighbor information, the model improves the accuracy of link prediction in sparse networks, generates high-quality negative samples, and enhances the performance of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829844B_ABST
    Figure CN119829844B_ABST
Patent Text Reader

Abstract

A bipartite graph link prediction system and recommendation method based on edge weight-guided contrastive learning are disclosed, relating to the field of recommender system technology. The system 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. Based on this system, the method dynamically aggregates neighbor information through a weight-guided edge attention mechanism, enabling the model to adaptively focus on important connections; it employs a two-layer contrastive learning framework to comprehensively capture local interaction patterns and global structural similarity; it proposes a weight-degree balanced negative sampling strategy to generate high-quality negative samples, demonstrating excellent performance in sparse networks; and it proposes a unified learning framework that integrates classification and contrastive learning objectives, achieving optimization of both local and global structures. This invention effectively improves the accuracy and efficiency of recommender systems, is suitable for large-scale, sparse user-item interaction data, and has broad application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of recommender systems, specifically to a bipartite graph link prediction system and its recommendation method based on edge weight-guided contrastive learning. Background Technology

[0002] Recommender systems are widely used in e-commerce, social networks, and other fields. In practical applications, recommender systems typically use a bipartite graph structure to describe the interaction between users and items, where users and items constitute two classes of nodes in the bipartite graph, and user actions such as ratings and clicks on items form weighted edges. Accurately predicting potential new interactions between users and items is crucial for personalized recommendations.

[0003] Traditional recommendation methods are primarily based on collaborative filtering, predicting future interactions by analyzing users' historical behavior patterns. These methods suffer from 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. These methods learn representations of user and item nodes through message passing mechanisms, effectively utilizing the structural information of the graph. However, most existing methods simplify user-item interactions to binary relationships, ignoring the important information of interaction strength and making it difficult to distinguish different levels of user preference.

[0004] Recent research has shown that introducing self-supervised learning, particularly contrastive learning, into recommender systems can significantly improve model performance. These methods typically construct training samples through data augmentation or negative sampling. However, in practical applications, simple data augmentation strategies may disrupt the original semantics of user-item interactions in bipartite graphs, and uniform random negative sampling often produces low-quality negative samples, affecting the model's learning effectiveness.

[0005] User behavior data on e-commerce platforms naturally contains edge weight information, such as ratings, purchase quantity, and browsing time. These weights reflect the strength of users' preferences for items and are valuable for accurately understanding user interests. However, existing recommendation methods mainly use simple weighting or feature concatenation when utilizing this weight information, failing to fully leverage the guiding role of weights in representation learning. Furthermore, due to the differences between user activity and item popularity, the degree distribution of nodes in bipartite graphs often exhibits a long-tail characteristic, posing 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 both fully leverage interaction strength information to guide representation learning and combine node degree distribution features for high-quality negative sample sampling, thereby improving the performance of the recommendation system. Summary of the Invention

[0007] The technical problem this invention aims to solve is to address the shortcomings of existing technologies by providing a bipartite graph link prediction system and method based on edge weight-guided contrastive learning. Edge weights in a bipartite graph contain information about the strength of interactions between users and items. Existing methods typically treat links as simple binary relations, ignoring the differences in interaction strength reflected by edge weights. Furthermore, it is difficult to capture complex user-item interaction patterns in sparse networks. Therefore, this invention proposes an edge weight-guided contrastive learning method that 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 in this invention is as follows: On one hand, this 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] The data preprocessing unit comprises three key components: A data loader, specifically designed for processing raw user-item interaction data. Its core function is to read user IDs, item IDs, and interaction rating information, and construct an efficient compressed sparse row (CSR) matrix storage structure. This storage structure significantly reduces memory usage and improves data processing efficiency. A weight normalizer performs special normalization processing on user-item interaction ratings. Employing quantile transformation and beta distribution adjustment methods, it ensures that the normalized weight values ​​maintain their original order while highlighting the discriminative power of high-scoring interactions. This processing is crucial for accurately capturing the intensity of user preferences. A negative sampler dynamically generates negative samples during training based on an innovative sampling strategy. By considering the degree distribution of item nodes, it selects representative negative sample items for each positive user-item pair, ensuring the quality and diversity of negative samples.

[0010] The embedding unit contains two specialized embedders: a user embedder, which generates low-dimensional, dense vector representations for user nodes in the bipartite graph, mapping discrete user IDs to a continuous embedding space; and an item embedder, which similarly generates corresponding embedding representations for item nodes, ensuring that users and items can be effectively similar in the same vector space.

[0011] The weight-guided edge attention unit consists of three collaborative components: Attention Calculator: Through a designed multilayer perceptron network, it jointly calculates the embeddings of user nodes and their historically interacted item nodes to obtain an initial attention score reflecting the strength of relationships between nodes. Weight Integrator: Innovatively, it multiplies and integrates the user-item interaction score with the initial attention score to generate an attention score that incorporates interaction strength information. Information Aggregator: It performs softmax normalization on the integrated attention score and aggregates historically interacted item information through weighted summation to ultimately obtain a rich user-item interaction representation vector.

[0012] The two-layer contrastive learning unit comprises two complementary contrastive learners: a node-level contrastive learner, based on the Locality Sensitive Hash (LSH) algorithm, which efficiently identifies user nodes with similar behavioral patterns and treats them as positive samples, while considering other user nodes within the batch as negative samples; and an edge-level contrastive learner, which implements a weighted importance mechanism based on weights and degrees for the sampled negative sample items, effectively enhancing the influence of high-quality negative samples in the contrastive learning process.

[0013] The fusion learning unit includes two loss calculators: a classification loss calculator, which calculates the cross-entropy loss for the user-item interaction prediction task; and a contrastive loss calculator, which calculates the contrastive loss for node-level and edge-level contrastive learning and then weights and fuses it with the classification loss using adjustable weight parameters.

[0014] The prediction unit consists of two core components: a feature integrator, which concatenates the user-item interaction representation vector with its respective node embeddings to form a complete feature representation; and a predictor, which uses a carefully designed multi-layer neural network to perform a non-linear transformation on the integrated feature vector, ultimately outputting the predicted probability of the user's interaction rating for the item.

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

[0016] Step 1: Data Preprocessing Stage. This stage 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 weights W reflect the interaction strength. To highlight the impact of high-quality interactions, a three-step weight normalization process is designed:

[0017] Step 101: Load the raw interaction data and extract the user ID, item ID, and rating information. This information will form the basic structure of the bipartite graph, with the rating value serving as the initial weight of the edges.

[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] Each non-zero element w ij This represents a weighted edge, reflecting the interaction strength between user i and item j. This matrix representation facilitates subsequent feature extraction and computation.

[0022] Step 104: Perform quantile transformation using QuantileTransformer, which preserves the relative order of the scores.

[0023] w′=QuantileTransform(w)

[0024] Step 105: Limit the transformed value to the range [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-scoring interactions through power transformation, which is particularly important for recognizing 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 (via degree d). v′ ) and interaction quality (via average weight w) v′avg This allows for the generation of more representative negative samples.

[0031] Step 108: Apply logarithmic transformation log(1+d) v′ This can prevent high-number nodes from dominating the sampling process.

[0032] Step 2: Embedding Representation Stage. This stage generates initial vector representations for user and item nodes. A carefully designed embedding strategy ensures that the node representations fully capture the graph structure information.

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

[0034]

[0035] Here, the embedding dimension of users and items is uniformly set to 'd' to ensure they are in the same vector space, facilitating subsequent similarity calculations and feature interactions. Xavier initialization ensures consistent variance during forward propagation, accelerating model convergence.

[0036] Step 3: Weight-guided edge attention calculation stage. This stage is one of the core innovations of this invention, dynamically integrating interactive information through an attention mechanism:

[0037] Step 301: Attention score calculation uses 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 using a multilayer perceptron:

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

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

[0042] Step 304: Weight-guided information aggregation. First, multiply the edge weights by the attention scores:

[0043] Step 305: Normalize using softmax:

[0044]

[0045] Step 306: Perform efficient information aggregation using batch matrix multiplication (BMM):

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

[0047] This weight-guided attention mechanism adaptively aggregates neighbor information based on interaction strength, giving more attention to important interaction patterns. The use of batch matrix multiplication significantly improves computational efficiency, enabling the model to handle large-scale graph data.

[0048] Step 4: Two-Layer Contrastive Learning Phase This phase uses contrastive learning at both the node and edge levels to comprehensively capture the structural information in the graph.

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

[0050] Step 402: Identify structurally similar users based on Locality Sensitive Hash (LSH):

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

[0052] This LSH-based method for discovering similar users is both efficient and scalable.

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

[0054]

[0055] Where τ is a temperature parameter that controls the smoothness of the similarity distribution. Embeddings representing similar users, u - This indicates negative sample 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, thereby enhancing the model's representational capabilities.

[0061] Step 5: Integration Learning Phase. This phase unifies the classification learning objective with the contrastive learning objective:

[0062] Step 501: Loss Calculation and Fusion First, calculate the cross-entropy classification loss of the interaction prediction:

[0063]

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

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

[0066] Step 6: Prediction Stage. This stage integrates all the aforementioned information to generate the final prediction result:

[0067] Step 601: Feature Integration and Prediction First, the user-item interaction representation and node embedding are concatenated: x = [e uv ||h u ||h v ]

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

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

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

[0071] Step 605: Prediction Result Determination: Based on the predicted probability The final prediction result is determined by comparing it with a preset threshold θ.

[0072]

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

[0074] This multi-layered prediction structure makes full use of the edge representation information and node embedding information, thereby improving the prediction accuracy of the model.

[0075] The beneficial effects of this invention are as follows: It proposes a novel edge-weight-guided contrastive learning method that better utilizes interaction strength information in bipartite graphs, improving the accuracy of link prediction. A weight-guided edge attention mechanism is designed to dynamically aggregate neighbor information, enabling the model to adaptively focus on important connections. A two-layer contrastive learning framework is employed to comprehensively capture local interaction patterns and global structural similarity, enhancing the representation learning effect. A weight-degree balanced negative sampling strategy is proposed to generate high-quality negative samples, demonstrating excellent performance in sparse networks. A unified learning framework is proposed, fusing classification and contrastive learning objectives to optimize both local and global structures. In summary, this invention significantly improves the accuracy of link prediction in various application scenarios, such as e-commerce recommendations and social analysis, representing an innovative solution. Attached Figure Description

[0076] Figure 1 This is a flowchart of the method of the present invention;

[0077] Figure 2 This is a structural diagram of the link prediction model of the present invention; Detailed Implementation

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

[0079] like Figure 2 The diagram shows the system structure of this method, which includes a data preprocessing unit, an embedding unit, a weight-guided side 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] The data preprocessing unit comprises three key components: A data loader, specifically designed for processing raw user-item interaction data. Its core function is to read user IDs, item IDs, and interaction rating information, and construct an efficient compressed sparse row (CSR) matrix storage structure. This storage structure significantly reduces memory usage and improves data processing efficiency. A weight normalizer performs special normalization processing on user-item interaction ratings. Employing quantile transformation and beta distribution adjustment methods, it ensures that the normalized weight values ​​maintain their original order while highlighting the discriminative power of high-scoring interactions. This processing is crucial for accurately capturing the intensity of user preferences. A negative sampler dynamically generates negative samples during training based on an innovative sampling strategy. By considering the degree distribution of item nodes, it selects representative negative sample items for each positive user-item pair, ensuring the quality and diversity of negative samples.

[0081] The embedding unit contains two specialized embedders: a user embedder, which generates low-dimensional, dense vector representations for user nodes in the bipartite graph, mapping discrete user IDs to a continuous embedding space; and an item embedder, which similarly generates corresponding embedding representations for item nodes, ensuring that users and items can be effectively similar in the same vector space.

[0082] The weight-guided edge attention unit consists of three collaborative components: Attention Calculator: Through a designed multilayer perceptron network, it jointly calculates the embeddings of user nodes and their historically interacted item nodes to obtain an initial attention score reflecting the strength of relationships between nodes. Weight Integrator: Innovatively, it multiplies and integrates the user-item interaction score with the initial attention score to generate an attention score that incorporates interaction strength information. Information Aggregator: It performs softmax normalization on the integrated attention score and aggregates historically interacted item information through weighted summation to ultimately obtain a rich user-item interaction representation vector.

[0083] The two-layer contrastive learning unit comprises two complementary contrastive learners: a node-level contrastive learner, based on the Locality Sensitive Hash (LSH) algorithm, which efficiently identifies user nodes with similar behavioral patterns and treats them as positive samples, while considering other user nodes within the batch as negative samples; and an edge-level contrastive learner, which implements a weighted importance mechanism based on weights and degrees for the sampled negative sample items, effectively enhancing the influence of high-quality negative samples in the contrastive learning process.

[0084] The fusion learning unit includes two loss calculators: a classification loss calculator, which calculates the cross-entropy loss for the user-item interaction prediction task; and a contrastive loss calculator, which calculates the contrastive loss for node-level and edge-level contrastive learning and then weights and fuses it with the classification loss using adjustable weight parameters.

[0085] The prediction unit consists of two core components: a feature integrator, which concatenates the user-item interaction representation vector with its respective node embeddings to form a complete feature representation; and a predictor, which uses a carefully designed multi-layer neural network to perform a non-linear transformation on the integrated feature vector, ultimately outputting the predicted probability of the user's interaction rating for the item.

[0086] like Figure 1 The diagram shown is a flowchart of the method of the present invention, which mainly includes the following steps:

[0087] Step 1: Data Preprocessing Stage

[0088] Step 101: Extract the user ID set U = [u1, u2, ..., u] from the original data. 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 user IDs and item IDs to ensure continuous indexing.

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

[0091] Step 104: Use QuantileTransformer to adjust the weight values ​​w ij Perform quantile transformations while maintaining the relative order.

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

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

[0094] Step 107: Calculate the negative sampling probability P(v′|u) for each positive sample (u,v) based on the item's degree and average weight. 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 height nodes from dominating the sampling process.

[0096] Step 2: Embedded Representation Stage

[0097] Step 201: Initialize the parameters of user embeddings and item embeddings using a 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: Set the embedding dimension d of users and items uniformly to ensure that they are in the same vector space, which facilitates subsequent similarity calculation and feature interaction.

[0099] Step 3: Weight-guided edge attention calculation stage

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

[0101] Step 302: Use the embedded representation of the item v that has historically interacted with user u as the key-value vector Keys.

[0102] Step 303: Perform a joint transformation on Q and Keys using the designed multilayer perceptron to obtain the initial attention score eij:

[0103] User-item interaction weight w ij Compared with the initial attention score e ij Multiplying these together yields an attention score that incorporates the interaction intensity:

[0104]

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

[0106] Efficiently aggregate item embeddings using batch matrix multiplication (BMM) 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 users with similar structures using Locality-Sensitive Hash (LSH):

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

[0111] Calculate node-level contrast loss:

[0112]

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

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

[0115] Based on the item degree and average weight, apply a weight-degree balanced importance weighting to the negative sample item v', and calculate the edge contrast loss:

[0116]

[0117] Step 5: Integrated Learning Phase

[0118] Step 501: Calculate the cross-entropy classification loss L of the interaction prediction. cls .

[0119]

[0120] Step 502: Classification loss L cls The loss is weighted and fused with the node-level contrastive loss Lnode and the edge-level contrastive 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 e ij With user-embedded h u The hv of the item is concatenated with the hv of the item to form a feature vector.

[0125] Step 602: Transformation through dimensionality reduction layers and nonlinear activation functions.

[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 user u's interaction with item v. uv.

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

Claims

1. A bipartite graph link prediction system based on edge weight-guided contrastive learning, characterized in that: It includes a data preprocessing unit, an embedding unit, a weight-guided side attention unit, a two-layer contrastive learning unit, a fusion learning unit, and a prediction unit; The data preprocessing unit includes a data loader, a weight normalizer, and a negative sampler; The embedding unit includes user embedders and item embedders; Weight-guided edge attention units include an attention calculator, a weight integrator, and an information aggregator; The attention calculator is used to calculate the embedding of user nodes and their historical interactive item nodes through a multilayer 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 historical interactive item information to obtain a representation vector of user-item interaction. 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 behavioral patterns as positive samples based on the locality-sensitive hashing algorithm, and to identify other user nodes in the batch as negative samples. The edge-level contrastive learner is used to perform weight-degree balance importance weighting on the sampled negative sample items to enhance the contrastive learning effect of high-quality negative samples. The fusion learning unit includes a classification loss calculator and a contrastive loss calculator; the classification loss calculator is used to calculate the cross-entropy loss of user-item interaction prediction; the contrastive loss calculator is used to calculate the contrastive loss of node-level and edge-level contrastive learning, and to 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 rating 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 rating 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 rating to obtain normalized weight values, thereby enhancing the discriminative power of high-scoring interactions; the negative sampler is used to sample based on the degree distribution of item nodes during the training phase, generating 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 user nodes in a bipartite graph; the item embedder is used to generate an initial embedding representation vector for item nodes in a bipartite graph.

4. A bipartite graph recommendation method based on edge weight-guided contrastive learning, implemented using the bipartite graph link prediction system based on edge weight-guided contrastive learning as described in claim 1, characterized in that: The steps are as follows: Step 1: Data preprocessing stage. Load the original user-item interaction data, perform data cleaning, encoding and mapping, and construct the interaction matrix. Prepare data for the subsequent recommendation process through weight normalization and negative sampling. Step 2: Embedding representation stage. Initialize the embedding tables for 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 stage. Calculate the attention score between user nodes and item nodes, integrate the interaction score and attention score, and obtain the representation vector of user-item interaction through softmax normalization and weighted summation. Step 4: In the two-layer contrastive learning stage, node-level and edge-level contrastive learning is performed to generate signature vectors. LSH is applied to identify structurally similar users and to calculate the degree and importance weight of negative sample items. Step 5: In the fusion learning phase, calculate the classification loss and contrastive loss, and use adjustable weight parameters to perform weighted balancing to obtain the final loss function used to guide model training; Step 6: In the prediction stage, the user-item interaction representation vector is concatenated with the user node embedding and the item node embedding. The concatenated vector is mapped to a specified dimension through a dimensionality reduction layer. After ReLU activation and Dropout regularization, the interaction rating prediction probability is output through a linear layer to generate the user's predicted rating for the item.

5. The bipartite graph recommendation method based on edge weight-guided contrastive learning according to claim 4, characterized in that: In step 1, the specific method is as follows: 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, converting them into consecutive integer indices; Step 103: Construct the user-item interaction matrix using a compressed sparse row matrix storage structure; Step 104: Use QuantileTransformer to perform quantile transformation on the original scores while preserving the order of the scores; Step 105: Limit the transformed score value to the range [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, which is the number of users who have interacted with that item; Step 108: Construct a sampling probability distribution based on the degree distribution of the item nodes; Step 109: For each positive user-item pair, sample a specified number of negative sample items from the item set according to a probability distribution.

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

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

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

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

Citation Information

Patent Citations

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

    CN118503445A

  • Graph neutral networks with attention

    WO2019220128A1