Multi-behavior recommendation model training method, recommendation method and device of fusion graph neural network

By introducing the attention mechanism and the parameter sharing mechanism of multi-task learning into the recommendation algorithm, combined with the GradNorm algorithm, the problem of differences in graph structure data and interactive behaviors is solved, and the effect and user experience of the recommendation system are improved.

CN118733868APending Publication Date: 2024-10-01BEIJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202310332628.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing recommendation algorithms based on graph neural networks are not suitable for graph-structured data, fail to fully utilize user behavior information, and do not consider the differences between different interactive behaviors.

Method used

A multi-behavior recommendation model that integrates graph neural networks is used to obtain user and item data of multiple interactive behaviors, introduce an attention mechanism and a parameter sharing mechanism of multi-task learning, extract the characteristics of users, items and interactive behaviors, and based on the GradNorm algorithm Optimize the loss function and generate predicted probability values.

Benefits of technology

It improves the recommendation effect of the recommendation system, considers the differences between different interactive behaviors, improves user experience, brings profits to platform operations, and improves social operation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733868A_ABST
    Figure CN118733868A_ABST
Patent Text Reader

Abstract

The invention provides a multi-behavior recommendation model training method and device fusing a graph neural network, and a recommendation method and device, and the method comprises the steps: obtaining a user and items with various interactive behaviors, and constructing a training data set; obtaining an initial graph neural network model, inputting the training data set into the model, and performing graph embedding on users, items and interaction behaviors in each layer to extract features; after different project weights are distributed for the project based on an attention mechanism, the embedded features of the user and the project are aggregated; sharing parameters are set for the embedding characteristics of the user and the project, and different parameters are set for the embedding characteristics of different interaction behaviors; superposing the features of each layer of users, items and interaction behaviors based on an attention mechanism, and finally obtaining a prediction probability value of interaction between each user and each item under each interaction behavior; and training the model to obtain a multi-behavior recommendation model. The multi-behavior recommendation model provided by the invention considers the difference of different behaviors, is suitable for bipartite graphs, is high in model performance, and improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of recommendation algorithms, and in particular to a multi-behavior recommendation model training method, a recommendation method and a device that integrates a graph neural network. Background Art

[0002] The recommendation algorithm uses the user's historical information and some mathematical algorithms to infer the items that the user may like. According to the development stage, the recommendation algorithm can be divided into traditional recommendation algorithms and recommendation algorithms based on deep learning. In recent years, with the continuous growth of user information records, traditional recommendation algorithms can no longer meet the personalized needs of users at the current stage. At the same time, with the continuous improvement of GPU computing power and the in-depth development of deep learning algorithms, deep learning algorithms can be applied to complex data scenarios, analyze and calculate linear or nonlinear feature sequences from multiple dimensions, and automatically learn features that meet user needs from massive data. Therefore, more and more researchers have begun to apply deep learning to the field of recommendation systems. For deep learning recommendation algorithms, they can be mainly divided into recommendation algorithms based on recurrent neural networks, recommendation algorithms based on convolutional neural networks, and recommendation algorithms based on graph neural networks. The existing recommendation algorithms based on graph neural networks (GNN) mainly rely on the method of embedding propagation iterative aggregation neighborhoods in graph neural networks. By superimposing propagation layers, each node can access high-order neighbor information, unlike traditional methods that only access first-order neighbor information, so that it has high-order feature representation capabilities. The GNN-based recommendation method has become an advanced recommendation method in the current recommendation system due to its powerful advantages in processing and mining structured data.

[0003] The existing recommendation algorithm based on graph neural network is the most advanced method at present. Deep learning recommendation algorithm can effectively extract the hidden features of users and items in Euclidean data (such as images, text, etc.). However, in real life, there are still a large number of graph structure data with associations. For graph structure data, deep learning-based methods cannot perform effective feature extraction, and most recommendation algorithms use single user behavior information for recommendation. In addition, multi-behavior recommendation algorithms do not take into account the differences between different interactive behaviors. Summary of the invention

[0004] In view of this, the embodiments of the present invention provide a multi-behavior recommendation model training method, a recommendation method and a device that integrate a graph neural network to eliminate or improve one or more defects existing in the prior art, and to solve the problems that the existing recommendation algorithms based on graph neural networks are not suitable for graph structured data, do not fully utilize user behavior information, and do not consider the differences between different interactive behaviors.

[0005] On the one hand, the present invention provides a multi-behavior recommendation model training method integrating a graph neural network, characterized in that the method comprises the following steps:

[0006] Obtain a training data set, wherein the training data set includes multiple samples, each sample includes multiple users and items with which multiple interactive behaviors occur; and add a label to each sample indicating whether the user interacts with the corresponding item;

