An interactive supervision method for new intent discovery in human-computer dialogue systems
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YUNNAN NORMAL UNIV
- Filing Date
- 2024-05-15
- Publication Date
- 2026-08-07
AI Technical Summary
[0006]本发明的目的在于针对上述现有方法的不足,本发明提供了一种人机对话系统中新意图发现的交互式监督方法,以用于解决了现有方法不能很好结合参数聚类和表征学习的问题
[0043](1)本发明联合参数聚类和表征学习,两者协同工作并提供交互监督以相互促进。一方面,表征学习分支为正则化参数聚类的预测结果提供了可靠的语义相似度信息,使得语义相似度大的样本具有相似的预测,同时允许不同样本的预测分离;另一方面,参数聚类为指导表征学习分支提供了额外的伪标签;
Smart Images

Figure QLYQS_19 
Figure QLYQS_21 
Figure QLYQS_22
Abstract
Description
Technical Field
[0001] This invention relates to an interactive supervision method for discovering novel intentions in a human-computer dialogue system, belonging to the field of natural language processing technology. Background Technology
[0002] Novel intent discovery aims to categorize previously unknown intents into different clusters. In today's task-oriented dialogue systems, novel intent discovery plays a crucial role in accurately identifying users' evolving preferences and intents. This technology has wide applications, encompassing intelligent customer service systems, e-commerce platforms, smart home systems, healthcare, and social media platforms. Through this technology, systems can better understand user needs and provide personalized, intelligent services and experiences. The main challenges of novel intent discovery include effectively transferring prior knowledge from known intents to identify unknown intents, and effectively extracting semantic evidence from user utterances.
[0003] Existing methods for discovering new intentions can be broadly classified into two categories.
[0004] One approach is parametric clustering, which utilizes labeled known intents and unlabeled unknown intents to train a parametric classifier for direct classification of unknown intents. These methods have been widely applied in computer vision. Y. Zhou et al., in the paper "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," proposed a probabilistic framework for intent discovery based on parametric clustering and optimized it using an expectation-maximization framework. The advantage of parametric clustering is that it directly reflects the clustering results, making it particularly efficient when processing streaming data. However, this method also suffers from low clustering accuracy, requiring further improvement and optimization.
[0005] Second, there is the representation learning method, which is a two-stage approach. First, a feature extraction network is trained by integrating known and unknown intents. Then, a 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 paper "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 during cluster assignment. Representation learning methods generally exhibit superior clustering accuracy, but they are not suitable for streaming data environments that require continuous clustering of new data. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of existing methods by providing an interactive supervised method for discovering new intentions in human-computer dialogue systems. This method solves the problem that existing methods cannot effectively combine parametric clustering and representation learning. It effectively combines the advantages of parametric clustering and representation learning methods, allowing them to work synergistically and provide interactive supervision to mutually promote each other. This results in more accurate identification of unknown intentions and improves the performance and efficiency of the new intention discovery task.
[0007] The technical solution of this invention is: an interactive supervision method for discovering new intentions in a human-computer dialogue system, wherein the specific steps of the interactive supervision method for discovering new intentions in a human-computer dialogue system are as follows:
[0008] Step 1: Obtain the dataset provided by the user. This dataset includes labeled data with known intents and unlabeled data with unknown intents.
[0009] Step 2: Divide the raw data into labeled known intent data and unlabeled unknown intent data, and perform preprocessing operations on the dataset;
[0010] Step 3: Perform pre-training on known intent data to capture the essence of known intent data;
[0011] Step 4: Cluster unknown intents 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 Step 2, preprocessing includes encapsulating data formats and converting text data into feature representations acceptable to the pre-trained model, making the data more suitable for model training and evaluation.
[0015] Furthermore, Step 3 includes the following:
[0016] First, a known intent sample x is given. i The encoder is used to obtain its representation z. i Then, z i As input to the feature projection F and the classifier C, two distinct vectors f are generated. i and c i For the feature projection F, supervised contrastive learning is employed, as follows:
[0017]
[0018] Where L scl This is the loss function for supervised contrastive learning, representing the similarity loss between samples. N represents the total number of samples in the current mini-batch. A mini-batch refers to the small batch of data into which the entire training dataset is divided during neural network training. During training, a mini-batch is randomly selected for forward and backward propagation to update the model parameters. P(i) represents the number of samples x in the current mini-batch. i The "positive pair" refers to samples from the same category. sim() represents cosine similarity, and f... j This indicates that in the current mini-batch, f i Forming another eigenvector opposite to it, f b This indicates that in the current mini-batch, f i Other feature vectors of different categories, τ is a 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, while separating samples from different classes. For classifier C, cross-entropy loss is used to learn the distinction between classes.
[0019] Furthermore, Step 4 includes the following steps:
[0020] Step 4.1, Representation Learning:
[0021] Given an example of an unknown intent u i First, a pre-trained network is used 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 equation:
[0022]
[0023] Where L icl For instance-level contrastive learning, f i 'Represents vector f i The extended features; N represents the total number of samples in the current mini-batch, where mini-batch refers to the small batches of data that are divided into when training a neural network, sim() represents the cosine similarity, f j This indicates that in the current mini-batch, f i Another eigenvector forming the opposite direction, τ f The temperature parameter controls the smoothness of the similarity distribution between vectors. After this, a simple dropout is performed as data augmentation.
[0024] Step 4.2, Parameter Clustering: The output of the classifier directly reveals the clustering results, and clustering is compared at the cluster level;
[0025] Given an example of an unknown intent u i The classifier outputs a probability matrix of size N×c, where c represents the number of clusters, i.e., the number of columns in the probability matrix output by the classifier, and the column number is c in the j-th row. j Example of unknown intent u i probability distribution u j The i-th column vector c i It can be viewed as a 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 contrastive loss is:
[0026]
[0027] Where L ccl It is a clustering-level contrastive loss function used to measure the clustering effect of samples in the feature space, c' i It is a vector c i The extended clustering representation, τ c The temperature parameter controls the smoothness of the similarity distribution between vectors. Additionally, to prevent the majority of instances from clustering into a few groups, an extra entropy regularization term is used to constrain the classifier's output.
[0028]
[0029] H(C) represents the output entropy of the classifier, which measures the degree of uncertainty or disorder in the probability distribution.
[0030] Furthermore, in Step 5, a Top-k method for generating false positives is used to improve representation learning through parameter clustering; the Top-k method for generating false positives includes:
[0031] The method first identifies the indices of the Top-k elements in vector e, denoted as t = T. k (e) "Top-k elements" refers to the top k largest elements in an array or vector, t k This represents the index of the k-th largest value in vector e. i sum vector e j Having the same Top-k element index, i.e., t i =t j This means that the indices of the top k maximum values in the clustering probability distribution of these two vectors are the same, indicating that they may have similar clustering representations in the feature space. For such positive pairs of samples, supervised contrastive learning loss L should also be applied. scl Calculation;
[0032] Furthermore, Step 6 includes:
[0033] The parameter clustering branch is regularized by leveraging semantic similarity from the representation learning branch; for any given sample pair (a i ,a j Define two similarity measures: S(d) f S(d) represents the feature space distance. c The ) represents the cluster assignment distance; these metrics aim to more closely link cluster assignments with the inherent semantic relationships existing in the feature space, thereby enhancing the representation learning process; as shown in the following equation:
[0034]
[0035]
[0036] Where σ is a parameter, the essence of which is to separate samples with low semantic similarity and move them closer to samples with high semantic similarity, using binary cross-entropy loss to regularize the cluster assignment; as shown in the following equation:
[0037] L bce =∑-S(d f )log S(d c )-(1-S(d f ))log(1-S(d c ))
[0038] Where L bceThe binary cross-entropy loss function is defined by the feature space. The basic principle of binary cross-entropy loss is to ensure that the cluster assignment is fine-tuned in a way that reflects the actual semantic proximity in the data. The binary cross-entropy loss serves as a guide to make the clustering process more closely aligned with the inherent semantic structure of the data.
[0039] Supported by this novel interactive supervision mechanism, the overall goal of the method is:
[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 contrastive loss function L ccl The classifier's output entropy H(e) and the binary cross-entropy loss function L bce Loss function L for supervised contrastive learning scl The parameters λ1 and λ2 represent the weights of the loss.
[0042] The beneficial effects of this invention are:
[0043] (1) This invention combines parametric 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 parametric clustering, so that samples with high semantic similarity have similar predictions, while allowing the predictions of different samples to be separated; on the other hand, parametric 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 interactive supervision between representation learning and parameter clustering to enhance the discovery of new intentions. The ablation experiment verified its effectiveness. The method of this invention can more accurately identify unknown intentions, improve the performance and efficiency of the new intention discovery task, and provide stronger support for applications such as intelligent dialogue systems. Detailed Implementation
[0045] Example 1: An interactive supervision method for discovering new intentions in a human-computer dialogue system. The specific steps of the interactive supervision method for discovering new intentions in a human-computer dialogue system are as follows:
[0046] Step 1: Obtain the dataset provided by the user. This dataset includes labeled data with known intents and unlabeled data with unknown intents.
[0047] Step 2: Divide the raw data into labeled known intent data and unlabeled unknown intent data, and perform preprocessing operations on the dataset. Preprocessing includes encapsulating the data format and converting the text data into feature representations acceptable to the pre-trained model, making the data more suitable for model training and evaluation.
[0048] Step 3: Perform pre-training on known intent data to capture the essence of the known intent data; Step 3 includes the following:
[0049] First, a known intent sample x is given. i The encoder is used to obtain its representation z. i Then, z i As input to the feature projection F and the classifier C, two distinct vectors f are generated. i and c i For the feature projection F, supervised contrastive learning is employed, as follows:
[0050]
[0051] Where L scl This is the loss function for supervised contrastive learning, representing the similarity loss between samples. N represents the total number of samples in the current mini-batch. A mini-batch refers to the small batch of data into which the entire training dataset is divided during neural network training. During training, a mini-batch is randomly selected for forward and backward propagation to update the model parameters. P(i) represents the number of samples x in the current mini-batch. i The "positive pair" refers to samples from the same category. sim() represents cosine similarity, and f... j This indicates that in the current mini-batch, f i Forming another eigenvector opposite to it, f b This indicates that in the current mini-batch, f i Other feature vectors of different categories, τ is a 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, while separating samples from different classes. For classifier C, cross-entropy loss is used to learn the distinction between classes.
[0052] Step 4: Clustering of unknown intents through interactive learning; Step 4 includes the following steps:
[0053] Step 4.1, Representation Learning:
[0054] Given an example of an unknown intent u i First, a pre-trained network is used 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 equation:
[0055]
[0056] Where L icl For instance-level contrastive learning, f i 'Represents vector f i The extended features; N represents the total number of samples in the current mini-batch, where mini-batch refers to the small batches of data that are divided into when training a neural network, sim() represents the cosine similarity, f j This indicates that in the current mini-batch, f i Another eigenvector forming the opposite direction, τ f The temperature parameter controls the smoothness of the similarity distribution between vectors. After this, a simple dropout is performed as data augmentation.
[0057] Step 4.2, Parameter Clustering: The output of the classifier directly reveals the clustering results, and clustering is compared at the cluster level;
[0058] Given an example of an unknown intent u i The classifier outputs a probability matrix of size N×c, where c represents the number of clusters, i.e., the number of columns in the probability matrix output by the classifier, and the column number is c in the j-th row. j Example of unknown intent u i probability distribution u j The i-th column vector c i It can be viewed as a 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 contrastive loss is:
[0059]
[0060] Where L ccl It is a clustering-level contrastive loss function used to measure the clustering effect of samples in the feature space, c' i It is a vector c i The extended clustering representation, τ c The temperature parameter controls the smoothness of the similarity distribution between vectors. Additionally, to prevent the majority of instances from clustering into a few groups, an extra entropy regularization term is used to constrain the classifier's output.
[0061]
[0062] H(C) represents the output entropy of the classifier, which measures the degree of uncertainty or disorder in the probability distribution.
[0063] Step 5: Improving Representation Learning Through Parameter Clustering: In Step 5, a Top-k method for generating false positives is used to improve representation learning through parameter clustering. This Top-k method for generating false positives includes:
[0064] The method first identifies the indices of the Top-k elements in vector e, denoted as t = T. k (e) "Top-k elements" refers to the top k largest elements in an array or vector, t k This represents the index of the k-th largest value in vector e. i sum vector e j Having the same Top-k element index, i.e., t i =t j This means that the indices of the top k maximum values in the clustering probability distribution of these two vectors are the same, indicating that they may have similar clustering representations in the feature space. For such positive pairs of samples, supervised contrastive learning loss L should also be applied. scl Calculation;
[0065] Step 6: Improve parameter clustering using representation learning. Step 6 includes:
[0066] The parameter clustering branch is regularized by leveraging semantic similarity from the representation learning branch; for any given sample pair (a i ,a j Define two similarity measures: S(d) f S(d) represents the feature space distance. c The ) represents the cluster assignment distance; these metrics aim to more closely link cluster assignments with the inherent semantic relationships existing in the feature space, thereby enhancing the representation learning process; as shown in the following equation:
[0067]
[0068]
[0069] Where σ is a parameter, the essence of which is to separate samples with low semantic similarity and move them closer to samples with high semantic similarity, using binary cross-entropy loss to regularize the cluster assignment; as shown in the following equation:
[0070] L bce =∑-S(d f )log S(d c )-(1-S(d f ))log(1-S(dc ))
[0071] Where L bce The binary cross-entropy loss function is defined by the feature space. The basic principle of binary cross-entropy loss is to ensure that the cluster assignment is fine-tuned in a way that reflects the actual semantic proximity in the data. The binary cross-entropy loss serves as a guide to make the clustering process more closely aligned with the inherent semantic structure of the data.
[0072] Supported by this novel interactive supervision mechanism, the overall goal of the method is:
[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 contrastive loss function L ccl The classifier's output entropy H(e) and the binary cross-entropy loss function L bce Loss function L for supervised contrastive learning scl The parameters λ1 and λ2 represent the weights of the loss.
[0075] To demonstrate the effectiveness of the method of this invention, we conducted validation experiments on the CLIC-30% dataset and BANKING, and calculated the NMI, ACC, and ARI metrics, as shown in Table 1.
[0076] Table 1: Performance comparison of different methods on the CLIC and BANKING datasets
[0077]
[0078] Performance validation experiments on the CLIC-30% and Banking datasets show that the INS method achieves significant improvements in NMI, ACC, and ARI compared to existing methods. Particularly on the Banking dataset, it outperforms its best competitor, DKT, by 7.49%, 5.94%, and 9.35% in NMI, ACC, and ARI, respectively. On the CLIC-30% dataset, the INS method also outperforms other methods. This indicates that the method of this invention can more accurately identify unknown intents, improving the performance and efficiency of novel intent discovery tasks and providing stronger support for applications such as intelligent dialogue systems.
[0079] The specific embodiments of the present invention have been described in detail above. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. An interactive supervision method for discovering novel intentions in a human-computer dialogue system, characterized in that: The specific steps of the interactive supervision method for discovering new intentions in the human-computer dialogue system are as follows: Step 1: Obtain the dataset provided by the user. This dataset includes labeled data with known intents and unlabeled data with unknown intents. Step 2: Divide the raw data into labeled known intent data and unlabeled unknown intent data, and perform preprocessing operations on the dataset; Step 3: Perform pre-training on known intent data to capture the essence of known intent data; Step 4: Cluster unknown intents through interactive learning; Step 5: Improve representation learning through parameter clustering: Step 6: Use representation learning to improve parameter clustering; Step 3 includes the following: First, a known intent sample is given. Use the encoder to obtain its representation ,Then, As a feature projection and classifier The input generates two different vectors. and For feature projection Supervised contrastive learning is employed; supervised contrastive learning is used to group samples belonging to the same class together while separating samples from different classes, which is beneficial for the classifier. Cross-entropy loss is used to learn the distinction between categories; Step 4 includes the following: Step 4.1, Representation Learning: Given an example of an unknown intent First, a pre-trained network is used to obtain different vectors of the samples. and Then, instance-level contrastive learning is performed to improve feature projection. Step 4.2, Parameter Clustering: The classifier outputs the clustering assignment results, and the clustering is compared at the cluster level; In addition, to prevent the problem of clustering most instances into a few groups, an additional entropy regularization term is used to constrain the classifier's output; In Step 5, a Top-k method for generating false positives is used to improve representation learning through parameter clustering; One method for generating Top-k false positives includes: The method first identifies the vector The index of the Top-k element is represented as "Top-k elements" refers to the k largest elements in an array or vector. express The index corresponding to the k-th largest value in the vector, if sum vector Having the same Top-k element index, i.e. This means that the indices of the top k maximum values in the clustering probability distribution of these two vectors are the same, indicating that they may have similar clustering representations in the feature space. For such pairs of samples, supervised contrastive learning loss should also be applied. Calculation; Step 6 includes: The parameter clustering branch is regularized by leveraging semantic similarity from the representation learning branch; for any given pair of samples... Define two similarity measures: Represents the spatial distance of features. These metrics represent the cluster assignment distance; they aim to more closely link cluster assignments with the inherent semantic relationships existing in the feature space, thereby enhancing the representation learning process; as shown in the following equation: ; in, Indicates the current mini-batch and Forming another eigenvector opposite to it, Represents classifier The output of the first The row vector, where σ is a parameter, essentially aims to separate samples with low semantic similarity and group them towards samples with higher semantic similarity. Binary cross-entropy loss is used to regularize the clustering assignment; as shown in the following equation: ; in The binary cross-entropy loss function is defined by the feature space. The basic principle of binary cross-entropy loss is to ensure that the cluster assignment is fine-tuned in a way that reflects the actual semantic proximity in the data. The binary cross-entropy loss serves as a guide to make the clustering process more closely aligned with the inherent semantic structure of the data. With the support of this interactive supervision mechanism, the overall goal of the method is: ; Overall loss function Includes loss functions for instance-level contrastive learning. Cluster-level contrastive loss function The output entropy of the classifier and binary cross-entropy loss function Loss function for supervised contrastive learning ;parameter and This indicates the weight of the loss.
2. The interactive supervision method for discovering new intentions in a human-computer dialogue system according to claim 1, characterized in that: Step 3 includes the following: In Step 2, preprocessing includes encapsulating data formats and converting text data into feature representations acceptable to the pre-trained model, making the data more suitable for model training and evaluation.
3. The interactive supervision method for discovering new intentions in a human-computer dialogue system according to claim 1, characterized in that: Step 3 includes the following: First, a known intent sample is given. Use the encoder to obtain its representation ,Then, As a feature projection and classifier The input generates two different vectors. and For feature projection Supervised contrastive learning is employed, and the method is as follows: ; in It is the loss function for supervised contrastive learning, representing the loss due to the similarity between samples. This represents the total number of samples in the current mini-batch. A mini-batch refers to a small batch of data that is used to divide the entire training dataset during neural network training. During training, a mini-batch is randomly selected for forward and backward propagation to update the model's parameters. Indicates the current mini-batch "Directly opposite" refers to samples from the same category. Represents cosine similarity. Indicates the current mini-batch and Forming another eigenvector opposite to it, Indicates the current mini-batch and Other feature vectors of different categories, This is a temperature parameter used to control the smoothness of the similarity distribution between vectors. Supervised contrastive learning is used to group samples belonging to the same class together while separating samples from different classes, which is important for classifiers. Cross-entropy loss is used to learn the distinction between categories.
4. The interactive supervision method for discovering new intentions in a human-computer dialogue system according to claim 1, characterized in that: Step 4 includes the following steps: Step 4.1, Representation Learning: Given an example of an unknown intent First, a pre-trained network is used to obtain different vectors of the samples. and Then, instance-level contrastive learning is performed to improve feature projection. As shown in the following formula: ; in For instance-level contrastive learning loss function, Representing vectors Extended features; This indicates the total number of samples in the current mini-batch. A mini-batch refers to a small batch of data that is divided into from the entire training dataset during neural network training. Represents cosine similarity. Indicates the current mini-batch and Forming another eigenvector opposite to it, The temperature parameter controls the smoothness of the similarity distribution between vectors. After this, dropout is performed as data augmentation. Step 4.2, Parameter Clustering: The classifier outputs the clustering assignment results, and the clustering is compared at the cluster level; Given an example of an unknown intent The classifier outputs a value of size The probability matrix, where The number of clusters represents the number of columns in the probability matrix output by the classifier. OK Example of unknown intent probability distribution , No. column vector It can be regarded as the first The cluster representation of each cluster; the probability matrix is used to illustrate the cluster assignment of the training data, as shown in the following formula, and the cluster-level contrastive loss is: ; in It is a clustering-level contrastive loss function used to measure the clustering effect of samples in the feature space. It is a vector The extended clustering representation, The temperature parameter controls the smoothness of the similarity distribution between vectors. Additionally, to prevent the majority of instances from clustering into a few groups, an extra entropy regularization term is used to constrain the classifier's output. ; in The output entropy of the classifier is used to measure the degree of uncertainty or disorder in the probability distribution.