Task-based dialogue model based on dual perception representation and hierarchical interactive memory network

Through the task-based dialogue model of dual perception representation and hierarchical interactive memory network, the problems of user demand tracking and dynamic processing of knowledge base in task-based dialogue systems are solved, and more accurate response generation is achieved.

CN115168549BActive Publication Date: 2025-09-23TIANJIN UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210343005.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-02
Publication Date
2025-09-23
Estimated Expiration
2042-04-02

AI Technical Summary

Technical Problem

Existing task-based dialogue systems find it difficult to effectively track and capture users' latest needs, and ignore dialogue information that is highly relevant to current needs. In addition, the original memory network lacks hierarchical interaction capabilities and has difficulty dynamically processing knowledge base information, resulting in inaccurate responses.

Method used

A task-based dialogue model based on dual perception representation and hierarchical interactive memory network is adopted. By integrating static demand perception representation and dynamic knowledge perception representation, combined with hierarchical interactive memory network, the interaction of memory content at hop-level and layer-level is enhanced, and relevant information is dynamically extracted from the knowledge base.

Benefits of technology

The accuracy and consistency of the dialogue system in generating responses have been improved, and it can better capture the user's latest needs and integrate knowledge base information to generate more appropriate responses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115168549B_ABST
    Figure CN115168549B_ABST
Patent Text Reader

Abstract

The present invention discloses a task-based dialogue system based on dual-perception representation and hierarchical interactive memory network. This system uses an end-to-end approach to capture dual-perception representation and utilizes a designed hierarchical interactive memory network to construct the task-based dialogue system. The system includes a dialogue history and user demand encoding module, a hierarchical interactive memory network module, a perception representation fusion module, and a dynamic memory decoding module. Static demand-perception representation and dynamic knowledge-perception representation serve as dual-perception representations. Static demand-perception representation can better capture the user's latest demand information, while dynamic knowledge-perception representation can integrate current and past knowledge base information to obtain knowledge information related to the current demand. The hierarchical interactive memory network can enhance the interaction of memory content at the hop-level and layer-level, thereby enhancing the knowledge representation capability. This allows the model to more accurately extract relevant knowledge information from an external knowledge base to generate more accurate and appropriate responses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of task-based dialogue, and in particular relates to a task-based dialogue system based on dual perceptual representation and hierarchical interactive memory network. Background Art

[0002] In recent years, due to the explosive growth of data and the improvement of computing power, deep learning has made amazing breakthroughs. Natural language processing, as an important research direction in artificial intelligence, has also made breakthrough progress in various application fields under the successful application of deep learning. Intelligent dialogue systems, in various forms, are increasingly attracting people's attention. The successful emergence of human-computer dialogue has greatly promoted the development of task-based dialogue systems. Task-based dialogue systems are different from chat-type dialogue systems. They aim to understand user needs and intelligently help users complete specific tasks in specific application scenarios (such as restaurant reservations, hotel reservations, and schedule arrangements) within a limited number of dialogue rounds. From the perspective of implementation methods, task-based dialogue systems can be divided into pipeline methods and end-to-end methods:

[0003] The pipeline method is a relatively traditional method for task-based dialogue systems. It mainly includes four key modules: natural language understanding, dialogue state tracking, dialogue strategy learning, and natural language generation. However, there are two major problems with traditional task-based dialogue systems based on the pipeline method: first, it is difficult for the user's final feedback to be passed to the previous module; second, there is the interdependence between each module. The input of each module depends on the output of the previous module. If the user's intention is not accurately recognized in natural language understanding, the subsequent process will deviate from the ultimate goal. Moreover, when involving new fields, all modules need to be updated, and the pre-defined semantic slots will also be changed[1].