[0007] An initial neural network model is obtained, wherein the initial neural network model adopts a graph neural network and introduces an attention mechanism and a parameter sharing mechanism based on multi-task learning; each sample of the training data set is input into the initial neural network model, and in each layer of the initial neural network model, the user, the project and the interactive behavior are graph-embedded to extract corresponding features; based on the attention mechanism, different project weights are assigned to the project by calculating the similarity coefficient between the user and the project, and the embedded features of the user are aggregated with the embedded features of the project after being assigned different project weights; wherein shared parameters are set for the embedded features of the user and the embedded features of the project; different parameters are set for the embedded features of each interactive behavior; different layer weights are assigned to each layer of the initial neural network model based on the attention mechanism, and based on the layer weights, the features of the user, the project and the interactive behavior obtained by aggregation at each layer are respectively superimposed to generate user features, project features and interactive behavior features; based on the user features, the project features and the interactive behavior features, a predicted probability value of each user interacting with each project under each interactive behavior is obtained;

[0008] The initial neural network model is trained using the training data set, a loss function of the label and the predicted probability value is constructed, and the loss function is optimized using the GradNorm algorithm, and finally a multi-behavior recommendation model is trained.

[0009] In some embodiments of the present invention, the method further includes: calculating a similarity coefficient between the user and the item based on the attention mechanism;

[0010] The embedded features of the vertices of the user and the item are dimensionally increased by using a linear mapping of a preset parameter matrix to obtain a user dimensionally increased feature and an item dimensionally increased feature;

[0011] Splicing the user dimension-added feature and the project dimension-added feature to generate a spliced ​​feature;

[0012] The concatenated feature is mapped to a real number to obtain the similarity coefficient.

[0013] In some embodiments of the present invention, the calculation formula of the similarity coefficient is:

[0014] S u,v =α([We u ||We v ]), v∈N u ;

[0015] Among them, S u,v represents the similarity coefficient between user u and item v; a(·) represents a preset function used to map the concatenated feature to a real number; W represents the shared parameter; e u represents the embedded features of user u; e v represents the embedded features of user v; N u Represents the item neighbors of user u under each interaction behavior.

[0016] In some embodiments of the present invention, the similarity coefficient is normalized to obtain the user's attention coefficient for the project, and different project weights are assigned to the project using the attention coefficient. The calculation formula of the attention coefficient is:

[0017]

[0018] Among them, α u,v represents the attention coefficient of user u to item v; LeakyReLU(·) represents the processing of random rectified linear unit; S u,v represents the similarity coefficient between user u and item v; N u represents the item neighbors of user u under each interaction behavior; S u,k represents the similarity coefficient between user u and item k.

[0019] In some embodiments of the present invention, the user embedding feature is aggregated with the embedding features of the items assigned with different weights to obtain a user aggregate embedding feature, and the user aggregate embedding feature calculation formula is:

[0020]

[0021] in, represents the aggregated embedding features of user u at layer l; σ(·) represents the activation function; N u represents the item neighbors of user u under each interaction behavior; α u,v represents the attention coefficient of user u to item v; Represents the parameter matrix of the rth interaction behavior at layer l; represents the aggregated embedding features of item v at level l-1;

[0022] Similarly, the calculation formula for project aggregation embedding features is:

[0023]

[0024] in, represents the aggregated embedding feature of item v at layer l; σ(·) represents the activation function; N v represents the user neighbors of item v under each interaction behavior; α u,v represents the attention coefficient of user u to item v; Represents the parameter matrix of the rth interaction behavior at layer l; represents the aggregated embedded features of user u at layer l-1.

[0025] In some embodiments of the present invention, different layer weights are assigned to each layer of the initial neural network model based on the attention mechanism, and the attention coefficients of the user, the item, and the interaction behavior corresponding to each layer are calculated respectively, and the calculation formula is:

[0026]

[0027]

[0028]

[0029] Among them, β u,l represents the attention coefficient of user u at layer l; β v,l represents the attention coefficient of item v at layer l; β r,l represents the attention coefficient of the interaction behavior r in layer l; LeakyReLU(·) represents the processing of random rectified linear unit; represents the aggregated embedded features of user u at layer l; L represents the total number of network layers; represents the aggregated embedded features of user u at layer i; represents the aggregated embedding features of item v at level l; represents the aggregated embedding features of item v at the i-th level; Represents the embedded features of the interaction behavior r at layer l; Represents the embedded features of the interaction behavior r at the i-th layer.

[0030] In some embodiments of the present invention, based on the layer weights, the features of the user, the item, and the interactive behavior obtained by aggregation at each layer are respectively superimposed to generate user features, item features, and interactive behavior features, and the calculation formula is:

[0031]

[0032]

[0033]

