Interactive supervision method for new intention discovery in man-machine conversation system
By combining interactive supervision methods with parameter clustering and representation learning, and using technologies such as supervised contrastive learning, the problem of low accuracy of new intent discovery methods in streaming data environments is solved, achieving more accurate unknown intent identification and more efficient New intent discovery task performance.
Patent Information
- Application Number
- CN202410601070.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-05-15
AI Technical Summary
Existing new intent discovery methods have efficiency and accuracy problems in combining parameter clustering and representation learning. Parameter clustering methods are not accurate in streaming data environments, while representation learning methods are not suitable in continuous clustering environments.
An interactive supervision method is proposed that combines parameter clustering and representation learning. Through interactive learning and interactive supervision mechanisms, techniques such as supervised contrastive learning, instance-level contrastive learning, and cluster-level contrastive learning are used to improve feature extraction and clustering. Assignment to enhance recognition of new intentions.
It improves the performance and efficiency of new intent discovery tasks, can more accurately identify unknown intentions, and enhances the support capabilities of intelligent dialogue systems.
Smart Images

Figure BDA0004840580800000062 
Figure BDA0004840580800000043 
Figure BDA0004840580800000032
Abstract
Description
Technical Field
[0001] The invention relates to an interactive supervision method for discovering new intentions in a human-computer dialogue system, and belongs to the technical field of natural language processing. Background Art
[0002] New intent discovery aims to classify previously unknown intents into different clusters. In today's task-oriented dialogue systems, new intent discovery plays a vital role in accurately identifying users' changing preferences and intentions. This technology has a wide range of applications, covering various fields such as intelligent customer service systems, e-commerce platforms, smart home systems, medical and health fields, and social media platforms. With this technology, the system can better understand the needs of users and provide users with personalized and intelligent services and experiences. The main challenges of new intent discovery include effectively transferring prior knowledge from known intents to identify unknown intents, and effectively extracting semantic evidence from user utterances.
[0003] Existing new intent discovery methods can be roughly divided into two categories.
[0004] The first is the parameter clustering method, whose main feature is to use labeled known intents and unlabeled unknown intent data to train parameter classifiers to directly classify unknown intents. These methods have been widely used in the field of computer vision. Y. Zhou et al. proposed a probabilistic framework for intent discovery based on parameter clustering in the document "Zhou Y, Quan G, Qiu XA Probabilistic Framework for Discovering New Intents[C] / / Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics(Volume 1:Long Papers).2023:3771-3784." and optimized it using the expectation maximization framework. The advantage of the parameter clustering method is that it can directly reflect the clustering results, so it is particularly efficient when processing streaming data. However, this method also has the problem of low clustering accuracy, which needs further improvement and optimization.
[0005] The second is the representation learning method, which is a class of methods that consists of two stages. First, the feature extraction network is trained by integrating known and unknown intents, and then the traditional clustering method is used to obtain the final result. H. Zhang et al. proposed a deep aligned clustering method based on representation learning in the document "Zhang H, Xu H, Lin TE, et al. Discovering new intents with deep aligned clustering [C] / / Proceedings of the AAAI Conference on Artificial Intelligence. 2021, 35 (16): 14365-14373." and adopted an alignment strategy to solve the problem of inconsistent labels in the clustering assignment process. The representation learning method usually exhibits superior clustering accuracy, but it is not applicable in streaming data environments where new data needs to be continuously clustered. Summary of the invention
[0006] The purpose of the present invention is to address the deficiencies of the above-mentioned existing methods. The present invention provides an interactive supervision method for new intent discovery in a human-computer dialogue system to solve the problem that the existing methods cannot combine parameter clustering and representation learning well. The advantages of the parameter clustering method and the representation learning method can be effectively combined. The two work together and provide interactive supervision to promote each other, more accurately identify unknown intents, and improve the performance and efficiency of new intent discovery tasks.
[0007] The technical solution of the present invention is: an interactive supervision method for new intent discovery in a human-computer dialogue system, and the specific steps of the interactive supervision method for new intent discovery in a human-computer dialogue system are as follows:
[0008] Step 1: Obtain a dataset provided by the user, which includes labeled data with known intent and unlabeled data with unknown intent;
[0009] Step 2: Divide the original data into labeled known intent data and unlabeled unknown intent data, and perform preprocessing operations on the data set;
[0010] Step 3: Pre-train known intent data to capture the essence of known intent data;
[0011] Step 4: Cluster unknown intent through interactive learning;
[0012] Step 5: Improve representation learning through parameter clustering:
[0013] Step 6. Use representation learning to improve parameter clustering.
[0014] Furthermore, in the Step 2, the preprocessing includes encapsulating the data format and converting the text data into a feature representation acceptable to the pre-trained model, so that the data is more suitable for model training and evaluation.
[0015] Furthermore, the Step 3 includes the following:
[0016] First, given a known intent sample x i , use the encoder to obtain its representation z i , then, z i As the input of feature projection F and classifier C, two different vectors f are generated i and c i ; For the feature projection F, supervised contrastive learning is used as follows:
[0017]
[0018] Where L scl is the loss function of supervised contrastive learning, which represents the similarity loss between samples. N represents the total number of samples in the current mini-batch. Mini-batch refers to the small batch data into which the entire training data set is divided when training a neural network. During the training process, a mini-batch data is randomly selected for forward propagation and back propagation to update the parameters of the model. P(i) represents the number of samples x in the current mini-batch. i Positive pairs refer to samples from the same category, sim() represents cosine similarity, and f j Indicates the number of cells in the current mini-batch that are related to f i The other eigenvector that forms the pair, f b Indicates the number of cells in the current mini-batch that are related to f i Other feature vectors of different categories, τ is the temperature parameter used to control the smoothness of the similarity distribution between vectors, supervised contrastive learning is used to pull samples belonging to the same class together and separate samples from different classes, and for classifier C, cross entropy loss is used to learn the distinction between categories.
[0019] Furthermore, the Step 4 includes the following steps:
[0020] Step 4.1, representation learning:
[0021] Given an unknown intent example u i , first use the pre-trained network to obtain different vectors f of the samples i and c i ; Then, instance-level contrastive learning is performed to improve feature projection; as shown in the following formula:
[0022]
[0023] Where L icl is the loss function of instance-level contrastive learning, f i ' represents the vector f i The expanded features; N represents the total number of samples in the current mini-batch. Mini-batch refers to the small batches of data into which the entire training data set is divided when training a neural network. sim() represents the cosine similarity. f j Indicates the number of cells in the current mini-batch that are related to f i The other eigenvector that forms the pair, τ f is the temperature parameter, which is used to control the smoothness of the similarity distribution between vectors. After that, simple dropout is performed as data augmentation;
[0024] Step 4.2, parameter clustering: The output of the classifier directly reveals the cluster assignment results, using cluster-level contrast clustering;
[0025] Given an unknown intent example u i , the classifier outputs a probability matrix of size N×c, where c represents the number of clusters, that is, the number of columns in the probability matrix output by the classifier, and the jth row c j Refers to unknown intent example u i The probability distribution u j , the i-th column vector c i It can be regarded as the cluster representation of the i-th cluster; the probability matrix directly reveals the cluster assignment of the training data, as shown in the following formula, and the cluster-level contrast loss is:
[0026]
[0027] Where L ccl is the clustering level contrast loss function, which is used to measure the clustering effect of samples in the feature space, c' i is the vector c i The expanded clustering representation of c is the temperature parameter, which is used to control the smoothness of the similarity distribution between vectors. In addition, in order to prevent the problem of clustering most instances into a few groups, an additional entropy regularization term is used to constrain the output of the classifier:
[0028]
[0029] Where H(C) represents the output entropy of the classifier, which is used to measure the uncertainty or confusion of the probability distribution.
[0030] Furthermore, in the Step 5, a Top-k method for generating false positives is used to improve representation learning through parameter clustering; a Top-k method for generating false positives includes:
[0031] The method first identifies the index of the top-k elements in the vector e, denoted as t = T k (e), "Top-k elements" refers to the first k largest elements in an array or vector, t k Represents the index corresponding to the kth largest value in e. If the vector e i and vector e j have the same Top-k element index, i.e. t i =t j , which means that the indexes of the first k maximum values of these two vectors in the cluster probability distribution are the same, indicating that they may have similar cluster representations in the feature space. For such positive samples, the loss L of supervised contrastive learning is also required. scl Calculation of
[0032] Furthermore, the Step 6 includes:
[0033] The parameter clustering branch is regularized by utilizing the semantic similarity from the representation learning branch; for any given sample pair (a i ,a j ), define two similarity metrics: S(d f ) represents the feature space distance, S(d c ) represents the cluster assignment distance; these indicators are designed to more closely combine cluster assignment with the inherent semantic relationship existing in the feature space, thereby enhancing the representation learning process; as shown in the following formula:
[0034]
[0035]
[0036] Where σ is a parameter. Essentially, the goal is to separate samples with lower semantic similarity and move closer to samples with higher semantic similarity, using binary cross entropy loss to regularize cluster assignment; as shown in the following formula:
[0037] L bce =∑-S(d f )log S(d c )-(1-S(d f ))log(1-S(d c ))
[0038] Where L bcerepresents the binary cross entropy loss function. The basic principle of binary cross entropy loss is to ensure that the cluster assignments are fine-tuned in a way that reflects the actual semantic proximity in the data, which is defined by the feature space. The binary cross entropy loss acts as a guide to make the clustering process more closely aligned with the inherent semantic structure of the data.
[0039] With the support of this novel interactive supervision mechanism, the overall goals of our method are:
[0040] L=L icl +L ccl +H(e)+λ1L bce +λ2L scl
[0041] The overall loss function L includes the instance-level contrastive learning loss function L icl , cluster-level contrast loss function L ccl , the output entropy H(e) of the classifier and the binary cross entropy loss function L bce And the loss function L of supervised contrastive learning scl ; Parameters λ1 and λ2 represent the weight of the loss.
[0042] The beneficial effects of the present invention are:
[0043] (1) The present invention combines parameter clustering and representation learning, which work together and provide interactive supervision to promote each other. On the one hand, the representation learning branch provides reliable semantic similarity information for the prediction results of regularized parameter clustering, so that samples with large semantic similarity have similar predictions, while allowing the predictions of different samples to be separated; on the other hand, parameter clustering provides additional pseudo-labels to guide the representation learning branch;
[0044] (2) This is a pioneering experiment to explore and verify the effectiveness of using representation learning and interactive supervision between reference clusters to enhance new intent discovery. The ablation experiment verifies its effectiveness. The method of the present invention can more accurately identify unknown intents, improve the performance and efficiency of new intent discovery tasks, and provide stronger support for applications such as intelligent dialogue systems. DETAILED DESCRIPTION
[0045] Embodiment 1: An interactive supervision method for new intent discovery in a human-computer dialogue system, the specific steps of the interactive supervision method for new intent discovery in a human-computer dialogue system are as follows:
[0046] Step 1: Obtain a dataset provided by the user, which includes labeled data with known intent and unlabeled data with unknown intent;
[0047] Step 2: Divide the original data into labeled data with known intent and unlabeled data with unknown intent, and preprocess the data set; preprocessing includes encapsulating the data format and converting the text data into a feature representation acceptable to the pre-trained model, so that the data is more suitable for model training and evaluation.
[0048] Step 3: Pre-training known intent data to capture the essence of known intent data; Step 3 includes the following:
[0049] First, given a known intent sample x i , use the encoder to obtain its representation z i , then, z i As the input of feature projection F and classifier C, two different vectors f are generated i and c i ; For the feature projection F, supervised contrastive learning is used as follows:
[0050]
[0051] Where L scl is the loss function of supervised contrastive learning, which represents the similarity loss between samples. N represents the total number of samples in the current mini-batch. Mini-batch refers to the small batch data into which the entire training data set is divided when training a neural network. During the training process, a mini-batch data is randomly selected for forward propagation and back propagation to update the parameters of the model. P(i) represents the number of samples x in the current mini-batch. i Positive pairs refer to samples from the same category, sim() represents cosine similarity, and f j Indicates the number of cells in the current mini-batch that are related to f i The other eigenvector that forms the pair, f b Indicates the number of cells in the current mini-batch that are related to f i Other feature vectors of different categories, τ is the temperature parameter used to control the smoothness of the similarity distribution between vectors, supervised contrastive learning is used to pull samples belonging to the same class together and separate samples from different classes, and for classifier C, cross entropy loss is used to learn the distinction between categories.
[0052] Step 4: Cluster unknown intents through interactive learning; Step 4 includes the following steps:
[0053] Step 4.1, representation learning:
[0054] Given an unknown intent example u i , first use the pre-trained network to obtain different vectors f of the samplesi and c i ; Then, instance-level contrastive learning is performed to improve feature projection; as shown in the following formula:
[0055]
[0056] Where L icl is the loss function of instance-level contrastive learning, f i ' represents the vector f i The expanded features; N represents the total number of samples in the current mini-batch. Mini-batch refers to the small batches of data into which the entire training data set is divided when training a neural network. sim() represents the cosine similarity. f j Indicates the number of cells in the current mini-batch that are related to f i The other eigenvector that forms the pair, τ f is the temperature parameter, which is used to control the smoothness of the similarity distribution between vectors. After that, simple dropout is performed as data augmentation;
[0057] Step 4.2, parameter clustering: The output of the classifier directly reveals the cluster assignment results, using cluster-level contrast clustering;
[0058] Given an unknown intent example u i , the classifier outputs a probability matrix of size N×c, where c represents the number of clusters, that is, the number of columns in the probability matrix output by the classifier, and the jth row c j Refers to unknown intent example u i The probability distribution u j , the i-th column vector c i It can be regarded as the cluster representation of the i-th cluster; the probability matrix directly reveals the cluster assignment of the training data, as shown in the following formula, and the cluster-level contrast loss is:
[0059]
[0060] Where L ccl is the clustering level contrast loss function, which is used to measure the clustering effect of samples in the feature space, c' i is the vector c i The expanded clustering representation of c is the temperature parameter, which is used to control the smoothness of the similarity distribution between vectors. In addition, in order to prevent the problem of clustering most instances into a few groups, an additional entropy regularization term is used to constrain the output of the classifier:
[0061]
[0062] Where H(C) represents the output entropy of the classifier, which is used to measure the uncertainty or confusion of the probability distribution.
[0063] Step 5, improving representation learning by parameter clustering: In the Step 5, a Top-k method for generating false positives is used to improve representation learning by parameter clustering; a Top-k method for generating false positives includes:
[0064] The method first identifies the index of the top-k elements in the vector e, denoted as t = T k (e), "Top-k elements" refers to the first k largest elements in an array or vector, t k Represents the index corresponding to the kth largest value in e. If the vector e i and vector e j have the same Top-k element index, i.e. t i =t j , which means that the indexes of the first k maximum values of these two vectors in the cluster probability distribution are the same, indicating that they may have similar cluster representations in the feature space. For such positive samples, the loss L of supervised contrastive learning is also required. scl Calculation of
[0065] Step 6: Improve parameter clustering using representation learning. Step 6 includes:
[0066] The parameter clustering branch is regularized by utilizing the semantic similarity from the representation learning branch; for any given sample pair (a i ,a j ), define two similarity metrics: S(d f ) represents the feature space distance, S(d c ) represents the cluster assignment distance; these indicators are designed to more closely combine cluster assignment with the inherent semantic relationship existing in the feature space, thereby enhancing the representation learning process; as shown in the following formula:
[0067]
[0068]
[0069] Where σ is a parameter. Essentially, the goal is to separate samples with lower semantic similarity and move closer to samples with higher semantic similarity, using binary cross entropy loss to regularize cluster assignment; as shown in the following formula:
[0070] L bce =∑-S(d f )log S(d c )-(1-S(d f ))log(1-S(dc ))
[0071] Where L bce represents the binary cross entropy loss function. The basic principle of binary cross entropy loss is to ensure that the cluster assignments are fine-tuned in a way that reflects the actual semantic proximity in the data, which is defined by the feature space. The binary cross entropy loss acts as a guide to make the clustering process more closely aligned with the inherent semantic structure of the data.
[0072] With the support of this novel interactive supervision mechanism, the overall goals of our method are:
[0073] L=L icl +L ccl +H(e)+λ1L bce +λ2L scl
[0074] The overall loss function L includes the instance-level contrastive learning loss function L icl , cluster-level contrast loss function L ccl , the output entropy H(e) of the classifier and the binary cross entropy loss function L bce And the loss function L of supervised contrastive learning scl ; Parameters λ1 and λ2 represent the weight of the loss.
[0075] To demonstrate the effectiveness of the proposed method, we conducted verification experiments on the CLINC-30% dataset and BANKING, and calculated the NMI, ACC, and ARI indicators, as shown in Table 1.
[0076] Table 1: Performance comparison of different methods on the CLINC dataset and BANKING dataset
[0077]
[0078] The performance verification experimental results of the method of the present invention on the CLINC-30% dataset and the Banking dataset show that compared with the existing methods, the INS method has achieved significant improvements in the NMI, ACC and ARI indicators. Especially on the Banking dataset, it is 7.49%, 5.94% and 9.35% higher than the best competitor DKT in NMI, ACC and ARI respectively. On the CLINC-30% dataset, the performance of the INS method is also better than other methods. This shows that the method of the present invention can more accurately identify unknown intents, improve the performance and efficiency of new intent discovery tasks, and provide stronger support for applications such as intelligent dialogue systems.
[0079] The specific implementation modes of the present invention are described in detail above, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. An interactive supervision method for new intention discovery in a human-computer dialogue system, characterized by: The specific steps of the interactive supervision method for new intent discovery in the human-computer dialogue system are as follows: Step 1: Obtain a dataset provided by the user, which includes labeled data with known intent and unlabeled data with unknown intent; Step 2: Divide the original data into labeled known intent data and unlabeled unknown intent data, and perform preprocessing operations on the data set; Step 3: Pre-train known intent data to capture the essence of known intent data; Step 4: Cluster unknown intent through interactive learning; Step 5: Improve representation learning through parameter clustering: Step 6. Use representation learning to improve parameter clustering.
2. The interactive supervision method for new intention discovery in a human-computer dialogue system according to claim 1, characterized in that: The Step 3 includes the following: In the Step 2, the preprocessing includes encapsulating the data format and converting the text data into a feature representation acceptable to the pre-trained model, so that the data is more suitable for model training and evaluation.
3. The interactive supervision method for new intention discovery in a human-computer dialogue system according to claim 1, characterized in that: The Step 3 includes the following: First, given a known intent sample x i , use the encoder to obtain its representation z i , then, z i As the input of feature projection F and classifier C, two different vectors f are generated i and c i ; For the feature projection F, supervised contrastive learning is used as follows: Where L scl is the loss function of supervised contrastive learning, which represents the similarity loss between samples. N represents the total number of samples in the current mini-batch. Mini-batch refers to the small batch data into which the entire training data set is divided when training a neural network. During the training process, a mini-batch data is randomly selected for forward propagation and back propagation to update the parameters of the model. P(i) represents the number of samples x in the current mini-batch. i Positive pairs refer to samples from the same category, sim() represents cosine similarity, and f j Indicates the number of cells in the current mini-batch that are related to f i The other eigenvector that forms the pair, f b Indicates the number of cells in the current mini-batch that are related to f i Other feature vectors of different categories, τ is the temperature parameter used to control the smoothness of the similarity distribution between vectors, supervised contrastive learning is used to pull samples belonging to the same class together and separate samples from different classes, and for classifier C, cross entropy loss is used to learn the distinction between categories.
4. The interactive supervision method for new intention discovery in a human-computer dialogue system according to claim 1, characterized in that: The Step 4 includes the following steps: Step 4.1, representation learning: Given an unknown intent example u i , first use the pre-trained network to obtain different vectors f of the samples i and c i ;Then, instance-level contrastive learning is performed to improve the feature projection; As shown below: Where L icl is the loss function of instance-level contrastive learning, f' i Represents the vector f i The expanded features; N represents the total number of samples in the current mini-batch. Mini-batch refers to the small batches of data into which the entire training data set is divided when training a neural network. sim() represents the cosine similarity. f j Indicates the number of cells in the current mini-batch that are related to f i The other eigenvector that forms the pair, τ f is the temperature parameter, which is used to control the smoothness of the similarity distribution between vectors. After that, simple dropout is performed as data augmentation; Step 4.2, parameter clustering: The output of the classifier directly reveals the cluster assignment results, using cluster-level contrast clustering; Given an unknown intent example u i , the classifier outputs a probability matrix of size N×c, where c represents the number of clusters, that is, the number of columns in the probability matrix output by the classifier, and the jth row c j Refers to unknown intent example u i The probability distribution u j , the i-th column vector c i It can be regarded as the cluster representation of the i-th cluster; the probability matrix directly reveals the cluster assignment of the training data, as shown in the following formula, and the cluster-level contrast loss is: Where L ccl is the clustering level contrast loss function, which is used to measure the clustering effect of samples in the feature space, c' i is the vector c i The expanded clustering representation of c is the temperature parameter, which is used to control the smoothness of the similarity distribution between vectors. In addition, in order to prevent the problem of clustering most instances into a few groups, an additional entropy regularization term is used to constrain the output of the classifier: Where H(C) represents the output entropy of the classifier, which is used to measure the uncertainty or confusion of the probability distribution.
5. The interactive supervision method for new intention discovery in a human-computer dialogue system according to claim 1, characterized in that: In the Step 5, a Top-k method for generating pseudo-positives is used to improve representation learning through parameter clustering; A Top-k method for generating false positives includes: The method first identifies the index of the top-k elements in the vector e, denoted as t = T k (e), "Top-k elements" refers to the first k largest elements in an array or vector, t k Represents the index corresponding to the kth largest value in e. If the vector e i and vector e j have the same Top-k element index, i.e. t i =t j , which means that the indexes of the first k maximum values of these two vectors in the cluster probability distribution are the same, indicating that they may have similar cluster representations in the feature space. For such positive samples, the loss L of supervised contrastive learning is also required. scl Calculation.
6. The interactive supervision method for new intention discovery in a human-computer dialogue system according to claim 1, characterized in that: The Step 6 includes: The parameter clustering branch is regularized by utilizing the semantic similarity from the representation learning branch; for any given sample pair (a i ,a j ), define two similarity metrics: S(d f ) represents the feature space distance, S(d c ) represents the cluster assignment distance; these indicators are designed to more closely combine cluster assignment with the inherent semantic relationship existing in the feature space, thereby enhancing the representation learning process; as shown in the following formula: Where σ is a parameter. Essentially, the goal is to separate samples with lower semantic similarity and move closer to samples with higher semantic similarity, using binary cross entropy loss to regularize cluster assignment; as shown in the following formula: L bce =∑-S(d f )logS(d c )-(1-S(d f ))log(1-S(d c )) Where L bce represents the binary cross entropy loss function. The basic principle of the binary cross entropy loss is to ensure that the cluster assignments are fine-tuned in a way that reflects the actual semantic proximity in the data, which is defined by the feature space. The binary cross entropy loss acts as a guide to make the clustering process more closely aligned with the inherent semantic structure of the data. With the support of this novel interactive supervision mechanism, the overall goals of our method are: L=L icl +L ccl +H(e)+λ1L bce +λ2L scl The overall loss function L includes the instance-level contrastive learning loss function L icl , cluster-level contrast loss function L ccl , the output entropy H(e) of the classifier and the binary cross entropy loss function L bce And the loss function L of supervised contrastive learning scl ; Parameters λ1 and λ2 represent the weight of the loss.
Citation Information
Patent Citations
Man-machine conversation model training method, system, equipment and medium
CN116701585A
Method for discovering new intention through pre-training and comparative learning
CN116796757A
System and method for intent discovery from user logs using deep semi-supervised contrastive clustering
EP4303755A1
System and Method for Incremental Estimation of Interlocutor Intents and Goals in Turn-Based Electronic Conversational Flow
US20230237276A1
System and method for intent discovery from user logs using deep semi-supervised contrastive clustering
US20240013006A1
