Item recommendation method, device and storage medium based on graph neural network

By constructing a directed network graph of users and items and using the ApeGNN model, taking into account semantic differences, the problem of low item recommendation accuracy in the existing technology is solved, and a more efficient recommendation effect is achieved.

CN114722269BActive Publication Date: 2024-09-06TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210219700.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-08
Publication Date
2024-09-06
Estimated Expiration
2042-03-08

AI Technical Summary

Technical Problem

Existing item recommendation models based on graph neural networks ignore the semantic differences between users and items, resulting in low recommendation accuracy.

Method used

Construct a directed network graph between users and items, use the ApeGNN model for training, and consider the semantic differences between users and items at each layer through the adaptive aggregation layer, adaptive high-dimensional propagation layer and adaptive pooling layer. Generate prediction scores and rank them.

Benefits of technology

It improves the accuracy of item recommendation and enhances the effect of the recommendation system by distinguishing the semantic differences between users and items.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114722269B
    Figure CN114722269B
Patent Text Reader

Abstract

In the method, device and storage medium for item recommendation based on graph neural network proposed in the present application, user information, item information and user-item interaction information are obtained, and a directed network graph between users and items is constructed using the user information, item information and user-item interaction information, and an ApeGNN model based on graph neural network is constructed. The ApeGNN model is trained using the directed network graph to obtain a target ApeGNN model. The item information to be recommended for each user is obtained, and the predicted score of the item to be recommended is obtained using the target ApeGNN model. The ranking result is determined based on the predicted score, and the recommended item information corresponding to each user is output based on the ranking result. Among them, the present application takes into account the semantic differences between users and items in each layer, thereby improving the accuracy of item recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data recommendation technology, and in particular to an item recommendation method, device and storage medium based on graph neural network. Background Art

[0002] With the rapid development of e-commerce and social media platforms, recommendation systems have become an indispensable tool for companies to improve their profitability. Currently, graph neural networks have achieved iconic success in recommendation systems, especially graph neural networks that aggregate neighbor information through the process of message passing on the graph structure.

[0003] In related technologies, there are several recommendation models based on graph neural networks:

[0004] Method 1: Apply information propagation operations on the user-item bipartite graph to recommend items that users may be interested in based on their historical interaction records.

[0005] Method 2: On the user-item bipartite graph, a recommendation model based on a graph neural network is used. In the pooling stage, the embedding of each layer is summed and averaged as the representation of the last layer.

[0006] However, the user-item bipartite graph in method 1 is a special type of graph. The edges in the bipartite graph only contain the interaction information between users and items, and there are no edges between users or items. In method 2, the semantic differences between users and items are ignored in the aggregation stage, and the importance of different layers of embedding is not distinguished, which makes the accuracy of item recommendation low. Summary of the invention

[0007] The present application provides an item recommendation method, device and storage medium based on a graph neural network, so as to at least solve the technical problem in the related art of ignoring the semantic differences between users and items, resulting in low accuracy of item recommendation.

[0008] The first embodiment of the present application proposes an item recommendation method based on a graph neural network, including:

[0009] Obtain user information, item information, and user-item interaction information;

[0010] Using the user information, item information, and user-item interaction information, construct a directed network graph between users and items;

[0011] Constructing an ApeGNN model based on a graph neural network, and training the ApeGNN model using the directed network graph to obtain a target ApeGNN model;

[0012] Get the recommended item information for each user;

[0013] The target ApeGNN model is used to obtain predicted scores of the items to be recommended, a ranking result is determined according to the predicted scores, and recommended item information corresponding to each user is output according to the ranking result.

[0014] The second embodiment of the present application proposes an item recommendation device based on a graph neural network, including:

[0015] An acquisition module, used to acquire user information, item information, and user-item interaction information;

[0016] A construction module, configured to construct a directed network graph between users and items by using the user information, item information, and user-item interaction information;

[0017] The training module is also used to construct an ApeGNN model based on a graph neural network, and train the ApeGNN model using the directed network graph to obtain a target ApeGNN model;