[0034] Among them, e u Represents user characteristics; e v Indicates project characteristics; e r represents the interactive behavior characteristics; L represents the total number of network layers; β u,l represents the attention coefficient of user u at layer l; β v,l represents the attention coefficient of item v at layer l; β r,l Represents the attention coefficient of the interaction behavior r at layer l; represents the aggregated embedded features of user u at layer l; represents the aggregated embedding features of item v at level l; Represents the embedded features of the interaction behavior r at the lth layer.

[0035] In some embodiments of the present invention, based on the user characteristics, the item characteristics and the interaction behavior characteristics, a predicted probability value of each user interacting with each item under each interaction behavior is obtained, and the calculation formula is:

[0036]

[0037] in, represents the predicted probability value of user u interacting with item v under interaction behavior k; e u Indicates user characteristics; (·) T represents transpose; represents a diagonal matrix, are diagonal elements; e v Represents project characteristics.

[0038] On the other hand, the present invention provides a multi-behavior recommendation method integrating a graph neural network, characterized in that the method comprises the following steps:

[0039] Acquire multi-behavior recommendation data, wherein the multi-behavior recommendation data includes at least one user and a plurality of items to be recommended, wherein the user has a plurality of interactive behaviors with each item;

[0040] The multi-behavior recommendation data is input into a multi-behavior recommendation model trained by the multi-behavior recommendation model training method of the fused graph neural network as described in any of the above items, and the predicted probability value of the user interacting with each item under each interactive behavior is obtained to perform item recommendation.

[0041] On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods mentioned above.

[0042] The beneficial effects of the present invention are at least:

[0043] The present invention provides a multi-behavior recommendation model training method, a recommendation method and a device integrating a graph neural network. A training data set is constructed by acquiring users and projects with multiple interactive behaviors. A graph neural network is used as an initial graph neural network model so that it can be applied to a bipartite graph. The training data set is input into the model, and graph embedding is performed on users, projects and interactive behaviors in each layer to extract corresponding features. After introducing an attention mechanism to assign different project weights to projects, the embedded features of users and projects are aggregated so that users can be selective about projects. A parameter sharing mechanism of multi-task learning is introduced to set shared parameters for the embedded features of users and projects, and different parameters for the embedded features of different interactive behaviors to achieve parameter sharing and reduce overfitting. Based on the attention mechanism, the features of each layer of users, projects and interactive behaviors are superimposed, and finally the predicted probability value of each user interacting with each project under each interactive behavior is obtained. The model is trained using a training data set, a loss function of labels and predicted probability values ​​is constructed, and the GradNorm algorithm is used for optimization, so that multiple behaviors can have different training speeds, and different behaviors correspond to different strengths, and finally a multi-behavior recommendation model is obtained. The multi-behavior recommendation based on graph neural network provided by the present invention takes into account the differences between different interactive behaviors and is suitable for bipartite graphs. At the same time, it improves the recommendation effect of the recommendation system, enhances the user experience, brings profits to the platform operation, and improves the efficiency of social operation.

[0044] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.

[0045] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:

[0047] Figure 1 Schematic diagram of the steps of a multi-behavior recommendation model training method integrating a graph neural network in one embodiment of the present invention.

[0048] Figure 2 This is an overall flow chart of a multi-behavior recommendation model training method integrating a graph neural network in one embodiment of the present invention.

[0049] Figure 3 Schematic diagram of an embedding feature aggregation method based on a self-attention mechanism in one embodiment of the present invention.

[0050] Figure 4 Schematic diagram of a hard parameter sharing mechanism based on multi-task learning in one embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0052] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.

[0053] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0054] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.

[0055] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0056] It should be emphasized here that the step marks mentioned below are not intended to limit the order of the steps, but it should be understood that the steps can be executed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be executed simultaneously.

[0057] In order to solve the problems that the existing recommendation algorithms based on graph neural networks are not applicable to graph structured data, do not make full use of user behavior information, and do not consider the differences between different interactive behaviors, the present invention provides a multi-behavior recommendation model training method integrating graph neural networks, such as Figure 1 As shown, the method includes the following steps S101 to S103:

[0058] Step S101: Acquire a training data set, wherein the training data set includes multiple samples, each sample includes multiple users and items with which multiple interactive behaviors occur; and add a label for each sample indicating whether the user interacts with the corresponding item.

[0059] Step S102: Obtain an initial neural network model, wherein the initial neural network model adopts a graph neural network and introduces an attention mechanism and a parameter sharing mechanism based on multi-task learning. Input each sample of the training data set into the initial neural network model, and in each layer of the initial neural network model, graph embedding is performed on users, projects, and interactive behaviors to extract corresponding features; based on the attention mechanism, by calculating the similarity coefficient between users and projects, different project weights are assigned to projects, and the embedded features of users are aggregated with the embedded features of projects assigned with different project weights; wherein shared parameters are set for the embedded features of users and projects; different parameters are set for the embedded features of different interactive behaviors; different layer weights are assigned to each layer of the initial neural network model based on the attention mechanism, and based on the layer weights, the features of users, projects, and interactive behaviors obtained by aggregation of each layer are respectively superimposed to generate user features, project features, and interactive behavior features; based on the user features, project features, and interactive behavior features, the predicted probability value of each user interacting with each project under each interactive behavior is obtained.

