Session recommendation method based on three-channel graph neural network
By converting session sequence data into session graphs, hypergraphs, and global graphs, and utilizing a three-channel graph neural network to learn item embeddings and fuse information, the problem of insufficient item transition information capture in existing session recommendations is solved, achieving more efficient recommendation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2026-04-07
AI Technical Summary
Existing session recommendation methods fail to effectively capture item transition information in session sequences when modeling user behavior, especially ignoring context transitions between items and relationships between different sessions, leading to decreased recommendation accuracy.
The session sequence data is converted into session graph, hypergraph and global graph data. Item embeddings are learned through a three-channel graph neural network to capture the transformation relationships between items in a session, the higher-order relationships between items, and the relationships between different sessions. Information from the three channels is then fused to obtain more complete item transformation information.
By using a three-channel graph neural network model, the accuracy and performance of conversation recommendations are significantly improved, outperforming existing graph neural network-based models. This model can more comprehensively capture item conversion relationships and enhance recommendation effectiveness.
Smart Images

Figure CN114547276B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of conversation recommendation technology, and more specifically, to a conversation recommendation method based on a three-channel graph neural network. Background Technology
[0002] With the rapid growth of internet information in recent years, recommender systems have become an effective way to help users alleviate information overload, playing a vital role in consumption, service provision, and decision-making. Most existing recommendation methods rely on users' long-term historical interactions and user profiles. However, in many services, user identities may be unknown, or only historical behavior during a user's session may be available. Session-based recommendation, an emerging form of recommendation, addresses these shortcomings.
[0003] Due to the high practical value of conversational recommendation, many conversational recommendation methods have been proposed. Markov chains are a classic example, predicting a user's next action based on the previous action. However, due to the strong independence assumption of Markov chains, independent combinations of past interactions may limit the accuracy of recommendations. With the rapid development of deep learning, many deep learning-based recommendation methods have also emerged. For example, methods combining recurrent neural networks enhance the model by data augmentation and considering the temporal changes in user behavior. GRU4REC uses GRU to build short-term user preferences for recommendations. NARM uses GRU combined with attention mechanisms to simultaneously learn sequential behavior and the user's primary intent to model sequences. The Transformer model has achieved state-of-the-art results in translation tasks. This model does not use recurrent or convolutional networks, but instead uses a stacked encoder-decoder structure of self-attention networks to model sequences. The success of the Transformer model stems from the application of self-attention. Self-attention is a special attention mechanism that has been widely used for sequence data modeling. SASrec was one of the earliest models to apply self-attention to the recommendation field and achieved state-of-the-art results. These methods have all achieved good results in modeling preferences for a given conversation using pairwise item transformation information. However, these methods still face some problems. First, without sufficient user behavior in a single session, these methods struggle to estimate user representations. Second, when modeling transitions between items, these works only model unidirectional transitions, neglecting transitions between contexts.
[0004] SR-GNN addressed the aforementioned issues, being the earliest application of graph neural networks for conversation recommendation. It models sequence data as a graph data structure and captures complex item transitions using graph neural networks. GCE-GNN, also based on graph neural networks for conversation recommendation, considers not only item transitions between target conversations but also transitions between different conversations. Graph neural network-based conversation recommendation has achieved significant results. However, these methods still face some challenges. Graph neural network-based conversation recommendation systems model conversation sequences as paired graph structured data or hypergraph structured data. This modeling of conversation sequences as a single graph fails to capture more complete item transition information, leading to decreased recommendation accuracy. Summary of the Invention
[0005] The present invention provides a session recommendation method based on a three-channel graph neural network, which can overcome some or all of the defects of the prior art.
[0006] The session recommendation method based on a three-channel graph neural network according to the present invention includes the following steps:
[0007] (1) Convert the session sequence data into session graph, hypergraph, and global graph data;
[0008] (2) The graph data learns three types of item embeddings through a graph neural network with three channels; the three channels include the conversation graph channel, the hypergraph channel, and the global graph channel; the conversation graph channel is used to capture the transformation relationship between items in the conversation, the hypergraph channel is used to capture the higher-order relationship between items in the conversation, and the global graph channel is used to capture the relationship between items in different conversations;
[0009] (3) Integrating the project representation formed by the three channels yields more complete project transformation information;
[0010] (4) The predicted probability of the project output by the prediction layer.
[0011] Preferably, in a session graph, given a session... , This refers to the item clicked in session S. v i And the session length is L;G s = (V s E s ) represents a conversation graph, which divides each item s i ∈ V s As a node and adjacent items (s i-1 ,s i )∈ E s As an edge;
[0012] Indicates a hypergraph. Let represent the set of N unique vertices in a hypergraph. Let M denote the set of M hyperedges in the hypergraph; each hyperedge contains at least two vertices, where and Each hyperedge is assigned a weight. All the weights form a diagonal matrix. Hypergraph uses matrices This indicates that when the superedge contains a vertex... hour, ,otherwise The degrees of the vertices and hyperedges are respectively and ,in D and B are diagonal matrices;
[0013] The global graph is used to obtain information about the transformation of items between different sessions. Gg = (Vg, Eg) represents the global graph, where Vg represents the set of graph nodes for all items, and Eg represents the set of all edges. Each edge corresponds to two pairs of items in all sessions.
[0014] As a preferred method, the method for embedding the session graph is as follows:
[0015] For the target project, different adjacent projects have varying degrees of importance to it. An attention mechanism is used to capture the weights between different nodes; the attention coefficients are shown below:
[0016] ;
[0017] s ij This indicates the importance of project vj to project vi. Indicates the relationship between projects, h vi Indicates the embedding of the project's VI, h vj Indicates the embedding of project vj, r ij The relationship between vi and vj is also known as the edge relationship. The weights are represented by the function `softmax`. Then, to make the coefficients comparable across different nodes, the attention weights are normalized using the `softmax` function, as shown in the following equation:
[0018] ;
[0019] a ij The weights between nodes vi and vj after normalization;
[0020] Finally, the attention coefficients and corresponding items are linearly combined to obtain the output of each node, as shown in the following formula:
[0021] ;
[0022] Represents a node.
[0023] As a preferred method, the hypergraph embedding method is as follows:
[0024] Hypergraph channels are used to capture higher-order relationships between items. Hypergraph convolution is defined as:
[0025] ;
[0026] for l +1 layer project embedding, These are the values in the correlation matrix. These are weighting coefficients. Embedded in the L layer of the project;
[0027] The above expression can be written in matrix form as follows:
[0028] ;
[0029] in, They are l +1 layer project embedding and l Layered project embedding, Aggregate information from nodes to hyperedges, and multiply by the session sequence beforehand. View the aggregation information from the hyperedge to the node; embed in the initial project go through After convolution of the hypergraph layers, the embeddings of each layer are summed and averaged to obtain the final item embedding. ;
[0030] Location embedding adds the project's location information to the project embedding. The learnable location embedding matrix is given, where k is the length of the current session; the item embeddings with added location information are as follows:
[0031] ;
[0032] in, For projects with location information, embedding is required. , Location information for the project. and These are the parameters learned; the session embedding is generated by aggregating the item representations in the session; then the session is augmented. Embedded representation:
[0033] ;
[0034] in, The weights of nodes in the sequence. , The coefficients that can be obtained through training. It is a conversation The embedding is represented by the average embedding of all items in this session. , It is a conversation The Middle Embedding of individual projects, For attention parameters.
[0035] As a preferred method, the global graph embedding method is as follows:
[0036] Each item is linearly combined based on the scores generated by conversation-aware attention, as follows:
[0037] ;
[0038] h is the attention score, h vj Embed for the project's VJ. π ( vi , vj This is used to calculate the weights of different neighbors; the closer an item is to the current session, the more important it is and the greater its weight. π ( vi , vj The details are as follows:
[0039] ;
[0040] LeakyReLU is used as the activation function. The symbol indicates multiplication of elements at corresponding positions, and || indicates a concatenation operation. w ij It is the weight of each edge in the global session graph. W 1 and q 1 is a trainable parameter. s It is a feature of the target session, obtained by calculating the average of the current session, and then compared with the target session using the softmax function. vi The coefficients of all adjacent items are normalized; based on this attention, it is concluded that adjacent items receive attention.
[0041] Finally, the target project information and the information of projects adjacent to the target project are aggregated. This process is accomplished through a non-linear transformation, as follows:
[0042] ;
[0043] h v For the project to represent, The representation is the aggregator of the item representation and the neighbor representation, and ReLU is the activation function. These are trainable parameters;
[0044] To obtain higher-order information, we extend the single-layer aggregator to multiple layers, and the formula in the previous step is expressed as follows:
[0045] ;
[0046] h (k-1) The project was generated by the previous steps. v The expression; The previous layer of project embedding, with Aggle representing aggregation operations. The aggregated k-order items represent a project k The order representation is derived from its initial representation and its neighboring representations. k It is a combination of skipped projects.
[0047] As a preferred method, the approach of integrating the project representations formed by the three channels to obtain more complete project transformation information is as follows:
[0048] First, the item representations generated by the session graph channel and the global graph channel are merged;
[0049] For each project, its final project representation is obtained by merging the global representation and the session representation. The specific calculations are as follows:
[0050] ;
[0051] The session embedding is generated by merging the session graph channel and the global graph channel into an item embedding. The project's location information is obtained through a learnable location matrix. The location information of the project is added to the project embedding; then, the location information and the project representation are integrated through a join operation and a non-linear transformation, as shown below:
[0052] ;
[0053] Session sequences with added location information To capture location information between items, the conversation sequence is input into the self-attention layer:
[0054] ;
[0055] Where F is the attention-required session representation, and d is a hyperparameter. The projection matrix;
[0056] By leveraging the increased nonlinearity of the model through the ReLU activation function, a residual connection is added after the feedforward network, as shown below:
[0057] ;
[0058] E represents the session through the residual link. yes A 3D matrix and yes To prevent overfitting, a bias vector of dimension 1 is used. Dropout regularization is applied during training. The self-attention mechanism can be described as follows:
[0059] ;
[0060] Finally, the single self-attention is expanded into multi-head self-attention, as shown below:
[0061] ;
[0062] E (k) E represents the conversation after k layers of attention. (k-1) This represents the session after k-1 layers of attention.
[0063] Represent the self-attention-processed conversation sequence By using soft attention to learn the weight of each node in the sequence, the different importance of different nodes to the sequence is reflected, as shown below:
[0064] ;
[0065] in, These are all training parameters, where σ represents the soft attention formula. It is a conversation The embedding is represented by the average embedding of all items in this session. , It is a conversation The Middle Embedding of individual projects, For attention parameters, finally... and Combined to form the final session representation .
[0066] Preferably, in step (4), the embedding of each initial candidate item and the session representation obtained in the previous section are subjected to a dot product operation before further processing. The probability of receiving a recommendation is calculated as follows:
[0067] ;
[0068] For the purpose of a session, Indicates project The probability of being selected next in the target session;
[0069] The model is trained by minimizing the objective function:
[0070] ;
[0071] Where y represents the one-hot encoding of the project. , These are predicted values.
[0072] This invention integrates item representations generated from three channels to improve the performance of session-based recommendation. It simultaneously models session sequences as three graph structures to capture richer item transition relationships. Extensive experiments on two real-world datasets demonstrate the effectiveness and superiority of our model. Attached Figure Description
[0073] Figure 1 This is a flowchart of a session recommendation method based on a three-channel graph neural network in Example 1;
[0074] Figure 2 This is a structural diagram of the three-channel graph neural network (MCG-SR) model in Example 1. Detailed Implementation
[0075] To further understand the content of this invention, a detailed description of the invention will be provided in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments are merely illustrative and not limiting of the invention. Example
[0076] like Figure 1 As shown, this embodiment provides a session recommendation method based on a three-channel graph neural network, which includes the following steps:
[0077] (1) Convert the session sequence data into session graph, hypergraph, and global graph data;
[0078] (2) The graph data learns three types of item embeddings through a graph neural network with three channels; the three channels include the conversation graph channel, the hypergraph channel, and the global graph channel; the conversation graph channel is used to capture the transformation relationship between items in the conversation, the hypergraph channel is used to capture the higher-order relationship between items in the conversation, and the global graph channel is used to capture the relationship between items in different conversations;
[0079] (3) Integrating the project representation formed by the three channels yields more complete project transformation information;
[0080] (4) The predicted probability of the project output by the prediction layer.
[0081] This embodiment proposes a three-channel graph neural network (MCG-SR) model based on conversation recommendation to capture richer item conversion relationships in conversations. Figure 2 The overall structure of the model is shown (where s1 is session 1, s2 and s3 are similar, and v represents an item). First, the session sequence data is converted into three graph structure data forms. Then, the graph data is processed by a three-channel graph neural network to learn three item embeddings. After that, the three representations are fused and finally, the prediction layer outputs the predicted probability of the item.
[0082] In the session graph, each session sequence is transformed into graph-structured data, and item embeddings for a given session are learned using a GNN. Given a session... , This refers to the item clicked in session S. v i And the session length is L;G s = (V s E s ) represents a conversation graph, which divides each item s i ∈ V s As a node and adjacent items (s i-1 ,s i )∈ E s As edges; there are four types of edge relationships in a conversation graph, namely Each project has been given a self-looping feature.
[0083] In a hypergraph, session sequences are transformed into hypergraph structured data to learn higher-order transformation relationships between items.
[0084] Indicates a hypergraph. Let represent the set of N unique vertices in a hypergraph. Let M be the set of M hyperedges in the hypergraph; each hyperedge contains at least two vertices, and it is worth noting that any two vertices on a hyperedge are connected. and Each hyperedge is assigned a weight. All the weights form a diagonal matrix. Hypergraph uses matrices This indicates that when the superedge contains a vertex... hour, ,otherwise The degrees of the vertices and hyperedges are respectively and ,in D and B are diagonal matrices.
[0085] Building a global graph primarily involves capturing transformation information between items across sessions. The global graph is created by converting all items involved in a session into graph-structured data. It's important to note that session graphs are directed graphs, while global graphs are not. Gg = (Vg, Eg) represents the global graph, where Vg represents the set of all graph nodes for all items, and Eg represents the set of all edges, with each edge corresponding to two pairs of items in all sessions. For each node Vi, different edges should have different weights, the magnitude of which depends on the frequency of the corresponding edge appearing in the session.
[0086] The method for embedding conversation graphs is as follows:
[0087] The session graph allows us to learn the transformations of pairs of items within the current session, which are more important in the session graph than item transformations in the global graph. For the target item, different adjacent items have varying degrees of importance; an attention mechanism is used to capture the weights between different nodes. The attention coefficients are shown below:
[0088] ;
[0089] s ij This indicates the importance of project vj to project vi. for and The relationship between them is called the edge relationship. Indicate weight; use at the same time As the activation function; then, to make the coefficients between different nodes comparable, through The function normalizes the attention weights, as shown in the following formula:
[0090] ;
[0091] Finally, the attention coefficients and corresponding items are linearly combined to obtain the output of each node, as shown in the following formula:
[0092] ;
[0093] Represents a node.
[0094] The method for hypergraph embedding is as follows:
[0095] Hypergraph channels are used to capture higher-order relationships between items. Hypergraph convolution is defined as:
[0096] ;
[0097] for l +1 layer project embedding, These are the values in the correlation matrix. These are weighting coefficients. Embedded in the L layer of the project;
[0098] The above expression can be written in matrix form as follows:
[0099] ;
[0100] in, They are l +1 layer project embedding and l Layered project embedding, Aggregate information from nodes to hyperedges, and multiply by the session sequence beforehand. View the aggregation information from the hyperedge to the node; embed in the initial project go through After convolution of the hypergraph layers, the embeddings of each layer are summed and averaged to obtain the final item embedding. ;
[0101] Location embedding adds the project's location information to the project embedding. The learnable location embedding matrix is given, where k is the length of the current session; the item embeddings with added location information are as follows:
[0102] ;
[0103] in, For projects with location information, embedding is required. , Location information for the project. and These are the parameters learned; the session embedding is generated by aggregating the item representations in the session; then the session is augmented. Embedded representation:
[0104] ;
[0105] in, The weights of nodes in the sequence. , The coefficients that can be obtained through training. It is a conversation The embedding is represented by the average embedding of all items in this session. , It is a conversation The Middle Embedding of individual projects, For attention parameters.
[0106] The method for embedding a global graph is as follows:
[0107] An item may appear in multiple sessions. Transition information from different sessions is used to capture item transitions across sessions. Measuring whether the information in the global graph is relevant to user preferences in the target session is crucial. Item importance is distinguished based on session-aware attention. Each item is linearly combined based on scores generated by session-aware attention, as follows:
[0108] ;
[0109] h is the attention score, h vj Embed for the project's VJ. π ( vi , vj This is used to calculate the weights of different neighbors; the closer an item is to the current session, the more important it is and the greater its weight. π ( vi , vj The details are as follows:
[0110] ;
[0111] LeakyReLU is used as the activation function. The symbol indicates multiplication of elements at corresponding positions, and || indicates a concatenation operation. w ij It is the weight of each edge in the global session graph. W 1 and q 1 is a trainable parameter. s It is a feature of the target session, obtained by calculating the average of the current session, and then compared with the target session using the softmax function. vi The coefficients of all adjacent items are normalized; based on this attention, it is concluded that adjacent items receive attention.
[0112] Finally, the target project information and the information of projects adjacent to the target project are aggregated. This process is accomplished through a non-linear transformation, as follows:
[0113] ;
[0114] h v For the project to represent, The representation is the aggregator of the item representation and the neighbor representation, and ReLU is the activation function. These are trainable parameters;
[0115] To obtain higher-order information, we extend the single-layer aggregator to multiple layers, and the formula in the previous step is expressed as follows:
[0116] ;
[0117] h (k-1) The project was generated by the previous steps. v The expression; The previous layer of project embedding, with Aggle representing aggregation operations. The aggregated k-order items represent a project k The order representation is derived from its initial representation and its neighboring representations. k It is a combination of skipped projects.
[0118] The method for obtaining more complete project transformation information by integrating project representations formed by the three channels is as follows:
[0119] First, the item representations generated by the session graph channel and the global graph channel are merged;
[0120] For each item, its final item representation is obtained by merging the global representation and the session representation. The specific calculation is as follows: (To avoid overfitting, the global representation uses...) )
[0121] ;
[0122] The session embedding is generated by merging the session graph channel and the global graph channel into an item embedding. The project's location information is obtained through a learnable location matrix. The location information of the project is added to the project embedding; then, the location information and the project representation are integrated through a join operation and a non-linear transformation, as shown below:
[0123] ;
[0124] Session sequences with added location information To capture location information between items, the conversation sequence is input into the self-attention layer:
[0125] ;
[0126] Where F is the attention-required session representation, and d is a hyperparameter. The projection matrix;
[0127] The self-attention mechanism described above only exhibits a linear relationship. To enhance the representation of the conversation sequence, the ReLU activation function is used to increase the nonlinearity of the model. A residual connection is added after the feedforward network, as shown below:
[0128] ;
[0129] E represents the session through the residual link. yes A 3D matrix and yes To prevent overfitting, a bias vector of dimension 1 is used. Dropout regularization is applied during training. The self-attention mechanism can be described as follows:
[0130] ;
[0131] Finally, the single self-attention is expanded into multi-head self-attention, as shown below:
[0132] ;
[0133] E (k) E represents the conversation after k layers of attention. (k-1) This represents the session after k-1 layers of attention.
[0134] Represent the self-attention-processed conversation sequence By using soft attention to learn the weight of each node in the sequence, the different importance of different nodes to the sequence is reflected, as shown below:
[0135] ;
[0136] in, These are all training parameters, where σ represents the soft attention formula. It is a conversation The embedding is represented by the average embedding of all items in this session. , It is a conversation The Middle Embedding of individual projects, For attention parameters, finally... and Combined to form the final session representation .
[0137] In step (4), the embedding of each initial candidate item and the session representation obtained in the previous section are subjected to a dot product operation before further processing. The probability of receiving a recommendation is calculated as follows:
[0138] ;
[0139] For the purpose of a session, Indicates project The probability of being selected next in the target session;
[0140] The model is trained by minimizing the objective function:
[0141] ;
[0142] Where y represents the one-hot encoding of the project. , These are predicted values.
[0143] experiment
[0144] We describe the datasets used in our experiments, the comparison models, and compare our proposed method with other methods. We also designed ablation experiments to investigate the contribution of each channel to the model.
[0145] Dataset
[0146] We evaluated the proposed method on two real-world datasets: the Tmall dataset and the Nowplaying dataset. The Tmall dataset comes from the IJCAI-15 competition and contains anonymous user shopping logs from the Tmall online shopping platform.
[0147] To ensure a fair comparison, we preprocessed both datasets. During preprocessing, we filtered out sessions of length 1 and items appearing less than 5 times. We split the data into training and testing data, and generated corresponding labels for each session segment. The statistical data for the datasets are summarized in Table 1.
[0148] Table 1 Dataset
[0149]
[0150] To evaluate our proposed method, we compared it with representative baselines and state-of-the-art methods.
[0151] POP: Recommend the top-N most popular items in the training set.
[0152] Item-KNN: Recommends items based on the similarity between the current session item and other session items. Similarity is defined using cosine similarity.
[0153] FPMC: It is a hybrid model that combines matrix factorization and first-order Markov chains for recommendation, and it was one of the earliest models to process sequence data.
[0154] GRU4Rec: It is an RNN-based session recommendation model that models user sequences.
[0155] STAMP: This model considers both long-term and current user preferences.
[0156] SR-GNN: It was one of the earliest models to use graph neural networks for recommendation, using a gated neural network to obtain item embeddings and make recommendations.
[0157] DHCN: This model uses a hypergraph to model session sequences.
[0158] GCE-GNN: It not only considers the item transformation relationships within a session, but also the transformations between items across all sessions, achieving state-of-the-art results in session recommendation.
[0159] Evaluation indicators
[0160] The latent vector dimension is set to 100, and the model mini-batch size is also 100. For a fair comparison, we set the hyperparameters of each model to the same value. We use the Adam optimizer with an initial learning rate of 0.001, decaying by 0.1 every three epochs. The L2 penalty is set to... Dropout rate at Search in the middle.
[0161] Model performance
[0162] The experimental results are shown in Table 2:
[0163] Table 2 Experimental Results
[0164]
[0165] Our MCG-SR model was evaluated against eight other baseline models on two datasets and two evaluation metrics. We highlight the best results in bold. Analyzing the results in Table 2, we can draw the following conclusions.
[0166] Traditional methods (such as POP and Item-KNN) differ significantly from recently proposed methods (GRU4REC, STAMP, SR-GNN, and DHCN). The recent methods model sequential dependencies, which traditional models do not, demonstrating the importance of sequential information for conversational recommendation. Furthermore, the recent methods all employ deep learning techniques, highlighting the crucial role of deep learning in conversational recommendation.
[0167] Among recently proposed methods, STAMP significantly outperforms GRU4REC. GRU4REC is based on recurrent neural network modeling, while STAMP is a completely attention-based approach. This is because GRU4REC only considers sequential behavior and struggles to handle shifts in user preferences. In contrast, attention-based models, which assign different importance to different items, can more accurately predict user behavior.
[0168] State-of-the-art graph neural network-based session recommendation outperforms models based on recurrent neural networks and attention mechanisms. Our proposed MCG-SR model simultaneously models session sequences as three types of graphs: the session graph, the hypergraph, and the global graph. We capture the transition information between items in these three graphs using graph neural networks, and then fuse the information captured from the three graphs to capture richer item transition information. Experimental results are shown in Table 2. Our model outperforms all baseline models, including state-of-the-art graph neural network-based models (such as SR-GNN, GCE-GNN, and DHCN), achieving significant improvements, which demonstrates the effectiveness of our method.
[0169] Ablation Research
[0170] To investigate the contribution of different channels to our model, we designed three variants: MCG-SR-S, MCG-SR-G, and MCG-SR-H. MCG-SR-S represents the version without a session graph channel, MCG-SR-G represents the version without a global graph channel, and MCG-SR-H represents the version without a hypergraph channel. We compared these three variants with MCG-SR, DHCN, and GCE-GNN on the Tmall and Nowplaying datasets.
[0171] Table 3 observes the different impacts of the three channels on the two datasets. It shows that removing the session graph channel results in a significant performance drop on the Tmall dataset compared to MCG-SR, while the P@20 metric decreases slightly and the MRR@20 metric increases on the Nowplaying dataset. Removing the global graph channel improves the P@20 metric and decreases the MRR@20 metric on both datasets compared to MCG-SR. Removing the hypergraph channel results in a decrease on both evaluation metrics on both datasets compared to MCG-SR. Table 3 concludes that only by including all three channels can our model improve on both metrics across both datasets, validating that our model can capture more complete item transformation relationships and improve generalization ability.
[0172] Table 3
[0173]
[0174] This embodiment proposes a three-channel graph neural network model for conversation-based recommendation. Previous graph neural network-based conversation recommendation models typically model conversation sequences as a single graph, which limits the capture of richer item transitions. Our model models conversation sequences simultaneously as three graphs: a conversation graph, a hypergraph, and a global graph. We capture item transition information between these three graphs using a graph neural network, and then fuse the information captured from these three graphs to capture richer item transition information. Experiments on two datasets demonstrate that our model achieves significant advantages, proving its effectiveness.
[0175] The present invention and its embodiments have been described above illustratively. This description is not restrictive, and the figures shown are only one embodiment of the present invention; the actual structure is not limited thereto. Therefore, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the present invention, such designs should fall within the protection scope of the present invention.
Claims
1. A conversation recommendation method based on a three-channel graph neural network, characterized in that: Includes the following steps: (1) Convert the session sequence data into session graph, hypergraph, and global graph data; (2) The graph data learns three types of item embeddings through a graph neural network with three channels; the three channels include the conversation graph channel, the hypergraph channel, and the global graph channel; the conversation graph channel is used to capture the transformation relationship between items in the conversation, the hypergraph channel is used to capture the higher-order relationship between items in the conversation, and the global graph channel is used to capture the relationship between items in different conversations; The method for embedding conversation graphs is as follows: For the target project, different adjacent projects have varying degrees of importance to it. An attention mechanism is used to capture the weights between different nodes; the attention coefficients are shown below: ; s ij This indicates the importance of project vj to project vi. Indicates the relationship between projects, h vi Indicates the embedding of the project's VI, h vj Indicates the embedding of project vj, r ij The relationship between vi and vj is also known as the edge relationship. The weights are represented by the function `softmax`. Then, to make the coefficients comparable across different nodes, the attention weights are normalized using the `softmax` function, as shown in the following equation: ; a ij The weights between nodes vi and vj after normalization; Finally, the attention coefficients and corresponding items are linearly combined to obtain the output of each node, as shown in the following formula: ; Represents a node; (3) Integrating the project representation formed by the three channels yields more complete project transformation information; (4) The predicted probability of the project output by the prediction layer.
2. The session recommendation method based on a three-channel graph neural network according to claim 1, characterized in that: In a session graph, given a session , This refers to the item clicked in session S. v i And the session length is L;G s = (V s E s ) represents a conversation graph, with each item s i ∈ V s As a node and adjacent items (s i-1 ,s i )∈ E s As an edge; Indicates a hypergraph. Let represent the set of N unique vertices in a hypergraph. Let M denote the set of M hyperedges in the hypergraph; each hyperedge contains at least two vertices, where and Each hyperedge is assigned a weight. All the weights form a diagonal matrix. Hypergraph uses matrices This indicates that when the superedge contains a vertex hour, ,otherwise The degrees of the vertices and hyperedges are respectively and ,in D and B are diagonal matrices; The global graph is used to obtain information about the transformation of items between different sessions. Gg = (Vg, Eg) represents the global graph, where Vg represents the set of graph nodes for all items, and Eg represents the set of all edges. Each edge corresponds to two pairs of items in all sessions.
3. The session recommendation method based on a three-channel graph neural network according to claim 2, characterized in that: The method for hypergraph embedding is as follows: Hypergraph channels are used to capture higher-order relationships between items. Hypergraph convolution is defined as: ; for l +1 layer project embedding, These are the values in the correlation matrix. These are weighting coefficients. Embedded in the L layer of the project; The above expression can be written in matrix form as follows: ; in, They are l +1 layer project embedding and l Layered project embedding, Aggregate information from nodes to hyperedges, and multiply by the session sequence beforehand. View the aggregation information from the hyperedge to the node; embed in the initial project go through After convolution of the hypergraph layers, the embeddings of each layer are summed and averaged to obtain the final item embedding. ; Location embedding adds the project's location information to the project embedding. The learnable location embedding matrix is given, where k is the length of the current session; the item embeddings with added location information are as follows: ; in, For projects with location information, embedding is required. , Location information for the project. and These are the parameters learned; the session embedding is generated by aggregating the item representations in the session; then the session is augmented. Embedded representation: ; in, The weights of nodes in the sequence. , The coefficients that can be obtained through training. It is a conversation The embedding is represented by the average embedding of all items in this session. , It is a conversation The Middle Embedding of individual projects, For attention parameters.
4. The session recommendation method based on a three-channel graph neural network according to claim 3, characterized in that: The method for embedding a global graph is as follows: Each item is linearly combined based on the scores generated by conversation-aware attention, as follows: ; h is the attention score, h vj Embed for the project's VJ. π ( vi , vj This is used to calculate the weights of different neighbors; the closer an item is to the current session, the more important it is and the greater its weight. π ( vi , vj The details are as follows: ; LeakyReLU is used as the activation function. The symbol indicates multiplication of elements at corresponding positions, and || indicates a concatenation operation. w ij It is the weight of each edge in the global session graph. W 1 and q 1 is a trainable parameter. s It is a feature of the target session, obtained by calculating the average of the current session, and then compared with the target session using the softmax function. vi The coefficients of all adjacent items are normalized; based on this attention, it is concluded that adjacent items receive attention. Finally, the target project information and the information of projects adjacent to the target project are aggregated. This process is accomplished through a non-linear transformation, as follows: ; h v For the project to represent, The representation is the aggregator of the item representation and the neighbor representation, and ReLU is the activation function. These are trainable parameters; To obtain higher-order information, we extend the single-layer aggregator to multiple layers, and the formula in the previous step is expressed as follows: ; h (k-1) The project was generated by the previous steps. v The expression; The previous layer of project embedding, with Aggle representing aggregation operations. The aggregated k-order items represent a project k The order representation is derived from its initial representation and its neighboring representations. k It is a combination of skipped projects.
5. The session recommendation method based on a three-channel graph neural network according to claim 4, characterized in that: The method for obtaining more complete project transformation information by integrating project representations formed by the three channels is as follows: First, the item representations generated by the session graph channel and the global graph channel are merged; For each project, its final project representation is obtained by merging the global representation and the session representation. The specific calculations are as follows: ; The session embedding is generated by merging the session graph channel and the global graph channel into an item embedding. The project's location information is obtained through a learnable location matrix. The location information of the project is added to the project embedding; then, the location information and the project representation are integrated through a join operation and a non-linear transformation, as shown below: ; Session sequences with added location information To capture location information between items, the conversation sequence is input into the self-attention layer: ; Where F is the attention-required session representation, and d is a hyperparameter. The projection matrix; By leveraging the increased nonlinearity of the model through the ReLU activation function, a residual connection is added after the feedforward network, as shown below: ; E represents the session through the residual link. yes A 3D matrix and yes To prevent overfitting, a bias vector of dimension 1 is used. Dropout regularization is applied during training. The self-attention mechanism can be described as follows: ; Finally, the single self-attention is expanded into multi-head self-attention, as shown below: ; E (k) E represents the conversation after k layers of attention. (k-1) This represents the session after k-1 layers of attention. Represent the self-attention-processed conversation sequence By using soft attention to learn the weight of each node in the sequence, the different importance of different nodes to the sequence is reflected, as shown below: ; in, These are all training parameters, where σ represents the soft attention formula. It is a conversation The embedding is represented by the average embedding of all items in this session. , It is a conversation The Middle Embedding of individual projects, For attention parameters, finally... and Combined to form the final session representation .
6. The session recommendation method based on a three-channel graph neural network according to claim 5, characterized in that: In step (4), the embedding of each initial candidate item and the session representation obtained in the previous section are subjected to a dot product operation before further processing. The probability of receiving a recommendation is calculated as follows: ; For the purpose of a session, Indicates project The probability of being selected next in the target session; The model is trained by minimizing the objective function: ; Where y represents the one-hot encoding of the project. , These are predicted values.
Citation Information
Patent Citations
Global context enhancement graph neural network method based on session recommendation
CN113487018A
Hypergraph convolution collaborative filtering recommendation method and system based on topological information embedding, and computer readable storage medium
CN113672811A