[0004] Therefore, in recent years, end-to-end generative models have begun to be proposed. The use of end-to-end methods can reduce the workload of manual labeling. Many researchers are also trying to build an end-to-end trainable framework for task-based dialogue systems. In 2014, the Google team first proposed the sequence-to-sequence model (Sequence-to-Sequence, Seq2Seq) [2], which achieved end-to-end training. Subsequently, Bahdanau et al. added the attention mechanism (Attention) [3] based on the Seq2Seq model, which effectively solved the problem of long sequence dependency. Many models of task-based dialogue systems are also improved on the basis of these two models. For example, Eric et al. proposed the Key-Value Retrieval Networks (KV Retrieval Net) [4], which adds an attention mechanism to the external knowledge base (KBs) when generating responses; Madotto et al. used the End-to-End Memory Network (MemNN) [5] as the encoder and decoder of the dialogue system and proposed a memory-to-sequence model [6]; Wu et al. proposed a global and local memory pointer to enhance the model's replication capability, making the model more effective in including knowledge base information [7]; Qin et al. used a shared-private network to enable the task-based dialogue model to learn common and special knowledge between different domains in multi-domain scenarios [8]; He et al. encode knowledge information by considering the intrinsic structural information of the knowledge graph and the latent semantic information in the dialogue history [9].

[0005] Although some of the end-to-end methods mentioned above have achieved very good results, they still have some problems: (1) In task-based dialogues, user needs are always changing, and the latest needs represent the information that users currently expect the system to respond to. Therefore, it is very important for the dialogue system to track and capture the user's latest needs. However, current models tend to encode all dialogue history information into a fixed hidden representation. This encoding method ignores the attention to the user's latest needs, resulting in the neglect of dialogue information that is highly relevant to the current needs, and also introduces more noise to the current encoding. Due to the neglect of such dialogue information and the introduction of noise, it is difficult for the system to generate appropriate responses; (2) Current dialogue systems usually use memory networks to extract knowledge base (KB) information. However, the memory modules in the original memory network lack the ability to interact at the hierarchical level. In addition, these methods find it difficult to dynamically process KB information from previous query results. Such shortcomings are not conducive to the dialogue system fully learning the representation of knowledge, nor are they conducive to the model maintaining the consistency of responses.

[0006] [References]

[0007] [1] Chen Hong Shen, Liu Xiao Rui, Yin Da Wei, et al. A survey on dialogue systems: recent advances and new frontiers[J]. ACM SIGKDD Explorations Newsletter, 2017, 19(2): 25 - 35.

[0008] [2] Sutskever I, Vinyals O, Le Q V. Sequence to sequence learning with neural networks[C] / / Advances in neural information processing systems. Montreal: NIPS Press, 2014: 3104 - 3112.

[0009] [3] Bahdanau D, Cho K, Bengio Y. Neural machine translation by jointly learning to align and translate[C] / / International Conference on Learning Representations. San Diego: ICLR Press, 2014.

[0010] [4] Eric M, Krishnan L, Charette F, et al. Key - value retrieval networks for task - oriented dialogue[C] / / in Proceedings of the SIGDIAL 2017 Conference. Saarbrücken: ACL Press, 2017: 37 - 49.

[0011] [5] Sukhbaatar S, Weston J, Fergus R, et al. End - to - end memory networks[C] / / Advances in neural information processing systems. Montreal: NIPS Press, 2015: 2440 - 2448.

[0012] [6] Madotto A, Wu Chien-Sheng, Fung P. Mem2Seq: effectively incorporating knowledge bases into end-to-end task-oriented dialog systems[C] / / Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics. Melbourne: ACL Press, 2018: 1468-1478.

[0013] [7] Wu C S, Socher R, Xiong C. Global-to-local memory pointer networks for task-oriented dialogue[J]. arXiv preprint arXiv:1901.04713, 2019.

[0014] [8] Qin L, Xu X, Che W, et al. Dynamic fusion network for multi-domain end-to-end task-oriented dialog[J]. arXiv preprint arXiv:2004.11019, 2020.

[0015] [9] He Z, He Y, Wu Q, et al. Fg2seq: Effectively encoding knowledge for end-to-end task-oriented dialog[C] / / ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2020: 8029-8033. Summary of the Invention

[0016] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a task-based dialogue model based on dual-perception representation and hierarchical interactive memory network, and to train the network model through an end-to-end approach. The present invention utilizes static demand-perception representation and dynamic knowledge-perception representation as dual-perception representation, while better capturing the user's latest demand information, integrating current and past knowledge base information to obtain knowledge information related to the current demand. By designing a hierarchical interactive memory network, the interaction of memory content at the hop-level and layer-level is enhanced, thereby enhancing the ability to represent knowledge, and being able to more accurately extract relevant knowledge information from the external knowledge base to generate more accurate and appropriate responses.