[0018] The acquisition module is further used to acquire information of items to be recommended to each user;

[0019] The output module is used to obtain the predicted scores of the items to be recommended by using the target ApeGNN model, determine the sorting results according to the predicted scores, and output the recommended item information corresponding to each user according to the sorting results.

[0020] The third aspect of the present application proposes a non-temporary computer-readable storage medium, wherein the non-temporary computer-readable storage medium stores a computer program; when the computer program is executed by a processor, the method shown in the first aspect above is implemented.

[0021] The computer device proposed in the fourth aspect of the present application includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it can implement the method described in the first aspect above.

[0022] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:

[0023] In the method, device and storage medium for item recommendation based on graph neural network proposed in the present application, user information, item information and user-item interaction information are obtained, and a directed network graph between users and items is constructed using the user information, item information and user-item interaction information, and an ApeGNN model based on graph neural network is constructed. The ApeGNN model is trained using the directed network graph to obtain a target ApeGNN model, and the item information to be recommended for each user is obtained. The predicted scores of the items to be recommended are obtained using the target ApeGNN model, and the ranking results are determined according to the predicted scores, and the recommended item information corresponding to each user is output according to the ranking results. Among them, the present application treats users and items as different types in the aggregation stage, and the graph convolution in the adaptive pooling layer configures different weights for different layers, taking into account the semantic differences between users and items in each layer, thereby improving the accuracy of item recommendation.

[0024] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0026] Figure 1 A schematic diagram of a flow chart of an item recommendation method based on a graph neural network provided according to an embodiment of the present application;

[0027] Figure 2 A schematic diagram of the structure of an item recommendation device based on a graph neural network provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0029] The following describes an item recommendation method and device based on a graph neural network according to an embodiment of the present application with reference to the accompanying drawings.

[0030] Embodiment 1

[0031] Figure 1 A flowchart of a method for recommending items based on a graph neural network is provided according to an embodiment of the present application. Figure 1 As shown, it may include:

[0032] Step 101: Obtain user information, item information, and user-item interaction information.

[0033] In the embodiment of the present invention, user information, item information, and user-item interaction information can be obtained from the transaction data set. In addition, the user information can include the user's ID, gender, age, occupation, etc., so that the user information can be used to select the user's neighbor set later. The item information can include the item's ID, type, price, etc., so that the item information can be used to select the item's neighbor set later.

[0034] Furthermore, in an embodiment of the present invention, user-item interaction information may include transaction information between the user and the item, and click-through information between the user and the item.

[0035] Step 102: Utilize user information, item information, and user-item interaction information to construct a directed network graph between users and items.

[0036] For example, in an embodiment of the present invention, a directed network graph G=(U, V, R) between users and items is constructed, where U represents a set of |U| user nodes, V represents a set of |V| item nodes, and R represents a set of |R| edges, i.e., interaction records between users and items. i Represents a user node, v j Represents an item node, r(u i v j ) represents two nodes u i and v j The edge between two nodes u i and v j There are interaction records, r(u i v j ) takes the value of 1, otherwise r(u i v j ) has a value of 0.

[0037] Step 103: construct an ApeGNN model based on a graph neural network, train the ApeGNN model using a directed network graph, and obtain a target ApeGNN model.

[0038] In an embodiment of the present invention, the ApeGNN model regards users and items as different types in the aggregation stage. Also, in an embodiment of the present invention, the ApeGNN model may include an adaptive aggregation layer, an adaptive high-dimensional propagation layer, an adaptive pooling layer, and a prediction layer in sequence.

[0039] Furthermore, in an embodiment of the present invention, a method for training an ApeGNN model using a directed network graph to obtain a target ApeGNN model may include the following steps:

[0040] Step a: According to the directed network graph, all users and all items are initialized and embedded to obtain the initial embedding representation of the i-th user. Initial embedding representation of the jth item

[0041] In the embodiment of the present invention, the embedding dimension is d, and m and n are the number of users and items respectively.

