Commodity recommendation method based on bidirectional collaborative enhancement
By employing a bidirectional collaborative enhancement approach, high-order residual propagation and an improved PPR algorithm are used to optimize the node attributes and structure of graph neural networks. Combined with a dual-channel GNN model, this approach addresses the issues of incomplete structure and missing attributes in graph data, thereby improving the robustness and recommendation accuracy of the model.
Patent Information
- Application Number
- CN202510944093.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-10-28
AI Technical Summary
When processing real-world graph data, existing graph neural networks suffer from incomplete structures and missing or abnormal node attributes, leading to decreased model performance and stability. Single-dimensional augmentation methods are insufficient to simultaneously optimize structure and attributes, resulting in inaccurate information transmission paths and limited node representation capabilities.
A method based on bidirectional collaborative enhancement is adopted to optimize node attributes through a high-order residual propagation mechanism, construct a node-attribute bipartite graph, and use an improved PPR algorithm for path propagation. Combined with a dual-channel GNN model for training, consistency loss and prototype alignment contrast loss are introduced to improve the semantic robustness of the model.
It significantly improves node representation quality and recommendation accuracy. By collaboratively enhancing structure and attributes, it improves the model's learning robustness and generalization ability in complex scenarios, reduces model size, and maintains output consistency across multiple graph views.
Smart Images