[0060] Step S103: Use the training data set to train the initial neural network model, construct a loss function for the label and predicted probability value, and use the GradNorm algorithm to optimize the loss function, and finally train to obtain a multi-behavior recommendation model.

[0061] like Figure 2 As shown, it is an overall flow chart of the multi-behavior recommendation model training method integrating graph neural network.

[0062] In step S101, a training data set for model training is first constructed. Multiple users and projects with multiple interactive behaviors are obtained as single samples, and the users and projects are used as nodes, and the interactive behaviors between users and projects are used as edges to construct graph structure data. Thus, the multi-behavior recommendation model finally trained by the present invention is suitable for graph structure data.

[0063] In some embodiments, an overall data set is constructed based on multiple users and items with multiple interactive behaviors, and is divided into a training data set and a test data set according to a preset ratio, wherein the training data set is used to train model parameters, and the test data set is used to test the performance of the trained model. Exemplarily, the preset ratio is 8:2.

[0064] In some embodiments, a label is added to each sample to indicate whether the user interacts with the corresponding item. If the user interacts with the item, it is marked as 1; if the user does not interact with the item, it is marked as 0.

[0065] In step S102, the existing acquisition of user and project embedding features mainly relies on Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN), but these two methods can only work in Euclidean space and can only aggregate through the information of first-order neighbors, and cannot aggregate the information of higher-order neighbors. At the same time, considering that the model of the present invention is to capture the information of users and projects through the relationship between users and projects, and does not consider the information of users and projects themselves, the initial neural network model of the present invention selects Graph Neural Network (GNN).

[0066] For the classic graph neural network, the node embedding feature calculation formula obtained by a single layer is shown in formula (1):

[0067]

[0068] Among them, E l represents the node embedding feature obtained at the lth layer; σ(·) represents the activation function; represents the normalized adjacency matrix; E (l-1) represents the node embedding feature obtained at the l-1th layer; W l Represents the parameter matrix obtained at the lth layer.

[0069] It can be seen from formula (1) that the classic graph neural network can only aggregate the information of nodes of the same type. Specifically, user nodes aggregate the information of user nodes, and project nodes aggregate the information of project nodes. Since the present invention does not consider the relationship between users or projects, aggregating nodes of the same type is meaningless to the present invention. At the same time, the classic graph neural network does not consider the situation of multiple interactive behaviors. Therefore, the present invention is improved based on the classic graph neural network.

[0070] Formula (1) is rewritten into formula (2) to satisfy the fact that the user's embedding features are obtained by aggregating the items with which the user interacts, and the connection is established through the various interactive behaviors between the user and the items. The calculation formula of formula (2) is expressed as:

[0071]

[0072] in, represents the embedded features of user u at layer l; σ(·) represents the activation function; N u represents the item neighbors of user u under each interaction behavior; |N u | represents the number of neighbors of user u; |N v | represents the number of neighbors of item v; Represents the parameter matrix of the rth interaction behavior at layer l; Represents the embedded features of item v at level l-1.

[0073] Graph neural networks can be divided into two theoretical systems: graph domain and frequency domain. Formula (1) is the frequency domain implementation method of graph neural networks, and formula (2) can be understood as a variant of the graph domain implementation method of graph neural networks.

[0074] For a project, the acquisition of its embedding features is consistent with the user embedding feature method, as shown in formula (3):

[0075]

[0076] in, represents the embedding feature of item v at layer l; σ(·) represents the activation function; N v represents the user neighbors of item v under each interaction behavior; |N u | represents the number of neighbors of user u; |N v | represents the number of neighbors of item v; Represents the parameter matrix of the rth interaction behavior at layer l; Represents the embedded features of user u at the l-1 layer.

[0077] Furthermore, considering that in practice, users will have a focus when selecting projects and will not treat all projects equally, the present invention introduces the attention mechanism of the Graph Attentional Layer (GAT), which uses the attention mechanism to make users and projects have an attention effect when embedding features are aggregated, that is, different learning weights are assigned to different projects, thereby simulating user selectivity.

[0078] Specifically, Figure 3 As shown, taking the user as an example, for the user vertex u, the similarity coefficients between it and its neighbors are calculated one by one.

[0079] In some embodiments, the method for calculating the similarity coefficient includes the following steps S1021-S1023:

