E-commerce recommendation system based on graph neural network
By introducing embedded processing modules and node cluster comparison learning modules into the graph collaborative filtering recommendation model, the problems of node importance differences and data sparseness in traditional models are solved, and more efficient and accurate e-commerce recommendations are achieved.
Patent Information
- Application Number
- CN202510095118.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-13
AI Technical Summary
The traditional graph collaborative filtering recommendation model ignores the importance differences of nodes when processing user-product binary graphs, and it is difficult to learn reliable representation and capture higher-order information due to the sparseness and noise of interactive data.
The embedding processing module is used to analyze the incoming degree of nodes, and adaptively assign a unique diffusion coefficient to each node to generate importance-weighted user and product embeddings. Combining the node cluster comparison learning module, semantic neighbors are built and potential prototypes are learned to alleviate the problem of data sparseness.
By considering the importance of nodes and semantic neighbors, the performance and reliability of the recommendation system are improved, and complex and huge e-commerce recommendation scenarios can be better met and provided more personalized and accurate recommendations.
Smart Images

Figure CN119991255A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of personalized recommendation in data mining applications, and relates to an e-commerce recommendation system based on graph neural network. Background Art
[0002] With the rapid development of the Internet, information has also grown exponentially, bringing a huge amount of product data to online shopping users. In the face of a wide range of products, the problem of information overload has troubled many users. The emergence of recommendation systems has solved this problem. It analyzes user history and accurately predicts user preferences to provide personalized services. Therefore, e-commerce recommendation systems that consider the relationship between users and electronic products have important practical significance.
[0003] Graph Neural Networks (GNN), as a deep learning model that can process graph structured data, has achieved remarkable results in the field of recommendation systems in recent years. User-product relationships in e-commerce can be constructed as bipartite graphs in graph structured data, which fits the application direction of collaborative filtering in GNN.
[0004] Graph collaborative filtering is based on the idea of neighbor-based recommendation. It mainly relies on the similarity between users or items, combined with historical behavior data, to provide effective recommendations for target users. However, traditional graph collaborative filtering recommendation models inevitably face some problems: Graph collaborative filtering methods regard each node as having the same importance during the node embedding process. However, for the user-item bipartite graph, the connection of each node is different, with its own special local structure, and should be given different importance; due to the differences in user-item interactions in the real world, interaction data is usually sparse or noisy. This data sparsity and noisy characteristics make it difficult for the model to learn reliable representations, and it is also difficult to capture the high-order information of the interaction data, which has proven to be important in recommendation systems. Summary of the invention
[0005] In view of the shortcomings of existing books, the present invention proposes an e-commerce recommendation system based on graph neural network.
[0006] The present invention comprises:
[0007] The embedding processing module is used to adaptively assign a unique diffusion coefficient to each node by analyzing the in-degree of the node to distinguish the importance of different nodes; and generate importance-weighted user and item embeddings;
[0008] The node cluster contrast learning module is used to build semantic neighbors of nodes based on the original user and item embeddings, and identify semantic neighbors by learning the potential prototypes of each user and item to alleviate the impact of data sparsity on recommendation performance;
[0009] The recommendation system module is used to receive the importance-weighted user and product embeddings generated by the embedding processing module, and make personalized recommendations in combination with the optimization objectives of the node cluster comparison learning module.
[0010] The beneficial effects of the present invention are as follows:
[0011] The present invention uses Newton's heat kernel theory for embedding processing and is applied to user-oriented e-commerce recommendation tasks. It makes full use of the advantages of graph collaborative filtering to capture the node information between conversion users and commodities and achieves excellent results.
[0012] The present invention combines the embedding processing module and node cluster comparative learning into a lightweight GCN to construct a new graph collaborative filtering recommendation system model.
[0013] The present invention is a comprehensive and detailed e-commerce recommendation system. Compared with the prior art, the present invention considers more node information between users and products, improves the problems of incomplete recommendations and low accuracy of e-commerce recommendation systems, and can cope with more complex e-commerce recommendation scenarios with larger data. By embedding the processing module, the present invention has the advantages of being more comprehensive and more interpretable; the use of node cluster comparative learning alleviates the sparsity and noise problems, making the system more reliable; finally, the graph convolutional network with a simplified transfer layer is used to obtain better practicality and performance. Users can get a better recommendation experience through the present invention and get corresponding products that better meet their requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A system schematic diagram of an embodiment of the present application.
[0015] Figure 2 Schematic diagram of the recommendation system module.
[0016] Figure 3 Schematic diagram of the node cluster comparison learning module. DETAILED DESCRIPTION
[0017] Embodiments of the present invention are described in detail below. The embodiments described below are exemplary and intended to be used to explain the present invention, but should not be construed as limiting the present invention.
[0018] The core idea of this application is to simplify the graph convolutional network model of the transfer layer as the main body, integrate the embedding processing module and the node cluster comparison learning module into it and optimize it. The recommendation system model trained and optimized by the two processed e-commerce data sets can perform personalized recommendation tasks, solving the problem of ignoring the importance of each node and noisy and sparse interactive data in the embedding processing of the traditional recommendation model system. At the same time, the present invention has the advantages of lightweight and efficient training.
[0019] The technical solution of this application is as follows Figure 1 As shown, Amazon-Electronics and Amazon-CDs are first processed to retain the data required by the present invention. The data is constructed into a bipartite graph structure, including users, products and the corresponding interaction edges between them; the graph structure data is converted into an embedded object and input into the recommendation system module, which includes two submodules: an embedding processing module and a node cluster comparison learning module; finally, the recommendation task is performed to recommend reasonable products to users by analyzing the user and product node information and historical interaction information.
[0020] With respect to the e-commerce recommendation system provided in the embodiment of the present application, the present application includes the following steps:
[0021] Data preparation:
[0022] The datasets used in this embodiment are Amazon-Electronics and Amazon-CDs. Amazon-Electronics is derived from the user behavior and product data of the electronic product category on the Amazon platform. It is large in scale and contains a large amount of information about electronic products and records of user interactions with them. It covers data such as transactions and evaluations of various electronic products, and can reflect the consumption situation and user behavior characteristics of the electronic product market. Amazon-CDs is derived from the transaction and user behavior data of CD products on the Amazon platform, and contains rich information about music CDs and a large number of user purchase and evaluation records.
[0023] Furthermore, for ease of use, this embodiment filters and establishes edges, and finally constructs user-product two-dimensional graph data. Amazon-Electronics contains 1435 users, 1522 products, and 35931 node interactions; Amazon-CDs contains 43169 users, 35648 products, and 777426 node interactions.
[0024] Model design:
[0025] This embodiment adopts a graph collaborative filtering method to complete the user product recommendation task. The overall model includes an embedding processing module, a node cluster comparison learning module, and a constraint loss function.
[0026] like Figure 2 As shown, in this embodiment, user nodes u1, u2, ..., u7 and commodity nodes v1, v 2, ...,v6 becomes user embedded e after embedding processing u (0) and product embedding u (0) , input them into the embedding processing module HK, and the obtained diffusion coefficient α u and α v Combined with user and product embeddings to get new embedding e u and e v This process of graph diffusion gives each node more information and unique importance.
[0027] At the same time, the original user and product embeddings are input into the node cluster for comparative learning to obtain the loss function L P Embed e with the original path u and e v The loss function L obtained by processing the simplified graph convolutional neural network (UltraGCN) U , L O Combined with overall model optimization training.
[0028] In one example: the main body of the model uses the GCN model with a simplified message passing layer as the backbone of graph collaborative filtering. In GCN, a constraint loss strategy is used to replace the explicit message passing link of the traditional graph collaborative filtering model. The constraint loss directly approaches the limit of infinite-layer graph convolution to alleviate the limitations of the message passing link of the graph collaborative filtering method. After infinite message passing, the final convergence condition is expressed as follows:
[0029]
[0030] It follows that the representations of the last two layers remain unchanged, since the vector generated by neighborhood aggregation is equal to the node representation itself. When convergence is reached, the final user representation (e u ) is as follows:
[0031]
[0032] The simplified convergence state is:
[0033]
[0034] Similarly, the final product representation (e i ) is calculated in the same way as the above formula. If each node meets the above formula, the model can be regarded as reaching the message passing convergence state. The goal is to approximate the above convergence state to replace explicit message passing, normalize the embedding to a unit vector, and then achieve it by maximizing the dot product of the two terms:
[0035]
[0036] For the convenience of optimization, we further combine sigmoid activation and negative log-likelihood to obtain the following loss:
[0037]
[0038] Where σ is the sigmoid function. The loss is optimized to satisfy the structural constraints. Therefore, represents the constraint loss, β u,i Represents the constraint coefficient.
[0039] Further, for optimization To avoid the over-smoothing problem encountered, negative sampling is performed during training. The final constrained loss is as follows:
[0040]
[0041] Among them, N + and N - denote the sets of positive pairs and randomly sampled negative pairs, respectively.
[0042] By introducing the constraint loss The model can directly approach the limit state of infinite-layer message passing, thereby effectively capturing high-order information in the user-item bipartite graph.
[0043] The BCE loss is used for optimization to perform the item recommendation task as follows:
[0044]
[0045] Among them, N + and N - represents positive links and randomly sampled negative links.
[0046] Since the model does not rely on explicit message passing, it can learn other relationships, such as item-item, separately in a more flexible way. In the item-item graph, building an item-item co-occurrence graph by linking items that have co-occurrence will produce the following weighted adjacency matrix
[0047]
[0048] Each entry represents the co-occurrence of two items. Use the formula to approximate the infinite layer graph convolution on G and derive the new coefficient ω i,j :
[0049]
[0050] Among them, gi and g j They represent the degree of product i and product j in G respectively (summed by column).
[0051] Furthermore, in order to ensure the sparsity of product connections and improve training efficiency, we first i,j Select the top-K most similar products S(i) for product i, ω i,j It can measure the similarity between product i and product j, which is proportional to the number of co-occurrences between product i and product j, but inversely proportional to the total degree of the two products. Compared with directly constructing a product-product co-occurrence relationship graph, constructing a user-product adjacency matrix can keep the training conditions uniform and reduce the difficulty of multi-task learning.
[0052] For each positive (u, i) pair, first create K weighted positive (u, j) pairs, where j∈S(i). Then use a more reasonable similarity score ω i,j To penalize the learning process, we can derive the constraint loss on the product-product graph. as follows:
[0053]
[0054] Where |S(i)|=K.
[0055] Therefore, the final training goal of the model is:
[0056]
[0057] Among them, λ and γ are hyperparameters, which are used to adjust the relative importance of user-item and item-item relationships respectively.
[0058] Embedded processing module:
[0059] In order to give each node embedding its unique importance, this embodiment introduces the heat kernel theory into the process of node embedding processing.
[0060] In one example, for user u i and its neighbor nodes With diffusion coefficient function The node embedding processing function D is:
[0061]
[0062] Similarly, product v j The diffusion coefficient function The node embedding processing function D is:
[0063]
[0064] For the diffusion coefficient α, the heat kernel method is used to model the graph diffusion process. The feature propagation between nodes in the graph neural network-based model can be regarded as the practice of Newton's law of cooling (also known as the heat kernel), that is, heat is transferred from a higher temperature area to a lower temperature area. In other words, the embedding propagation between two nodes is proportional to the representation of the nodes. The derivation of this prior knowledge can be calculated as follows:
[0065]
[0066] in, and Indicates that user u after time t i and product v j This derivation shows that is associated with its neighbors at a certain moment. This embodiment introduces the heat kernel theorem into the graph collaborative filtering model for recommendation. Given an initial definition, the heat kernel can be represented in the graph as H t =e -tΓ , where Γ = ID is the Laplacian matrix of the graph G. According to this definition, the embedding of the node after heat core diffusion is:
[0067] h hk =H t h(0),
[0068] Here, h(0) represents the initial embedding of the node.
[0069] Therefore, the function of each node and Automatically assign weights during the node embedding process:
[0070]
[0071] Therefore, the weight assigned to each initial embedding can reflect the different node importance. Studies have shown that the importance of a node is positively correlated with its centrality in the graph, so the in-degree can be used to represent the importance of a node. i ) and d(v j ) as weight and To capture user u i and product v j Therefore, the weight It is expressed as follows:
[0072]
[0073] Where ∈ is a small positive constant, chosen to be 10 -7 .
[0074] Then, a node cluster contrast learning module is designed to solve the noise problem caused by sparsity:
[0075] Noise problems will inevitably be introduced when processing through node embedding, and the semantic features of some users or products will be discarded. The present invention adds node cluster contrast learning to solve the problem of noisy and unevenly distributed interaction data. Node cluster contrast learning incorporates the semantic neighbors of the user-product graph into contrast learning. Semantic neighbors refer to neighbors with similar semantics, but may not be directly reachable on the graph. They have similar product features and user preferences. Semantic neighbors are identified by learning the potential prototypes of each user and product. Similar user or product nodes are in adjacent embedding spaces. The prototype represents the center of a group of semantic neighbor node clusters. The node cluster contrast learning method is as follows: Figure 3 shown.
[0076] From this, a clustering algorithm is used to infer the embeddings of users and items to obtain prototypes, and the expectation maximization (EM) algorithm is used to learn the contrast target. Therefore, the goal of the model is to maximize the following log-likelihood function:
[0077]
[0078] Where Θ is a set of model parameters, R is the interaction matrix, c i is the potential prototype of user u. Similarly, the optimization target of the product can be obtained.
[0079] The node cluster comparison learning objective is based on InfoNCE to minimize the following function:
[0080]
[0081] Among them, c i is the prototype of user u. Similarly, the optimization target of the product can be obtained:
[0082]
[0083] Among them, c j is the prototype of product i, and the final node cluster comparison learning objective is the weighted sum of two items:
[0084]
[0085] By introducing node cluster contrast learning, the model can capture the similarities between users and products and alleviate the impact of data sparsity and noise on the performance of the recommendation system.
[0086] Finally, the model is optimized. After introducing node cluster contrastive learning, the contrastive learning loss is regarded as a supplement to the graph collaborative filtering model, and a multi-task learning strategy is used to jointly train the traditional ranking loss and the proposed contrastive loss. Therefore, the overall training goal is:
[0087]
[0088] Among them, τ is a hyperparameter of the node cluster comparison learning objective.
[0089] Finally, the recommendation system recommends personalized and reasonable products to users by analyzing user and product nodes. The model effect comparison diagram of the embodiment of the present application is shown in the following table. Under the setting of TOP-10, the Recall and NDCG of this example are always better than the baseline model.
[0090]
[0091] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.
Claims
1. An e-commerce recommendation system based on graph neural network, characterized in that: include: An embedding processing module is used to adaptively assign a unique diffusion coefficient to each node by analyzing the in-degree of the node to distinguish the importance of different nodes; And generate importance-weighted user and item embeddings; The node cluster contrast learning module is used to build semantic neighbors of nodes based on the original user and item embeddings, and identify semantic neighbors by learning the potential prototypes of each user and item to alleviate the impact of data sparsity on recommendation performance; The recommendation system module is used to receive the importance-weighted user and product embeddings generated by the embedding processing module, and make personalized recommendations in combination with the optimization objectives of the node cluster comparison learning module.
2. The e-commerce recommendation system according to claim 1, characterized in that: The embedding processing module adopts the diffusion coefficient function in the heat kernel theory and performs embedding processing for users and their neighbor nodes, commodities and their neighbor nodes based on the in-degree of the nodes, so as to give importance to each node.
3. The e-commerce recommendation system according to claim 1 or 2, characterized in that: The node cluster contrastive learning module learns the potential prototype of each user and product by constructing the semantic neighborhood of the user-product graph, so that similar user or product nodes are in adjacent embedding spaces, and obtains the contrastive loss function by minimizing InfoNCE.
4. The e-commerce recommendation system according to claim 1, characterized in that: The constrained loss function in the recommendation system module replaces the traditional graph convolution process by optimizing the loss to generate a constrained loss function, and models the interaction between users and products by optimizing the loss function.
5. The e-commerce recommendation system according to claim 1 or 4, characterized in that: The simplified message passing graph convolutional neural network approaches the limit state of infinite-layer graph convolution by calculating the constrained loss function, thereby effectively capturing the high-order information in the user-item bipartite graph.
6. The e-commerce recommendation system according to claim 5, characterized in that: The recommendation system module also includes learning of product-product relationships, measuring the similarity between products by constructing a product-product co-occurrence graph, and then penalizing the learning process to obtain a constraint loss on the product-product graph.
7. The e-commerce recommendation system according to claim 1, characterized in that: The final training objective of the recommendation system module is the weighted sum of the loss function of the user-item relationship, the constraint loss function, and the constraint loss function of the item-item relationship. The relative importance of different relationships is balanced by adjusting the hyperparameters.
8. The e-commerce recommendation system according to claim 1, characterized in that: The system uses the Amazon-Electronics and Amazon-CDs subsets of the Amazon commodity transaction dataset as data sources, and constructs two-dimensional graph data of users and commodities after screening and processing.
9. The e-commerce recommendation system according to claim 7, characterized in that: The system adopts a negative sampling strategy during training to solve the over-smoothing problem, and jointly trains traditional ranking loss and contrastive loss through a multi-task learning strategy to optimize recommendation performance.
Citation Information
Cited By
Node importance estimation method based on multi-view graph prompt learning
CN120354320A