A jensen-shannon divergence based dialogue state tracking method
By processing noisy samples using a method based on Jensen-Shannon divergence, the dialogue state tracking model is optimized, which solves the problem of limited model performance in noisy environments and improves dialogue quality. This method is particularly suitable for mobile phones and voice assistants.
Patent Information
- Application Number
- CN202310360585.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-03
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-04-03
AI Technical Summary
Existing dialogue state tracking models struggle to fit downstream task data in noisy environments, limiting model performance and impacting dialogue quality.
We employ a method based on Jensen-Shannon divergence to process noisy samples. We use JS divergence to measure whether a sample is noise, dynamically adjust the threshold for judging noisy samples, and optimize the fitting and generalization ability of the dialogue state tracking model.
It improves the accuracy of dialogue state tracking in noisy environments, enhances dialogue quality, and is suitable for applications with high noise levels in real-world scenarios, such as mobile phones and voice assistants.
Smart Images

Figure CN116431786B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence natural language processing, in particular to the field of dialogue state tracking, and specifically to a dialogue state tracking method based on Jensen-Shannon divergence. BACKGROUND
[0002] With the rapid development of artificial intelligence related technologies, people's life has brought many conveniences. The human-computer dialogue system is a new type of interactive way for people to communicate with machines, which has attracted widespread attention and research in the academic and industrial circles. Its goal is to imitate the dialogue mode between humans to the greatest extent and to realize human-computer interaction more naturally to achieve daily communication or complete a specific task in a specific scenario. In recent years, the human-computer dialogue system has made great progress and has gradually become the core competitiveness of various enterprises. Dialogue state tracking is a very important module in the dialogue system. Its goal is to monitor the user's goals and requests hidden in the dialogue history and represent them as a dialogue state composed of a series of (domain, slot, slot value) triplets to provide decision-making basis for dialogue decision-making, and its correctness affects the performance of the entire dialogue system. Therefore, for the realization of high-quality human-computer dialogue system, the research of dialogue state tracking is of great significance.
[0003] Most of the latest DST models are deep neural network models based on pre-training encoders, which need a large amount of data for training when optimizing for specific tasks. However, due to the complexity of real-world dialogues and the difficulty of corpus annotation, such data sets often have a lot of noise. For example, the most widely used DST model in research is the MultiWOZ data set. According to relevant papers, there are about 40% of the MultiWOZ2.0 data set with annotation errors; and the MultiWOZ2.1 data set updated on this basis also has more than 30% of the errors. The noise problem has a great impact on the training and optimization of the DST model. SUMMARY
[0004] The present application proposes a dialogue state tracking method based on Jensen-Shannon divergence, which is based on Jensen-Shannon divergence and used for training dialogue state tracking model in noisy environment. This method can effectively solve the problem that it is difficult to fit downstream task data when training DST model in real noisy environment, further optimize the performance of DST model, and provide new ideas for subsequent engineering applications.
[0005] To solve the above technical problems, the technical scheme of the present application is as follows:
[0006] A dialogue state tracking method based on Jensen-Shannon divergence, comprising the following steps:
[0007] S1, collect task-oriented dialogue data sets in different fields, the task-oriented dialogue data sets including historical and current dialogue, historical and current state, slot information, and corresponding original labels;
[0008] S2, construct a dialogue state tracking model, the dialogue state tracking model including an encoding module and a dialogue state decision module;
[0009] S3, the encoding module encodes the semantic information of the historical and current dialogue, the current state and the slot information in the task-oriented dialogue data set;
[0010] S4, input the encoded semantic information into the dialogue state decision module to generate a target probability distribution;
[0011] S5, use JS divergence (Jensen-Shannon divergence) as an index to measure whether a sample belongs to a noise sample;
[0012] S6, for non-noise samples, keep their original labels, for noise samples, select the target with the maximum probability value as the new label according to the target probability distribution obtained in S4, and use the new label for training;
[0013] S7, dynamically adjust the noise sample judgment threshold to adapt to the constantly enhanced dialogue state tracking model during the training process until the dialogue state tracking model is fitted.
[0014] As a preferred, in the step S2, the encoding module adopts an encoder based on a pre-trained language model.
[0015] As a preferred, the pre-trained language model is a pre-trained Bert model.
[0016] As a preferred, the method of semantic encoding by the pre-trained Bert model is: Xi={CLS, D t , S t-1 , U t-1 , SEP, S t , U t , [SLOT], hotel, name, …, none, [SLOT], …}
[0017] As an input of the encoder, wherein CLS, SEP, SLOT are special marks in BERT, D t is the current state, S t-1 and U t-1 are historical dialogue, S t and U t are current dialogue, and the SLOT mark part is slot information. The input is encoded by the pre-trained BERT model to obtain the encoded output semantic information:
[0018] H i =BERT(X i )。
[0019] As preferred, the dialogue state decision module is a two-stage classification model, which firstly takes the user, system dialogue and the last round dialogue state as input to obtain the first-stage classification result {None, Donotcare, Other}. The second-stage classification predicts a value for the slot whose first-stage output is "Other". At the same time, a contrast loss is introduced to optimize the generalization ability of the model.
[0020] As preferred, the target probability distribution refers to the probability distribution of each category in the two-stage classification.
[0021] As preferred, the method for the two-stage classification model to generate the target probability distribution is:
[0022] S4-1, the output of each SLOT label part in step two is subjected to a first-stage classifier to obtain the first-stage classification result:
[0023] P1∈{None,Donotcare,Other}
[0024] Wherein, P1 is a three-class probability distribution, and in addition to the cross-entropy loss, the first-stage classifier also adds a contrast loss;
[0025] S4-2, if the first-stage classification result max(p)=Other, the second-stage classification is performed to obtain the specific slot value belonging to each slot. Correspondingly, the second-stage classification also has a probability distribution P2, and the dimension is the number of slot values.
[0026] As preferred, in step S5, the JS divergence is used to measure the similarity between two distributions, and the value is between 0 and 1. The specific method is: the two target probability distributions generated in step S4 are respectively calculated with the original label in the data set to calculate the JS divergence, and the calculation result represents the distribution difference. The larger one is considered as a noise sample.
[0027] As preferred, in step S7, the threshold value is used to judge the intermediate value of the noise sample and the non-noise sample, and the threshold value will gradually increase with the training process.
[0028] The present application has the following characteristics and beneficial effects:
[0029] The technical solution of the present application integrates the processing strategy for noise samples into the dialogue state tracking task, and optimizes the fitting generalization ability of the model for the problem of real noisy data. Previously, in the dialogue state tracking task, the performance of the model was limited by the noise in the real data, because the real data contains a large amount of noise, voice cross and other factors, which makes it difficult for the model to correctly track the dialogue state, thereby affecting the quality of the dialogue.
[0030] To solve this technical defect, the present application proposes a new technical solution, which integrates the processing strategy for noise samples into the dialogue state tracking task, so that the model can better process the noise data existing in reality, improve the fitting generalization ability of the model, and thus more accurately track the dialogue state and improve the dialogue quality.
[0031] At the same time, the technical solution proposed by the present application also provides a new idea for subsequent engineering applications. In actual application, the technical solution proposed by the present application can effectively improve the performance of the dialogue state tracking task, has a wide application prospect, and is especially suitable for occasions with large noise in real scenes, such as mobile phones, voice assistants and other fields.
[0032] Therefore, the present application has obvious technical advantages and beneficial effects, and can effectively solve the technical defects existing in the dialogue state tracking task in real scenes, and provides a new idea and solution for practical application. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0034] Figure 1 A specific flow chart of a method for tracking dialogue state according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0036] In the description of the present application, it needs to be understood that the orientations or positional relationships indicated by the terms "center", "longitudinal", "transverse", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements indicated must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second" and the like are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" and the like can be explicitly or implicitly included one or more. In the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more.
[0037] In the description of the present application, it needs to be understood that unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood through specific circumstances.
[0038] The embodiment provides a dialogue state tracking method based on Jensen-Shannon divergence, as shown in the formula (1), comprising the following steps: Figure 1 As shown in the formula (1), comprising the following steps:
[0039] S1, collect multi-domain task type dialogue data set, specifically MultiWOZ2.1 data set, about 10000 human-computer dialogue data, containing dialogue of 7 fields of hotel, restaurant, train, taxi, scenic spot, hospital and police, and the number of turns of most dialogues is more than 10 rounds.
[0040] It should be noted that in the present embodiment, the dialogue of the police and hospital fields is not used in the present application due to incomplete annotation.
[0041]
[0042] S2, constructing a dialogue state tracking model, the dialogue state tracking model comprising an encoding module and a dialogue state decision module;
[0043] S3, the history and current dialogue, the current state and slot information are encoded by the encoding module, and the encoding module adopts a pre-trained Bert model. Specifically, the
[0044] Xi={CLS,Dt , S t-1 , U t-1 , SEP, S t , U t , [SLOT], hotel, name, …, none, [SLOT], …
[0045] As the input of the encoder, where CLS, SEP, SLOT are special tokens in BERT, D t is the current state information, S t-1 and U t-1 are the historical dialogues, S t and U t are the current round of dialogues, and the SLOT token part is the slot information. The input is encoded by the pre-trained BERT model to obtain the encoded output semantic information:
[0046] H i = BERT (X i )
[0047] S4, input the encoded information into the dialog state decision module to generate the target probability distribution. According to step S3, take the output of each SLOT token part, and then pass it through the dialog state decision module. The module sets a two-stage classifier for each slot, which can be divided into:
[0048] S4-1, the output of each SLOT token part in step two is passed through the first stage classifier to obtain the first stage classification result:
[0049] P1 ∈ {None, Donotcare, Other}
[0050] Where P1 is a three-class probability distribution. In addition to the cross-entropy loss, the first stage classifier also adds a contrast loss.
[0051] S4-2, if the first stage classification result max(p) = Other, then the second stage classification is performed to obtain the specific slot value belonging to each slot. Correspondingly, the second stage classification also has a probability distribution P2, and the dimension is the number of slot values.
[0052] S5, use JS divergence as an indicator to measure whether the sample belongs to a noise sample. JS divergence is used to measure the similarity between two distributions, and its value is between 0-1, which can be well used to describe the possibility of whether a sample is a noise sample. Specifically, it can be divided into:
[0053] S5-1, in step S4, the output of the dialog state tracking model is:
[0054]
[0055] Sample label is:
[0056]
[0057] S5-2, calculate the JS divergence between the two distributions:
[0058]
[0059] S5-3, get the probability that a certain sample X belongs to a clean sample:
[0060] P clean (x i )=1-d i ∈[0,1]
[0061] S5-4, finally, the noise sample can be selected:
[0062] X: P clean (X)<T clean
[0063] S6, for non-noise samples, keep their original label. If a certain sample X in step four P clean (X)>τ clean , it can be considered as a clean sample, which does not contain noise, and no additional processing is needed, the original label is directly used for training.
[0064] In this embodiment, non-noise samples refer to samples whose target probability distribution generated by the dialogue state decision module and the original label distribution are relatively close, and the JS divergence of the two falls within a certain range. For non-noise samples, the original label is used in the subsequent training process.
[0065] S7, for noise samples, generate new labels according to the target probability distribution for training. In step four, step (4) selects noise samples that need to update labels.
[0066] The specific method is to select the class to which the maximum value of the probability distribution obtained in step three belongs as the new label:
[0067]
[0068] The new label is used for subsequent training.
[0069] In this embodiment, noise samples refer to samples whose target probability distribution generated by the dialogue state decision module and the original label distribution are quite different, and the JS divergence of the two falls outside a certain range. For noise samples, new labels are generated according to the target probability distribution for training.
[0070] S8, dynamically adjust the noise sample judgment threshold in the training process to adapt to the constantly enhanced dialogue state tracking model. At the beginning of the training, τ clean should be set smaller; as the training proceeds, the value of τ clean increases constantly, and the number of selected noise samples also gradually increases. The dialogue state tracking model is trained until fitting.
[0071] The embodiments of the present application are described in detail above with reference to the drawings, but the present application is not limited to the described embodiments. For those skilled in the art, various changes, modifications, replacements and variations of the embodiments including components are made without departing from the principles and spirits of the present application, and still fall within the protection scope of the present application.
Claims
1. A dialogue state tracking method based on Jensen-Shannon divergence, characterized in that, Includes the following steps: S1. Collect task-oriented dialogue datasets from different domains. The task-oriented dialogue datasets include historical and current dialogues, historical and current states, slot information, and corresponding original labels. S2. Construct a dialogue state tracking model, which includes an encoding module and a dialogue state decision module; S3. Semantic information that performs semantic encoding on the historical and current dialogues, current state and slot information in the task-oriented dialogue dataset through the encoding module; S4. Input the encoded semantic information into the dialogue state decision module to generate the target probability distribution; S5. Use JS divergence as an indicator to measure whether a sample is a noisy sample; S6. For non-noise samples, retain their original labels. For noise samples, select the target with the highest probability value according to the target probability distribution, use it as the new label, and use the new label for training. S7. During training, dynamically adjust the threshold for judging noise samples to adapt to the continuously improving dialogue state tracking model until the dialogue state tracking model is well-fitted.
2. The dialogue state tracking method based on Jensen-Shannon divergence according to claim 1, characterized in that, In step S2, the encoding module uses an encoder based on a pre-trained language model.
3. The dialogue state tracking method based on Jensen-Shannon divergence according to claim 2, characterized in that, The pre-trained language model is a pre-trained BERT model.
4. The dialogue state tracking method based on Jensen-Shannon divergence according to claim 3, characterized in that, The method for semantic encoding using a pre-trained BERT model is as follows: Let Xi = {CLS, D} t S t-1 U t-1 SEP, S t U t ,[SLOT],hotel,name,…,none,[SLOT],…} As input to the encoder, CLS, SEP, and SLOT are special markers in BERT, and D t As the current state, S t-1 and U t-1 For historical dialogue, S t and U t For the current dialogue, the SLOT tag portion represents slot information. This information is input into a pre-trained BERT model and encoded to obtain the encoded semantic information output. H i =BERT(X i )。 5. The dialogue state tracking method based on Jensen-Shannon divergence according to claim 4, characterized in that, The dialogue state decision module is a two-stage classification model.
6. The dialogue state tracking method based on Jensen-Shannon divergence according to claim 5, characterized in that, The target probability distribution refers to the probability distribution of each category in the two-stage classification.
7. The dialogue state tracking method based on Jensen-Shannon divergence according to claim 5, characterized in that, The method for generating the target probability distribution in the two-stage classification model is as follows: S4-1. Pass the output of each SLOT tag in step two through the first-level classifier to obtain the first-stage classification result: P1∈{None, Donotcare, Other} P1 is a three-class probability distribution. In addition to cross-entropy loss, the first-level classifier also adds contrast loss. S4-2. If the first-stage classification result max(p) = Other, then perform the second-stage classification to obtain the specific slot value belonging to each slot. Correspondingly, the second-stage classification will also have a probability distribution P2, the dimension of which is the number of slot values.
8. The dialogue state tracking method based on Jensen-Shannon divergence according to claim 7, characterized in that, In step S5, the JS divergence is used to measure the similarity between two distributions. Its value is between 0 and 1. Specifically, the JS divergence is calculated between the two target probability distributions generated in step S4 and the original labels in the dataset. The calculation result indicates that the distribution with greater difference is considered to be a noise sample.
9. The dialogue state tracking method based on Jensen-Shannon divergence according to claim 1, characterized in that, In step S7, the threshold is used to determine the intermediate value between noise samples and non-noise samples, and the threshold gradually increases during the training process.
Citation Information
Patent Citations
Implementation method and device of generative dialogue state tracking model
CN114841069A
Systems and methods of using natural language processing for visual analysis of a data set
US10817527B1