[0080] Step S1021: Use the linear mapping of the preset parameter matrix to increase the dimension of the embedded features of the vertices of the user and the project to obtain the user increased dimension features and the project increased dimension features.

[0081] Step S1022: Concatenate the user dimension-added features and the project dimension-added features to generate concatenated features.

[0082] Step S1023: Map the concatenated feature to a real number to obtain a similarity coefficient.

[0083] In some embodiments, the calculation formula of the similarity coefficient is shown in formula (4):

[0084] S u,v =a([We u ||We v ]), v∈N u ; (4)

[0085] Among them, S u,v represents the similarity coefficient between user u and item v; a(·) represents a preset function used to map the concatenated features to a real number; W represents a preset parameter matrix; eu u represents the embedded features of user u; e v represents the embedded features of user v; N u Represents the item neighbors of user u under each interaction behavior.

[0086] The similarity coefficient is normalized to obtain the user's attention coefficient for the project. The calculation formula of the attention coefficient is shown in formula (5):

[0087]

[0088] Among them, α u,v represents the attention coefficient of user u to item v; LeakyReLU(·) represents the processing of random rectified linear unit; S u,v represents the similarity coefficient between user u and item v; N u represents the item neighbors of user u under each interaction behavior; S u,k represents the similarity coefficient between user u and item k.

[0089] The obtained item attention coefficient is used to assign different item weights to items, so that users and items have an attention effect when embedding features are aggregated. Therefore, formula (2) is improved to formula (6), and formula (3) is improved to formula (7):

[0090]

[0091] in, represents the aggregated embedding features of user u at layer l; σ(·) represents the activation function; N u represents the item neighbors of user u under each interaction behavior; α u,v represents the attention coefficient of user u to item v; Represents the parameter matrix of the rth interaction behavior at layer l; represents the aggregated embedding features of item v at level l-1.

[0092]

[0093] in, represents the aggregated embedding feature of item v at layer l; σ(·) represents the activation function; N v represents the user neighbors of item v under each interaction behavior; α u,v represents the attention coefficient of user u to item v; Represents the parameter matrix of the rth interaction behavior at layer l; represents the aggregated embedded features of user u at layer l-1.

[0094] According to formula (6) and formula (7), when the embedding features of users and items are aggregated, the aggregated embedding features are obtained by aggregating the neighbors under multiple interactive behaviors. However, from the parameter level, the effect of parameter sharing is not achieved, resulting in the inability to extract the common features under multiple interactive behaviors through parameters. Figure 4 As shown, the present invention introduces a parameter sharing mechanism of multi-task learning to achieve parameter sharing of users and projects and model interactive behaviors.

[0095] Similarly, taking the user as an example, in formula (6), the parameters are expressed as First, set the parameter to be shared by multiple behaviors. l , thus, based on formula (6), we get formula (8):

[0096]

[0097] in, represents the aggregated embedding features of user u at layer l; σ(·) represents the activation function; N u represents the item neighbors of user u under each interaction behavior; α u,v represents the attention coefficient of user u to item v; Wl represents the shared parameter matrix at layer l; represents the aggregated embedding features of item v at level l-1.

[0098] In formula (8), the parameters representing the interactive behavior are removed. Therefore, the present invention introduces an embedded feature representation for each interactive behavior. Thus, formula (9) is obtained based on formula (8):

[0099]

[0100] in, represents the aggregated embedding features of user u at layer l; σ(·) represents the activation function; N u represents the item neighbors of user u under each interaction behavior; α u,v represents the attention coefficient of user u to item v; W l represents the shared parameter matrix at layer l; represents the aggregated embedding features of item v at level l-1; Represents the embedded features of the interaction behavior r at the l-1 layer.

[0101] In formula (9), the embedding feature update method of the interactive behavior is shown in formula (10):

[0102]

[0103] in, Represents the embedded feature representation of the interaction behavior r at layer l; Indicates that different weights are given to different interactive behaviors, that is, the non-shared layer in multi-behavior learning; Represents the embedded features of the interaction behavior r at the l-1 layer.

[0104] Finally, considering that the representations obtained from different layers of the graph neural network emphasize information transmitted from different orders, illustratively, the first layer enforces smoothness on interacting users and items, the second layer smoothes overlapping users (items) on interacting items (users), and higher layers capture higher-order proximities, therefore, the present invention utilizes the attention mechanism to assign different weights to different layers to obtain the final feature form of users, items, and interaction behaviors.

[0105] In some embodiments, the calculation formulas for the attention coefficients of users, items, and interaction behaviors corresponding to each layer are shown in formula (11), formula (12), and formula (13), respectively:

[0106]

[0107]

[0108]