[0042] Step b: The user-initialized embedding representation and the item-initialized embedding representation are respectively passed through the adaptive aggregation layer, the adaptive high-dimensional propagation layer, the adaptive pooling layer, and the prediction layer to obtain the final prediction score.

[0043] In an embodiment of the present invention, when the user-initialized embedded representation and the item-initialized embedded representation pass through the adaptive aggregation layer, the adaptive aggregation layer processes the user-initialized embedded representation. and item embedding representation Use the embedded first aggregation function to perform graph convolution operation to obtain the user embedding representation and item embedding representation And, the first aggregation function is AGG 1 The first aggregation function is to aggregate the user's neighbor item set to obtain the user's representation, and to aggregate the item's neighbor user set to obtain the item's representation. The user's neighbor item set can specifically be a set of items that have interacted with users in the user's neighbor set, and the item's neighbor user set can be a set of users that have interacted with items in the item's neighbor set.

[0044] Specifically, we get the user embedding representation and item embedding representation for:

[0045]

[0046]

[0047] Among them, N(u i ) is user u i The neighbor set of θ u is the only weight parameter of the user containing t, L is the number of layers of the graph convolutional network, and is the weight configured by the adaptive aggregation layer for users and items at layer l, e is a logarithmic function, D is the diagonal node degree matrix, and A is the adjacency matrix excluding self-connections.

[0048] Further, in an embodiment of the present invention, the adaptive high-dimensional propagation layer performs a graph convolution operation using the embedded second aggregation function and the result of the adaptive aggregation layer to perform embedded propagation to explore high-dimensional connection information, wherein the second aggregation function is AGG 2 , user u i and items j The propagated embedding at layer l is:

[0049]

[0050]

[0051] in, It is a symmetric normalization term. The number of convolutional layers of the adaptive high-dimensional propagation layer and the adaptive aggregation layer is the same, which is L layers.

[0052] Further, in an embodiment of the present invention, each layer in the graph convolution operation embeds semantic structural information containing different layers, based on which the embedding of each layer is processed separately in the pooling stage. In the embodiment of the present disclosure, different weights are set for each layer to capture the semantic information of each layer, so that the importance of users and items at different layers is considered in the adaptive pooling stage.

[0053] Specifically, in the embodiment of the present disclosure, the adaptive pooling layer combines the results of the adaptive high-dimensional propagation layer to obtain the user u i and items j Final Representation and

[0054]

[0055]

[0056] Among them, β(u,l) is the weight configured for the users in the lth layer, and β(υ,l) is the weight configured for the items in the lth layer.

[0057] Furthermore, in an embodiment of the present invention, the prediction layer will be i Characterization and items j Characterization Perform inner product to get the final prediction score The ranking results are determined according to the prediction scores, and recommendations are made to users based on the ranking results.

[0058] In the embodiment of the present invention, the user u i Characterization and items j Characterization Perform inner product to get the final prediction score Can be:

[0059]

[0060] Furthermore, in one embodiment of the present invention, the prediction scores may be sorted from high to low, and the top ranked items (e.g., the top 10 items) may be recommended based on the sorting results. In another embodiment of the present invention, the prediction scores may be sorted from low to high, and the bottom ranked items (e.g., the bottom 10 items) may be recommended based on the sorting results.

[0061] Step c: Use the Bayesian personalized ranking loss function to optimize the parameters of the ApeGNN model until the loss function value no longer decreases, and obtain the target ApeGNN model.

[0062] In an embodiment of the present invention, the Bayesian personalized ranking loss function may be:

[0063]

[0064] in, is the paired training data, is a collection of interaction records. is a collection of uninteracted records, It is a sigmoid function, and λ controls L2 regularization. At the same time, L2 regularization can prevent overfitting during the training process.

[0065] Furthermore, in an embodiment of the present invention, each layer of weights of users and each layer of weights of items in the adaptive aggregation layer in the ApeGNN model can be optimized using the Bayesian personalized ranking loss function, and each layer of weights of users and each layer of weights of items in the adaptive pooling layer in the ApeGNN model can be optimized.