Figure CN120852003A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of product recommendation technology, specifically relating to a product recommendation method based on bidirectional collaborative enhancement. Background Technology
[0002] Graph Neural Networks (GNNs) are a class of deep learning models used to process graph-structured data, and have been widely applied in various practical scenarios such as social networks, e-commerce recommendations, and knowledge graphs in recent years. GNNs primarily achieve effective representation of nodes, edges, and even subgraphs by fusing attribute information of nodes with structural information of their neighbors. However, real-world graph data often suffers from incomplete structure, noisy edge connections, and missing or abnormal node attributes, which severely impact the performance and stability of the models.
[0003] To address these issues, existing research has proposed a series of enhancement techniques, attempting to repair and optimize graphs at the level of graph structure or node attributes. One type of method focuses on adjusting the graph's structure, such as filling in missing connections and deleting abnormal edges, to improve the graph's connectivity and information propagation capabilities. Another type of method aims to enhance feature representation in the attribute space, such as improving the robustness of original features through propagation, perturbation, or reconstruction. However, these two types of methods mostly operate independently, neglecting the close intrinsic relationship between graph structure and node attributes.
[0004] In real-world graphs, structural and attribute defects often coexist. Structural noise can affect the effective propagation of attribute information, and conversely, attribute anomalies can mislead the optimization of graph structure, leading to inaccurate information transmission paths and limited representational capabilities. Furthermore, single-dimensional enhancement methods are unlikely to solve both problems simultaneously and often fall into performance bottlenecks, especially when dealing with heterogeneous, sparse, or highly noisy graphs, where their effectiveness is unstable.
[0005] Existing graph augmentation techniques have not effectively modeled the collaborative relationship between structure and attributes, and lack a unified and robust mechanism to optimize both simultaneously. Solving this problem mainly faces the following challenges:
[0006] Challenge 1: How to enhance the representation of node attributes in damaged topologies? Current methods often assume the graph structure is reliable and propagate features based on adjacency relationships. However, in practical applications, structures often suffer from missing edges, incorrect edges, etc., making it difficult for nodes to obtain sufficient contextual information, resulting in inaccurate attribute representations or even noise contamination. Furthermore, relying solely on propagation methods based on first-order or limited neighbor information makes it difficult to capture potential associations in higher-order structures, limiting the expression of true semantic relationships between nodes.
[0007] Challenge 2: How to construct more robust graph structures using attribute information? While node attributes hold great potential in characterizing semantic similarity, directly using raw attributes to calculate similarity and construct new edges is susceptible to feature noise and high-dimensional sparsity, leading to false or missed connections, which in turn affects the reliability of the graph structure and the stability of representation learning. Therefore, how to construct more reasonable and globally consistent graph structures starting from attributes is a problem that current technologies have not yet fully solved.
[0008] In summary, there is an urgent need for a method that can fuse structural information and attribute features to achieve complementary enhancement through a collaborative approach, thereby improving the performance of graph neural networks in complex scenarios and enhancing the accuracy of downstream tasks. Summary of the Invention
[0009] To address the shortcomings of existing technologies, this invention proposes a product recommendation method based on bidirectional collaborative enhancement. This method includes: acquiring product information and user information and constructing an original graph; inputting the original graph into a trained product recommendation model for processing to obtain user and product classification results; and making product recommendations based on the user and product classification results.
[0010] The training process for a product recommendation model includes:
[0011] S1: Obtain product information and user information, and construct the original graph based on the product information and user information;
[0012] S2: The original graph is processed using a high-order residual propagation mechanism to obtain an enhanced attribute matrix;
[0013] S3: Construct a node-attribute bipartite graph based on the enhanced attribute matrix; the node-attribute bipartite graph includes information nodes and attribute nodes; information nodes consist of user nodes and product nodes;
[0014] S4: The node-attribute bipartite graph is processed using an improved PPR algorithm to obtain the PPR score set when each information node is the source node;
[0015] S5: Construct two enhanced graphs based on the PPR score set when each information node is a source node and the original graph;
[0016] S6: A dual-channel GNN model is used to process the original image and the augmented image respectively, to obtain the original prediction classification result and two augmented prediction classification results;
[0017] S7: Calculate the total loss of the model based on the original predicted classification results and the two enhanced predicted classification results, and perform backpropagation based on the total loss of the model to iteratively adjust the parameters of the GNN model and obtain the trained product recommendation model.
[0018] Preferably, the process of constructing the original graph based on product information and user information includes: treating both products and users as graph nodes; forming edges between user nodes or between user nodes and product nodes if there is an interaction relationship; forming edges between product nodes if the similarity reaches a similarity threshold; and representing the relationships between graph nodes using a normalized adjacency matrix. Obtain the attribute values of each product node or user node and derive the initial attribute matrix X based on these values. The original graph is represented as follows:
[0019] Preferably, the original graph is processed using a higher-order residual propagation mechanism, as shown below:
[0020]
[0021] Among them, X (l) Let β represent the enhancement attribute matrix of the l-th layer, and let β represent the residual coefficient. Let X represent the adjacency matrix of the original graph. (l-1) Let X represent the enhanced attribute matrix of the (l-1)th layer, and let X represent the initial attribute matrix of the original graph.
[0022] Preferably, the process of constructing a node-attribute bipartite graph based on the enhanced attribute matrix includes: performing zero-dimensional cleansing on the enhanced attribute matrix to obtain a zero-dimensional cleaned enhanced attribute matrix; constructing an initial node-attribute bipartite graph based on the zero-dimensional cleaned enhanced attribute matrix; and performing singleton weight reduction on the initial node-attribute bipartite graph to obtain the final node-attribute bipartite graph.
[0023] Preferably, the process of processing node-attribute bipartite graphs using the improved PPR algorithm includes:
[0024] Step 1: Select the current information node as the source node, initialize the PPR score of each information node to 0, set the restart probability and the initial information node r value; calculate the residual of the information nodes in the node-attribute bipartite graph;
[0025] Step 2: Based on the restart probability and the initial information node r value, push operations are performed on all information nodes whose residuals are greater than the residual threshold until the residuals of all information nodes are less than the residual threshold, thus obtaining the PPR score set when the current information node is the source node;
[0026] Step 3: Select the next information node as the current node, return to step 1, and continue until all information nodes have been used as source nodes to complete one improved PPR algorithm, and obtain the PPR score set when each information node is used as a source node.
[0027] Furthermore, the process of performing a push operation on all information nodes whose residuals are greater than the residual threshold includes:
[0028] Step 1: Update the PPR score of the current information node based on the restart probability and the r value of the current information node;
[0029] Step 2: Calculate the r value of the attribute node based on the restart probability, the r value of the current information node, and the weights of the current information node and its neighboring attribute nodes;
[0030] Step 3: Calculate the r value of the current attribute node based on the current attribute node's r value and the weights of the current attribute node and its neighboring information nodes; return to Step 1 until the residuals of all information nodes are less than the residual threshold.
[0031] Furthermore, the formula for updating the PPR score of the information node is as follows:
[0032]
[0033] in, This represents the PPR score of the updated information node v. This represents the PPR score of information node v before the update, α represents the restart probability, and r s (v) represents the r value of information node v;
[0034] The formula for calculating the r-value of an attribute node is:
[0035]
[0036] Where, r s (u) represents the updated value of attribute node u, r so (u) represents the r value of attribute node u before the update, w(u,v) represents the weight of information node v and its neighboring attribute nodes u, and N(v) represents the set of neighboring attribute nodes of information node v. i This represents the i-th attribute node in the set of neighbor attribute nodes;
[0037] The formula for calculating the r-value of an information node is:
[0038]
[0039] Where, r s (v i ) represents the updated information node v i The value of r, r so (v i ) represents the information node v before the update. i The value of r, (v i (u) represents the attribute node u and its neighboring information node v. i The weights, N(u), represent the set of neighboring information nodes of attribute node u. This represents an information node in the set of neighbor information nodes.
[0040] Preferably, the process of constructing two enhancement maps includes:
[0041] Based on the PPR score of each information node, the K most similar information nodes of each information node are selected and connected to form an edge to obtain the first augmented graph;
[0042] Based on the original graph, according to the PPR score of each information node, each information node selects its K most similar information nodes to form an edge, and deletes the edges between each information node and its K least similar information nodes, thus obtaining the second enhanced graph.
[0043] Preferably, the total model loss is a weighted sum of the original cross-entropy loss, the consistency loss, the class-based contrastive loss, and the two enhanced cross-entropy losses; whereby the consistency loss is expressed as:
[0044]
[0045] Among them, L co Let S represent the consistency loss, S represent the number of augmented graphs, V represent the number of nodes in the training set, and Y represent the number of nodes in the training set. agg(i) This represents the average original predicted classification result for node i. This represents the augmentation prediction classification result of node i under the s-th augmentation graph;
[0046] The class-based contrastive loss is expressed as:
[0047]
[0048] Among them, L dpa This represents the class-based contrastive loss, where C represents the total number of classes, and p... j p represents the prototype vector of class j. j ′ represents an enhanced version of the prototype vector of class j; p q , p′ q Let f(u,v) represent the prototype vector of the qth other category and its enhanced version, and let f(u,v) represent the cosine similarity.
[0049] The beneficial effects of this invention are as follows:
[0050] This invention proposes a bidirectional collaborative enhancement graph neural network framework, comprising a topology-enhanced attribute module, an attribute-driven structure module, and a dual-channel contrastive learning mechanism. The method first optimizes node attributes using a high-order topology propagation mechanism, ensuring semantically complete representation even with local structural defects. Subsequently, it constructs a node-attribute bipartite graph and introduces a personalized path propagation strategy to mine multi-hop feature similarities, back-completing the graph structure from the attribute space. Finally, it maintains semantic consistency and robustness between the original and enhanced graphs through dual-channel representation learning and prototype alignment. This invention proposes a dual-channel framework combining the original graph structure with an enhanced graph structure constructed based on bipartite graph PPR. Both channels share the same set of network parameters, reducing model size and balancing local fine structure and global connectivity on the same feature extraction backbone, thus significantly improving node representation quality. Furthermore, this invention designs a consistency loss to maintain model output consistency across multiple graph views through different enhancement strategies, and introduces a prototype alignment contrastive loss to bring similar cross-channel prototypes closer together and separate dissimilar cross-channel prototypes, effectively enhancing the model's semantic robustness and classification performance. Attached Figure Description
[0051] Figure 1 This is a diagram illustrating the overall training framework of the product recommendation model in this invention.
[0052] Figure 2 This is a schematic diagram of attribute-based topology enhancement in this invention. Detailed Implementation
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] Graph neural networks suffer from both topological defects and node attribute noise, severely impacting the accuracy of graph representation learning and downstream tasks. To address this, this invention proposes a product recommendation method based on bidirectional collaborative enhancement, aiming to simultaneously repair potential defects in both structure and attributes, thereby improving the model's robustness and generalization ability in noisy graphs. This invention designs three main modules, jointly enhancing both topological structure and attributes, and introduces a dual-channel graph neural network structure to unify the learning objective. The method includes the following steps: acquiring product and user information and constructing an original graph; inputting the original graph into a trained product recommendation model for processing to obtain user and product classification results; and making product recommendations based on the user and product classification results.
[0055] like Figure 1 As shown, the training process of the product recommendation model includes:
[0056] S1: Obtain product information and user information, and construct the original graph based on the product information and user information.
[0057] Both products and users are treated as graph nodes. If there is an interaction between user nodes or between a user node and a product node, an edge is formed between them. Similarly, if product nodes have a similarity threshold, an edge is formed between them. The relationships between graph nodes are represented by a normalized adjacency matrix. Obtain the attribute values of each product node or user node and derive the initial attribute matrix X∈R based on the attribute values of each product node or user node. n×d The original image is represented as Preferably, the product node information includes information such as category, price, rating, text features, and image features, while the user information includes information such as gender, age, and behavioral statistics.
[0058] S2: The original graph is processed using a high-order residual propagation mechanism to obtain an enhanced attribute matrix.
[0059] Real-world graph structures suffer from insufficient homogeneity and incomplete connectivity, while existing attribute enhancement methods often rely on one-hop neighbors. To address this issue, this invention designs a topology-enhanced attribute propagation module to introduce higher-order structural information to improve attribute quality. This module employs a higher-order residual propagation mechanism to process the original graph. The propagation iteration of this higher-order residual propagation mechanism is as follows:
[0060]
[0061] X (0) =X
[0062] Among them, X (l) X represents the enhancement attribute matrix of the l-th layer, β∈[0,1] represents the residual coefficients, used to preserve the original information; (l-1) Let X represent the enhanced attribute matrix of the (l-1)th layer, and let X represent the initial attribute matrix of the original graph.
[0063] This propagation mechanism possesses the following characteristics: it can introduce semantically similar nodes from multi-hop neighbors, i.e., in e-commerce scenarios, users who purchase similar products or products purchased by similar users; and it mitigates heterogeneity contamination by suppressing excessive mixing through residual terms in heterogeneous graphs. Addressing potential structural defects (such as missing social relationships) and user attribute noise (such as incomplete user profiles) in user social networks or behavior graphs, the method of this invention can enhance the expressive power of user attributes, enabling more accurate semantic representation. This module obtains the enhanced attribute matrix H = X through iterative propagation. (h)This lays the foundation for building higher-quality graph structures.
[0064] S3: Construct a node-attribute bipartite graph based on the enhanced attribute matrix; the node-attribute bipartite graph includes information nodes and attribute nodes; information nodes consist of user nodes and product nodes.
[0065] While multi-hop propagation can expand the receptive field of each node and capture the global signal, it limits the new information acquired by each node at each propagation step through the residual coefficient β. Although this limitation allows each node to maintain its own attributes during feature propagation, preventing all nodes from becoming identical, the residual coefficient also restricts the propagation of attributes from more distant nodes. While similarity between nodes can be mined from an attribute perspective, traditional similarity calculation methods, such as cosine similarity, risk failure when attributes contain noise. For example: in... Figure 2 In the previous module, after attribute enhancement, nodes v1 (user A) and v3 (user B) might be considered similar. However, node v7 (user C) is too far from node v2 (user D), and its attributes have not been effectively enhanced. In this case, using the traditional cosine similarity method to calculate the similarity between nodes v1 and v7 may collapse to 0.
[0066] To address the aforementioned problems, this invention proposes an attribute-aware topology enhancement module that reconstructs topological connections based on a constructed node-attribute bipartite graph. After attribute enhancement, this invention utilizes an enhanced attribute matrix to further enhance the original graph structure. Through an attribute-driven structure optimization module, more reasonable connections between products or users can be constructed using user-product interaction information, such as connecting users who have purchased similar products or discovering associations between users with potential purchasing intentions and products. In this module, to avoid noise propagation caused by high-dimensional sparse attributes, two preprocessing steps are performed:
[0067] Perform zero-dimensional cleanup on the enhanced attribute matrix, that is, delete the attributes that are all 0 in all nodes, to obtain the zero-dimensional cleaned enhanced attribute matrix.
[0068] Construct an initial node-attribute bipartite graph G based on the enhanced attribute matrix after zero-dimensional cleanup. b = (U∪V,Eb),
[0069] Where: U = {a1, a2, ..., a k} is a set of attributes; V = {v1, v2, ..., v n} represents a set of information nodes, which consist of user nodes and product nodes; each edge (a i ,v j )∈E b Represents attribute a iAppears at node v j In the middle, the weight is w(a) i ,v j )=H ij .
[0070] The initial node-attribute bipartite graph is subjected to singleton weight reduction, which reduces the influence of attribute dimensions that only appear on a single node, to obtain the final node-attribute bipartite graph.
[0071] S4: The node-attribute bipartite graph is processed using an improved PPR algorithm to obtain the PPR score set when each information node is the source node.
[0072] The attribute-aware topology enhancement module uses an improved PPR algorithm to process node-attribute bipartite graphs, uncovering indirect and potential relationships from a global perspective. Therefore, even if nodes are far apart in the actual graph structure, topological connections can be obtained through attributes.
[0073] The traditional PPR algorithm is defined as follows:
[0074] π=αe s +(1-α)πD -1 A
[0075] Where α is the restart probability, e s Let D be a one-dimensional vector of the source node, and let D be a diagonal matrix. However, the traditional PPR algorithm is implemented for general unipart graphs and does not consider the special case of bipartite graphs. When applied to bipartite graphs, it will generate distributions in both attributes and nodes. Therefore, this invention proposes a novel strategy (an improved PPR algorithm) that can retain the final PPR score within the node set, focusing on mining the similarity between nodes.
[0076] The core of the improved PPR algorithm is a variant of the Personalized PageRank (PPR) algorithm specifically designed for bipartite graphs. The basic idea of PPR is to simulate a random walk that starts from a source node, continues walking with a certain probability, and "restarts" back to the source node with a certain probability. Ultimately, the PPR score of each node represents the steady-state probability that the random walk started from the source node and eventually stayed at that node.
[0077] Each information node is used as a source node to execute the improved PPR algorithm once, resulting in a set of PPR scores for each information node when it is used as a source node.
[0078] In the improved PPR algorithm, for each source node s, a set of PPR scores for that source node s is ultimately obtained, where each score vector in the set... This represents the PPR score of a node that starts from the source node s and eventually stops at node v. This score is the similarity measure of node v relative to the source node s.
[0079] The specific algorithm steps are as follows: Specifically, the current information node is selected as the source node, and in the first line... and r s Initialization was performed, and then selection was made to satisfy the criteria. A push operation is performed on node v (line 2-3), and d(v) represents the degree of node v. max Here, it serves as a parameter to balance the efficiency and accuracy of PPR computation. In each push operation, a small portion of the residual *r* is retained, while the 1-α portion is propagated to neighboring nodes (lines 5-8). Then, the residuals received by the neighbors are propagated back (lines 9-14) until the residuals of all nodes are less than a threshold. The algorithm terminated.
[0080]
[0081]
[0082] Specifically: Initialize the PPR score to 0, set the restart probability α and the initial information node r value (which can be 1); calculate the residuals of the information nodes in the node-attribute bipartite graph.
[0083] Based on the restart probability and the initial information node's r value, push operations are performed on all information nodes whose residuals are greater than the residual threshold until the residuals of all information nodes are less than the residual threshold. This yields the PPR score set when the current information node is the source node. Specifically:
[0084] Step 1: Update the PPR score of the current information node based on the restart probability and the current r value of the information node; the formula for updating the PPR score of the information node is:
[0085]
[0086] in, This represents the PPR score of the updated information node v. This represents the PPR score of information node v before the update, α represents the restart probability, and r s (v) represents the r value of information node v.
[0087] Step 2: Calculate the r-value of the attribute node based on the restart probability, the r-value of the current information node, and the weights of the current information node and its neighboring attribute nodes; the formula for calculating the r-value of the attribute node is:
[0088]
[0089] Where, r s (u) represents the updated value of attribute node u, r so (u) represents the r value of attribute node u before the update, w(u,v) represents the weight of information node v and its neighboring attribute nodes u, and n(v) represents the set of neighboring attribute nodes of information node v. i This represents the i-th attribute node in the set of neighbor attribute nodes.
[0090] Step 3: Calculate the r-value of the information node based on the current attribute node's r-value and the weights of the current attribute node and its neighboring information nodes; the formula for calculating the r-value of an information node is:
[0091]
[0092] Where, r s (v i ) represents the updated information node v i The value of r, r so (v i ) represents the information node v before the update. i The value of r, (v i (u) represents the attribute node u and its neighboring information node v. i The weights, N(u), represent the set of neighboring information nodes of attribute node u. This represents an information node in the set of neighbor information nodes.
[0093] Return to step 1 until the residuals of all information nodes are less than the residual threshold.
[0094] After all information nodes perform the improved PPR algorithm once as source nodes, the PPR score set for each information node as a source node is obtained.
[0095] Based on the enhanced feature matrix obtained after attribute propagation, the PPR algorithm on bipartite graphs can uncover more accurate relationships between nodes, and the following theorem can be derived:
[0096] Theorem 1: In graph G b All nodes v that can be reached from the source node s via a path of length 2c. j satisfy:
[0097]
[0098] Prove that we let the random walk matrix M = D -1 W, where W is the weighted adjacency matrix and D is the degree matrix. Since graph G... b It is a bipartite graph, where any point from the source s∈V to v jPaths ∈ V must be of even length and alternate between V and U. Consider a path of length 2c, where v0 = s, v c =v j Consider the i-th "two-hop" transition, its probability is:
[0099] Pre-processing guarantees:
[0100] w(v i-1 ,a i )≥w min ,w(a i ,v i )≥w min ,
[0101] Therefore:
[0102]
[0103] Multiplying the above inequalities by i = 1, ..., c, we get:
[0104]
[0105] Summing all such paths of length 2c, we get:
[0106]
[0107] Finally, based on the definition of Personalized PageRank:
[0108]
[0109] Q.E.D.
[0110] S5: Construct two enhanced graphs based on the PPR score set when each information node is the source node and the original graph.
[0111] Calculate Then, the augmented graph is constructed using the following strategy:
[0112] Based on the PPR score set when each information node is the source node, each information node selects the K information nodes that are most similar to it (with the highest PPR score) and connects them to form an edge, thus obtaining the first augmented graph.
[0113] Based on the original graph, each information node selects its K most similar information nodes to form edges, and deletes the edges between each information node and its K least similar information nodes, thus obtaining the second enhanced graph.
[0114] These two strategies enable the construction of two enhanced graphs, thereby strengthening the graph's structure across different dimensions. Overall, this module further improves the global connectivity of the graph structure and addresses the issue that the original adjacency matrix cannot reflect semantic neighbors.
[0115] S6: A dual-channel GNN model is used to process the original image and the augmented image respectively, to obtain the original prediction classification result and two augmented prediction classification results.
[0116] This invention designs a prototype-aligned dual-channel consistency learning module that uses a shared encoder to supervise two views and maintain consistency. In this module, a dual-channel GNN model is used to process the original graph separately. and two enhanced graphs Dual-channel GNN parameters are shared, as shown in the following output:
[0117]
[0118] S7: Calculate the total loss of the model based on the original predicted classification results and the two enhanced predicted classification results, and perform backpropagation based on the total loss of the model to iteratively adjust the parameters of the GNN model and obtain the trained product recommendation model.
[0119] To reduce the number of parameters and enhance the robustness of the backbone network to both the original and enhanced structures, this invention adopts a dual-channel weight sharing strategy, using cross-entropy loss for both channels.
[0120]
[0121] in, Y(i) is the training node set, which is the set of users or products with known categories in e-commerce recommendation. Y(i) is the true label of node i, that is, the interest group to which the user belongs or the category to which the product belongs. Let Y(i) represent the augmented prediction classification result for node i, and Y(i) represent the original prediction classification result for node i. Since there are two augmented graphs, There are two values, corresponding to L′ ce There are two values.
[0122] Since there are two augmentation maps in the augmentation channel, a consistency loss is introduced to ensure that the model outputs consistently across different augmentation maps.
[0123]
[0124] Among them, L co Let S represent the consistency loss, S represent the number of augmented graphs, V represent the number of nodes in the training set, and Y represent the number of nodes in the training set. agg(i) This represents the average original predicted classification result for node i. This represents the augmentation prediction classification result of node i under the s-th augmentation graph;
[0125] By applying the aforementioned consistency constraints to different augmented graphs, this invention improves the quality of graph learning. However, class semantics between channels may still exhibit discrepancies. Drawing inspiration from contrastive learning, class-level prototype alignment is introduced here. Let Z, Z′∈R be the hidden representations of the original channel and the augmented channel. n×d For each category j∈{1,…,C}, the class prototypes learned by the original channel and the augmented channel are defined as follows:
[0126]
[0127] Among them, t i This is the confidence weight (1 if labeled, the highest predicted probability is used if unlabeled), and based on this, the class-based contrastive loss can be derived:
[0128]
[0129] Among them, L dpa This represents the class-based contrastive loss, where C represents the total number of classes, and p... j p represents the prototype vector of class j. j ' represents an enhanced version of the prototype vector of class j, p q , p′ q Let f(u,v) represent the prototype vector of the qth other category and its enhanced version. cos(u,v) / τ Cosine similarity, where τ is a temperature hyperparameter, usually set to 0.5. This contrast loss design can bring prototypes of the same class closer together and push prototypes of different classes further apart (Theorem 2), thus enhancing the semantic consistency across channels.
[0130] The total model loss is a weighted sum of the original cross-entropy loss, consistency loss, class-based contrastive loss, and two enhanced cross-entropy losses. Therefore, the final optimization objective, i.e., the total model loss L, is expressed as:
[0131] L = L ce +λ1L′ ce +λ2L co +λ3K dpa
[0132] Theorem 2: Minimizing the contrastive loss will make the same prototype p j ,p j The cosine similarity of ' approaches 1, while for q≠j, we have cos(p) j ,pq′)≤1-∈.
[0133] Proof: For each class j, let the gradient It is divided into two parts: the first is the "positive alignment" item, which improves cos(p) j ,p j ′); secondly, the "negative separation" term, which inhibits cos(p j ,p q′ At the equilibrium point (where the gradient is zero), positive similarity reaches its maximum and is strictly higher than all negative similarity, therefore the theorem holds.
[0134] This invention improves the representation learning quality of graph neural networks for nodes (user nodes or product nodes) by synergistically enhancing the graph structure and node attributes. The final recommendation result is typically achieved by calculating the similarity between user and product embeddings after obtaining high-quality user and / or product embeddings, thereby recommending the most relevant products to the user. The model outputs Y and Y' represent the classification predictions or representations of nodes (users or products), which can be used for downstream recommendation tasks.
[0135] In summary, to address Challenge 1, this invention proposes a topology enhancement attribute module aimed at improving the representational ability of nodes under structural defects. Traditional feature propagation methods typically rely on first-order adjacency relationships, which can easily introduce erroneous information or cause semantic isolation in graphs with incomplete topologies or numerous erroneous edges. To overcome this problem, this invention introduces a residual high-order information propagation mechanism, incorporating multi-hop structural information on top of the original attributes to progressively correct and supplement node feature representations, thereby improving the completeness and stability of attributes. This module not only strengthens the semantic connections between locally similar nodes but also mitigates the interference of heterogeneous structures on feature distribution, making nodes more comprehensive and discriminative when receiving information.
[0136] To address Challenge 2, this invention designs an attribute-driven structure optimization module that utilizes global feature similarity to construct more reasonable adjacency relationships. In high-dimensional sparse or noisy graphs, traditional edge construction methods based on local attribute similarity often mislead the structure optimization process. Therefore, this invention constructs a node-attribute bipartite graph and uses a personalized path propagation strategy (such as a global distance metric based on random walks) for feature propagation to uncover potential multi-hop semantic connections. Finally, by mapping these connections back to the original graph, adjacency edges are dynamically completed or reconstructed, effectively connecting semantically close but structurally broken node pairs, improving the overall structural consistency and learning robustness of the graph.
[0137] To integrate the enhancement effects of the two modules mentioned above, this invention further proposes a dual-channel graph neural network framework, introducing a prototype-aligned contrastive learning mechanism while preserving the structural representations of both the original and enhanced graphs. By introducing a category-prototype contrastive loss, the embeddings of the two channels are guided to converge in the semantic space, thereby improving the model's generalization ability and robustness in the face of multi-source noise. Furthermore, this mechanism effectively alleviates the bias problem caused by over-reliance on a single view, enabling the model to achieve collaborative optimization between local and global perspectives.
[0138] This invention improves the representation learning quality of graph neural networks for nodes through a novel dual-channel graph neural network model and an efficient consistency and alignment training mechanism, thereby improving the accuracy of recommendation results.
[0139] The above-described embodiments further illustrate the purpose, technical solution, and advantages of the present invention. It should be understood that the above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made to the present invention within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A product recommendation method based on bidirectional collaborative enhancement, characterized in that, include: Obtain product and user information and construct an original graph. Input the original graph into a trained product recommendation model for processing to obtain user and product classification results. Recommend products based on user and product category results; The training process for a product recommendation model includes: S1: Obtain product information and user information, and construct the original graph based on the product information and user information; S2: The original graph is processed using a high-order residual propagation mechanism to obtain an enhanced attribute matrix; S3: Construct a node-attribute bipartite graph based on the enhanced attribute matrix; the node-attribute bipartite graph includes information nodes and attribute nodes; information nodes consist of user nodes and product nodes; S4: The node-attribute bipartite graph is processed using an improved PPR algorithm to obtain the PPR score set when each information node is the source node; S5: Construct two enhanced graphs based on the PPR score set when each information node is a source node and the original graph; S6: A dual-channel GNN model is used to process the original image and the augmented image respectively, to obtain the original prediction classification result and two augmented prediction classification results; S7: Calculate the total loss of the model based on the original predicted classification results and the two enhanced predicted classification results, and perform backpropagation based on the total loss of the model to iteratively adjust the parameters of the GNN model and obtain the trained product recommendation model.
2. The product recommendation method based on bidirectional collaborative enhancement according to claim 1, characterized in that, The process of constructing the original graph based on product and user information includes: treating both products and users as graph nodes; forming edges between user nodes or between user nodes and product nodes if there are interaction relationships; forming edges between product nodes if their similarity reaches a similarity threshold; and representing the relationships between graph nodes using a normalized adjacency matrix. Obtain the attribute values of each product node or user node and derive the initial attribute matrix X based on these values. The original graph is represented as follows:
3. The product recommendation method based on bidirectional collaborative enhancement according to claim 1, characterized in that, The processing of the original graph using a higher-order residual propagation mechanism is represented as follows: Among them, X (l) Let β represent the enhancement attribute matrix of the l-th layer, and let β represent the residual coefficient. Let X represent the adjacency matrix of the original graph. (l-1) Let X represent the enhanced attribute matrix of the (l-1)th layer, and let X represent the initial attribute matrix of the original graph.
4. The product recommendation method based on bidirectional collaborative enhancement according to claim 1, characterized in that, The process of constructing a node-attribute bipartite graph based on the enhanced attribute matrix includes: performing zero-dimensional cleansing on the enhanced attribute matrix to obtain a zero-dimensional cleaned enhanced attribute matrix; constructing an initial node-attribute bipartite graph based on the zero-dimensional cleaned enhanced attribute matrix; and performing singleton weight reduction on the initial node-attribute bipartite graph to obtain the final node-attribute bipartite graph.
5. The product recommendation method based on bidirectional collaborative enhancement according to claim 1, characterized in that, The process of processing node-attribute bipartite graphs using the improved PPR algorithm includes: Step 1: Select the current information node as the source node, initialize the PPR score of each information node to 0, set the restart probability and the initial information node r value; calculate the residual of the information nodes in the node-attribute bipartite graph; Step 2: Based on the restart probability and the initial information node r value, push operations are performed on all information nodes whose residuals are greater than the residual threshold until the residuals of all information nodes are less than the residual threshold, thus obtaining the PPR score set when the current information node is the source node; Step 3: Select the next information node as the current node, return to step 1, and continue until all information nodes have been used as source nodes to complete one improved PPR algorithm, and obtain the PPR score set when each information node is used as a source node.
6. The product recommendation method based on bidirectional collaborative enhancement according to claim 5, characterized in that, The process of performing a push operation on all information nodes whose residuals are greater than the residual threshold includes: Step 1: Update the PPR score of the current information node based on the restart probability and the r value of the current information node; Step 2: Calculate the r value of the attribute node based on the restart probability, the r value of the current information node, and the weights of the current information node and its neighboring attribute nodes; Step 3: Calculate the r value of the current attribute node based on the current attribute node's r value and the weights of the current attribute node and its neighboring information nodes; return to Step 1 until the residuals of all information nodes are less than the residual threshold.
7. The product recommendation method based on bidirectional collaborative enhancement according to claim 6, characterized in that, The formula for updating the PPR score of an information node is: in, This represents the PPR score of the updated information node v. This represents the PPR score of information node v before the update, α represents the restart probability, and r s (v) represents the r value of information node v; The formula for calculating the r-value of an attribute node is: Where, r s (u) represents the updated value of attribute node u, r so (u) represents the r value of attribute node u before the update, w(u,v) represents the weight of information node v and its neighboring attribute nodes u, and N(v) represents the set of neighboring attribute nodes of information node v. i This represents the i-th attribute node in the set of neighbor attribute nodes; The formula for calculating the r-value of an information node is: Where, r s (v i ) represents the updated information node v i The value of r, r so (v i ) represents the information node v before the update. i The value of r, (v i (u) represents the attribute node u and its neighboring information node v. i The weights, N(u), represent the set of neighboring information nodes of attribute node u. This represents an information node in the set of neighbor information nodes.
8. The product recommendation method based on bidirectional collaborative enhancement according to claim 1, characterized in that, The process of constructing two enhancement maps includes: Based on the PPR score of each information node, the K most similar information nodes of each information node are selected and connected to form an edge to obtain the first augmented graph; Based on the original graph, according to the PPR score of each information node, each information node selects its K most similar information nodes to form an edge, and deletes the edges between each information node and its K least similar information nodes, thus obtaining the second enhanced graph.
9. The product recommendation method based on bidirectional collaborative enhancement according to claim 1, characterized in that, The total model loss is a weighted sum of the original cross-entropy loss, consistency loss, class-based contrastive loss, and two enhanced cross-entropy losses; where the consistency loss is expressed as: Among them, L co Let S represent the consistency loss, S represent the number of augmented graphs, V represent the number of nodes in the training set, and Y represent the number of nodes in the training set. agg(i) This represents the average original predicted classification result for node i. This represents the augmentation prediction classification result of node i under the s-th augmentation graph; The class-based contrastive loss is expressed as: Among them, L dpa This represents the class-based contrastive loss, where C represents the total number of classes, and p... j Let p′ represent the prototype vector of class j. j p represents an enhanced version of the prototype vector of class j; q , p′ q Let f(u,v) represent the prototype vector of the qth other category and its enhanced version, and let f(u,v) represent the cosine similarity.
Citation Information
Patent Citations
A novel random walk recommendation method based on a bipartite graph
CN109885758A
Personalized news recommendation method based on feature bidirectional dynamic collaboration
CN112541128A
Article recommendation method based on cosine ranking loss and virtual edge graph neural network
CN115098787A
Contrast learning news recommendation method based on hypergraph enhancement
CN117033763A
Social recommendation method based on multi-feature heterogeneous graph neural networks
US20220414792A1
Cited By
E-commerce commodity classification method based on decoupling graph neural network
CN121188578A