[0109] Among them, β u,l represents the attention coefficient of user u at layer l; β v,l represents the attention coefficient of item v at layer l; β r,l represents the attention coefficient of the interaction behavior r in layer l; LeakyReLU(·) represents the processing of random rectified linear unit; represents the aggregated embedded features of user u at layer l; L represents the total number of network layers; represents the aggregated embedded features of user u at layer i; represents the aggregated embedding features of item v at level l; represents the aggregated embedding features of item v at the i-th level; Represents the embedded features of the interaction behavior r at layer l; Represents the embedded features of the interaction behavior r at the i-th layer.

[0110] After obtaining the attention coefficient, the user, item and interaction behavior are superimposed based on the attention coefficient to obtain the user characteristics, item characteristics and interaction behavior characteristics. The calculation formulas are formula (14), formula (15) and formula (16) respectively:

[0111]

[0112]

[0113]

[0114] Among them, e u Represents user characteristics; e v Indicates project characteristics; e r represents the interactive behavior characteristics; L represents the total number of network layers; β u,l represents the attention coefficient of user u at layer l; β v,l represents the attention coefficient of item v at layer l; β r,l Represents the attention coefficient of the interaction behavior r at layer l; represents the aggregated embedded features of user u at layer l; represents the aggregated embedding features of item v at level l; Represents the embedded features of the interaction behavior r at the lth layer.

[0115] Based on user characteristics, item characteristics and interaction behavior characteristics, the predicted probability value of each user interacting with each item under each interaction behavior is obtained. The calculation formula is shown in formula (17):

[0116]

[0117] in, represents the predicted probability value of user u interacting with item v under interaction behavior k; e u Indicates user characteristics; (·) T represents transpose; represents a diagonal matrix, are diagonal elements; e v Represents project characteristics.

[0118] Based on the above design, the initial neural network model of the present invention is obtained, which adopts a graph neural network and introduces an attention mechanism and a parameter sharing mechanism based on multi-task learning. Specifically, each sample of the training data set is first input into the initial neural network model, and in each layer of the initial neural network model, the user, project and interactive behavior are graph embedded to extract the corresponding features. Then, based on the attention mechanism, by calculating the similarity coefficient between the user and the project, different project weights are assigned to the project, and the user's embedded features are aggregated with the embedded features of the project after assigning different project weights. Among them, based on the parameter sharing mechanism of multi-task learning, the user's embedded features and the project's embedded features set shared parameters; different parameters are set for the embedded features of different interactive behaviors. Then, based on the attention mechanism, different layer weights are assigned to each layer of the initial neural network model, and based on the layer weights, the features of the user, project and interactive behavior obtained by aggregation of each layer are superimposed respectively to generate user features, project features and interactive behavior features. Finally, based on the user features, project features and interactive behavior features, the predicted probability value of each user interacting with each project under each interactive behavior is obtained.

[0119] In step S103, the initial neural network model is trained using the training data set.

[0120] In training, regarding how to model the relationship between multiple interactive behaviors and target behaviors, existing algorithms treat multiple interactive behaviors and target interactive behaviors equally, or manually set the relationship between interactive behaviors and target interactive behaviors based on experience, or design and model the relationship between interactive behaviors through models, but all of these have certain limitations. In the present invention, the multi-task learning mentioned above is continued to be introduced, starting from the perspective of optimizing multiple loss values ​​in multi-behavior learning, and by introducing a loss optimization algorithm, the relationship between multiple behaviors is modeled.

[0121] Taking the kth interaction behavior as an example, for a group of users B and the entire item set V, the loss function is constructed as shown in formula (18):

[0122]

[0123] Among them, L k represents the loss function; c represents the weight; y(k) uv For labels; Represents the predicted probability value.

[0124] After the predicted probability value is obtained based on the model, different loss values ​​under different interactive behaviors are obtained according to formula (18). For multiple loss values, the existing traditional method is to directly add the losses under multiple interactive behaviors to obtain the overall loss. However, considering that the loss magnitudes of different interactive behaviors are different, there may be a phenomenon that the interactive behavior with larger loss dominates, and the learning speed of different interactive behaviors is different. The present invention uses the GradNorm algorithm to optimize the loss to improve the final effect of the model.

[0125] In some embodiments, the Using Uncertainty to Weigh Losses algorithm and the Dynamic Weight Average algorithm can also be used to optimize the loss function. Experimental results show that the GradNorm algorithm used in the present invention has better effect.

[0126] The present invention will be further described below in conjunction with a specific embodiment:

[0127] Obtain a training data set from Beibei, China's largest e-commerce platform for infant products. Specifically, the data set includes 21,716 users and 7,977 products with three types of behaviors, including click, add to cart, and purchase. Specifically, there are 2,412,586 browsing behaviors, 642,622 add to cart behaviors, and 304,576 shopping behaviors. Input the user, product, and three types of behavior encoding into the model for training to obtain a multi-behavior recommendation model. Based on the multi-behavior recommendation model, the user's purchasing behavior can be predicted.

