A conversational recommendation system and method integrating temporal and semantic dependencies
By building global and local item graphs combined with semantic dependency modules, the problems of insufficient utilization of item conversion relationships and incomplete description of users' overall interests in conversational recommendation systems are solved, achieving more accurate user intent prediction and improved recommendation performance.
Patent Information
- Application Number
- CN202311785649.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2043-12-22
AI Technical Summary
Existing conversational recommendation systems are limited by the limited data in a single session when utilizing item conversion relationships. They find it difficult to accurately predict the intentions of anonymous users and lack a complete description of the user's overall interests. In addition, the fusion mechanism of different dependency relationships is poorly designed, resulting in poor recommendation performance.
The item conversion dependency module and semantic dependency module are adopted to capture the conversion relationships at different levels by constructing global and local item graphs. Combined with the cross-fusion module and debugging module, time and semantic information are integrated, and the recommendation model is optimized using self-supervised learning and cross-view mechanism.
It improves the accuracy of conversational recommendations, can better capture users' long-term and short-term time dependencies, effectively integrate users' overall interests and temporary preferences, and improves recommendation performance.
Smart Images

Figure CN117743798B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of recommendation systems, and in particular to a conversational recommendation system and method that integrates temporal and semantic dependencies. Background Art
[0002] In published research, Markov chains are an efficient method for leveraging the temporal nature of conversations in conversational recommendations. Shani et al. first used Markov decision processes (MDPs) to formulate the recommendation problem as a sequential optimization problem. Zimdar et al. also considered collaborative filtering as a time series problem, using decision tree learning methods and Markov chains for prediction. Matrix factorization was applied to SBR to capture long-term information from item-to-item connections. Rendle et al. then first combined matrix factorization and Markov chains to predict the next action by learning a user's long-term static interests and short-term dynamic interests.
[0003] In recent years, with the rapid development of deep neural networks, deep learning models have performed well in SBR (conversational recommendation systems). Recurrent neural networks (RNNs) are widely used in conversation-based models because they are able to utilize serialized information. Observing the potential of RNNs, Hidasi et al. first introduced them to SBR and modified the details of the task, including changing the appropriate ranking loss function and enhancing the sequence. Later, a new deep learning framework, NARM, was proposed, which mixed attention mechanisms and GRU units to capture the user's purpose in the conversation. STAMP combines the user's general interests and current interests for recommendation, and also uses an attention mechanism as a supplement. SASRec balances Markov chains and RNNs, and also uses a self-attention mechanism to model the user's historical behavior information and extract more valuable information.
[0004] Recently, graph neural networks (GNNs) have been applied to sequence-based decision-making (SBR). Compared to RNNs, graph structures can exploit high-order interactions between items. SR-GNN first explored how to apply graph structures to SBR and used a gating mechanism to obtain accurate user representations. GC-SAN considers self-attention to capture long-range dependencies in the contextual representation of items in the learning sequence. TAGNN follows the gated graph neural network model based on SR-GNN and adds an embedding representation that is sensitive to the prediction target. Summary of the Invention
[0005] In order to solve the technical problems in the above background, the following technical solutions are provided:
[0006] A conversational recommendation system that integrates temporal and semantic dependencies, including: an item conversion dependency module, a semantic dependency module, a cross-fusion module, and a debugging module;
[0007] The item conversion dependency module is connected to the cross-fusion module, and the item conversion dependency module is used to capture the conversion dependency relationship of items;
[0008] The semantic dependency module is connected to the cross-fusion module, and the semantic dependency module is used to capture semantic information embedded in the original item sequence;
[0009] The cross-fusion module is used to perform cross-fusion training on the transformation dependency and semantic information to obtain a recommendation model;
[0010] The debugging module is connected to the cross-fusion module, and the debugging module is used to reduce the error of the recommendation model.
[0011] Preferably, the item conversion module includes: a global capture unit, a local capture unit and a correction unit;
[0012] The global capture unit is connected to the correction unit, and the global capture unit captures the order conversion of items at the global level by constructing a global item graph.
[0013] The local capturing unit is connected to the correction unit, and the local capturing unit captures the item order transformation of items at the local level by constructing a local item graph;
[0014] The correction unit is used to integrate the global item graph and the local item graph to complete the capture of the conversion dependency relationship of the items.
[0015] Preferably, the method for the correction unit to integrate the global item graph and the local item graph includes:
[0016]
[0017] Where sim is the cosine similarity; τ represents the temperature coefficient, which is used to control the effect of self-supervision; z g,s and z l,s Represent the global item graph and local item graph of the current session s respectively; z g,u and z l,u They represent the global item graph and local item graph of other sessions u respectively; exp is the natural exponential function; is the calculated loss function; S represents the total number of sessions.
[0018] Preferably, the semantic dependency module includes: a semantic capture unit and an optimization unit;
[0019] The semantic capture unit is connected to the optimization unit, and the semantic capture unit captures semantic dependency information by constructing an interaction graph from the perspective of co-occurrence of conversations and items;
[0020] The optimization unit alleviates the sparsity of the interaction graph by adopting a view enhancement method.
[0021] Preferably, the method by which the optimization unit alleviates the sparsity of the interaction graph includes:
[0022]
[0023] Among them, GraphEncoder represents the graph convolution process; P c represents the input embedding representation of the bipartite graph, and Both represent augmented views.
[0024] Preferably, the workflow of the cross-fusion module includes: adopting a cross-view mechanism to promote the exchange of semantic preferences, and integrating the item representations in the semantic dependency module into the embedding of the item dependency conversion module by using a cross-view method.
[0025] Preferably, the workflow of the debugging module includes: calculating a final loss function based on the final item representation and the final session representation of the global session graph, and optimizing the recommendation model by reducing the output of the loss function.
[0026] The present invention also provides a conversational recommendation method that integrates temporal and semantic dependencies. The method is applied to the above system and includes the following steps:
[0027] Capturing transformation dependencies of items;
[0028] Capturing semantic information embedded in the original item sequence;
[0029] Performing cross-fusion training on the transformation dependency and the semantic information to obtain a recommendation model;
[0030] Optimize the recommendation model and use the recommendation model to recommend items.
[0031] Preferably, the method for capturing the transformation dependency of items includes:
[0032] By constructing a global item graph, we can capture the order transformation of items at the global level.
[0033] By constructing a local item graph, we can capture the item order transformation at the local level.
[0034] The global item graph and the local item graph are integrated to complete the capture of the transformation dependency relationship of the items.
[0035] Preferably, it is characterized in that
[0036] The method of integrating the global item graph and the local item graph includes:
[0037]
[0038] Where sim is the cosine similarity; τ represents the temperature coefficient, which is used to control the effect of self-supervision; z g,s and z l,s Represent the global item graph and local item graph of the current session s respectively; z g,u and z l,u They represent the global item graph and local item graph of other sessions u respectively; exp is the natural exponential function; is the calculated loss function; S represents the total number of sessions.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] 1. The present invention introduces a semantic dependency module into session-based recommendation to understand the user's overall interests.
[0041] 2. This paper proposes two different levels of item transition graphs to mine users’ long-term and short-term temporal dependencies, and adaptively incorporates self-supervised learning to integrate information.
[0042] 3. In order to effectively transfer semantic information into the item conversion module, this paper designs a new cross-view framework to promote the recommendation task by organically cross-item representations. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0044] Figure 1 Schematic diagram of the system structure of an embodiment of the present invention;
[0045] Figure 2 Schematic diagram of a model framework according to an embodiment of the present invention;
[0046] Figure 3 Schematic diagram of an item dependency conversion module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0048] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] Before explaining, let me first introduce the nouns that appear in the text:
[0050] Items: all items that the user has browsed during the browsing process;
[0051] Session: the session window during item browsing;
[0052] Conversion dependency: the sequential conversion relationship of item browsing.
[0053] Current conversational recommendation systems are mainly based on SBR technology, which primarily uses the browsing history of anonymous users. This results in the system being unaware of the user's historical information and behavior, only the current string of user behaviors. As a result, the data is often sparse, making it difficult to accurately predict the anonymous user's intentions.
[0054] Although SBR technology is becoming increasingly mature, there are still three key issues:
[0055] 1. Insufficient Utilization of Item Transitions. Most existing research solely leverages item dependencies within a session to explore user interests and make predictions. Since sessions are short-term sequences, this approach is limited by the limited data within a single session, resulting in poor performance. Since other sessions may contain similar transition patterns, it is necessary to leverage item transitions across the entire set of sessions to obtain a more informative representation.
[0056] 2. Insufficient exploration of overall interests. Although item transitions play an important role in SBR, they primarily characterize users' temporal preferences and lack a complete description of their overall interests. For example, assuming a user is interested in both electronic devices and sports, they might purchase several electronic devices and then a pair of basketball shoes. In this case, the final purchase behavior is unrelated to the previous time series and is instead driven by the user's intrinsic interests. Exploring users' stable and overall interests from existing session data remains an open question.
[0057] 3. Designing a fusion mechanism for different dependencies. Although users' temporary preferences and overall interests are important for SBR, they cannot be directly combined. In particular, not all overall interests are useful for predicting the next item in the current session. Simple combination may degrade recommendation performance. Therefore, designing an effective fusion mechanism to extract useful information from them remains a challenge.
[0058] Based on the above-mentioned defects of the prior art, the present invention provides a conversational recommendation system that integrates temporal and semantic dependencies, such as Figure 1 As shown, it includes: an item conversion dependency module, a semantic dependency module, a cross-fusion module and a debugging module; the item conversion dependency module is connected to the cross-fusion module, and the item conversion dependency module is used to capture the conversion dependency relationship of items; the semantic dependency module is connected to the cross-fusion module, and the semantic dependency module is used to capture the semantic information embedded in the original item sequence; the cross-fusion module is used to perform cross-fusion training on the conversion dependency relationship and semantic information to obtain a recommendation model; the debugging module is connected to the cross-fusion module, and the debugging module is used to reduce the error of the recommendation model.
[0059] Example 1
[0060] The following will describe in detail how the present invention solves technical problems in real life in conjunction with this embodiment.
[0061] First, the item conversion dependency module is used to capture the item conversion dependency.
[0062] In the item conversion dependency module, this embodiment adopts two graph structures designed to capture the sequential conversion of items at the global level and the local level. In order to capture the sequential conversion of items at the global level, the global capture unit constructs a global item graph that includes conversions across all sessions. The global item graph is able to consider a wider range of contexts and dependencies between items across multiple sessions. In addition, at the local level, the local capture unit introduces a local session graph that focuses on utilizing the most recent time information between consecutive sessions; the local session graph can effectively capture the immediate dependencies and conversions between items in a given session sequence. The specific structures of the two graphs are as follows: Figure 3 shown.
[0063] The global item graph considers all item conversion relationships across all sessions. In this graph, each item in a session is considered a node, and the edges correspond to the conversions between them. This embodiment applies a classic GNN to integrate the neighborhood relationships in the global item graph and obtain the corresponding item representation and session representation respectively. And because the feature transformation matrix and nonlinear function are trivial, this embodiment removes them from the network layer. In this way, through the layer network propagation, the item representation x of the global item graph is obtained. g .
[0064] Then, the position corresponding to the intra-session order is embedded in x p The x obtained by the above process g Mapping to a new embedding space through a feature transformation operation. The feature transformation operation step includes: using a weight matrix to multiply the current embedding to achieve the effect of changing the dimension of the current embedding. Based on the above steps, an attention mechanism (which is a data processing method in machine learning for learning a comprehensive representation of a set of representations) is combined to comprehensively represent the single session embedding z of the global item graph. g .
[0065] Unlike the global item graph, in the local session graph, this embodiment uses sessions as nodes and utilizes a set of short-term time information of the current session. The local session graph describes the relationship between items from the perspective of the local session. Similar to the global item graph, the items are convolved with the session representation through GNN. It is worth noting that the session representation of this embodiment is not an independent embedding, but is represented by the embedding of all items in each session. The local capture unit uses an average operation on the initialized item representation to represent a specific session embedding. After layer graph convolution, the item representation x of the local session graph is obtained. l The subsequent operation is the same as that of the global item graph to obtain the single session embedding z of the local session graph. l .
[0066] In order to ensure the consistency of learning between the global item graph and the local session graph, the correction unit adopts a self-supervised learning method. Specifically, the item conversion dependency module obtains different session representations, denoted as z g and z l , which capture different levels of sequential information embedded in the original session data. In the self-supervised scheme of this embodiment, representations from the same session are considered positive samples, while representations from different sessions are considered negative samples. By aligning mutually positive representations, the session embedding is fine-tuned to consistently capture two levels of information in the embedding space. Compared with previous methods that directly fuse different representations, this embodiment achieves a more balanced integration of different information and smoothly mixes the features of each representation. The specific formula is shown in formula (1):
[0067]
[0068] Where sim is the cosine similarity; τ represents the temperature coefficient, which is used to control the effect of self-supervision; z g,s and z l,s Represent the global item graph and local item graph of the current session s respectively; z g,u and z l,uThey represent the global item graph and local item graph of other sessions u respectively; exp is the natural exponential function; is the calculated loss function; S represents the total number of sessions.
[0069] Afterwards, a semantic dependency module is used to capture the semantic information embedded in the original item sequence.
[0070] The semantic dependency module is a parallel module of the item conversion dependency module. Unlike the item conversion dependency module, which constructs a global item graph and a local session graph from the perspective of time conversion, the semantic dependency module constructs an interaction graph from the perspective of the co-occurrence of sessions and items, thereby capturing semantic dependency information.
[0071] In order to effectively capture the semantic information embedded in the original item sequence, this embodiment designs a semantic dependency module to perform an additional training task. In traditional recommendation systems, a co-occurrence matrix represented by a bipartite graph is usually used to capture the long-term static dependency between users and items. However, in SBR, the focus is mainly on the item conversion relationship, and the semantic information generated by the co-existence of items in different sessions is usually ignored. To address this limitation, this embodiment introduces a co-occurrence matrix into the SBR framework, which enables the exploration of co-occurrence information preferences. Specifically, the goal of the semantic dependency module is to learn the co-occurrence relationship between sessions and items to effectively utilize the existing semantic information.
[0072] In order to fully utilize the collaborative semantic information in the bipartite graph, the semantic capture unit uses a specific graph encoder to extract node representations. In this embodiment, due to its effectiveness and simplicity, the semantic capture unit uses LightGCN as the basic structure of the encoder. The semantic dependency module uses the message propagation strategy of LightGCN to extract information node features through graph convolution. The initial embedding P of the semantic dependency module is c Get its final embedding representation H c It should be noted that due to the characteristics of bipartite graph convolution, P c and H c They are all obtained by connecting the session representation and the item representation, for example: P c =[z c ||x c ],z c represents a single session representation in the semantic dependency module, x c Represents a single item in a semantic dependency module, and || represents a connection operation.
[0073] It's important to note that user IDs are agnostic in session-based recommendations. Furthermore, in SBR, the number of sessions is typically much larger than the number of items, leading to significant sparsity. Furthermore, the increasing number of sessions increases the size of the graph, posing challenges in terms of training overhead. To alleviate this issue, the optimization unit utilizes a self-supervisory signal between node representations through contrastive learning, addressing both sparsity and training scalability.
[0074] The optimization unit applies view enhancement to the interaction graph. Specifically, this embodiment constructs an augmented view by random edge discarding technology, denoted as G' c and G” c In this process, this embodiment randomly masks the interaction between sessions and items with probability, so that in Figure G c These interactive masks effectively generate an enhanced view of the bipartite graph, providing additional perspectives and enhancing the robustness of the model. The specific process is shown in formula (2):
[0075]
[0076] Among them, the graph convolution process of GraphEncoder is consistent with that of the semantic capture unit; c represents the input embedding representation of the bipartite graph, and Both represent the augmented views obtained above.
[0077] Based on the final node representation of the two enhanced views, the optimization unit regards each other as positive samples and performs self-supervised learning. The specific process is shown in formula (3):
[0078]
[0079] Among them, sim is the cosine similarity; τ represents the temperature coefficient, which is used to control the effect of self-supervision; H′ c,s and H″ c,s are the augmented view of the current session s Figure 1 and augmented vision Figure 2 The representation of H′ c,u and H″ c,u It is the augmented view of other conversations u Figure 1 and augmented vision Figure 2 , exp is the natural exponential function, is the calculated loss function; S represents the total number of sessions.
[0080] By passing the network layers of the item dependency conversion module and the semantic dependency module, the system can obtain temporal information and semantic preferences. To recognize the key role of semantic information in the item conversion scenario, the cross-fusion module adopts a cross-view mechanism to promote the exchange of semantic preferences. Specifically, the module uses a cross-view method to integrate the item representations in the semantic dependency module into the embedding of the item dependency module. Given the huge information gap between the two modules, the use of commonly used multi-task methods will introduce additional noise during the information transfer process and degrade performance. In contrast, the cross-fusion module adopts a cross-view method to facilitate the learning of shared parameters in an iterative manner and integrate common information into other modules.
[0081] Specifically, the item representations of the item conversion dependency module and the semantic dependency module are shared and exchanged by cross views during the graph convolution process. The input of the interactive view is: the item representation x of the global item graph convolution process of the item conversion dependency module g , and the item representation x obtained by separating the embedding during the semantic dependency module graph convolution process c The formula for parameter sharing is as follows:
[0082]
[0083] Where W ll , W rl , W lr , W rr are all feature transformation matrices; l l+1 and r l+1 is the feature vector returned after information exchange; and It is the item representation of the global item graph convolution process and the item representation obtained by separating and embedding in the semantic dependency module graph convolution process; T represents the transpose of the matrix. It should be noted that the cross-view parameter sharing of this embodiment is performed before the graph convolution process of each layer. Parameter sharing is performed first, and then the features are returned and the graph convolution process of this layer is performed. Therefore, different modules perform selective information fusion and exchange to complete the construction of the recommendation model. The model framework of this embodiment is as follows Figure 2 shown.
[0084] Finally, the debugging module is used to calculate the loss function, thereby narrowing the gap between the predicted value and the true value, making the result more accurate.
[0085] The debugging module represents x according to the final item of the global session graph g and the final session representation z g To calculate the final loss function, first calculate the score by multiplying the item and the session:
[0086]
[0087] Among them, z g is the final session representation; x g,i is the final item representation; T represents the transpose of the matrix; is the result of calculation.
[0088] Afterwards, the debugging module uses a Softmax function to calculate the predicted probability for each item:
[0089]
[0090] in, is the result obtained from the above formula; Softmax is an activation function; is the predicted probability obtained.
[0091] At the same time, the cross entropy loss function is used to calculate the loss of the item transfer dependency module:
[0092]
[0093] Among them, y g,i is a one-hot encoded vector of the ground truth, used to represent the real sample; is the predicted probability obtained from the above formula; m is the number of items; is the loss function for computing. For the session and item representations of the previously learned semantic dependency module, the loss function is defined as:
[0094]
[0095] Among them, Z c and X c are the session and item representations of the bipartite graph; I s Represents the item set of the current session s; and are the scores of items that belong to the current session s and the scores of items that do not belong to the current session s, respectively.
[0096] To better utilize temporal and semantic information, the debugging module uses multi-task learning to train both. Specifically, it alternately trains the semantic dependency module and the item conversion dependency module:
[0097]
[0098] in, are the loss functions obtained previously; μ1 and μ2 are hyperparameters, which are pre-set values that control the weights of different loss functions.
[0099] The loss function here is to train the model. In fact, the system predicts the probability of all items. Sort by size and select the most likely top K recommended items (K is the required number of recommendations) as the system's recommendation results.
[0100] Example 2
[0101] This embodiment also provides a conversational recommendation method that integrates temporal and semantic dependencies. The specific steps include:
[0102] S1. Capture the transformation dependencies of items;
[0103] This embodiment adopts two graph structures designed to capture the sequential transformation of items at the global level and the local level. In order to capture the sequential transformation of items at the global level, this embodiment designs an item dependency transformation module. This module constructs a global item graph that includes transformations across all sessions. The global item graph is able to consider a wider range of contexts and dependencies between items across multiple sessions. In addition, at the local level, this embodiment also introduces a local session graph that focuses on utilizing the most recent time information between consecutive sessions; the local session graph can effectively capture the immediate dependencies and transformations between items in a given session sequence. The specific structures of the two graphs are as follows: Figure 3 shown.
[0104] The global item graph considers all item conversion relationships across all sessions. In this graph, each item in a session is considered a node, and the edges correspond to the conversions between them. This embodiment applies a classic GNN to integrate the neighborhood relationships in the global item graph and obtain the corresponding item representation and session representation respectively. And because the feature transformation matrix and nonlinear function are trivial, this embodiment removes them from the network layer. In this way, through the layer network propagation, the item representation x of the global item graph is obtained. g .
[0105] Then, the position corresponding to the intra-session order is embedded in x p The x obtained by the above process g Mapping to a new embedding space through a feature transformation operation. The feature transformation operation step includes: using a weight matrix to multiply the current embedding to achieve the effect of changing the dimension of the current embedding. Based on the above steps, an attention mechanism (which is a data processing method in machine learning for learning a comprehensive representation of a set of representations) is combined to comprehensively represent the single session embedding z of the global item graph. g .
[0106] Unlike the global item graph, in the local session graph, this embodiment uses sessions as nodes and utilizes a set of short-term time information of the current session. The local session graph describes the relationship between items from the perspective of the local session. Similar to the global item graph, the items are convolved with the session representation through GNN. It is worth noting that the session representation of this embodiment is not an independent embedding, but is represented by the embedding of all items in each session. The local capture unit uses an average operation on the initialized item representation to represent a specific session embedding. After layer graph convolution, the item representation x of the local session graph is obtained. l The subsequent operation is the same as that of the global item graph to obtain the single session embedding z of the local session graph. l .
[0107] In order to ensure the consistency of learning between the global item graph and the local session graph, the correction unit adopts a self-supervised learning method. Specifically, the item conversion dependency module obtains different session representations, denoted as z g and z l , which capture different levels of sequential information embedded in the original session data. In the self-supervised scheme of this embodiment, representations from the same session are considered positive samples, while representations from different sessions are considered negative samples. By aligning mutually positive representations, the session embedding is fine-tuned to consistently capture two levels of information in the embedding space. Compared with previous methods that directly fuse different representations, this embodiment achieves a more balanced integration of different information and smoothly mixes the features of each representation. The specific formula is shown in Equation (10):
[0108]
[0109] Where sim is the cosine similarity; τ represents the temperature coefficient, which is used to control the effect of self-supervision; z g,s and z l,s Represent the global item graph and local item graph of the current session s respectively; z g,u and z l,u They represent the global item graph and local item graph of other sessions u respectively; exp is the natural exponential function; is the calculated loss function; S represents the total number of sessions.
[0110] S2. Capturing semantic information embedded in the original item sequence.
[0111] This step is a parallel step of S1. Unlike S1, which constructs a global item graph and a local session graph from the perspective of time conversion, S2 constructs an interaction graph from the perspective of the co-occurrence of sessions and items, thereby capturing semantic dependency information.
[0112] In order to effectively capture the semantic information embedded in the original item sequence, this embodiment designs a semantic dependency module to perform an additional training task. In traditional recommendation systems, a co-occurrence matrix represented by a bipartite graph is usually used to capture the long-term static dependency between users and items. However, in SBR, the focus is mainly on the item conversion relationship, and the semantic information generated by the co-existence of items in different sessions is usually ignored. To address this limitation, this embodiment introduces a co-occurrence matrix into the SBR framework, which enables the exploration of co-occurrence information preferences. Specifically, the goal of the semantic dependency module is to learn the co-occurrence relationship between sessions and items to effectively utilize the existing semantic information.
[0113] In order to fully utilize the collaborative semantic information in the bipartite graph, the semantic capture unit uses a specific graph encoder to extract node representations. In this embodiment, due to its effectiveness and simplicity, the semantic capture unit uses LightGCN as the basic structure of the encoder. The semantic dependency module uses the message propagation strategy of LightGCN to extract information node features through graph convolution. The initial embedding P of the semantic dependency module is c Get its final embedding representation H c It should be noted that due to the characteristics of bipartite graph convolution, P c and H c They are all obtained by connecting the session representation and the item representation, for example: P c =[z c ||x c ],z c represents a single session representation in the semantic dependency module, x c Represents a single item in a semantic dependency module, and || represents a connection operation.
[0114] It's important to note that user IDs are agnostic in session-based recommendations. Furthermore, in SBR, the number of sessions is typically much larger than the number of items, leading to significant sparsity. Furthermore, the increasing number of sessions increases the size of the graph, posing challenges in terms of training overhead. To alleviate this issue, the optimization unit utilizes a self-supervisory signal between node representations through contrastive learning, addressing both sparsity and training scalability.
[0115] Afterwards, this embodiment also applies view enhancement to the interaction graph. Specifically, this embodiment constructs an augmented view by random edge discarding technology, which is represented as G' c and G” c In this process, this embodiment randomly masks the interaction between sessions and items with probability, so that in Figure G cThese interactive masks effectively generate an enhanced view of the bipartite graph, providing additional perspectives and enhancing the robustness of the model. The specific process is shown in Formula 11:
[0116]
[0117] Among them, the graph convolution process of GraphEncoder is consistent with that of the semantic capture unit; c represents the input embedding representation of the bipartite graph, and Both represent the augmented views obtained above.
[0118] Based on the final node representation of the two enhanced views, they are regarded as positive samples and self-supervised learning is performed. The specific process is shown in Formula 12:
[0119]
[0120] Among them, sim is the cosine similarity; τ represents the temperature coefficient, which is used to control the effect of self-supervision; H′ c,s and H″ c,s are the augmented view of the current session s Figure 1 and augmented vision Figure 2 The representation of H′ c,u and H″ c,u It is the augmented view of other conversations u Figure 1 and augmented vision Figure 2 , exp is the natural exponential function, is the calculated loss function; S represents the total number of sessions.
[0121] S3. Perform cross-fusion training on transformation dependencies and semantic information to obtain a recommendation model.
[0122] Through the network layer built by the first two modules, temporal information and semantic preferences can be obtained. In order to recognize the key role of semantic information in the item conversion scenario, this embodiment adopts a cross-view mechanism at the end of the model to promote the exchange of semantic preferences. Specifically, the cross-view method is used to integrate the item representation in the semantic dependency module into the embedding of the item dependency module. Considering the huge information gap between the two modules, the use of commonly used multi-task methods will introduce additional noise in the information transfer process and reduce performance. In contrast, the cross-fusion module adopts a cross-view method to facilitate the learning of shared parameters in an iterative manner and integrate common information into other modules.
[0123] Specifically, the item representations of the item conversion dependency module and the semantic dependency module are shared and exchanged by cross views during the graph convolution process. The input of the interactive view is: the item representation x of the global item graph convolution process of the item conversion dependency module g , and the item representation x obtained by separating the embedding during the semantic dependency module graph convolution process c The formula for parameter sharing is as follows:
[0124]
[0125] Where W ll , W rl , W lr , W rr are all feature transformation matrices; l l+1 and r l+1 is the feature vector returned after information exchange; and It is the item representation of the global item graph convolution process and the item representation obtained by separating and embedding in the semantic dependency module graph convolution process; T represents the transpose of the matrix. It should be noted that the cross-view parameter sharing of this embodiment is performed before the graph convolution process of each layer. Parameter sharing is performed first, and then the features are returned and the graph convolution process of this layer is performed. Therefore, different modules perform selective information fusion and exchange to complete the construction of the recommendation model. The model framework of this embodiment is as follows Figure 2 shown.
[0126] S4. Optimize the recommendation model and use it to recommend items.
[0127] Finally, by calculating the loss function, the gap between the predicted value and the true value is narrowed, making the result more accurate.
[0128] The final item representation x according to the global session graph g and the final session representation z g To calculate the final loss function, first calculate the score by multiplying the item and the session:
[0129]
[0130] Among them, z g is the final session representation; x g,i is the final item representation; T represents the transpose of the matrix; is the result of calculation.
[0131] Afterwards, the debugging module uses a Softmax function to calculate the predicted probability for each item:
[0132]
[0133] in, is the result obtained from the above formula; Softmax is an activation function; is the predicted probability obtained.
[0134] At the same time, the cross entropy loss function is used to calculate the loss of the item transfer dependency module:
[0135]
[0136] Among them, y g,i is a one-hot encoded vector of the ground truth, used to represent the real sample; is the predicted probability obtained from the above formula; m is the number of items; is the loss function for computing. For the session and item representations of the previously learned semantic dependency module, the loss function is defined as:
[0137]
[0138] Among them, Z c and X c are the session and item representations of the bipartite graph; I s Represents the item set of the current session s; and are the scores of items that belong to the current session s and the scores of items that do not belong to the current session s, respectively.
[0139] To better utilize temporal and semantic information, the debugging module uses multi-task learning to train both. Specifically, it alternately trains the semantic dependency module and the item conversion dependency module:
[0140]
[0141] in, are the loss functions obtained previously; μ1 and μ2 are hyperparameters, which are pre-set values that control the weights of different loss functions.
[0142] The loss function here is to train the model. In fact, the system predicts the probability of all items. Sort by size and select the most likely top K recommended items (K is the required number of recommendations) as the system's recommendation results.
[0143] The embodiments described above are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by persons skilled in the art should fall within the scope of protection defined by the claims of the present invention.
Claims
1. A conversational recommendation system that integrates temporal and semantic dependencies, characterized by: include: Item conversion dependency module, semantic dependency module, cross-fusion module and debugging module; The item conversion dependency module is connected to the cross-fusion module, and the item conversion dependency module is used to capture the conversion dependency relationship of items; The semantic dependency module is connected to the cross-fusion module, and is used to capture semantic information embedded in the original item sequence; the semantic dependency module includes: a semantic capture unit and an optimization unit; The semantic capture unit is connected to the optimization unit, and the semantic capture unit captures semantic dependency information by constructing an interaction graph from the perspective of co-occurrence of conversations and items; The optimization unit alleviates the sparsity of the interaction graph by adopting a view enhancement method, which includes the following steps: the optimization unit applies view enhancement to the interaction graph and constructs an augmented view by random edge discarding technology, which is expressed as and ; randomly mask the interaction between sessions and items with probability, so that Middle mask edge: Among them, the graph convolution process of GraphEncoder is consistent with that of the semantic capture unit; represents the input embedding representation of the bipartite graph, and Both represent the augmented views obtained above; Based on the final node representations of the two enhanced views, the optimization units regard each other as positive samples and perform self-supervised learning: Among them, sim is cosine similarity; Represents the temperature coefficient, which is used to control the effect of self-supervision; and are the representations of augmented view 1 and augmented view 2 of the current session s, respectively. and is the representation of augmented view 1 and augmented view 2 of other sessions u, exp is the natural exponential function, is the calculated loss function; S represents the total number of sessions; The cross-fusion module is used to perform cross-fusion training on the transformation dependency and semantic information to obtain a recommendation model; The debugging module is connected to the cross-fusion module, and the debugging module is used to reduce the error of the recommendation model.
2. The conversational recommendation system integrating temporal and semantic dependencies according to claim 1, characterized in that: The item conversion dependency module includes: a global capture unit, a local capture unit and a correction unit; The global capture unit is connected to the correction unit, and the global capture unit captures the item order conversion of items at the global level by constructing a global item graph; The local capturing unit is connected to the correction unit, and the local capturing unit captures the item order transformation of items at the local level by constructing a local item graph; The correction unit is used to integrate the global item graph and the local item graph to complete the capture of the conversion dependency relationship of the items.
3. The conversational recommendation system integrating temporal and semantic dependencies according to claim 2, characterized in that: The method for the correction unit to integrate the global item graph and the local item graph includes: Where sim is the cosine similarity; Represents the temperature coefficient, which is used to control the effect of self-supervision; and Represent the global item graph and local item graph of the current session s respectively; and They represent the global item graph and local item graph of other sessions u respectively; exp is the natural exponential function; is the calculated loss function; S represents the total number of sessions.
4. The conversational recommendation system integrating temporal and semantic dependencies according to claim 1, characterized in that: The workflow of the cross-fusion module includes: using a cross-view mechanism to promote the exchange of semantic preferences, integrating the item representations in the semantic dependency module into the embedding of the item conversion dependency module by using a cross-view method; the item representations of the item conversion dependency module and the semantic dependency module are shared parameters and exchanged information by cross-view during the graph convolution process; the input of the cross-view is: the item representation x in the global item graph convolution process of the item conversion dependency module g , and the item representation x obtained by separating the embedding during the semantic dependency module graph convolution process c , the parameter sharing formula is as follows: Among them, W ll , W rl , W lr , W rr are all feature transformation matrices; l l+1 and r l+1 is the feature vector returned after information exchange; and It is the item representation of the global item graph convolution process and the item representation obtained by separating and embedding in the semantic dependency module graph convolution process; T represents the transpose of the matrix; Cross-view parameter sharing is performed before the graph convolution process of each layer. Parameter sharing is performed first, and then the features are returned and the graph convolution process is performed.
5. The conversational recommendation system integrating temporal and semantic dependencies according to claim 2, characterized in that: The workflow of the debugging module includes: calculating a final loss function based on the final item representation and the final session representation of the global session graph, and optimizing the recommendation model by reducing the output of the loss function.
6. A conversational recommendation method integrating temporal and semantic dependencies, said method being applied to the system according to any one of claims 1 to 5, characterized in that: include: Capturing transformation dependencies of items; Capturing semantic information embedded in the original item sequence; Performing cross-fusion training on the transformation dependency and the semantic information to obtain a recommendation model; Optimize the recommendation model and use the recommendation model to recommend items.
7. The conversational recommendation method integrating temporal and semantic dependencies according to claim 6, characterized in that: The method of capturing the transformation dependency of an item includes: By constructing a global item graph, we can capture the order transformation of items at the global level. By constructing a local item graph, we can capture the item order transformation at the local level. The global item graph and the local item graph are integrated to complete the capture of the transformation dependency relationship of the items.
8. The conversational recommendation method integrating temporal and semantic dependencies according to claim 7, characterized in that: The method of integrating the global item graph and the local item graph includes: Where sim is the cosine similarity; Represents the temperature coefficient, which is used to control the effect of self-supervision; and Represent the global item graph and local item graph of the current session s respectively; and They represent the global item graph and local item graph of other sessions u respectively; exp is the natural exponential function; is the calculated loss function; S represents the total number of sessions.
Citation Information
Patent Citations
Context awareness graph neural network-based session item recommendation method
CN115292585A
Graph neural network session recommendation method fusing correlation information
CN115510335A