[0017] The purpose of the present invention is achieved through the following technical solutions:

[0018] A task-based dialogue system based on dual perceptual representation and hierarchical interactive memory networks uses an end-to-end approach to construct a task-based dialogue model based on dual perceptual representation and hierarchical interactive memory networks. The model includes a dialogue history and user demand encoding module, a hierarchical interactive memory network module, a perceptual representation fusion module, and a dynamic memory decoding module. The dialogue history and user demand encoding module is used to encode the complete dialogue history and the user's latest utterance.

[0019] The hierarchical interactive memory network module is used to fully learn knowledge representation and is used in the dialogue encoding and decoding stages;

[0020] The perception representation fusion module is used to fuse the static demand perception representation and the dynamic knowledge perception representation into a final unified perception representation. During the fusion process, two trainable scalar weighted sums are used to obtain the final perception representation. This perception representation is used to help the dialogue system complete the response generation in the subsequent dynamic memory decoding module.

[0021] The dynamic memory decoding module is used to dynamically select words from the knowledge base and vocabulary to generate appropriate response feedback to the user.

[0022] Further: The task-based dialogue model is constructed:

[0023] In the dialogue history and user demand encoding module, the inputs are the dialogue history and the user's latest demand, respectively. The dialogue history is encoded by Bi-GRU to obtain a hidden state. The last hidden state is used as the dialogue history representation, which will also serve as the input of the hierarchical interactive memory network module and the dynamic memory decoding module.

[0024] The user's latest demand is encoded using the same Bi-GRU to obtain the corresponding hidden state, which is then enhanced through the Self-Attention mechanism to obtain the demand representation. The Attention mechanism is used to capture the conversation semantic information related to the current user demand to obtain the demand perception representation, which will serve as the input of the perception fusion module.

[0025] In the encoding phase of the hierarchical interactive memory network module, the hierarchical interactive memory network uses the dialogue history representation as a query vector. In the decoding phase, the hierarchical interactive memory network uses the decoded hidden state of each step as a query vector. The query vector is used to interact with the internal memory information and output the corresponding knowledge query results and knowledge perception representation. The dynamic memory unit is combined with the previously obtained knowledge perception representation to obtain the current final knowledge perception representation. The knowledge perception representation will serve as the input of the perception representation fusion module.

[0026] The inputs of the perception representation fusion module are demand perception representation and knowledge perception representation, which are fused to obtain perception representation. This perception representation will be used in the dynamic memory decoding module to help the model generate more appropriate responses.

[0027] The dynamic memory decoding module uses sketchGRU as a decoder. At each step, a new hidden state is generated. This hidden state is used as a query vector for the hierarchical interactive memory network to obtain knowledge base information. At each decoding step, the module generates two distributions: a vocabulary-based distribution and a knowledge base-based distribution.

[0028] The dynamic memory decoding module combines the perception representation, dialogue history representation, and knowledge query results to generate a vocabulary-based distribution, and then uses the attention weight of the last hop of the last layer of the hierarchical interactive memory network to obtain a knowledge base-based distribution. Once the module generates a sketch tag from the vocabulary-based distribution, it will continue to generate the corresponding knowledge entity from the knowledge base-based distribution to achieve dynamic decoding of dialogue responses.

[0029] Furthermore, the conversation history and user demand encoding module includes a conversation history representation, a user demand representation, and a static demand perception representation; the conversation history and user demand encoding module encodes the conversation history information and the user's latest utterance respectively to obtain a conversation history feature representation and a user demand feature representation, and then obtains a static demand perception representation. The conversation history feature representation is used as a query vector for the hierarchical interactive memory network module, and conversation-related knowledge information is queried on an external knowledge base to obtain a dynamic knowledge perception representation. The static demand perception representation and the dynamic knowledge perception representation are then fused, and the fused perception representation and the dynamic memory decoding module are used to generate a final response. The process includes the following steps:

[0030] 101. Use the word embedding matrix to embed the input word into a fixed-dimensional word vector.

[0031] 102. Use Bi-GRU to encode the current complete conversation history to obtain the corresponding hidden state, and use the last hidden state as the final conversation history representation; use the same Bi-GRU to encode the user's latest needs,