[0066] Step 104: Obtain information of items to be recommended for each user.

[0067] Step 105: Use the target ApeGNN model to obtain the predicted scores of the items to be recommended, determine the sorting results according to the predicted scores, and output the recommended item information corresponding to each user according to the sorting results.

[0068] The present application proposes a method for recommending items based on a graph neural network, which obtains user information, item information, and user-item interaction information, uses the user information, item information, and user-item interaction information to construct a directed network graph between users and items, constructs an ApeGNN model based on a graph neural network, trains the ApeGNN model using the directed network graph, obtains the target ApeGNN model, obtains the item information to be recommended for each user, uses the target ApeGNN model to obtain the predicted score of the item to be recommended, determines the ranking result based on the predicted score, and outputs the recommended item information corresponding to each user based on the ranking result. Among them, the present application treats users and items as different types in the aggregation stage, and the graph convolution in the adaptive pooling layer configures different weights for different layers, taking into account the semantic differences between users and items in each layer, thereby improving the accuracy of item recommendations.

[0069] Embodiment 2

[0070] Further, Figure 2 The structure diagram of an item recommendation device based on a graph neural network according to an embodiment of the present application is as follows: Figure 2 As shown, it may include:

[0071] An acquisition module 201 is used to acquire user information, item information, and user-item interaction information;

[0072] A construction module 202, for constructing a directed network graph between users and items using user information, item information, and user-item interaction information;

[0073] The training module 203 is also used to construct an ApeGNN model based on a graph neural network, and train the ApeGNN model using a directed network graph to obtain a target ApeGNN model;

[0074] The acquisition module 201 is also used to acquire information of items to be recommended to each user;

[0075] The output module 204 is used to obtain the predicted scores of the recommended items using the target ApeGNN model, determine the sorting results according to the predicted scores, and output the recommended item information corresponding to each user according to the sorting results.

[0076] In order to implement the above embodiments, the present disclosure also proposes a non-transitory computer-readable storage medium.

[0077] The non-temporary computer-readable storage medium provided in the embodiment of the present disclosure stores a computer program; when the computer program is executed by a processor, it can achieve the following Figure 1 The method shown.

[0078] In order to implement the above embodiments, the present disclosure also provides a computer device.

[0079] The computer device provided in the embodiment of the present disclosure includes a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the program, the following can be achieved: Figure 1 The method shown.

[0080] In the method, device and storage medium for item recommendation based on graph neural network proposed in the present application, user information, item information and user-item interaction information are obtained, and a directed network graph between users and items is constructed using the user information, item information and user-item interaction information, and an ApeGNN model based on graph neural network is constructed. The ApeGNN model is trained using the directed network graph to obtain a target ApeGNN model, and the item information to be recommended for each user is obtained. The predicted scores of the items to be recommended are obtained using the target ApeGNN model, and the ranking results are determined according to the predicted scores, and the recommended item information corresponding to each user is output according to the ranking results. Among them, the present application treats users and items as different types in the aggregation stage, and the graph convolution in the adaptive pooling layer configures different weights for different layers, taking into account the semantic differences between users and items in each layer, thereby improving the accuracy of item recommendation.

[0081] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0082] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0083] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. An item recommendation method based on graph neural network, characterized in that: The method comprises: Obtain user information, item information, and user-item interaction information; Using the user information, item information, and user-item interaction information, construct a directed network graph between users and items; Constructing an ApeGNN model based on a graph neural network, and training the ApeGNN model using the directed network graph to obtain a target ApeGNN model, wherein the ApeGNN model sequentially includes an adaptive aggregation layer, an adaptive high-dimensional propagation layer, an adaptive pooling layer, and a prediction layer; Get the recommended item information for each user; Using the target ApeGNN model to obtain the predicted scores of the items to be recommended, determining a ranking result according to the predicted scores, and outputting the recommended item information corresponding to each user according to the ranking result; The operation of the adaptive aggregation layer includes: The adaptive aggregation layer embeds the user representation and item embedding representation Use the embedded first aggregation function to perform graph convolution operation to obtain the user embedding representation and item embedding representation Among them, the first aggregation function is AGG 1 , The user embedding representation and item embedding representation for: Among them, N(u i ) is user u i The neighbor set of θ u is the only weight parameter of the user containing t, L is the number of layers of the graph convolutional network, and is the weight configured by the adaptive aggregation layer for users and items at layer l, e is a logarithmic function, is a diagonal node degree matrix, and A is an adjacency matrix excluding self-connections.