[0128] The present invention also provides a multi-behavior recommendation method integrating a graph neural network, the method comprising the following steps S201-S202:

[0129] Step S201: Acquire multi-behavior recommendation data, wherein the multi-behavior recommendation data includes at least one user and multiple items to be recommended, and the user has multiple interactive behaviors with each item.

[0130] Step S202: Input the multi-behavior recommendation data into the multi-behavior recommendation model trained by the multi-behavior recommendation model training method based on the fusion graph neural network, and obtain the predicted probability value of the user interacting with each item under each interactive behavior to make item recommendations.

[0131] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a multi-behavior recommendation model training method integrating a graph neural network and a multi-behavior recommendation method integrating a graph neural network.

[0132] Corresponding to the above method, the present invention also provides a device, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the device implements the steps of the method described above.

[0133] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned edge computing server deployment method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0134] In summary, the present invention provides a multi-behavior recommendation model training method, recommendation method and device integrating graph neural network, and constructs a training data set by acquiring users and projects with multiple interactive behaviors. A graph neural network is used as the initial graph neural network model so that it can be applied to a bipartite graph. The training data set is input into the model, and the user, project and interactive behavior are graph-embedded in each layer to extract the corresponding features. After introducing the attention mechanism to assign different project weights to the projects, the embedded features of the user and the project are aggregated so that the user can be selective about the project. The parameter sharing mechanism of multi-task learning is introduced to set shared parameters for the embedded features of the user and the project, and different parameters for the embedded features of different interactive behaviors to achieve parameter sharing and reduce overfitting. Based on the attention mechanism, the features of each layer of users, projects and interactive behaviors are superimposed, and finally the predicted probability value of each user interacting with each project under each interactive behavior is obtained. The model is trained using the training data set, and the loss function of the label and the predicted probability value is constructed, and the GradNorm algorithm is used for optimization, so that multiple behaviors can have different training speeds, and different corresponding strengths of different behaviors are achieved, and finally a multi-behavior recommendation model is obtained. The multi-behavior recommendation based on graph neural network provided by the present invention takes into account the differences between different interactive behaviors and is suitable for bipartite graphs. At the same time, it improves the recommendation effect of the recommendation system, enhances the user experience, brings profits to the platform operation, and improves the efficiency of social operation.

[0135] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.

[0136] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.

[0137] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.

[0138] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A multi-behavior recommendation model training method integrating graph neural network, characterized in that: The method comprises the following steps: Obtain a training data set, wherein the training data set includes multiple samples, each sample includes multiple users and items with which multiple interactive behaviors occur; and add a label to each sample indicating whether the user interacts with the corresponding item; An initial neural network model is obtained, wherein the initial neural network model adopts a graph neural network and introduces an attention mechanism and a parameter sharing mechanism based on multi-task learning; each sample of the training data set is input into the initial neural network model, and in each layer of the initial neural network model, the user, the project and the interactive behavior are graph-embedded to extract corresponding features; based on the attention mechanism, different project weights are assigned to the project by calculating the similarity coefficient between the user and the project, and the embedded features of the user are aggregated with the embedded features of the project after being assigned different project weights; wherein shared parameters are set for the embedded features of the user and the embedded features of the project; different parameters are set for the embedded features of different interactive behaviors; different layer weights are assigned to each layer of the initial neural network model based on the attention mechanism, and based on the layer weights, the features of the user, the project and the interactive behavior obtained by aggregation of each layer are respectively superimposed to generate user features, project features and interactive behavior features; based on the user features, the project features and the interactive behavior features, a predicted probability value of each user interacting with each project under each interactive behavior is obtained; The initial neural network model is trained using the training data set, a loss function of the label and the predicted probability value is constructed, and the loss function is optimized using the GradNorm algorithm, and finally a multi-behavior recommendation model is trained.

2. The multi-behavior recommendation model training method of fusion graph neural network according to claim 1 is characterized in that: By calculating the similarity coefficient between the user and the item based on the attention mechanism, the method further includes: The embedded features of the vertices of the user and the item are dimensionally increased by using a linear mapping of a preset parameter matrix to obtain a user dimensionally increased feature and an item dimensionally increased feature; Splicing the user dimension-added feature and the project dimension-added feature to generate a spliced ​​feature; The concatenated feature is mapped to a real number to obtain the similarity coefficient.

3. The multi-behavior recommendation model training method of fusion graph neural network according to claim 2 is characterized in that: The calculation formula of the similarity coefficient is: S u,v =a([We u ||We v ]),v∈N u ; Among them, S u,v represents the similarity coefficient between user u and item v; a(·) represents a preset function used to map the concatenated feature to a real number; W represents the shared parameter; e u represents the embedded features of user u; e v represents the embedded features of user v; N u Represents the item neighbors of user u under each interaction behavior.