[0032] 103. Use the Self-Attention mechanism to focus on the current important demand information to obtain enhanced demand representation; before the dialogue system gives feedback, the user's latest demand information always remains unchanged, and the Attention mechanism is used to capture the final demand perception information.

[0033] Furthermore, the hierarchical interactive memory network module includes hop-level memory interaction, layer-level memory interaction and dynamic knowledge perception representation; wherein:

[0034] The hierarchical memory network module completes horizontal memory interaction at the hop-level; the hierarchical memory network completes vertical memory interaction at the layer-level, and uses a high-speed network with an automatic learning gating mechanism to enable the layer-level hierarchical memory interaction network to learn to dynamically control the information flow according to the current input, so as to control the knowledge information of the same hop in the previous layer to forget irrelevant information and strengthen relevant knowledge information; extract the knowledge base memory content and the corresponding attention weight distribution of the last hop of the last layer to obtain the current knowledge perception representation, and use the dynamic memory gating mechanism to control the flow of knowledge information from the previous decoding moment to the current decoding moment to obtain an updated knowledge perception representation.

[0035] Furthermore, the dynamic memory decoding module is used to dynamically select words from the knowledge base and vocabulary to generate appropriate responses and feedback to the user:

[0036] 201. Combining the user's latest needs and conversation history, a sketch GRU is used to generate a labeled conversation response. The label is not the actual slot value, but a sketch label similar to "@poi";

[0037] 202. The dual perception representation, the dialogue history representation, and the query results of the external knowledge are integrated to initialize the sketch GRU. At the t-th decoding moment, both the vocabulary-based distribution representation and the knowledge base-based distribution representation are generated. Once the sketch label is generated at the decoding moment, the dynamic memory decoding module selects the word with the highest probability from the knowledge base-based distribution representation for output.

[0038] Beneficial effects

[0039] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0040] 1. The present invention proposes static demand-aware representation and dynamic knowledge-aware representation as dual-aware representation. Static demand-aware representation can better capture the user's latest demand information, and dynamic knowledge-aware representation can integrate current and past knowledge base information to obtain knowledge information related to current needs. The dual-aware representation will be integrated in the encoding and decoding stages to generate more appropriate responses.

[0041] 2. This paper proposes a hierarchical interactive memory network, which uses the adaptive gating mechanism of a high-speed network to enhance the original memory network. While ensuring memory interaction at the hop level, it designs memory interaction at the layer level, thereby increasing the amount of information contained in the memory matrix, thereby more fully learning knowledge representation, enhancing the ability to represent knowledge, and being able to more accurately extract relevant knowledge information from external knowledge bases. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a model diagram of the method of the present invention.

[0043] Figure 2 This is a diagram of the hierarchical interactive memory network model in the method of the present invention. DETAILED DESCRIPTION

[0044] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0045] like Figure 1 As shown, the present invention proposes a task-based dialogue system based on dual perceptual representation and hierarchical interactive memory network, which includes a dialogue history and user demand encoding module, a hierarchical interactive memory network module, a perceptual representation fusion module, and a dynamic memory decoding module. The dialogue history and user demand encoding module includes dialogue history representation, user demand representation, and static demand perceptual representation; the hierarchical interactive memory network module includes hop-level memory interaction, layer-level memory interaction, and dynamic knowledge perceptual representation.

[0046] This model is trained in an end-to-end manner. The conversation history and user demand encoding modules encode the historical information of the conversation and the user's latest utterances, respectively, to obtain the conversation history feature representation and user demand feature representation, and then obtain the static demand perception representation. The conversation history feature representation is used as the query vector of the hierarchical interactive memory network module, and the conversation-related knowledge information is queried on the external knowledge base to obtain the dynamic knowledge perception representation. The static demand perception representation and the dynamic knowledge perception representation are then fused, and the fused perception representation and the dynamic memory decoding module are used to generate the final response.

