A dialogue recommendation method based on double-channel hypergraph interest modeling
By modeling user interests and preferences using a dual-channel hypergraph convolutional neural network, the cold start problem in existing technologies is solved, improving the performance and user experience of dialogue recommendation and generating recommendation results that match user interests.
Patent Information
- Application Number
- CN202211110295.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-06-08
- Filing Date
- 2022-09-13
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-09-13
AI Technical Summary
Existing dialogue recommendation methods only consider the current dialogue context when modeling user interests, which leads to a serious cold start problem, makes it difficult to match users' true interests and preferences, and affects user experience.
We employ a dual-channel hypergraph convolutional neural network to model user interests and preferences. By structuring user history dialogue records into dialogue-based and knowledge-based hypergraphs, we utilize hypergraph convolution for high-order signal transmission and combine a multi-head attention mechanism and a Transformer encoder-decoder framework to generate recommendation results that match user interests.
It effectively alleviates the cold start problem, improves recommendation performance, generates item recommendations that match users' long-term interests and preferences, and enhances the user experience.
Smart Images

Figure CN115408505B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a dialogue recommendation method, in particular to a dialogue recommendation method based on double-channel hypergraph interest modeling. BACKGROUND
[0002] The prior art improves the performance of the dialogue recommendation method by semantic fusion based on a knowledge graph. The technology introduces an entity level and a vocabulary level knowledge graph, pretrains by mutual information maximization, performs semantic fusion on the representation of the entity and the vocabulary, and obtains a user representation by using a gating mechanism. Based on the obtained user representation, the technology proposes a knowledge-enhanced recommendation module and a dialogue module to generate accurate recommendation results and reply sentences with valuable information entities.
[0003] However, the prior art only considers the context information of the current ongoing dialogue when modeling the user's interest, and the information source understood by the user is very limited, and the cold start problem is serious. In this case, the recommended result of the system is difficult to meet the real interest preference of the user, thereby affecting the user experience.
[0004] The information disclosed in this BACKGROUND section is only for the purpose of enhancing the understanding of the general background of the application, and should not be considered as acknowledging or implying in any form that this information constitutes prior art that is known to those skilled in the art. SUMMARY
[0005] The purpose of the present application is to provide a dialogue recommendation method based on double-channel hypergraph interest modeling. The present application designs a method for modeling user interest preferences based on a double-channel hypergraph convolutional neural network. The method structures the user's historical dialogue records, obtains a dialogue-based hypergraph and a knowledge-based hypergraph, performs high-order signal transmission through hypergraph convolution, obtains a user representation, and performs recommendation. The present technology effectively alleviates the cold start problem in the dialogue recommendation scenario and improves the recommendation performance of the system.
[0006] In order to achieve the above purpose, the application adopts the following technical scheme:
[0007] The application provides a dialogue recommendation method based on double-channel hypergraph interest modeling, comprising the following steps:
[0008] S1: First, encode the entities of the knowledge graph to introduce external knowledge through the knowledge graph to improve the recommendation performance;
[0009] S2: Extract the item information in the user's historical dialogue, and enhance the representation by using a double-channel hypergraph modeling method;
[0010] S3: In order to make the recommendation result first pay attention to the current dialogue content, avoid over-fitting to the historical interests, use the multi-head attention mechanism to retrieve and weigh;
[0011] S4: An encoder-decoder framework is constructed to generate meaningful replies according to the user's interest preferences.
[0012] As a further technical solution, the specific method for encoding the entities of the knowledge graph in step S1 is as follows:
[0013] Use the relational graph convolutional neural network R-GCN for encoding:
[0014]
[0015] Wherein, is the vector representation of node e at the lth layer, denotes the set of neighbor nodes of node e under the relationship r, is the vector representation of neighbor node e' at the lth layer, and W (l) are the weight parameter matrices related and unrelated to the relationship respectively; finally, the invention obtains the vector representation of all entities on the knowledge graph, which constitutes the matrix N.
[0016] As a further technical solution, in step S1, in order to further improve the representation ability of the model to the entity, a pre-training process based on contrastive learning is introduced; specifically, the pre-training task is a subgraph instance discrimination task, which discriminates similar subgraphs and dissimilar subgraphs from a large number of subgraphs; the subgraph is obtained by random walk with restart, and the random walk sequence starts from a randomly sampled point on the knowledge graph, and returns to the original point at each time with a certain probability, and finally the subgraph is constructed from the nodes of the random walk sequence; the subgraphs composed of two sequences with the same starting point constitute similar subgraphs, otherwise dissimilar subgraphs; set two independent graph encoders f q and f k , respectively encode the query subgraph and the queried subgraph sequence into vectors q and vector set {k0,…,k K}, and use the following objective function for optimization:
[0017]
[0018] Wherein is the loss function, is the transpose of the query vector, k + is the positive key value vector, k i is the queried key value vector, and τ is the temperature hyperparameter. During training, a momentum-based parameter update method is also used, denoted as f q and f k parameters respectively.q and Θ k , update rule is Θ k ←mΘ k +(1-m)Θ q , where m is momentum hyper-parameter, and finally only keep f q as the graph encoder for downstream fine-tuning.
[0019] As a further technical solution, step S2 is specifically:
[0020] A hypergraph is an extension of the concept of a graph, in which a hyperedge can connect multiple nodes; the incidence matrix H of a hypergraph describes the relationship between hyperedges and nodes, the number of rows is the number of nodes, and the number of columns is the number of hyperedges; if the node represented by a certain row is in the hyperedge represented by a certain column, the value of the position of the incidence matrix is 1, otherwise it is 0; the degree of a hypergraph node is defined as the number of hyperedges it is in, and the degree of a hyperedge is defined as the number of nodes it contains, from which the node degree matrix D and the hyperedge degree matrix B can be obtained; on this basis, the following hypergraph convolution layer is defined:
[0021] X (l+1) =D -1 HB -1 H / X (l) Θ (l) ,
[0022] where X (l) is a matrix composed of vector representations of all nodes in the lth layer, and Θ is a learnable parameter matrix;
[0023] In order to model the user's historical interest preferences, two hypergraphs will be constructed based on the user's historical items; first, the dialogue-based hypergraph, which is composed only of historical items, is divided into different hyperedges according to different historical dialogues, so different hyperedges may share some nodes; the incidence matrix, node degree matrix and hyperedge degree matrix corresponding to this hypergraph are H s , D s , B s , respectively; the representation of the historical items extracted from N forms X h , and the dialogue-enhanced item representation is obtained after hypergraph convolution:
[0024] N s =HConv(H s ,D s ,B s ,X h ),
[0025] where HConv(·) is the hypergraph convolution layer defined above;
[0026] Secondly, knowledge-based hypergraph is constructed by historical items and their one-hop neighbors in the knowledge graph, and a single historical item and its neighbors form a hyperedge, and different hyperedges share some entity nodes describing the attributes of the items; the corresponding association matrix, node degree matrix and hyperedge degree matrix of the hypergraph are H k , D k , B k , the representation corresponding to the historical items and their one-hop neighbors in N is extracted to form X k , and the knowledge-enhanced item representation after hypergraph convolution is:
[0027] X′ k = HConv(H k , D k , B k , X k ),
[0028] Then each hyperedge is averaged and pooled to obtain the representation of each historical item N k ; the dual-channel hypergraph convolution acts on the two defined hypergraphs to obtain enhanced item representations under different perspectives; among them, the dialogue-enhanced item representation represents the full use of user historical dialogue information, and the knowledge-enhanced item representation represents the in-depth exploration of user historical interests.
[0029] As a further technical solution, step S3 is specifically: using a multi-head attention mechanism for retrieval and weighting:
[0030] N sk = MHA(N c , [N s ; N k ], [N s ; N k ]),
[0031] Where N c is the representation of the current dialogue entity, and MHA is a classic multi-head attention layer; under the supervision of the current dialogue signal, the multi-head attention layer retrieves information from the two types of historical signals, achieving a balance between utilization and exploration; finally, the average pooling operation Mean is used to obtain the final user representation vector:
[0032] u = Mean([Mean(N sk ); N c ]),
[0033] Where u is the user representation vector. The probability of recommending a certain item to the user is calculated:
[0034]
[0035] Where Mask sets the score of non-item entities to negative infinity; finally, the recommendation model is trained by taking the cross-entropy loss function as the objective function:
[0036]
[0037] Where is the probability of recommending item i to user j, N b is the batch size, y ij ∈{0,1} is the target label.
[0038] As a further technical solution, step S4 is specifically:
[0039] Two standard Transformer encoders are applied to encode the user's current dialogue context and historical dialogue, respectively, and input into the decoder as a cross-attention supervision signal; in order to let the generated dialogue reflect the user's interest preference, a decoder with user interest perception is constructed based on Transformer; each layer of the decoder first needs to go through self-attention and cross-attention to the historical item representation:
[0040]
[0041] Where R n-1 is the matrix output by the decoder at the n-1 layer; then the representations output by the two encoders are integrated into the representation of the decoder; in order to avoid overfitting of the dialogue to the historical signal and thus ignoring the current task, a hyperparameter β is introduced to weigh the relationship between the two encoder signals:
[0042]
[0043] Where X c is the output of the current dialogue encoder, X h is the output of the historical dialogue encoder, and β is a weight parameter that measures the importance of the historical signal and the current signal; finally, a feedforward neural network is used to get the output of each layer of the decoder:
[0044]
[0045] In order to make the generated dialogue text contain diversified recommended items, user interest bias and item-related bias obtained by the copy mechanism are introduced; given the predicted sequence y1,…,y i-1 , the probability of the next word can be calculated as follows:
[0046] P gen (y i |y1,…,y i-1 )=P1(y i |Ri )+P2(y i |u)+P3(y i |R i ,u),
[0047] where P1(·) is the word probability of the decoder's output R i as input, P2(·) is the word probability bias generated according to the user's representation u, P3(·) is the word probability bias of the copy mechanism, where the word probability of non-items is set to 0; the dialogue module is trained using a cross-entropy loss function as the objective function:
[0048]
[0049] where N b is the batch size, T is the text truncation length, which is used to avoid the generated text being too long.
[0050] With the above technical solutions, the present application has the following beneficial effects:
[0051] Most of the existing dialogue recommendation methods do not consider using the user's historical dialogue to enhance the understanding of the user's preferences, so that the system starts from zero to understand the user in each dialogue with the user, and faces a serious cold start problem. The method proposed in the present patent considers the user's historical dialogue and models it structurally into two types of hypergraphs, performs high-order signal transmission on the graph through hypergraph convolution, and fully excavates and explores the user's interest preferences. The user interest guided recommendation module proposed in the present patent can recommend items that meet the long-term interest preferences of the user, and the dialogue generation module with user interest perception can generate a dialogue with rich recommendation results, thereby improving the user experience in the dialogue recommendation scenario. BRIEF DESCRIPTION OF DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the specific embodiments or prior art of the present application, the drawings needed in the specific embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0053] Figure 1 The method flowchart of the present application. DETAILED DESCRIPTION
[0054] The technical solutions of the present application will be described clearly and completely in connection with the drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0055] The specific embodiments of the present application will be described in detail below in connection with the drawings. It should be understood that the specific embodiments described here are only used to illustrate and explain the present application, and are not used to limit the present application.
[0056] In connection with Figure 1 As shown in the drawings, the present embodiment provides a method for modeling user interest preferences based on a dual-channel hypergraph convolutional neural network. By structurally modeling the user's historical dialogue record, a dialogue-based hypergraph and a knowledge-based hypergraph are obtained. High-order signal transmission is performed through hypergraph convolution to obtain user representation for recommendation. The present technology effectively alleviates the cold start problem in the dialogue recommendation scenario and improves the recommendation performance of the system. The specific scheme is as follows:
[0057] The overall scheme is divided into four modules: a knowledge graph encoding module based on contrastive learning pre-training, a user interest modeling module based on dual-channel hypergraph convolution, a user interest guided recommendation module, and a reply generator module based on user interest perception.
[0058] First, the knowledge graph encoding module based on contrastive learning pre-training. The knowledge graph can introduce external knowledge to improve the recommendation performance, so the entities of the knowledge graph are first encoded. The present application uses a relational graph convolutional neural network R-GCN for encoding:
[0059]
[0060] Among them is the vector representation of node e at the lth layer, represents the set of neighbor nodes of node e under the relationship r, and W (l) are the weight parameter matrices related and unrelated to the relationship respectively. Finally, the present application obtains the vector representation of all entities on the knowledge graph, which form the matrix N.
[0061] To further enhance the model's ability to represent entities, this invention introduces a pre-training process based on contrastive learning. Specifically, the pre-training task is subgraph instance discrimination, which identifies similar and dissimilar subgraphs from a large number of subgraphs. Subgraphs are obtained through random walks with restarts. The random walk sequence starts from points randomly sampled from the knowledge graph, and each walk returns to the origin with a certain probability, ultimately constructing a subgraph from the nodes of the random walk sequence. Subgraphs formed by two sequences with the same starting point are considered similar; otherwise, they are dissimilar. Two independent graph encoders f are set. q and f k The query subgraph and the sequence of the queried subgraph are encoded into a vector q and a vector set {k0,…,k}, respectively. K The following objective function is used for optimization:
[0062]
[0063] in For loss function, For the transpose of the query vector, k + Let k be the positive example key value vector. i Let f be the query key-value vector, and τ be the temperature hyperparameter. During training, a momentum-based parameter update method is also used, denoted as f. q and f k The parameters are Θ q and Θ k The update rule is Θ k ←mΘ k +(1-m)Θ q Where m is the momentum hyperparameter, and ultimately only f is retained. q As a graph encoder for downstream fine-tuning.
[0064] In the user interest modeling module based on dual-channel hypergraph convolution, this invention extracts item information from user history dialogues and enhances its representation through dual-channel hypergraph modeling. A hypergraph is an extension of the graph concept, where a hyperedge can connect multiple nodes. The hypergraph's association matrix H represents the relationship between hyperedges and nodes, with the number of rows representing the number of nodes and the number of columns representing the number of hyperedges. If a node represented by a row is in a hyperedge represented by a column, the value at that position in the association matrix is 1; otherwise, it is 0. The degree of a hypergraph node is defined as the number of hyperedges it belongs to, and the degree of a hyperedge is defined as the number of nodes it contains. Thus, the node degree matrix D and the hyperedge degree matrix B can be obtained. Based on this, the following hypergraph convolutional layer can be defined:
[0065]
[0066] Where X (l) Θ is a matrix consisting of the vector representations of all nodes in the l-th layer, and Θ is the learnable parameter matrix.
[0067] To model users' historical interests and preferences, this invention constructs two hypergraphs based on users' historical items. The first is a dialogue-based hypergraph, composed solely of historical items, divided into different hyperedges according to different historical dialogues; thus, different hyperedges may share some nodes. The association matrix, node degree matrix, and hyperedge degree matrix of this hypergraph are H, respectively. s D s B s Extract the representations of historical items from N to form X. h After hypergraph convolution, the dialogue-enhanced item representation is obtained:
[0068] N s =HConv(H s D s B s ,X h ),
[0069] HConv(·) is the hypergraph convolutional layer defined above.
[0070] Secondly, there is a knowledge-based hypergraph, which consists of historical items and their one-hop neighbors in the knowledge graph. Each historical item and its neighbors form a hyperedge, and different hyperedges share entity nodes describing item attributes. The corresponding association matrix, node degree matrix, and hyperedge degree matrix of this hypergraph are H, respectively. k D k B k Extract historical items from N and their corresponding representations of one-hop neighbors to form X. k The knowledge-enhanced item representation after hypergraph convolution is as follows:
[0071] X′ k =HConv(H k D k B k ,X k ),
[0072] Then, average pooling is performed on each of the superedges to obtain the representation N of each historical item. k Dual-channel hypergraph convolution is applied to two defined hypergraphs to obtain enhanced item representations from different perspectives. Dialogue-enhanced item representations represent full utilization of user history dialogue information, while knowledge-enhanced item representations represent a deeper exploration of user history interests.
[0073] In the user interest-guided recommendation module, to ensure that the recommendation results prioritize the current dialogue content and avoid overfitting to historical interests, this invention utilizes a multi-head attention mechanism for retrieval and weighting:
[0074] N sk= MHA(N c , [N s ; N k ], [N s ; N k ]),
[0075] where N c is the representation of the current dialogue entity, and MHA is the classic multi-head attention layer. Under the supervision of the current dialogue signal, the multi-head attention layer retrieves information from two types of historical signals, achieving a trade-off between exploitation and exploration. Finally, the invention obtains the final user representation vector using the average pooling operation Mean:
[0076] u = Mean([Mean(N sk ); N c ]).
[0077] After obtaining the representation of the user, the probability of recommending a certain item to the user can be calculated:
[0078]
[0079] where Mask sets the score of non-item entities to negative infinity. The invention finally trains the recommendation model by taking the cross-entropy loss function as the objective function:
[0080]
[0081] where N b is the batch size, and y ij ∈{0,1} is the target label.
[0082] The reply generator module of user interest perception builds an encoder-decoder framework that can generate meaningful replies according to the user's interest preferences. The invention applies two standard Transformer encoders to encode the user's current dialogue context and historical dialogue, respectively, and inputs them into the decoder as cross-attention supervision signals. In order to make the dialogue generated by the decoder reflect the user's interest preferences, the invention builds a user interest perception decoder based on Transformer. Each layer of the decoder first needs to go through self-attention and cross-attention to the historical item representation:
[0083]
[0084]
[0085] where R n-1is the matrix outputted by the decoder at the n-1 layer. Then the two encoder outputs are fused into the decoder's representation. To avoid overfitting the dialogue to the history signal and thus neglecting the current task, the invention introduces a hyper-parameter β to balance the relationship between the two encoder signals:
[0086]
[0087] where X c is the output of the current dialogue encoder, X h is the output of the history dialogue encoder. Finally, the output of each layer of the decoder is passed through a feed-forward neural network:
[0088]
[0089] To make the generated dialogue text with diversified recommended items, the invention introduces a user interest bias and an item-related bias obtained by the copy mechanism. Given a predicted sequence y1,..., y i-1 , the probability of the next word can be calculated as follows:
[0090] P gen (y i |y1,..., y i-1 ) = P1(y i |R i ) + P2(y i |u) + P3(y i |R i , u),
[0091] where P1(·) is the word probability of the decoder's output R i as input, P2(·) is the word probability bias generated according to the user's representation u, and P3(·) is the word probability bias of the copy mechanism, where the word probability of non-items is set to 0. The invention uses a cross-entropy loss function as the objective function to train the dialogue module:
[0092]
[0093] where N b is the batch size, and T is the text truncation length, used to avoid the generated text being too long.
[0094] The key point of the patent is to introduce the user's historical dialogue as prior knowledge, and construct the entity information in it into two types of hypergraphs for modeling, thereby improving the model's understanding of the user's interest. In the two types of hypergraphs, the hypergraph based on dialogue reflects the full use of the user's dialogue history, and the hypergraph based on knowledge reflects the in-depth exploration of the user's historical preferences. The two are balanced through an attention network, and the final user representation is constructed through an interest fusion layer to provide appropriate recommendation results.
[0095] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A dialogue recommendation method based on two-channel hypergraph interest modeling, characterized in that, Comprise the following steps: S1: First, the entity of the knowledge graph is encoded, and external knowledge is introduced through the knowledge graph to improve the recommendation performance; S2: Extract the item information in the user's historical dialogue, and enhance its representation through double-channel supergraph modeling; S3: In order to let the recommendation result first pay attention to the current dialogue content, avoid overfitting to the historical interest, use multi-head attention mechanism for retrieval and weighting; S4: An encoder-decoder framework is constructed to generate meaningful replies according to the user's interest preferences; Step S3 is specifically: using multi-head attention mechanism for retrieval and weighting: N sk = MHA(N c , [N s ; N k ], [N s ; N k ]), where N c is the representation of the current dialogue entity, and MHA is a classic multi-head attention layer; under the supervision of the current dialogue signal, the multi-head attention layer retrieves information from two types of historical signals, achieving a trade-off between exploitation and exploration; finally, the average pooling operation Mean is used to obtain the final user representation vector: u = Mean([Mean(N sk ) ; N c ]), Where u is the user representation vector; Calculate the probability of recommending a certain item to the user: P rec = Softmax(Mask(u · N T )), Where Mask sets the score of non-item entities to negative infinity; Finally, the cross-entropy loss function is used as the objective function to train the recommendation model: where is the probability of recommending item i to user j, N b is the batch size, y ij ∈ {0,1} is the target label.
2. The method of claim 1, wherein, The specific method of encoding the entity of the knowledge graph in step S1 is as follows: Use relational graph convolutional neural network R-GCN for encoding: wherein, is the vector representation of node e at the l-th layer, denotes the set of neighboring nodes of node e under relation r, is the neighboring node e ′ at the l-th layer, and W (l) are the weight parameter matrices related and unrelated to the relation, respectively; resulting in the vector representation of all entities on the knowledge graph, which form the matrix N. 3.The method of claim 1, wherein, In step S1, a pre-training process based on contrastive learning is introduced to further improve the representation ability of the model to entities; specifically, the pre-training task is a subgraph instance discrimination task, which discriminates similar subgraphs and dissimilar subgraphs from a large number of subgraphs; the subgraph is obtained through a random walk with restart, the random walk sequence starts from a randomly sampled point on the knowledge graph, and each walk returns to the original point with a certain probability, and finally a subgraph is constructed from the nodes in the random walk sequence; the subgraphs composed of two sequences with the same starting point constitute similar subgraphs, otherwise dissimilar subgraphs; two independent graph encoders f q and f k are set to encode the query subgraph and the query subgraph sequence into vectors q and vector set {k D ,…,k K} respectively, and the following objective function is used for optimization: where is the loss function, q T is the transpose of the query vector, k + is the positive key-value vector, k i is the queried key-value vector, τ is the temperature hyperparameter; during training, momentum-based parameter update is also adopted, denoted as f q and f k The parameters of and are Θ q and Θ k , and the update rule is Θ k ←mΘ k +(1-m)Θ q , where m is the momentum hyperparameter, and finally only f q is retained as the downstream fine-tuned graph encoder. 4.The method of claim 1, wherein, Step S2 is specifically: Supergraph is an extension of the concept of graph, where a hyperedge can connect multiple nodes; The association matrix H of the supergraph describes the relationship between the hyperedge and the node, and the number of rows is the number of nodes and the number of columns is the number of hyperedges; If a node represented by a row is in a hyperedge represented by a column, the association matrix value is 1, otherwise 0; The degree of the supergraph node is defined as the number of hyperedges it contains, and the degree of the hyperedge is defined as the number of nodes it contains, thus the node degree matrix D and the hyperedge degree matrix B are obtained; On this basis, the following supergraph convolution layer is defined: X (l+1) = D -1 HB -1 H T X (l) Θ (l) , where X (l) is a matrix of vector representations of all nodes in the lth layer, and Θ is a matrix of learnable parameters. To model the historical interest preference of users, two hypergraphs are constructed based on the historical items of users; first is the dialogue-based hypergraph, which is composed of historical items only, and is divided into different hyperedges according to different historical dialogues, so that different hyperedges share part of the nodes; the corresponding association matrix, node degree matrix and hyperedge degree matrix of the hypergraph are H s , D s , B s , the representation corresponding to the historical items in N is extracted to form X h , and the dialogue-enhanced item representation is obtained after hypergraph convolution: N s = HConv(H s , D s , B s , X h ), Where HConv(·) is the supergraph convolution layer defined above; Secondly, the knowledge-based hypergraph is constructed by historical items and their one-hop neighbors in the knowledge graph, and a single historical item and its neighbors form a hyperedge, and different hyperedges share some entity nodes that describe the attributes of the items; the corresponding association matrix, node degree matrix and hyperedge degree matrix of the hypergraph are H k , D k , B k , the representation corresponding to the historical items and their one-hop neighbors is extracted from N to form X k , and the knowledge-enhanced item representation after hypergraph convolution is: X' k = HConv(H k , D k , B k , X k ), Then, each hyper-edge is averaged-pooled to obtain the representation N of each historical item k ; the dual-channel hypergraph convolution operates on the defined two hypergraphs to obtain enhanced item representations under different perspectives; wherein the dialogue-enhanced item representation represents sufficient utilization of the user's historical dialogue information, and the knowledge-enhanced item representation represents in-depth exploration of the user's historical interests. 5.The method of claim 1, wherein, Step S4 is specifically: Two standard Transformer encoders are applied to encode the user's current dialogue context and historical dialogue, and input into the decoder as the supervision signal of cross attention; In order to let the decoder generate dialogue that reflects the user's interest preferences, a user interest-aware decoder is constructed based on Transformer; Each layer of the decoder first needs to go through self-attention and cross-attention to the historical item representation: where R W-1 is the matrix output by the decoder at the n-1 layer; then the two encoder outputs are fused into the decoder's representation; to avoid overfitting the dialog to the history signal and thus neglecting the current task, a hyperparameter β is introduced to weigh the relationship between the two encoder signals: where X c is the output of the current dialogue encoder, X h is the output of the history dialogue encoder, and β is a weight parameter that measures the importance of the history signal and the current signal respectively; and finally the output of each layer of the decoder after passing through a feedforward neural network: To make the generated dialogue text with diverse recommended items, the user interest bias and the item-related bias obtained by the copy mechanism are introduced; given the predicted sequence y1, …, y i-1 , the probability of the next word is calculated as follows: P geW (y i |y1,…,y i-1 )=P1(y i |R i )+P Z (y i |u)+P3(y i |R i ,u), where P1(·) is the vocabulary probability of the decoder's output R i The vocabulary probability of the input word t Z (·) is the vocabulary probability bias generated according to the user's representation u, P3(·) is the vocabulary probability bias of the copy mechanism, where the vocabulary probability of non-items is set to 0; the dialogue module is trained using a cross-entropy loss function as the objective function: where N b is the batch size, T is the text truncation length, used to avoid excessively long generated text.
Citation Information
Patent Citations
Recommendation method and system based on knowledge-aware hypergraph neural network
CN112613602A
Knowledge enhancement dialogue recommendation method based on multi-level attention mechanism
CN114065047A