Evaluate text classification anomalies predicted by a text classification model
Through word-level analysis and heat map visualization technology, specific words that cause abnormalities in the text classification model are identified and adjusted, solving the problem of classification error identification in the existing technology, and improving the prediction accuracy and training efficiency of the model.
Patent Information
- Application Number
- CN202010273725.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-04-10
- Filing Date
- 2020-04-09
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-04-09
AI Technical Summary
Existing text classification models are prone to anomalies during prediction and are difficult to effectively identify specific words and their contributions that lead to classification errors. They lack effective data visualization tools to help users optimize training data sets.
The computer system performs word-level analysis on the predicted classification tags, decomposes the score and assigns a heat map value to each word, generates a heat map to visualize the contribution of the word to the classification tag, and provides a user interface to help users identify and adjust the training data set.
Effectively identify and adjust specific words that cause classification anomalies, improve the prediction accuracy of text classification models, reduce users' exploratory experiments on training data sets, and improve the classification accuracy of the model.
Smart Images

Figure CN111813928B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present invention generally relate to data processing, and in particular to evaluating text classification anomalies predicted by a text classification model.
[0002] Description of Related Technology
[0003] Machine learning plays an important role in many artificial intelligence (AI) applications. One of the outcomes of the process of training a machine learning application is a data object called a model used in text classification, which is a parameterized representation of the pattern inferred from the training data. After the model is created, it is deployed to one or more environments used in text classification. At runtime, the model is the core of the machine learning system, based on the structure generated by hours of development and large amounts of data. Summary of the invention
[0004] In one embodiment, a method involves: in response to running at least one test phrase on a pre-trained text classifier and identifying a separate predicted classification label based on a score calculated for each corresponding at least one test phrase, decomposing, by a computer system, a plurality of extracted features aggregated in the score into a plurality of word-level scores for each word in the at least one test phrase. The method involves: assigning, by the computer system, a separate heat map value to each of the plurality of word-level scores, each corresponding separate heat map value reflecting a weight of each of the plurality of word-level scores. The method involves: outputting, by the computer system, a separate predicted classification label and each separate heat map value reflecting a weight of each of the plurality of word-level scores for defining a heat map identifying a contribution of each word in the at least one test phrase to the separate predicted classification label.
[0005] In another embodiment, a computer system includes: one or more processors, one or more computer-readable memories, one or more computer-readable storage devices, and program instructions stored on at least one of the one or more storage devices for execution by at least one of the one or more processors via at least one of the one or more memories. The stored program instructions include: program instructions for decomposing a plurality of extracted features aggregated in a score into a plurality of word-level scores for each word in the at least one test phrase in response to running at least one test phrase on a pre-trained text classifier and identifying a separate predictive classification tag based on a score calculated for each corresponding at least one test phrase. The stored program instructions include: program instructions for assigning a separate heat map value to each of the plurality of word-level scores, each corresponding separate heat map value reflecting a weight of each of the plurality of word-level scores. The stored program instructions include: program instructions for outputting a separate predictive classification tag and each separate heat map value reflecting a weight of each of the plurality of word-level scores for defining a heat map identifying a contribution of each word in the at least one test phrase to a separate predictive classification tag.
[0006] In another embodiment, a computer program product includes: a computer-readable storage medium having program instructions embodied therein, wherein the computer-readable storage medium is not a transient signal itself. The program instructions are executable by a computer to cause the computer to, in response to running at least one test phrase on a pre-trained text classifier and identifying a separate predicted classification label based on a score calculated for each corresponding at least one test phrase, decompose, by the computer, a plurality of extracted features aggregated in the score into a plurality of word-level scores for each word in the at least one test phrase. The program instructions are executable by the computer to cause the computer to: assign, by the computer, a separate heat map value to each of the plurality of word-level scores, each corresponding separate heat map value reflecting a weight of each of the plurality of word-level scores. The program instructions are executable by the computer to cause the computer to: output, by the computer, a separate predicted classification label and each separate heat map value reflecting a weight of each of the plurality of word-level scores, for defining a heat map identifying a contribution of each word in the at least one test phrase to a separate predicted classification label. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] The novel features believed to be characteristic of one or more embodiments of the invention are set forth in the appended claims. However, the invention itself, one or more embodiments, will be better understood by reference to the following detailed description of illustrative embodiments when read in conjunction with the accompanying drawings, in which:
[0008] Figure 1 An example of a block diagram of a text classifier service for facilitating the creation and training of a text classifier for classifying text through tagging is shown;
[0009] Figure 2 An example of a block diagram of a text classifier service for providing information about text classification anomalies predicted by a text classifier during text classifier testing is shown;
[0010] Figure 3 An example of word-level analysis elements evaluated by a word-level analysis component at a text classifier level is shown;
[0011] Figure 4 shows an example of a table illustrating examples of types of extracted features that are decomposed for determining feature scores by word;
[0012] Figure 5 An example of a word-level heat map reflecting a ground-truth heat map is shown compared to a test set heat map based on test phrases tested on a trained model;
[0013] Figure 6 shows an example of a block diagram of a word-level heat map reflecting a heat map of the k top important words based on tokens of a test phrase tested on a trained model;
[0014] Figure 7 An example of a computer system in which an embodiment of the present invention may be implemented is shown;
[0015] Figure 8 A high-level logical flow chart of a process and computer program for creating and training a classifier model is shown;
[0016] Fig. 9 A high-level logic flow chart of a process and computer program for updating a trained classifier model is shown;
[0017] Fig.10 A high-level logic flow chart of a process and computer program for analyzing predicted classifications to determine heat map levels at the word level indicating word-level contributions to the predicted classification of a test phrase and the classification labels of a trained model is shown;
[0018] Fig.11 A high-level logic flow diagram showing a process and computer program for outputting a predicted classification with a visual indicator of influence on the predicted classification based on the corresponding word-level heat map levels of the most influential classification tags;
[0019] Fig.12A high-level logic flow chart showing a process and computer program for outputting a predicted classification with a visual indicator of influence on the predicted classification based on a list of k preferred words in a training set that are labeled with the most influential classification according to corresponding k preferred heat map levels; and
[0020] Fig.13 A high-level logic flow diagram of a process and computer program for supporting updated training of a text classifier that highlights classification label training for identified anomalies is shown. DETAILED DESCRIPTION
[0021] In the following description, for the purpose of illustration, a number of specific details are set forth to provide a deep understanding of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced without these specific details. In other examples, well-known structures and devices are shown in block diagram form to avoid unnecessarily obscuring the present invention.
[0022] Additionally, in the following description, multiple systems are described for illustrative purposes. It should be noted and apparent to those skilled in the art that the present invention can be implemented in a variety of systems, including various computer systems and electronic devices running any number of different types of operating systems.
[0023] Figure 1 A block diagram of a text classifier service for facilitating the creation and training of text classifiers for classifying text through tagging is shown.
[0024] In one example, machine learning plays an important role in artificial intelligence-based applications that interact with one or more natural language processing (NLP) systems. For example, AI-based applications may include, but are not limited to: speech recognition, natural language processing, audio recognition, visual scene analysis, email filtering, social network filtering, machine translation, data exfiltration, optical character recognition, sorting learning, and bioinformatics. In one example, the selection of AI-based applications may involve a computer system that can run in one or more types of computing environments to perform tasks that require one or more types of text classification analysis. In one example, machine learning may represent one or more types of AI that are based on training machines with data and algorithms that learn from and predict data. One of the main outcomes of the process of creating and training a machine learning environment is a data object (called a model) constructed from sample inputs. In one example, model 112 represents a data object of a machine learning environment.
[0025] In one example, to create and train the model 112, a user (such as the client 120) submits an initial training set, such as the ground truth training set 108, to the text classifier service 110. In one example, the ground truth training set 108 includes one or more words and multi-word phrases, each of which is identified with a tag from among a plurality of classification tags identified by the user for training the model 112. For example, a user may select a tag identifying an action type, such as "on" or "off", and assign the tag "on" or "off" to each selection of words or multi-word phrases that a customer may enter as a request to turn a service on or off, such as the phrase "add service" marked with "on" and the word "disconnect" marked with "off". In one example, the ground truth training set 108 may include one or more commercially available training sets. In another example, the ground truth training set 108 may include one or more user-generated training sets, such as training sets of words or phrases collected from conversational dialogue archives that have been marked by a user. In another example, the ground truth training set 108 may include one or more use-specific automatic training sets collected and marked by an automatic training set generation service.
[0026] In this example, the text classifier service 110 creates an instance of the model 112 in the text classifier 102 and trains the model 112 by applying the ground-truth training set 108. The text classifier 102 represents an instance of the model 112 in conjunction with the scorer 104 and trained by the ground-truth training set 108. In one example, the model 112 represents a parameter representation of a pattern inferred from the ground-truth training set 108 during the training process. In one example, the text classifier service 110 represents an entity that provides a service for use by a client, such as the client 120, for the client to create and train an instance of the model 112 in the text classifier 102. For example, the text classifier service 110 represents a cloud service provider for providing the text classifier 102 as a service through one or more applications selected by the client 120. In another example, the text classifier service 110 represents one or more programming interfaces through which the client 120 calls specific functions to create an instance of the model 112 in the text classifier 102 and calls specific functions to train the text classifier 102 based on the ground-truth training set 108. In additional or alternative embodiments, the client 120 can interact with the text classifier 102 through additional or alternative interfaces and connections.
[0027] In one example, after training, the client 120 may then test the text classifier 102 before deploying the text classifier 102 for access by one or more client applications for providing text classification services, such as intent classification, semantic analysis, or file classification for a dialog system. During training and after being deployed, a user may submit text to the text classifier 102. In response to the text submission, the text classifier 102 predicts a classification tag for the text and returns a predicted classification tag indicating what type of text has been received.
[0028] In this example, the text classifier 102 may respond to a test submission with an incorrectly predicted classification label when trained by the ground-truth training set 108. In one example, when the text classifier 102 makes an incorrect prediction, the incorrect prediction refers to an anomaly in the text classification performed by the text classifier 102.
[0029] The text classifier service 110 enables the client 120 to test the text classifier 102 and update the ground truth training set 108 for additional training of the text classifier 102, thereby adjusting the prediction accuracy of the text classifier 102 for use by the client. In particular, the client 120 relies on the text classifier 102 to provide accurate classification, however, the accuracy of the classification prediction made by a particular instance of the model in the text classifier 102 may be significantly affected by the distribution of training data in the ground truth training set 108 as originally used to train the model 112 and by additional training data submitted by the client 120 in response to anomalies detected when testing the text classifier 102. Therefore, it is desirable for the text classifier service 110 to also provide information to the user about text classification anomalies beyond incorrectly predicted classification labels, so that the user can efficiently and effectively evaluate corrections to the ground truth training set 108 that may be used to train the data patterns in the model 112 of the text classifier 102 to improve prediction accuracy.
[0030] Figure 2 A block diagram of a text classifier service for providing information about text classification anomalies predicted by a text classifier during text classifier testing is shown.
[0031] In one example, during the test phase, the test interface of the client 120 (e.g., the test controller 208) submits the text 222 to the text classifier 102, for example, by calling the application programming interface of the text classifier service 110 or directly calling the function of the text classifier 102. In this example, the text 222 may represent a test sample of one or more words or phrases from the test set 220. In this example, the text classifier 102 receives the text 222 and classifies the text 222, and predicts a labeled classification of the text 222.
[0032] In this example, the text classification service provided by the text classifier 102 refers to the following linear classifier processing: segmenting text including one or more words or other combinations of features, extracting features of one or more words, assigning weights of tags to each extracted feature, and combining the weights of predefined tags of the text to identify the scores of the tags. In one example, the text classifier 102 may determine a separate score for each tag in the tag selection and identify the predicted tag from the highest scoring tag. In one example, the tag may identify one or more types of classifications, such as, but not limited to, the intent of the content of the text. For example, the text classified by the text classifier 102 may represent a speech utterance converted into text, and the intent tag predicted by the text classifier 102 may represent the predicted intent of the speech based on the highest scoring tag of the speech among multiple scoring tags for the speech.
[0033] For example, to classify text, the text classifier 102 implements a scorer 104 that extracts features from words in the presented text. The scorer 104 calls a function of the model 112 to identify a weight for a tag for each extracted feature from the text 222. Based on the individually assigned weights of the extracted features, the scorer 104 may call a function of the model 112 to evaluate the classification of the entire text, such as a particular intent with a percentage probability.
[0034] For example, the features extracted by the text classifier 102 include, but are not limited to, unigram-based features, bigram-based features, part-of-speech-based features, term-based features, such as entity-based features or concept-based features, average pooling of word embedding features, and maximum pooling of word embedding features. For example, in the text phrase "I am a student at [A University]", unigram features may include "I", "I am", "student", "at", "university", and "A", and bigram features may include "A University".
[0035] For example, the text classifier 102 may perform linear classification of the text, where the ranking score S of each token I is a weighted sum of the combination of all extracted features, for example based on the following equation:
[0036] S I (U) = f1(U)w I1 +f2(U)w I2 …+f k (U)w IK +b I ,
[0037] Among them, U=u1u2u3…u Nis a test example, u n is a word in the test example, f k (U) is an extracted feature. In one example, the extracted feature may be one or more types of features extracted from certain words or phrases within the text. In this example, w IK are the model parameters for the kth feature given label I. In this example, b I Reflects the contribution from filler words, such as "bias", which reflects the inherent preference for intent without considering any input words.
[0038] In one example, the text classifier 102 represents a text classification model that can be viewed as a black box by the client 120, where text is applied to the text classifier 102 and classification predictions are output from the text classifier 102, but the trained data schema and the functions applied by the text classifier 102 are not visible to the client 120 requesting text classification services from the text classifier 102. To protect the underlying data objects created in the model 112, the entity deploying the model 112 may specify one or more protection layers for allowing the use of the functionality of the model 112 when deployed, but protecting the trained data schema of the data objects of the model 112.
[0039] In this example, in response to a submission of text 222 from client 120, text classifier 110 returns a classification 224 as determined by text classifier 102. In this example, classification 224 may include tags 226. Tags 226 may include specific classification tags and may include additional values, such as, but not limited to, a score probability calculated for the classification tag. In addition, tags 226 may include multiple tags.
[0040] In one example, in response to receiving classification 224, test controller 208 compares tag 226 to expected tag for text 222. In one example, test set 220 includes expected tag for text 222. In one example, if tag 226 does not match expected tag for text 222 in test set 220, test controller 208 can trigger an output to a user through user interface 240 to indicate the anomaly.
[0041] In one example, based on the detected anomaly, the user may choose to adjust the selection of one or more words assigned one or more tags in the training data set 238 within the user interface 240. The user may choose within the user interface 240 to request the training set controller 250 of the test controller 208 to send the training data set 238 to the text classifier 102 for additional training (as shown as training set 252), and to update the ground truth training set 108 with the training data set 238 to maintain a complete training set for training the text classifier 102. In this example, by having the client 120 submit additional training data in the training data set 238, the client 120 may improve the accuracy of the predictions performed by the text classifier 102, however, it is desirable to support the user at the user interface 240 in identifying which data to include in the training data set 238 for training the text classifier 102 to likely resolve the anomaly and improve the accuracy of the predictions made by the text classifier 102.
[0042] The accuracy of the model 112 in performing text classification can be a function of the time value and resources applied in creating, training, evaluating, and debugging the model to train the text classifier 102 to accurately classify text. In one example, the amount and distribution of labeled training data used to train the model 112 can significantly affect the reliability of the model 112 to accurately classify text. Although the client 120 relies on the accuracy of the text classifier 102 as a measure of the quality of the model 112, the quality and performance of text classifiers can vary greatly between models, and there is no unified measure for measuring the quality of a text classifier model or a publicly available unified training data set that produces the same accuracy measure when used to train the model.
[0043] Additionally, when the text classifier 102 is implemented as a black box provided by the text classifier service 110 and the client 120 receives a classification label in the classification 224, but the classification label is incorrect, information about why the text classifier 102 incorrectly classified a selection of text needs to be provided to the client 120, while also not exposing the underlying data objects in the model 112 to the client 120, so that an assessment can be made of what type of training data set is needed to potentially improve the classification accuracy of the text classifier 102. For example, if the client 120 submits text 222 of the phrase "how are you going to help me?" to the text classifier service 110 and receives an incorrect classification of "greeting" when the correct classification should be "capability", information about why the text classifier 102 incorrectly classified "how are you going to help me?" as "greeting" instead of "capability" needs to be provided to the client 120.
[0044] In particular, in addition to providing the classification label itself, it is desirable to provide the client 120 with information about why the text classifier 102 incorrectly classified the selection of text, so that a user monitoring the text classification service received by the client 120 can determine the additional training data sent to the text classifier 102 in the training data set 238 that is likely to train the text classifier 102 to correctly classify the selection of text. In particular, it is difficult for a user to attempt to determine the cause of the anomaly based solely on one or both of the label 226 in the classification 224 and the training data set submitted by the user in the training data set 238, because multiple combined factors may cause the classification anomaly. The first factor is that minor changes within the training data set 238, and feature debugging can substantially change the classification prediction performed by the text classifier 102. In particular, the text classifier 102 can be trained to determine the category of a text string based on a large number of features (e.g., more than 1,000 features) extracted internally from the training examples, wherein the features used to train the model 112 are transparent to the user, and the weights of the features are inherently determined by the training process applied to train the text classifier 102. The second factor is that, based on the selection of labeled training data used to train the model 112 and the limited nature of the selection of labeled training data for a particular domain of topics, the model 112 may overfit on some unexpected tokens or words for that domain. The third factor is that different categories of features may make the impact of a particular word on the final decision unclear. For example, some features are lexical based, such as unigrams and bigrams, and other features are not lexical based but are related to lexical, such as word embeddings and entity types.
[0045] For example, considering the second factor, if the system is based in part on word-level representation features because the words "want" and "need" have similar semantic meanings but different lexical meanings, then a training string for a classification intent tag with "place an order" may include a large number of occurrences of the word "want" for other classification intent tags, such that the text classifier 120 may incorrectly predict that the text input of "I need to delete an order" has a classification tag of "place an order" instead of the correct classification tag of "delete an order." Considering the first and third factors, the classification release is based on individual words, but identifying the specific words in "I need to delete an order" that cause the misclassification may be challenging based on test results alone, and the anomaly may disappear or reappear if additional training is performed to adjust the total number and type of training utterances used to train the model 112, without the user having to create training data that identifies the specific words that cause the anomaly.
[0046] According to the advantages of the present invention, an anomaly visualization service is provided to facilitate the user's understanding of specific words that cause text classification anomalies of the text classifier 102 at the client application level. In particular, according to the advantages of the present invention, the anomaly visualization service performs error analysis on the test set at the text classifier level and provides visual analysis and prompts of information about the errors at the application level, thereby helping the user to refine the training data set 238 for further training the text classifier 102. In one example, the visual analysis and prompts can be represented in one or more heat maps, where the heat map applies one or more colors at one or more intensities, and the intensity with color applied to the word represents the relative weight of the word in contributing to a specific classification label.
[0047] While the embodiments described herein relate to a visual heat map output as a graphical representation of data in a user interface that uses a system of color coding and color weights to represent different values, in additional or alternative embodiments, the visual heat map output may be represented in an output interface by other types of outputs detectable by a user, such as, but not limited to: tactile output of visual indicators in the visual heat map, auditory output of visual indicators in the visual heat map, and other outputs that enable a user to detect different score weights for a word. In addition, in additional or alternative embodiments, in addition to or in lieu of color, the visual heat map output may be represented by a graphically represented numerical value, where the numerical value represents a percentage or other weighted numerical value.
[0048] In one example, the anomaly visualization service includes a word-level analysis component 232 implemented at the classifier level with the text classifier 102, a word-level heat map component 234 implemented at the client application level of the client 120, and a word-level heat map 236, a k-preferred word heat map 242, and a training data set 238 implemented at the user interface level within the user interface 240. In additional or alternative embodiments, the anomaly visualization service may include additional or alternative functional and data components.
[0049] In one example, a word-level analysis component 232 is implemented in the same layer as the text classifier 102 or incorporated in the text classifier 102 for calculating one or more heat map values for the text 222 and one or more heat map values for the classification labels included in the ground truth training set 108. In this example, the classification 224 is updated by the word-level analysis component 232 with one or more heat map values, which are determined by the word-level analysis component 232 with the labels 226, shown as heat map values 228. In one example, each heat map value in the heat map values 228 may represent one or more weighted values (such as, but not limited to, percentages and colors), and may be identified with one or more symbols or correspond to one or more symbols (such as words), or may be ordered as a specific word in a corresponding sequence.
[0050] For example, the word-level analysis component 232 can determine the heat map value 228 by decomposing the score calculated for each extracted feature into each word or other symbol, and assigning each decomposed score as a heat map value that directly reflects the contribution of the word to the final score of the intent classification. IK As previously described, the linear model applied by model 112 for text classification of text 222 (denoted as U) uses the linear model obtained from text f k (U) The weighted sum of the various features extracted, and then the ranking score S of each tag I is obtained, for example, by the following formula:
[0051] S I (U) = f1(U)W I1 +f2(U)W I2 …+f k (U)w IK +b I
[0052] For all types of features used in the text classifier 102, the word-level analysis component 232 traces back and determines which words contributed to the extracted features. By accumulating all feature scores belonging to each token, the word-level analysis component 232 calculates the word-level feature scores. I (U) is broken down into individual words, as follows:
[0053] S I (U) = S′ I (u1)+S′ I (u2)...+S′ I (u N )+b I
[0054] In this example, S′ I (u N ) is used as a heat map value that directly reflects the contribution of the word to the final score of intent I. In particular, in this example, given the test instance text 222, the sum of the scores of all words on the heat map is exactly the score used to calculate the tag confidence, so the word-level score directly reflects the importance of each word in calculating the final intent tag confidence.
[0055] In one example, in response to the text 222, the word-level heat map controller 234 receives the classification 224 with the label 226 and the heat map value 228, and generates a visible graphical representation of the heat map value for the text 222 in the word-level heat map 236. In one example, the word-level heat map controller 234 sequentially applies each percentage or color value in the heat map value 228 to the word or other symbol identified in the text 222. In one example, the word-level heat map 236 can reflect different heat map values by different colors assigned to different heat map values, by different hues assigned to different percentages in the heat map value, and by other visually discernible output indicators assigned to different heat map values. In another example, the word-level heat map 236 can reflect different heat map values through other types of output interfaces, including but not limited to auditory and tactile interfaces for adjusting the output level or type to identify different heat map values.
[0056] In one embodiment, the word-level heat map 236 is described with reference to the advantages of the present invention, which is to show the relevance of each word or other symbol in the text sequence to the predicted token 226. In another embodiment, the word-level heat map 236 may include additional types of visual indicators of relevance, such as visualizing the comparison of the relevance of each word or symbol in the text sequence to the predicted token and the relevance of each word or other symbol in the text sequence to the ground-truth token. In particular, in this example, the word-level heat map controller 234 may access the ground-truth heat map of the sentence associated with the text 222 and the expected token for the sentence, and output the word-level heat map 236 with a visual representation of the comparison of the ground-truth heat map compared to the heat map generated for the text 222 and the predicted token 226 based on the heat map value 228. In one example, the text classifier 102 may provide the ground-truth heat map value in the classification 224. In another example, the test controller 208 may store the heat map generated from the classification 224 in response to the text 222 including the ground-truth training set 108. In addition, the test set 220 may include a user-generated ground-truth heat map.
[0057] In one example, the word-level heatmap controller 234 initially generates one or more tokens and one or more words in the training data set 238 based on analyzing the values in the word-level heatmap 236. In one example, a user can manually adjust the entities in the training data set 238 based on examining the word-level heatmap 236 and request the training set controller 250 to send the training data set 238 to train the text classifier 102. In one example, the training set controller 250 also updates the ground truth training set 108 with the training data set 238 to reflect the training data currently used to train the model 112 in the text classifier 102.
[0058] In one example, in addition to analyzing the words in the text 222, the word-level analysis component 232 also analyzes the weight of each word under each token identified relative to the intent tested by the test set 220. For example, the word-level analysis component 232 stores the sum of the word-level scores identified for each word in each intent predicted by the test set 220 in the form of word-level scores by intent 234. Based on the k preferred score words ordered for a specific intent in the word-level scores by intent 234, the word-level analysis component 232 identifies k preferred important words for a specific intent token for a specific intent, where k can be set to any value, such as "10". The word-level analysis component 232 returns the ranked k preferred important words for a specific intent token 226 in a k preferred heat map list 229 with an ordered list of the k preferred score words. In addition, the k preferred heat map list 229 may include a heat map value, such as a percentage or a color, assigned to each word in the ordered list, which indicates the relative score of each word to other words and the relative score is related to the predicted intent.
[0059] In this example, in response to receiving a tag 226 with k preferred heatmap lists 229, a word-level heatmap controller 234 generates k preferred word heatmaps 242, outputs the tag 226 and the k preferred lists, and visually highlights each word in the k preferred lists with heatmap attributes, such as color and percentage chroma, to visually indicate the relative score of each word relative to the predicted intent. According to the advantages of the present invention, the k preferred word heatmap 242 provides a visual representation of the weights of words trained for predicted intent to assist the user in visually assessing whether there are words in the k preferred words of the predicted intent tag that should be ranked higher or lower for the predicted intent tag. Further, the k preferred word heatmap 242 provides a visual representation of the weights of words trained for the desired intent to assist the user in visually assessing whether there are words in the k preferred words of the desired intent tag that should be ranked higher or lower. Within an interface that provides a visual representation of the weights of words trained for incorrectly predicted intents and expected intents in the k preferred heat maps 242, the user is also provided with an interface in which to selectively modify the training data set 238 to increase or decrease the words assigned to the predicted intent tags and the expected intent tags.
[0060] According to the advantages of the present invention, the word-level heat map 236 and the k-preferred word heat map 242 jointly provide the user with a visual representation of the specific words and their semantic counterparts that are most likely to cause anomalies, so as to help the user make the most likely selection within the training data set 238 to train the text classifier 102 to improve the prediction accuracy. For example, the word-level heat map 236 visually identifies one or more words that have the highest contribution to the predicted intent in the test string to prompt the user to the problem words that need additional training in the incorrectly predicted test string, and the k-preferred word heat map 242 visually identifies the response semantically associated words associated with the incorrectly predicted tags and the expected tags to prompt the user to the weights of the problem words that need additional training in the incorrectly predicted tag training and the expected tag training.
[0061] According to the advantages of the present invention, the time and effort of the user of the text classifier 102 to understand why the text classifier 102 generates a specific token for a specific test phrase and which words of the test phrase contribute most to the text classification decision at the word level is minimized through the word-level heatmap visualization provided via the heatmap value 228 and the k-preferred heatmap list 229, the anomaly visualization service provided via the functionality, and the visual representation provided via the word-level analysis component 232, the word-level heatmap controller 234, the word-level heatmap 236, and the k-preferred word heatmap 242, without exposing the underlying data objects of the model 112. In this example, the user can review the visualization of the scores of specific words within the text 222 that contribute to the classification of the tokens in the word-level heatmap 236 and effectively determine which words or phrases are more related to each token of the test phrase and whether the relationship is correct or reasonable to determine which words need additional training. In addition, in this example, the user can review the visualization of the score ranking of words related to specific tokens in the k-preferred word heatmap 242 on multiple test phrases to determine whether there are words that contribute to the scores of specific tokens that need to be adjusted.
[0062] In one embodiment, the text classifier 102 represents a linear classifier with arbitrary features, such as, but not limited to, a linear support vector machine (SVM), logistic regression, and perception. In another embodiment, the text classifier 102 may implement a more complex model, such as a deep learning model, however, according to the advantages of the present invention, the functionality of the anomaly visualization service does not require the more complex model environment of the deep learning model, but multiple weights applied to different symbols in the text string by the linear classifier are applicable. In addition, in one embodiment, the text classifier 102 represents a linear classifier that determines a score based on the sum of the weighted scores of the extracted features, and the word-level analysis component 232 is described with respect to the extracted feature scores that directly decompose the final tag prediction to describe how each word or phrase in the text affects the final tag output, however, in additional or alternative embodiments, the model 112 may also learn additional attention variables that are generated as auxiliary data that may or may not affect the final tag prediction score.
[0063] Figure 3 A block diagram showing one example of word-level analysis elements evaluated by a word-level analysis component at a text classifier level.
[0064] In this example, as shown by reference numeral 302, all weights are fixed for the trained text classifier model. In one example, in response to a text phrase M having three words u1, u2, and u3 (as shown by reference numeral 304), the text classifier 102 classifies the text phrase M by predicting a tag X (as shown by reference numeral 322). In this example, words u1, u2, and u3 may each represent a single word or a phrase having multiple words. In one example, each of words u1, u2, and u3 may each be referred to as a symbol.
[0065] In this example, to determine the tag score 310 for the predicted tag X, the text classifier 102 sums the weighted scores for each extracted feature. For example, the tag score X 310 is the sum of the product of the extracted feature 312 and the weight 314, the product of the extracted feature 316 and the weight 318, and the bias 320. In one example, the text classifier 102 may extract the same number of features as the number of words from the test phrase or may extract fewer or more features than the number of words from the test phrase.
[0066] In this example, the word-level analysis component 232 decomposes the extracted feature product used to calculate the token score X 310 to determine the feature scores by word that together with the bias 330 add up to the token score X 310, as shown by the feature score by word (u1) 326, the feature score by word (u2) 327, and the feature score by word (u3) 328. For example, when decomposing the extracted feature product, the word-level analysis component 232 can determine S by the following formula: I (U) to recover the original classification score,
[0067]
[0068] Where I represents the intent tag, i represents the extracted feature index, u represents the feature weight, and w is the contribution symbol of each feature. For multi-symbol features, the score of each symbol is evenly divided.
[0069] In this example, the word-level analysis component 232 selects a heatmap value for each score by word, as shown at reference numeral 332. For example, the word-level analysis component 232 assigns a heatmap value A 344 to the feature score 326 by word (u1), a heatmap value B 346 to the feature score 327 by word (u2), and a heatmap value C 348 to the feature score 328 by word (u3). In this example, the word-level analysis 232 outputs a classification with a label X and heatmap values A, B, and C, as shown at reference numeral 350, wherein the sequential order of the heatmap values in the classification corresponds to the order of words u1, u2, and u3 in the test phrase M.
[0070] In this example, for each test phrase in the test set 220, the word-level analysis component 232 updates a record for the token X in the word-level score by intent 234 as shown by the token X sum 360. In this example, the token X sum 360 includes a total score for each word that contributes to the token X and all scores for the predicted intents of the test set 220, including a total score 364 for the word U1 362, a total score 368 for the word U2 366, and a total score 372 for the word U3 370. In this example, the word-level score by intent 234 includes a record for each intent token detected for the test phrase in the test set 220.
[0071] In this example, based on the sum 360 of tokens X over multiple test phrases in the test set 220, the word-level analysis component 232 sorts the k preferred words of token X by the total score from one or more test phrases, as shown at reference numeral 380. Next, as shown at reference numeral 382, the word-level analysis component 232 assigns a heat map value to each of the k preferred words by the total score (382), and as shown at reference numeral 384, the word-level analysis component 232 outputs a list of k preferred words with heat map values.
[0072] Figure 4 An example of a table illustrating examples of types of extracted features that are decomposed for determining per-word feature scores is shown.
[0073] In one example, the text classifier 102 can support multiple types of feature extraction in any type of features that can be decomposed into words. In one example, the text classifier 102 supports word-level features, such as unigrams and parts of speech (POS). In another example, the text classifier 102 supports word features, such as entity-based features, concept-based and word-based features, bigram features, and trigram features. In another example, the text classifier 102 supports n-gram features at the letter level. In addition, the text classifier 102 supports the maximum (average) pooling of word embedding features or pre-trained CNN or biLSTM features.
[0074] In this example, table 402 shows examples of feature types extracted from a text string, symbols applied to the feature types, and examples of scores determined for the symbols. For example, table 402 includes: a column identifying feature types 410, a column identifying contribution symbols 412, and a column identifying score S(U) 414.
[0075] In the first example of table 402, for the feature type of unigram 420, the identified contributing symbol is "i" 422 and the score is assigned as "0.4" 424. k The word-by-word feature score S′ of (U) I (u N ) can be decomposed according to the following formula:
[0076] S′ I (u N ) = S′ I (u N )+f k (U)w IK .
[0077] In the second example of table 402, for the feature type of bigram 430, the contributing symbol identifier is "I am" and the score is assigned as "0.4" 434, which is the same as the score assigned to the symbol "I" 422. In one example, the contributing symbol identifier from the feature type for bigram 430, as well as for any term-based multi-word features, is assigned as "0.4" 434. k The word-by-word feature score S′ of (U) I (u N ) can be calculated according to the following formula:
[0078] S′ I (u N ) = S′ I (u N )+f k (U)w IK / |L|.
[0079] In one example, L is the length of a word, so the score of the feature is divided equally between each word in the word. For example, the length of "I am" is "2", so the feature product score for extracting the feature "I am" is divided equally between "I" and "I am".
[0080] In the third example of table 402, for the feature type of part-of-speech POS-PP 440, the contributing symbol identifier is "from", and a score is assigned as "0.5" 444, which is a higher score than the scores assigned to the symbol "I" 422 and the symbol "I am" 424. In one example, a feature f from the feature type for part-of-speech prepositional phrase (POS-PP) 440 may be determined by tagging each word with a POS tag using a POS tagger and then treating a particular POS tag as a feature (contributed by a particular word). k The word-by-word feature score S′ of (U) I (u N ).
[0081] In the fourth example of table 402, for the feature type of entity 450, the contributing symbol identifier is "city name A" 452, where "city name A" may identify a specific city name, and the score is assigned as "0.7" 454, which is a higher score than the scores assigned to the previous symbols. In one example, the contributing symbol identifier from the feature type for entity 450, as well as for any other entity-based or concept-based multi-word features, is assigned as "0.7" 454. k The word-by-word feature score S′ of (U) I (u N ) can be calculated according to the following formula:
[0082] S′ I (u N ) = S′ I (uN )+f k (U)w IK / |L|.
[0083] In the fifth example of table 402, for the feature type or dimension of average word vector 460, the contributing symbol identifier is "avg-w2v-I" 462, which represents the average vector of all word vectors of the words in the sentence, where the average vector has a numerical value. For example, for deep learning, a set of word vectors for vocabulary words can be pre-trained through a large corpus (such as the Wikipedia corpus) and used as a fixed input vector for each vocabulary word. In this example, the score is assigned as "-0.27" 464, which is a lower score than the score assigned to the previous symbol. In one example, the feature f from the feature type for average word vector 460 is k The word-by-word feature score S′ of (U) I (u N ) can be based on all u N The average of the word embeddings for each word in the sentence is then used to obtain the type of sentence-level features.
[0084] In the sixth example in table 402, for the maximum word vector 470 feature type, the contribution symbol identifier is "max-w2v-I" 472, and the score is assigned as "0.45" 474. In one example, the feature f from the maximum word vector 470 feature type k The word-by-word feature score S′ of (U) I (u N ) can be based on all u N The maximum value of the word embedding feature is calculated, where the score of this feature is only assigned back to one word u N , the word has the maximum value in the embedding dimension.
[0085] In the seventh example, in table 402, for a feature type of a character / letter level feature, such as letter-trigram 480, the contributing symbol identifier is "from" 482, and the score is assigned as "0.4" 484. In this example, word u N "This" has two letter-trigram features "thi" and "his", each of which includes the N In one example, feature f from the feature type for letter-trigram 480 k The word-by-word feature score S′ of (U) I(u N ) can be calculated according to the following formula:
[0086] S′ i (u N ) = S′ i (u N )+f k (tri1)w iK +f k′ (tri1)w iK′
[0087] In this example, k and k' may represent the first and second letter-trigrams, respectively.
[0088] Figure 5 A block diagram showing one example of a word-level heat map reflecting a ground-truth heat map compared to a test set heat map based on test phrases tested on a trained model.
[0089] In one example, a word-level heat map 236 is shown for selecting a test phrase from a test set 220 classified by the model 112. In this example, for purposes of illustration, Figure 5 Results are reflected for testing three test phrases included in the test set 220. In additional or alternative examples, the test set 220 may include an additional number of test phrases.
[0090] exist Figure 5 In the first example, the same test phrase "how are you going to help me?" shown under text 516 is visualized in the word-level heat map 236 for the training ground truth 504 and the test set prediction 506. In this example, for the same test phrase, the intent tag 510 is identified as "ability" 512 under the training ground truth 504 and as "greeting" 514 under the test set prediction 506. In this example, for the test phrase of "how are you going to help me?" from the test set 220, the test set prediction 506 indicates the tag currently predicted by the text classifier 102. For example, the word-level analysis component 232 determines the classification tag "ability" and heat map value of the word in the text 516 and outputs the tag and heat map value in the classification 224.
[0091] The word-level heat map controller 234 visually identifies (e.g., by a percentage color level) the percentage probability of each word token identified in the text 516 based on the heat map value returned in the classification 224. For illustrative purposes, in this example, the color percentages shown for the colors 518 are illustrated by color intensity numbers (a scale of 0 to 5), each number in the scale reflecting a different shade or color that can be applied to each symbolized portion of the text phrase. In this example, a "0" in the color 518 can reflect no shade, and a "5" in the color level 518 can reflect 100% shade.
[0092] For example, for text 516, the ground truth intent tag "ability" 512 is shown as being visually influenced by the words "you" and "help" reflecting the highest intensity "4", where the words "you" and "help" are more indicative of capability than greeting. In contrast, the predicted intent "greeting" 514 is shown as being visually influenced by the word "are you", reflecting the highest chroma "5", and the preceding word "how", reflecting the second highest chroma "3", where the words "how" and "you will" are more indicative of greeting than capability. In this example, by visually displaying the symbol scores as a heat map for the training ground truth and the test set predictions, the user is able to visually understand that the current system gives more preference to the word "you will" rather than "help me". In this example, the symbol "help me" is intuitively related to how customer service solves the requester's problem, which is related to the intent "ability", rather than the customer's choice to greet the customer service system. In this example, by visually displaying the symbol scores as a heat map for the predictions, the user may choose to adjust the training data set 238 to include additional training for the phrase "How will you help me?", thereby improving the symbol scores of "help" and other semantic counterparts (such as "helped" and "helps") in the same text phrase as "you will" for the intent "ability". Additionally, in this example, for the anomaly in the test of "How will you help me?", the user may selectively adjust the training data set 238 to reduce the occurrence of the phrase "you will" when it appears with "help" in the incorrectly predicted intent "greeting" and to improve its occurrence in the training ground truth intent "ability".
[0093] exist Figure 5In a second example, the same test phrase "I am feeling good thanks" shown under text 546 is visualized in the word-level heat map 236 for the training ground truth 504 and the test set prediction 506. In this example, for the same test phrase, the intent tag 540 is identified as "greetings" 542 under the training ground truth 504 and as "thanks" 544 under the test set prediction 506. In this example, the word-level heat map controller 234 visually identifies (e.g., by a percentage color level) the percentage probability of each word symbol identified in the text 546 based on the heat map value returned in the classification 224. For example, for the text 546, the ground truth intent tag "greetings" 542 is shown to be visually influenced by the words "feeling" and "good" reflecting intensities "3" and "4", where the words "feeling" and "good" are more indicative of greetings than thanks. In contrast, the predicted intent "thank" 544 is shown as being visually influenced by the word "thanks" reflecting the highest chromaticity "5", where the word "thank" is more indicative of thankfulness than greeting. In this example, by visually displaying the symbol scores as a heat map for the training ground truth and the test set predictions, the user is able to visually understand that the current system gives more preference to the word "thank" rather than "feel good". In this example, the symbol "feel good" is intuitively related to how the customer greets the customer service, related to the intent "greeting", rather than the customer choosing to thank the customer service system. In this example, by visually displaying the symbol scores as a heat map for the predictions, the user may choose to adjust the training data set 238 to include additional training for the phrase "I feel good thanks", thereby improving the symbol scores of "feeling" and "good" and other semantically corresponding words (such as "feeling (doing)" and "good (well)") in the same text phrase as "thank" for the intent "greeting". Additionally, in this example, for the anomaly in the test of "I feel great thanks," the user may selectively adjust the training data set 238 to reduce the occurrence of the phrase "thanks" when it appears with "feeling" and "great" in the incorrectly predicted intent "thanks" and to increase its occurrence in the training ground truth intent "greetings."
[0094] exist Figure 5In a third example of FIG. 5 , the same test phrase “dial the home number” shown under text 576 is visualized in the word-level heat map 236 for the training ground truth 504 and the test set prediction 506. In this example, for the same test phrase, the intent tag 570 is identified as “phone” 572 under the training ground truth 504 and as “place” 574 under the test set prediction 506. In this example, the word-level heat map controller 234 visually identifies (e.g., by a percentage color level) the percentage probability of each word symbol identified in the text 576 based on the heat map value returned in the classification 224. For example, for the text 576, the ground truth intent tag “phone” 572 is shown to be visually influenced by the words “dial” and “number” reflecting intensities “4” and “3”, where the words “dial” and “number” are more indicative of a phone command than a place command. In contrast, the predicted intent "place" 574 is shown as being visually influenced by the word "home," which reflects the highest chromaticity "5," where the word "home" is more indicative of a place command than a phone command. In this example, by visually displaying the symbol scores as a heat map for the training ground truth and the test set predictions, the user is able to visually understand that the current system gives more preference to the word "home" rather than "dial" and "number." In this example, the symbols "dial" and "number" are intuitively related to how a customer requests phone-related services, and are related to the intent "phone," rather than the customer's choice of a place. In this example, by visually displaying the symbol scores as a heat map for the predictions, the user may choose to adjust the training data set 238 to include additional training for the phrase "dial a home number," thereby improving the symbol scores for "dial" and "number" in the same text as "home" for the intent "phone." Additionally, in this example, for the anomaly in the test of "call home," the user may selectively adjust the training data set 238 to reduce the occurrence of the phrase "home" when it appears with "call" and "number" in the incorrectly predicted intent "place" and to increase its occurrence in the training ground truth intent "phone."
[0095] Figure 6 A block diagram showing an example of a word-level heat map reflecting a heat map of the k top important words based on tokens of a test phrase tested on a trained model.
[0096] In one example, the training set 602 reflects current training data for training the model 112 for the intent “turn on”. For example, the training set 602 includes the phrases “I need more lights,” “Can you turn on the radio?”, “Click my locks,” “Turn on the headlights,” “Turn on my wipers,” “Turn on the lights,” “Lock my doors,” “Close my doors,” “Play music,” “Play some music,” “Turn on the radio now,” “Turn on my backup camera,” “Turn on my lights for me,” “Turn on my windshield wipers,” and “Turn on the A / C.” In this example, the k preferred important words 610 show a list of words reflected in the training set 302, sorted by importance in predicting the intent “turn on.” In this example, the k preferred important words 610 are shown in order of importance, with the phrase “turn on” listed first as the most important and the word “camera” listed last as the least important. In this example, the order of the k preferred important words 610 is determined by the word-level analysis component 232 detecting the word-level scores by the intent 234 while testing the text classifier 102 against the test set 220. In particular, the word-level analysis component 232 can aggregate the scores calculated for the heat map values with respect to each word under each intent in the word-level scores by intent 234 and then determine k preferred total heat map values. In another example, the words in the k preferred important words 310 can be colored to visually reflect the importance or total heat map value, where the most important words have the highest percentage of color and the least important words have the lowest percentage of color.
[0097] In this example, the word "door" 612 may reflect an outlier word that is ranked higher than expected for the intent "open" because the training set 602 includes the phrases "lock my doors" and "close my doors" as training data for the intent classification "open", as shown by reference number 604. In this example, a user viewing the k preferred important words 610 may see that the word "door" is reflected as more important than expected and adjust the training set 602 by reducing the occurrence of the outlier word "door". By reducing the occurrence of words marked as outliers in the k preferred important words 610 in the training data set 238 and selecting the text classifier 102 with the training data set 238 as updated, the user can mitigate potential prediction errors before deploying the trained classifier model.
[0098] In particular, in this example, although Figure 5 In the example of the word-level heat map 236 shown in FIG. 1 , the user receives a visual assessment of the words in the test phrase that contribute most and least to the tag prediction in order to quickly identify the problem words in the particular test phrase that cause the tag prediction anomaly, but in Figure 6In the example of the k top word heat map 242 shown in , the user receives a visual assessment of the semantically related words in the training corpus that are likely to lead to a particular token prediction for the test set, in order to quickly identify problem words for training on a particular token.
[0099] Figure 7 A block diagram of one example of a computer system in which one embodiment of the present invention may be implemented is shown. The present invention may be implemented in various systems and combinations of systems comprised of functional components such as those described with reference to computer system 700 and communicatively connected to a network such as network 702.
[0100] The computer system 700 includes a bus 722 or other communication device for communicating information within the computer system 700, and at least one hardware processing device, such as a processor 712, coupled to the bus 722 for processing information. The bus 722 preferably includes low-latency and high-latency paths connected by bridges and adapters and controlled by multiple bus controllers within the computer system 700. When implemented as a server or node, the computer system 700 may include multiple processors designed to improve network service efficiency.
[0101] Processor 712 may be at least one general purpose processor that processes data during normal operation under the control of software 750, which may include at least one of application software, operating systems, middleware, and other code and computer executable programs accessible from dynamic storage devices (e.g., random access memory (RAM) 714), static storage devices (e.g., read-only memory (ROM) 716), data storage devices (e.g., mass storage device 718), or other data storage media. Software 750 may include, but is not limited to, code, applications, protocols, interfaces, and processes for controlling one or more systems within a network, including, but not limited to, adapters, switches, servers, cluster systems, and grid environments.
[0102] Computer system 700 can communicate with remote computers (e.g., server 740) or remote clients. In one example, server 740 can be connected to computer system 700 via any type of network (e.g., network 702) through a communication interface (e.g., network interface 732) or through a network link that can be connected to, for example, network 702.
[0103] In this example, multiple systems within a network environment may be communicatively connected via a network 702, which is a medium for providing communication links between various communicatively connected devices and computer systems. For example, the network 702 may include permanent connections (such as wired or fiber optic cables) and temporary connections through telephone connections and wireless transmission connections, and may include routers, switches, gateways, and other hardware to implement communication channels between systems connected via the network 702. The network 702 may represent one or more of the following: a packet-switching-based network, a telephony-based network, a broadcast television network, a local and cable area network, a public network, and a restricted network.
[0104] The network 702 and the systems communicatively connected to the computer 700 via the network 702 may implement one or more layers of one or more types of network protocol stacks, which may include one or more of a physical layer, a link layer, a network layer, a transport layer, a presentation layer, and an application layer. For example, the network 702 may implement one or more of the following: a transmission control protocol / internet protocol (TCP / IP) protocol stack, or an open system interconnection (OSI) protocol stack. In addition, for example, the network 702 may represent a worldwide collection of networks and gateways that use the TCP / IP protocol suite to communicate with each other. The network 702 may implement a secure HTTP protocol layer or other security protocol for secure communication between systems.
[0105] In this example, the network interface 732 includes an adapter 734 for connecting the computer system 700 to the network 702 by a link and for communicatively connecting the computer system 700 to the server 740 or other computing system via the network 702. Although not described, the network interface 732 may include additional software (e.g., device drivers), additional hardware, and other controllers that enable communication. When implemented as a server, the computer system 700 may include, for example, multiple communication interfaces accessible via multiple peripheral component interconnect (PCI) bus bridges connected to an input / output controller. In this manner, the computer system 700 allows connections to multiple clients via multiple separate ports, and each port may also support multiple connections to multiple clients.
[0106] In one embodiment, operations performed by processor 712 may control Figure 8-13The operations of the flowcharts of and other operations described herein. The operations performed by processor 712 may be requested by software 750 or other code, or the steps of one embodiment of the present invention may be performed by specific hardware components including hardwired logic for performing the steps or by a combination of programmed computer components and custom hardware components. In one embodiment, one or more components of computer system 700 or other components that may be integrated into one or more components of computer system 700 may include a computer program for performing Figure 8-13 The hard-wired logic of the operation of the flowchart.
[0107] In addition, the computer system 700 may include a plurality of peripheral components that facilitate input and output. These peripheral components are connected to a plurality of controllers, adapters, and expansion slots of one of the multiple levels coupled to the bus 722, such as an input / output (I / O) interface 726. For example, the input device 724 may include, for example, a loudspeaker, a photographic device, an image scanning system, a keyboard, a mouse, or other input peripherals that can be communicatively activated on the bus 722 via the I / O interface 726 for controlling input. In addition, for example, the output device 720 that can be communicatively activated on the bus 722 via the I / O interface 726 for controlling output may include, for example, one or more graphic display devices, an audio speaker, and a tactile detectable output interface, but may also include other output interfaces. In alternative embodiments of the present invention, additional or alternative input and output peripheral components may be added.
[0108] about Figure 7 The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0109] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, - but not limited to - an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0110] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0111] The computer program instructions for performing the operation of the present invention may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0112] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0113] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0114] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0115] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0116] Those skilled in the art will understand that Figure 7 The hardware described in the drawings may vary. Furthermore, those skilled in the art should appreciate that the described examples are not intended to imply architectural limitations to the present invention.
[0117] Figure 8 A high-level logic flow diagram of a process and computer program for creating and training a classifier model is shown. In one example, the process and computer program start at block 800 and then proceed to block 802. Block 802 shows a determination of whether a request to create a trained model is received from a client. At block 802, if a request to create a trained model is received from a client, the process proceeds to block 804. Block 804 shows a determination of whether a user-selected data set is received. At block 804, if a user-selected data set is received, the process proceeds to block 808. At block 804, if a user-selected data set is not received, the process proceeds to block 806. Block 806 shows a selection of a default data training set, and the process proceeds to block 808.
[0118] Box 808 shows applying the selected data training set as the ground truth training set to the model to create a trained model. Next, box 810 shows returning the trained model indicator to the client, and the process ends.
[0119] Fig. 9 A high-level logic flow diagram of a process and computer program for updating a trained classifier model is shown. In one example, the process and computer program start at block 900 and proceed to block 902. Block 902 shows a determination of whether an updated data training set is received from a client for the trained model. At block 902, if an updated data training set is received from a client for the trained model, the process proceeds to block 904. Block 904 shows updating the training of the classifier model with the updated data training set. Next, block 906 shows returning a trained model indicator to the client, and the process ends.
[0120] Fig.10 A high-level logical flow chart of a process and computer program for analyzing predicted classifications to determine heat map levels at the word level indicating word-level contributions to the predicted classification of a test phrase and the classification labels of a trained model is shown.
[0121] In one example, the process and computer program start at box 1000 and then proceed to box 1002. Box 1002 shows determining whether a test set is received from a client for testing a trained model. At box 1002, if a test set is received from a client for testing a trained model, the process proceeds to box 1004. Box 1004 shows running the test set on the trained model. Next, box 1006 shows identifying the predicted classification tags and scores for each test set phrase in the test set. Thereafter, box 1008 shows decomposing the extracted features aggregated in the tag scores into word-level scores for each word in each test set phrase. Next, box 1010 shows assigning heat map values to each word-level score for each word in each test set phrase. Thereafter, box 1012 shows storing the assigned heat map values by test set phrase and tag. Next, box 1014 shows a word-level score by word for each tag predicted for the test set. Thereafter, box 1016 shows identifying k preferred words for each tag in descending order based on the aggregated word-level scores for each tag. Next, box 1018 shows assigning heatmap values based on the word-level scores to the k preferred words in each tag list. Thereafter, box 1020 shows returning the predicted classification tags to the client along with the corresponding heatmap values sorted by the test set phrases and the k preferred words with heatmap values for the predicted classification tags.
[0122] Fig.11 A high-level logic flow diagram of a process and computer program for outputting a predicted classification with a visual indicator of influence on the predicted classification based on the corresponding word-level heat map levels of the most influential classification tags is shown.
[0123] In one example, the process and computer program start at box 1100 and then proceed to box 1102. Box 1102 shows determining whether a predicted classification tag and a word-level heat map value by test set phrase are received from a text classifier. At box 1102, if a predicted classification tag and a word-level heat map value by test set phrase are received from a text classifier, the process proceeds to box 1104. Box 1104 shows aligning the classification tag and the heat map value sorted by test set phrase with the corresponding test set phrase in the submitted test set. Next, box 1106 shows accessing (if available) the true state heat map value evaluation and expected classification tag associated with each test set phrase in the submitted test set. Thereafter, box 1108 shows the selection of identifying the submitted test set phrase with a returned classification tag that does not match the expected tag of the test set phrase, which indicates an anomaly. Next, box 1110 shows a graphical representation of the selection of the submitted test phrase output in the user interface with the returned classification labels and visual indicators at the word level based on the corresponding word-level heat map values compared to the visual indicators at the word level based on any corresponding ground-truth heat map values and ground-truth classification labels, and the process ends.
[0124] Fig.12 A high-level logic flow diagram of a process and computer program for outputting a predicted classification with a visual indicator of influence on the predicted classification based on a list of k preferred words in a training set that are labeled with the most influence on the classification according to corresponding k preferred heat map levels is shown.
[0125] In one example, the process and computer program start at block 1200 and proceed to block 1202. Block 1202 illustrates determining whether k preferred word lists with one or more predicted k preferred heat map values by classification are received from a text classifier. At block 1202, if one or more predicted k preferred word lists with one or more predicted k preferred heat map values by classification are received from a text classifier, the process proceeds to block 1204. Block 1204 illustrates identifying a classification labeled training set corresponding to each k preferred word list and heat map value for a classification label. Next, block 1206 illustrates determining whether k preferred word lists with word-level heat map values by a test set phrase are received.
[0126] At block 1206, if a list of k preferred words with word-level heatmap values by test set phrase is received, the process proceeds to block 1208. Block 1208 illustrates a selection of identifying submitted test set phrases with returned classification tags that do not match the ground-truth classification tags and a corresponding selection of the ground-truth classification tags and the returned classification tags. Next, block 1210 illustrates outputting a graphical representation of the selection of the list of k preferred words with a visual indicator in a user interface based on each corresponding heatmap value for selecting the corresponding ground-truth classification tags and the returned classification tags, and the process ends.
[0127] Returning to block 1206, if no k preferred word lists with word-level heat map values per test set phrase are received, the process proceeds to block 1212. Next, block 1212 illustrates outputting a graphical representation of one or more k preferred word lists with a visual indicator in a user interface based on each corresponding heat map value, and the process ends.
[0128] Fig.13 A high-level logic flow diagram of a process and computer program for supporting updated training of a text classifier that highlights classification label training for identified anomalies is shown.
[0129] In one example, the process and computer program start at box 1300 and then proceed to box 1302. Box 1302 shows displaying an editable training set in a user interface for additional training of a trained model. Next, box 1304 shows visually highlighting one or more classification label pairs identified as true condition classification labels and prediction labels for identified anomalies within the editable training set. Thereafter, box 1306 shows determining whether the user chooses to edit the training set and send the training set to a text classifier. At box 1306, if the user chooses to edit the training set and send the training set to the text classifier, the process proceeds to box 1308. Box 1308 shows a request to send the training set to the text classifier and update the training of the text classifier with the training set, and the process ends.
[0130] The purpose of the terms used herein is only to describe particular embodiments and is not intended to limit the present invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that when used in this specification, the terms "include" and / or "comprise" specify the presence of the features, wholes, steps, operations, elements and / or components, without excluding the presence or increase of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0131] The corresponding structures, materials, actions and equivalents of all methods or steps and functional elements in the following claims are intended to include any structure, material or other elements that are specifically protected as claimed to perform the action of the function in combination. The description of one or more embodiments of the present invention has been presented for the purpose of illustration and description, but is not intended to be exhaustive or limit the present invention to the disclosed form. Without departing from the scope and spirit of the present invention, many modifications and variations are obvious to those skilled in the art. Select and describe embodiments in order to better explain the principles and practical applications of the present invention, and enable other persons skilled in the art to understand the present invention for various embodiments with various modifications such as being suitable for the intended specific use.
[0132] While the invention has been particularly shown and described with reference to one or more embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention.
Claims
1. A method comprising the following steps: running at least one test phrase on a pre-trained text classifier, wherein the test phrase includes one or more words; identifying individual predicted classification tokens based on a per-intent score calculated by the text classifier for the test phrase; decomposing, by a computer system, the plurality of extracted features aggregated in the score into a plurality of word-level scores for each word in the test phrase; assigning, by the computer system, a separate heat map value to each word-level score in the plurality of word-level scores, each respective separate heat map value reflecting a weight of each word-level score in the plurality of word-level scores; and The individual predicted classification tags and each individual heat map value reflecting the weight of each of the plurality of word-level scores are outputted by the computer system to a client for defining a heat map identifying the contribution of each word in the test phrase to the individual predicted classification tags, wherein the client determines whether each individual predicted classification tag matches an expected classification tag for the client to evaluate text classification anomalies.
2. The method according to claim 1, further comprising the steps of: In response to running the test phrase, for each individual predicted classification token in a plurality of classification tokens, aggregating, by the computer system, the plurality of word-level scores on a per-word basis; For each individual predicted classification label, identifying, by the computer system, a list of preferred words from among the plurality of words in descending order from a highest per-word aggregate score; as well as The individual predicted classification labels, each individual heat map value, and the preferred word list for each corresponding individual predicted classification label are output by the computer system.
3. The method according to claim 1, further comprising the steps of: A score for the individual predicted classification label is calculated by the computer system based on a weighted sum of multiple combinations of individual extracted features from the plurality of features and weighted model parameters fixed in the pre-trained text classifier.
4. The method according to claim 1, wherein: The step of decomposing, by the computer system, the plurality of extracted features summed in the score into a plurality of word-level scores for each word in the test phrase further comprises the following steps: The plurality of extracted features are decomposed by the computer system, the plurality of extracted features comprising one or more of: unigram-based features, term-based features, average pooling of word embedding features, maximum pooling of word embedding features, and character-level features.
5. The method according to claim 1, further comprising the steps of: Initiating a text classifier model by the computer system; Training the text classifier model by the computer system by applying a training set having a plurality of training phrases; Deploying the text classifier model as the pre-trained text classifier by the computer system for client testing; and In response to receiving the at least one test phrase from the client, the at least one test phrase is run by the computer system on the pre-trained text classifier.
6. The method according to claim 1, wherein: The client outputs each individual heat map value in a user interface for graphically representing the weight of each word-level score to identify the contribution of each word in the at least one test phrase to the individual predicted classification label.
7. A computer system comprising one or more processors, one or more computer-readable memories, one or more computer-readable storage devices, and program instructions stored on at least one storage device of the one or more storage devices for execution by at least one processor of the one or more processors via at least one memory of the one or more memories, the stored program instructions comprising: Program code operable to perform the steps of the method according to any one of claims 1 to 6.
8. A computer program product, comprising a computer-readable storage medium, wherein the computer-readable storage medium embodies program instructions, wherein the program instructions can be executed by a computer to enable the computer to perform the steps of the method according to any one of claims 1 to 6.
9. A computer system comprising means for performing the steps of the method according to any one of claims 1 to 6.
10. A method comprising the following steps: submitting, by a computer system, a plurality of test phrases, each test phrase comprising a plurality of words, to a text classifier, the text classifier being trained to predict a token for each submitted test phrase, the text classifier being trained to calculate a word-level score for the token based on extracted features of each corresponding word within each submitted test phrase and assigning a heat map value to reflect a relative weight of each word-level score; receiving, by the computer system, a plurality of classification tokens from the text classifier, each classification token comprising one or more corresponding heat map values, each heat map value being associated with a separate word in a separate test phrase in the plurality of test phrases, each heat map value of the one or more corresponding heat map values reflecting a respective relative weight of a respective word-level score of a respective extracted feature in the separate word; aligning, by the computer system, each classification indicia and one or more corresponding heat map values of the plurality of classification indicia with a corresponding test phrase of the plurality of test phrases; accessing, by the computer system, a desired classification label and a separate ground truth heat map value estimate associated with each respective test phrase of the plurality of test phrases; identifying, by the computer system, one or more anomalies to a selection of one or more classification indicia of the plurality of classification indicia that differ from the expected classification indicia for each corresponding test phrase of the plurality of test phrases; as well as A graphical representation of the selection of one or more corresponding test phrases and one or more classification labels having visual indicators based on one or more corresponding heat map values compared to one or more visual indicators at the word level based on the individual ground-truth heat map value assessments and expected classification labels is output by the computer system in a user interface to identify the contribution of each word to the corresponding classification label.
11. The method according to claim 10, wherein: The step of submitting the plurality of test phrases to the text classifier by the computer system further comprises the following steps: The plurality of test phrases are submitted, by the computer system, to the text classifier trained by applying a training set having the plurality of test phrases.
12. The method according to claim 10, wherein: The step of receiving, by the computer system, a plurality of classification tags from the text classifier, each classification tag comprising one or more heat map values, each heat map value being associated with a separate word further comprises the following steps: The computer system receives the plurality of classification tags from the text classifier, each classification tag including the one or more heat map values, each heat map value being associated with a separate word from the text classifier, wherein, in response to running at least one test phrase on a pre-trained text classifier and identifying separate predicted classification tags based on a score calculated for each respective at least one test phrase, the text classifier decomposes a plurality of extracted features aggregated in the score into a plurality of word-level scores for each word in the at least one test phrase and assigns a separate heat map value to each of the plurality of word-level scores, each respective separate heat map value reflecting a weight of each of the plurality of word-level scores.
13. The method according to claim 10, further comprising the steps of: displaying, by the computer system, within the user interface, an editable training set having one or more training phrases; as well as The selection of one or more classification labels identified as the one or more anomalies is visually highlighted by the computer system within the editable training set.
14. The method according to claim 10, further comprising the steps of: receiving, by the computer system, from the text classifier a list of preferred words among a plurality of words and each individual predicted classification label, wherein the list of preferred words is in descending order from a highest aggregated word score based on the aggregated word-level scores; and Each individual predicted classification label, the one or more corresponding heat map values, and the preferred word list for each corresponding individual predicted classification label are output by the computer system in the user interface.
15. A computer system comprising one or more processors, one or more computer-readable memories, one or more computer-readable storage devices, and program instructions stored on at least one storage device of the one or more storage devices for execution by at least one processor of the one or more processors via at least one memory of the one or more memories, the stored program instructions comprising: Program code operable to perform the steps of the method according to any one of claims 10 to 14.
16. A computer program product, comprising a computer-readable storage medium, wherein the computer-readable storage medium embodies program instructions, wherein the program instructions can be executed by a computer to enable the computer to perform the steps of the method according to any one of claims 10 to 14.
17. A computer system comprising means for performing the steps of the method according to any one of claims 10 to 14.