[0047] The conversation history and user demand encoding module encodes the complete conversation history and the user's most recent utterance. First, the input word is embedded into a fixed-dimensional word vector using a word embedding matrix. The Bi-GRU is then used to encode the current complete conversation history to obtain the corresponding hidden state, with the last hidden state serving as the final conversation history representation. The same Bi-GRU is used to encode the user's latest demand, and the Self-Attention mechanism is then used to focus on currently important demand information to obtain an enhanced demand representation. The user's latest demand information remains unchanged until the conversation system provides feedback, and the Attention mechanism is used to capture the final demand perception information.

[0048] The hierarchical interactive memory network module is used to fully learn knowledge representation. The hierarchical memory network completes the horizontal interaction of memory at the hop-level. This process is consistent with the memory interaction process of the original MemNN. These memories are represented by a series of trainable embedding matrices. The hierarchical memory network completes the vertical interaction of memory at the layer-level. It uses a high-speed network with an automatic learning gating mechanism to enable the layer-level memory interaction network to learn to dynamically control the information flow according to the current input, which is used to control the knowledge information of the same hop in the previous layer to forget irrelevant information and strengthen relevant knowledge information. The knowledge base memory content and the corresponding attention weight distribution of the last hop of the last layer are extracted to obtain the current knowledge perception representation. The dynamic memory gating mechanism is used to control the flow of knowledge information from the previous decoding moment to the current decoding moment to obtain the updated knowledge perception representation. Among them:

[0049] 1. Dialogue history and user demand encoding module

[0050] 1.1 Dialogue History Representation

[0051] The dialogue history and user demand encoding module is used to encode the dialogue history and the user's latest demand to obtain a complete dialogue history representation and demand perception representation. First, the word embedding matrix The input word {x1,...,xn} is embedded into a fixed-dimensional word vector, and then Bi-GRU is used to encode the complete conversation history to obtain the corresponding hidden state H D =(h1,...,h n ), the formula is as follows:

[0052] h i =BiGRU(Φ emb (x i ),h i-1 )

[0053] Use h n Represents the conversation history, which will be used in the hierarchical interactive memory network module to query the knowledge base to extract relevant knowledge information.

[0054] 1.2 User Needs Representation

[0055] Use the same Bi-GRU to encode the user's latest demand R to obtain the corresponding hidden state U R =(u1,...,u c ), and then use the Self-Attention mechanism to focus on the current important demand information to obtain the enhanced demand representation e, which is expressed as follows:

[0056]

[0057]

[0058] Where W r ,b r ,v r and b v are all trainable parameters.

[0059] 1.3 Static Demand-Aware Representation

[0060] We use user demand representation and the Attention mechanism to capture demand perception information D from the conversation history. r , the formula is as follows:

[0061] β i =e T h i

[0062]

[0063] 2. Hierarchical Interactive Memory Network Module

[0064] The purpose of the hierarchical interactive memory network module is to enhance the information interaction between memory matrices from both the hop-level and layer-level perspectives. This module works in a bottom-up manner. The dialogue history representation interacts with the corresponding external memory at the hop-level to filter out irrelevant knowledge information. In order to more fully learn the relevant knowledge representation, knowledge information will be further accumulated at the layer-level, such as Figure 2 shown.

[0065] 2.1 Memory Interaction at the Hop-level

[0066] We adopt the original memory network (MemNN) interaction method on the hop-level, that is, the multi-hop attention mechanism to complete the interaction of the hierarchical interactive memory network on the hop-level. i ∈B is represented as a (Subject, Relation, Object) triple and stored in the KB memory block. For the dialogue history, we store the speaker information and sequence dependency information together in the dialogue memory block, and then we query the external knowledge base in the encoding module and decoding module.

[0067] The memory blocks in the Hierarchical Interactive Memory Network (HIMN) are represented by a series of trainable embedding matrices C = {C l ,1 ,...,C l,K+1}, where K is the total number of hops for each layer, C l,K+1 Represents the memory block of the last hop at layer l. HIMN writes the dialogue history X and the knowledge base B into their respective memory blocks, and then uses the encoded dialogue history to represent h n As the initial query vector, q l,0 =h n , the query vector is used to cyclically read the relevant memory, and for each memory i, the attention weight on k hops is calculated as follows:

[0068]