2. The method according to claim 1, characterized in that The method of training the ApeGNN model using the directed network graph to obtain a target ApeGNN model includes: According to the directed network graph, all users and all items are initialized and embedded to obtain the initialization embedding representation of the i-th user Initial embedding representation of the jth item Among them, the embedding dimension is d, m and n are the number of users and items respectively; The user-initialized embedding representation and the item-initialized embedding representation are respectively passed through the adaptive aggregation layer, the adaptive high-dimensional propagation layer, the adaptive pooling layer, and the prediction layer to obtain the final prediction score; The parameters of the ApeGNN model are optimized using the Bayesian personalized ranking loss function until the value of the loss function no longer decreases, thereby obtaining the target ApeGNN model.

3. The method as claimed in claim 2, characterized in that The operations of the adaptive high-dimensional propagation layer include: The adaptive high-dimensional propagation layer uses the embedded second aggregation function and the result of the adaptive aggregation layer to perform graph convolution operations to perform embedded propagation to explore high-dimensional connection information, where the second aggregation function is AGG 2 , user u i and items j The propagated embedding at layer l is: in, is the symmetric normalization term.

4. The method as claimed in claim 3, characterized in that The operations of the adaptive pooling layer include: The adaptive pooling layer combines the results of the adaptive high-dimensional propagation layer to obtain user u i and items j Final Representation and Among them, β(u,l) is the weight configured for the users in the lth layer, and β(υ,l) is the weight configured for the items in the lth layer.

5. The method as claimed in claim 4, characterized in that The operations of the prediction layer include: The prediction layer will pass user u i Characterization and items j Characterization Perform inner product to get the final prediction score A ranking result is determined according to the prediction score, and recommendations are made to the user based on the ranking result.

6. The method as claimed in claim 5, characterized in that The Bayesian personalized ranking loss function includes: in, is the paired training data, is a collection of interaction records. is a collection of uninteracted records, It is a sigmoid function, and λ controls L2 regularization. At the same time, L2 regularization can prevent overfitting during the training process.

7. An item recommendation device based on graph neural network, characterized in that , including the following modules: An acquisition module, used to acquire user information, item information, and user-item interaction information; A construction module, configured to construct a directed network graph between users and items by using the user information, item information, and user-item interaction information; The training module is further used to construct an ApeGNN model based on a graph neural network, and train the ApeGNN model using the directed network graph to obtain a target ApeGNN model, wherein the ApeGNN model includes an adaptive aggregation layer, an adaptive high-dimensional propagation layer, an adaptive pooling layer, and a prediction layer in sequence; The acquisition module is further used to acquire information of items to be recommended to each user; An output module, used to obtain the predicted scores of the items to be recommended by using the target ApeGNN model, determine the ranking results according to the predicted scores, and output the recommended item information corresponding to each user according to the ranking results; The operation of the adaptive aggregation layer includes: The adaptive aggregation layer embeds the user representation and item embedding representation Use the embedded first aggregation function to perform graph convolution operation to obtain the user embedding representation and item embedding representation Among them, the first aggregation function is AGG 1 , The user embedding representation and item embedding representation for: Among them, N(u i ) is user u i The neighbor set of θ u is the only weight parameter of the user containing t, L is the number of layers of the graph convolutional network, and is the weight configured by the adaptive aggregation layer for users and items at layer l, e is a logarithmic function, is a diagonal node degree matrix, and A is an adjacency matrix excluding self-connections.

8. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.