4. The multi-behavior recommendation model training method of fusion graph neural network according to claim 3 is characterized in that: The similarity coefficient is normalized to obtain the user's attention coefficient for the project, and different project weights are assigned to the project using the attention coefficient. The calculation formula of the attention coefficient is: Among them, α u,v represents the attention coefficient of user u to item v; LeakyReLU(·) represents the processing of random rectified linear unit; S u,v represents the similarity coefficient between user u and item v; N u represents the item neighbors of user u under each interaction behavior; S u,k represents the similarity coefficient between user u and item k.

5. The multi-behavior recommendation model training method of fused graph neural network according to claim 4 is characterized in that: The user embedding feature is aggregated with the embedding features of the items assigned different weights to obtain the user aggregate embedding feature. The user aggregate embedding feature calculation formula is: in, represents the aggregated embedding features of user u at layer l; σ(·) represents the activation function; N u represents the item neighbors of user u under each interaction behavior; α u,v represents the attention coefficient of user u to item v; Represents the parameter matrix of the rth interaction behavior at layer l; represents the aggregated embedding features of item v at level l-1; Similarly, the calculation formula for project aggregation embedding features is: in, represents the aggregated embedding features of item v at layer l; σ(·) represents the activation function; N v represents the user neighbors of item v under each interaction behavior; α u,v represents the attention coefficient of user u to item v; Represents the parameter matrix of the rth interaction behavior at layer l; represents the aggregated embedded features of user u at layer l-1.

6. The multi-behavior recommendation model training method of fusion graph neural network according to claim 1 is characterized in that: Based on the attention mechanism, different layer weights are assigned to each layer of the initial neural network model, and the attention coefficients of the user, the item, and the interaction behavior corresponding to each layer are calculated respectively, and the calculation formula is: Among them, β u,l represents the attention coefficient of user u at layer l; β v,l represents the attention coefficient of item v at layer l; β r,l represents the attention coefficient of the interaction behavior r in layer l; LeakyReLU(·) represents the processing of random rectified linear unit; represents the aggregated embedded features of user u at layer l; L represents the total number of network layers; represents the aggregated embedded features of user u at layer i; represents the aggregated embedding features of item v at level l; represents the aggregated embedding features of item v at the i-th level; Represents the embedded features of the interaction behavior r at layer l; Represents the embedded features of the interaction behavior r at the i-th layer.

7. The multi-behavior recommendation model training method of fusion graph neural network according to claim 6 is characterized in that: Based on the layer weights, the features of the user, the item, and the interactive behavior obtained by aggregation at each layer are respectively superimposed to generate user features, item features, and interactive behavior features, and the calculation formula is: Among them, e u Represents user characteristics; e v Indicates project characteristics; e r represents the interactive behavior characteristics; L represents the total number of network layers; β u,l represents the attention coefficient of user u at layer l; β v,l represents the attention coefficient of item v at layer l; β r,l Represents the attention coefficient of the interaction behavior r at layer l; represents the aggregated embedded features of user u at layer l; represents the aggregated embedding features of item v at level l; Represents the embedded features of the interaction behavior r at layer l.

8. The multi-behavior recommendation model training method of fusion graph neural network according to claim 1 is characterized in that: Based on the user characteristics, the item characteristics and the interaction behavior characteristics, the predicted probability value of each user interacting with each item under each interaction behavior is obtained, and the calculation formula is: in, represents the predicted probability value of user u interacting with item v under interaction behavior k; e u Indicates user characteristics; (·) T represents transpose; represents a diagonal matrix, are diagonal elements; e v Represents project characteristics.

9. A multi-behavior recommendation method integrating graph neural network, characterized in that: The method comprises the following steps: Acquire multi-behavior recommendation data, wherein the multi-behavior recommendation data includes at least one user and a plurality of items to be recommended, wherein the user has a plurality of interactive behaviors with each item; The multi-behavior recommendation data is input into a multi-behavior recommendation model trained by the multi-behavior recommendation model training method of the fused graph neural network as described in any one of claims 1 to 8, and the predicted probability value of the user interacting with each item under each interactive behavior is obtained to perform item recommendation.

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

Citation Information

Patent Citations

  • Data recommendation method and device, equipment and medium

    CN115114514A

  • Recommendation method, recommendation model training method, and related product

    WO2023011382A1

Cited By

  • Live broadcast recommendation method based on multiple repeated behaviors

    CN119562128A

  • Recommendation model training method and device based on large language model and recommendation method

    CN119598193A

  • Multi-behavior recommendation method based on knowledge interaction graph

    CN119862324A