[0069] in is to use the embedding matrix C l,k In addition, we use the global-local memory pointer mechanism to store the memory content at the i-th position. l,k As a global memory pointer G={g1,...,g n+f} is used to filter out the external memories related to the query vector. Finally, by l,k+1 The weighted sum on the read memory o is obtained l,k, and in the kth hop, the query vector q l,k+1 To update, the specific formula is as follows:

[0070]

[0071] q l,k+1 =q l,k +o l,k

[0072] 2.2 Layer-level memory interaction

[0073] Assuming that the HIMN has L layers, we use the output of the l-1th layer to initialize the query vector q of the lth layer l,0 To enhance the interaction of memory between different layers, the formula is as follows:

[0074] q l,0 =Relu(W l q l-1,K +b l ),l∈[2,L]

[0075] T l,k It is considered as an adaptive gating to manage the knowledge information of the previous layer under the same hop count, so as to help the network forget the information that does not need to be paid attention to and strengthen the information that needs to be paid attention to. The formula is as follows:

[0076]

[0077] q l,k =q l-1,k ⊙T l,k +q l,k ⊙(1-T l,k )

[0078] in and is the trainable parameter for the k-th hop l-th layer. In the actual network, we use a global approach to limit some parameters, namely the weight matrix and the bias vector It is shared between different layers but independent between different hops. The formula is as follows:

[0079]

[0080]

[0081] This approach is also used in the memory matrix C, which not only reduces the parameters of the network but also enables the model to have stronger generalization capabilities.

[0082] 2.3 Knowledge-Aware Representation

[0083] We extract the knowledge-aware representation D from the KB memory block of the last hop in the last layer and the corresponding attention weight distribution kb , the knowledge perception representation is related to the current conversation content. In the encoding phase, the knowledge perception representation is calculated using the following formula:

[0084]

[0085] Then, we use the dynamic memory gating mechanism to update the knowledge perception representation during decoding. At the t-th decoding step, the knowledge perception representation is updated using the gate V, which is expressed as follows:

[0086]

[0087]

[0088] in and Both are trainable parameters. The gate V is used to control how much knowledge information from the knowledge-aware representation of the previous decoding step should be carried into the current knowledge-aware representation, while discarding knowledge information that is useless for the current decoding step, thereby selecting more relevant and useful knowledge.

[0089] 3. Perception Representation Fusion Module

[0090] We will integrate the static demand-aware representation D in this module r and dynamic knowledge-aware representation The two perceptual representations are weighted and summed using two trainable scalar weights to obtain the final perceptual representation, which is expressed as follows:

[0091]

[0092] 4. Dynamic memory decoding module

[0093] Sketch GRU is used in the dynamic memory decoding module to generate dialogue responses with sketch labels. The label is not the actual slot value, but a sketch label similar to "@poi". For example, Sketch GRU will generate "@poiis@distanceaway" instead of directly generating "Starbucks is 1 mileaway". We also use perceptual representation Dialogue history representation h n And the query results of external knowledge q L,K+1 To initialize the sketch GRU, the formula is as follows:

[0094]

[0095]

[0096] in is a trainable parameter, and [,] represents a vector addition operation.

[0097] At the tth decoding moment, the dynamic memory decoder will generate two distribution representations, namely the distribution representation P based on the vocabulary t vocab and the knowledge base-based distribution representation P t ptr First, the hidden state s t Use the global memory pointer to query external knowledge, and then represent P based on the distribution of knowledge base t ptr The attention weight of the last hop of the last layer of the hierarchical interactive memory network is obtained, and the formula is as follows:

[0098]

[0099]

[0100] Once the sketch representation is generated at time t, we will get the distribution representation P from the knowledge base t ptr The word with the highest probability is selected for output.

[0101] In addition, the additive attention mechanism is also applied to this module to help the module decide which information in the dialogue history is helpful for the current decoding step, and finally represent the distribution of the vocabulary P t vocab It is obtained by the following formula:

[0102]

[0103] Where W2 represents the trainable parameters, [;] represents the vector concatenation operation, and c t Represents the conversation history vector with attention.

[0104] During the training phase, we train all parameters in the model by minimizing the weighted sum of two standard cross entropy losses and a binary cross entropy.

[0105] This embodiment uses two datasets as experimental materials. These datasets are widely used in related research, namely: the In-Car Assistant dataset and the CamRest dataset. The In-Car Assistant dataset is a human-to-human dialogue dataset covering multiple fields. The dataset contains a total of 3031 multi-round dialogue samples, with an average of 2.6 rounds for each dialogue sample, covering three fields: scheduling, weather information query, and navigation. The CamRest dataset is a human-to-human multi-round dialogue dataset containing 676 dialogue samples. This dataset only covers the field of restaurant ordering, with an average of 5.1 rounds for each dialogue sample. Specific information related to the dataset is shown in Table 1. For model training, the two datasets are divided into training set, validation set, and test set, respectively.

[0106] Table 1 Dataset information statistics

[0107]

[0108] In this paper, BLEU and Entity F1 indicators are used for evaluation, where Entity F1 adopts the microF1 calculation method. The detailed hyperparameter settings of the model on these two datasets are shown in Table 2.

[0109] Table 2 Hyperparameter settings

[0110]

[0111] Tables 3 and 4 show the comparison results between the proposed model and some baseline models on the In-Car Assistant dataset and CamRest dataset, respectively. The BLEU and Entity F1 evaluation results show that the proposed model achieves good results compared with other baseline models on both multi-domain and single-domain datasets, showing a certain improvement.

[0112] Table 3 Evaluation results based on the In-Car Assistant dataset

[0113]

[0114] Table 4 Evaluation results based on CamRest dataset

[0115]

[0116] In summary, the advantages of the present invention are mainly as follows:

[0117] By using static demand-aware representation and dynamic knowledge-aware representation as dual-aware representation, we can better capture the user's latest demand information while integrating current and past knowledge base information to obtain knowledge information related to current needs. By designing a hierarchical interactive memory network, we enhance the interaction of memory content at the hop-level and layer-level, thereby enhancing the knowledge representation ability and being able to more accurately extract relevant knowledge information from the external knowledge base to generate more accurate and appropriate responses.

[0118] The present invention is not limited to the embodiments described above. The above description of the specific embodiments is intended to describe and illustrate the technical solutions of the present invention. The above specific embodiments are merely illustrative and not restrictive. Without departing from the scope of the present invention and the scope of protection of the claims, those skilled in the art may make various specific modifications based on the teachings of the present invention, all of which fall within the scope of protection of the present invention.

Claims

1. A task-based dialogue system based on dual-perception representation and hierarchical interactive memory network, characterized by: The system uses an end-to-end approach to construct a task-based dialogue model based on dual perceptual representation and hierarchical interactive memory network; the model includes a dialogue history and user demand encoding module, a hierarchical interactive memory network module, a perceptual representation fusion module, and a dynamic memory decoding module; wherein: The dialogue history and user demand encoding module is used to encode the complete dialogue history and the user's latest speech; The hierarchical interactive memory network module is used to fully learn knowledge representation and is used in the dialogue encoding and decoding stages; The perception representation fusion module is used to fuse the static demand perception representation and the dynamic knowledge perception representation into a final unified perception representation. During the fusion process, two trainable scalar weighted sums are used to obtain the final perception representation. This perception representation is used to help the dialogue system complete the response generation in the subsequent dynamic memory decoding module. The dynamic memory decoding module is used to dynamically select words from the knowledge base and vocabulary to generate appropriate responses and feedback to the user; wherein: In the dialogue history and user demand encoding module, the inputs are the dialogue history and the user's latest demand, respectively. The dialogue history is encoded by Bi-GRU to obtain a hidden state. The last hidden state is used as the dialogue history representation, which will also serve as the input of the hierarchical interactive memory network module and the dynamic memory decoding module. The user's latest demand is encoded using the same Bi-GRU to obtain the corresponding hidden state, which is then enhanced through the Self-Attention mechanism to obtain the enhanced user demand representation. The Attention mechanism is used to capture the conversation semantic information related to the current user demand to obtain the demand perception representation, which will serve as the input of the perception fusion module. In the encoding phase of the hierarchical interactive memory network module, the hierarchical interactive memory network uses the dialogue history representation as a query vector. In the decoding phase, the hierarchical interactive memory network uses the decoded hidden state of each step as a query vector. The query vector is used to interact with the internal memory information and output the corresponding knowledge query results and knowledge perception representation. The dynamic memory unit is combined with the previously obtained knowledge perception representation to obtain the current final knowledge perception representation. The knowledge perception representation will serve as the input of the perception representation fusion module. The inputs of the perception representation fusion module are demand perception representation and knowledge perception representation, which are fused to obtain perception representation. This perception representation will be used in the dynamic memory decoding module to help the model generate more appropriate responses. The dynamic memory decoding module uses sketchGRU as a decoder. At each step, a new hidden state is generated. This hidden state is used as a query vector for the hierarchical interactive memory network to obtain knowledge base information. At each decoding step, the module generates two distributions: a vocabulary-based distribution and a knowledge base-based distribution. The dynamic memory decoding module combines the perception representation, dialogue history representation, and knowledge query results to generate a vocabulary-based distribution, and then uses the attention weight of the last hop of the last layer of the hierarchical interactive memory network to obtain a knowledge base-based distribution. Once the module generates a sketch tag from the vocabulary-based distribution, it will continue to generate the corresponding knowledge entity from the knowledge base-based distribution to achieve dynamic decoding of dialogue responses.

2. The task-based dialogue system based on dual perceptual representation and hierarchical interactive memory network according to claim 1 is characterized in that: The conversation history and user demand encoding module includes a conversation history representation, a user demand representation, and a static demand perception representation. The conversation history and user demand encoding module encodes the conversation history information and the user's latest utterance respectively to obtain a conversation history representation and a user demand representation, and then obtains a static demand perception representation. The conversation history representation is used as a query vector for the hierarchical interactive memory network module, and conversation-related knowledge information is queried on an external knowledge base to obtain a dynamic knowledge perception representation. The static demand perception representation and the dynamic knowledge perception representation are then fused, and the fused perception representation and the dynamic memory decoding module are used to generate a final response. The steps include: 101 uses the word embedding matrix to embed the input word into a fixed-dimensional word vector. 102 Use Bi-GRU to encode the current complete conversation history to obtain the corresponding hidden state, and use the last hidden state as the final conversation history representation; use the same Bi-GRU to encode the user's latest needs, 103 uses the Self-Attention mechanism to focus on the current important demand information to obtain enhanced demand representation; before the dialogue system gives feedback, the user's latest demand information always remains unchanged, and the Attention mechanism is used to capture the final demand perception information.

3. The task-based dialogue system based on dual perceptual representation and hierarchical interactive memory network according to claim 1 is characterized in that: The hierarchical interactive memory network module includes hop-level memory interaction, layer-level memory interaction and dynamic knowledge perception representation; wherein: The hierarchical memory network module completes horizontal memory interaction at the hop-level; the hierarchical memory network completes vertical memory interaction at the layer-level, and uses a high-speed network with an automatic learning gating mechanism to enable the layer-level memory interaction network to learn to dynamically control the information flow according to the current input, so as to control the knowledge information of the same hop in the previous layer to forget irrelevant information and strengthen relevant knowledge information; extract the knowledge base memory content of the last hop of the last layer and the corresponding attention weight distribution to obtain the current knowledge perception representation, and use the dynamic memory gating mechanism to control the flow of knowledge information from the previous decoding moment to the current decoding moment to obtain an updated knowledge perception representation.

4. The task-based dialogue system based on dual perceptual representation and hierarchical interactive memory network according to claim 1 is characterized in that: The dynamic memory decoding module is used to dynamically select words from the knowledge base and vocabulary to generate appropriate responses and feedback to the user: 201 Combining the user's latest needs and conversation history, a sketch GRU is used to generate labeled conversation responses. The label is not the actual slot value, but a sketch label similar to "@poi"; 202 The dual perception representation, dialogue history representation and external knowledge query results are integrated to initialize the sketch GRU; At each decoding moment, both the vocabulary-based distribution representation and the knowledge base-based distribution representation are generated. Once the sketch tag is generated at the decoding moment, the dynamic memory decoding module selects the word with the highest probability from the knowledge base-based distribution representation for output.

Citation Information

Patent Citations

  • Semantic and knowledge enhanced end-to-end task type dialogue system and semantic and knowledge enhanced end-to-end task type dialogue method

    CN111462750A

  • Generative dialogue method based on context information reasoning

    CN113656569A