Distance-based logit values for natural language processing
The use of distance-based logit values and enhanced activation functions in chatbot systems addresses the challenges of intent classification in natural language processing, enhancing accuracy and reliability of user intent recognition.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2026-04-14
AI Technical Summary
Existing chatbot systems face challenges in accurately determining user intents due to the nuances and ambiguities of natural language, leading to overconfidence issues in machine learning models and misclassification of utterances.
Implementing a machine learning model that uses distance-based logit values and enhanced activation functions to classify utterances, incorporating binary classifiers with modified logit functions and additional loss terms to improve classification accuracy.
Enhances the accuracy of intent classification by mitigating overconfidence and improving the reliability of chatbot responses to user inputs.
Smart Images

Figure 0007843760000011 
Figure 0007843760000012 
Figure 0007843760000013
Abstract
Description
[Technical Field]
[0001] Reference to related applications This application claims the interests of U.S. Provisional Application 63 / 119,459 filed on 30 November 2020, the contents of which are incorporated herein by reference in their entirety for all purposes.
[0002] Technical field This disclosure relates in general to chatbot systems, and more specifically to techniques for determining logit values for classifying utterances and messages input to a chatbot system in natural language processing. [Background technology]
[0003] background Many users worldwide are on instant messaging or chat platforms to get immediate responses. Organizations often use these instant messaging or chat platforms to engage in live conversations with customers (or end users). However, hiring service personnel to engage in live communication with customers or end users can be very expensive for organizations. Chatbots or bots began to be developed, especially on the internet, to simulate conversations with end users. End users can communicate with bots through messaging apps that they have already installed and are using. Intelligent bots, generally driven by artificial intelligence (AI), can communicate more intelligently and contextually in live conversations, and thus enable more natural conversations between bots and end users for an improved conversational experience. Instead of end users learning a fixed set of keywords or commands that the bot knows how to respond to, intelligent bots can understand the end user's intent based on the end user's natural language utterances and respond accordingly. [Overview of the Initiative]
[0004] overview Techniques are provided for classifying utterances and messages input to a chatbot system in natural language processing. One method may involve a chatbot system that receives utterances generated by a user interacting with the chatbot system. The utterances may include text data converted from speech input by the user. The chatbot system may input the utterances into a machine learning model that includes a set of binary classifiers. Each binary classifier in the set of binary classifiers may be configured to (i) estimate the probability that an utterance corresponds to a class in a set of classes, and (ii) may be associated with a modified logit function that converts the probability for that class into a real number. The modified logit function may be the logarithm of the odds corresponding to the probability for that class, and the logarithm of the odds is obtained based on the distance measured between the probability for that class and the centroid of the distribution associated with that class.
[0005] The method may also include a machine learning model generating a set of distance-based logit values for an utterance. In some examples, each distance-based logit value in the set of distance-based logit values is generated by (i) each binary classifier in a set of binary classifiers determining the respective probability that the utterance corresponds to the class associated with its respective binary classifier, and (ii) each binary classifier mapping its respective probability to a distance-based logit value based on a modified logit function. The mapping may include using the respective distance measured between each probability and the centroid of the distribution associated with the class associated with its respective binary classifier.
[0006] This method may also include a machine learning model applying an enhanced activation function to a set of distance-based logit values to generate predicted outputs. These predicted outputs can identify normalized probabilities that predict whether an utterance corresponds to a particular class within a set of classes within a given probability distribution. The enhanced activation function may include learned parameters for normalizing the initial output of the enhanced activation function in order to obtain the normalized probabilities.
[0007] This method may also include the chatbot system classifying utterances as belonging to a specific class based on their predicted output.
[0008] Techniques are also provided for training machine learning models that use distance-based logit values to classify utterances and messages. This method may include a training subsystem receiving a training dataset. The training dataset may include multiple utterances generated by a user interacting with a chatbot system. At least one of the multiple utterances may include text data converted from the user's voice input. The training subsystem may have access to a machine learning model that includes a set of binary classifiers. Each binary classifier in the set of binary classifiers may be configured to (i) estimate the probability that an utterance corresponds to a class in a set of classes, and (ii) may be associated with a modified logit function that converts the probability for that class into a real number. In some examples, the modified logit function is the logarithm of the odds corresponding to the probability for that class, and the logarithm of the odds is determined based on the distance measured between the probability for that class and the centroid of the distribution associated with that class.
[0009] The method may also include a training subsystem that trains a set of binary classifiers of a machine learning model using a training dataset. Training may include, for each binary classifier in the set, calculating the respective probability that an utterance from the training dataset corresponds to a class associated with that binary classifier. Training may also include mapping each probability for a class associated with a binary classifier to a distance-based logit value based on a modified logit function. The mapping may use the respective distance measured between each probability and the centroid of the distribution associated with the class associated with the binary classifier.
[0010] Training may also include applying an enhanced activation function to distance-based logit values to generate predicted outputs for a class. The predicted outputs can identify normalized probabilities that predict whether an utterance corresponds to a class within a probability distribution. The enhanced activation function may include learned parameters for normalizing the initial output of the enhanced activation function to obtain the normalized probabilities. Training may also include applying an enhanced loss function to the predicted and expected outputs of an utterance to obtain the total loss. The enhanced loss function may include a set of loss terms to obtain the total loss, which may include (i) a binary cross-entropy loss term, (ii) a mean squared error term, (iii) a margin loss term, and (iv) a threshold loss term. Training may also include tuning one or more parameters of a binary classifier, which may include learned parameters of an enhanced activation function.
[0011] Once the machine learning model has been trained, this method may also include the training subsystem deploying that trained machine learning model.
[0012] In some embodiments, a system is provided that includes one or more data processors and a non-temporary computer-readable storage medium containing instructions that, when executed on the one or more data processors, cause the one or more data processors to perform some or all of the methods disclosed herein.
[0013] In some embodiments, a computer program product is provided which includes instructions that are tangibly embodied in a non-temporary machine-readable storage medium and configured to cause one or more data processors to perform some or all of the methods disclosed herein.
[0014] Some embodiments of this disclosure include a system comprising one or more data processors. In some embodiments, the system includes a non-temporary computer-readable storage medium that, when executed on one or more data processors, causes one or more data processors to perform some or all of one or more of the methods disclosed herein and / or some or all of one or more processes. Some embodiments of this disclosure include a computer program product tangibly embodied in a non-temporary machine-readable storage medium that includes instructions configured to cause one or more data processors to perform some or all of the methods disclosed herein and / or some or all of one or more processes.
[0015] The technologies described above and below can be implemented in several ways and in several situations. Several exemplary implementations and situations are provided with reference to the following drawings, as will be described in more detail below. However, the following implementations and situations represent only a small fraction of the many. [Brief explanation of the drawing]
[0016] [Figure 1] This is a simplified block diagram of a distributed environment incorporating an exemplary embodiment. [Figure 2]A simplified block diagram of a computing system for implementing a master bot according to an embodiment. [Figure 3] A simplified block diagram of a computing system for implementing a skill bot according to an embodiment. [Figure 4] A simplified block diagram of a chatbot training and deployment system according to various embodiments. [Figure 5] Schematic diagrams of exemplary neural networks according to some embodiments are shown. [Figure 6] A flowchart showing an exemplary process for modifying a logit function to obtain distance-based logit values according to some embodiments. [Figure 7] A flowchart showing an exemplary process for modifying an activation function to estimate the probability that an utterance corresponds to a particular class according to some embodiments. [Figure 8] A flowchart showing an exemplary process for modifying a loss function to estimate the probability that an utterance corresponds to a particular class according to some embodiments. [Figure 9] A flowchart showing a process for training a machine learning model that uses distance-based logit values to classify utterances according to some embodiments. [Figure 10] A flowchart showing a process for classifying the intent of an utterance or message using distance-based logit values according to some embodiments. [Figure 11] A schematic diagram of a distributed system for implementing various embodiments. [Figure 12] A simplified block diagram of one or more components of a system environment in which services provided by one or more components of the system of an embodiment can be provided as cloud services according to various embodiments. [Figure 13] A diagram showing an exemplary computer system that can be used to implement various embodiments. [Modes for carrying out the invention]
[0017] Detailed explanation In the following description, certain details are included for illustrative purposes to facilitate a full understanding of the particular embodiment. However, it will be apparent that various embodiments can be implemented without these specific details. Figures and descriptions are not intended to be limiting. The term “exemplary” is used here to mean “provided as an example, case, or illustration.” Any embodiment or design described herein as “exemplary” should not necessarily be construed as being preferable or advantageous over other embodiments or designs.
[0018] A. Overview 1. Intent A digital assistant is an artificial intelligence-driven interface that helps users accomplish various tasks in natural language conversation. For each digital assistant, customers can assemble one or more skills. Skills (also referred to here as chatbots, bots, or skillbots) are individual bots that focus on specific types of tasks, such as tracking inventory, submitting time cards, and creating expense reports. When an end user interacts with a digital assistant, the digital assistant evaluates the end user's input and routes the conversation to the appropriate chatbot and from the appropriate chat. Digital assistants can be made available to end users through various channels such as Facebook Messenger, Skype Mobile Messenger, or Short Message Service (SMS). Channels allow chats to travel from the end user to the digital assistant and its various chatbots on various messaging platforms. Channels may also support user agent escalation, event-activated conversations, and testing.
[0019] Intents enable a chatbot to understand what a user wants the chatbot to do. An intent is a user's intention communicated to the chatbot through user requests and statements, also referred to as utterances (e.g., get account balance, make purchase). As used here, an utterance or message can refer to a set of words (e.g., one or more sentences) exchanged during a conversation with the chatbot. Intents may be created by providing a name that indicates some user action (e.g., order a pizza) and compiling a set of real-life user statements or utterances that are commonly associated with triggering that action. Since the chatbot's cognition is derived from these intents, each intent may be created from a robust dataset (1 to over 20 utterances) and may vary to allow the chatbot to interpret ambiguous user input. A rich set of utterances enables the chatbot to understand what a user wants when it receives messages that mean the same thing but are expressed differently, such as "ignore this order" or "cancel delivery!". Collectively, intents and the utterances belonging to them constitute a training corpus for chat. By training a model using a corpus, customers can essentially transform that model into a reference tool for resolving end-user input into a single intent. Customers can improve chat cognitive agility through a cycle of intent testing and intent training.
[0020] While the examples described herein focus on intent prediction, it should be understood that other classification tasks can be handled similarly. For example, a chatbot system may include classifiers to handle utterances at other levels, such as skillbot calls.
[0021] However, building a chatbot that can determine an end-user's intent based on user utterances is a challenging task, partly due to the nuances and ambiguities of natural language, as well as the dimensions of the input space (e.g., possible user utterances) and the size of the output space (number of intents). Exemplary examples of this difficulty arise from the characteristics of natural language, such as employing euphemisms, synonyms, or ungrammatical language usage to express intents. For example, an utterance might express the intent to order a pizza without explicitly mentioning pizza, order, or delivery. For instance, in the everyday language of a particular region, "pizza" is called "pie." These tendencies in natural language, such as inaccuracy or variability, create uncertainty and introduce reliability as a parameter for predicting intent, for example, through keyword inclusion, as opposed to the explicit indication of intent. Therefore, it may be necessary to train, monitor, debug, and retrain chatbots to improve their performance and the user experience they provide. Conventional systems provide training systems for training and retraining machine learning models for digital assistants or chatbots in spoken language understanding (SLU) and natural language processing (NLP).
[0022] 2. Determine intent using machine learning models. In one or more respects, a chatbot system can provide utterances as input to a neural network model that uses a logistic regression function to map its outputs to a probability distribution. For classification, for example, ordering a set of outputs in a probability distribution allows for prediction of the intent invoked in the utterance. Accurate prediction, in turn, allows the chatbot to interact accurately with the end user. In this sense, accuracy depends at least in part on mapping the output of the neural network classifier to a probability distribution.
[0023] Logit values are calculated based on the input to map the output of a neural network machine learning model to a probability distribution. Logit values, also called "logits," are the values output by the logit function of the network layer of the machine learning model. Logit values can represent the odds that an utterance corresponds to a specific class. The logit function is the logarithm of the odds for a particular class (e.g., the order_pizza intent class, the unresolved class), and it transforms the output of the machine learning model into corresponding logit values that fit within a probability distribution. The probability distribution ranges between (-∞, +∞).
[0024] The logit values can then be provided as input to an activation function (e.g., a softmax function) to generate a predicted likelihood of whether the input (e.g., an utterance) corresponds to a particular class in a set of classes. In the context of intent classification, the input may be the weighted output of a neural network model. For example, a numerical output corresponding to a specific class (e.g., order_pizza) is generated by processing an input utterance (e.g., "I want to grab a pie") through one or more intermediate layers of a polynomial machine learning model. The output may be processed by a logit function for the specific class to produce a logit value of 9.4. An activation function can then be applied to the logit value to obtain a probability value in the range between 0 and 1 (e.g., 0.974), which indicates that the input utterance corresponds to the order_pizza class. Utterances that invoke any intent other than those that the classifier can also train to identify correspond to out-of-range or out-of-domain utterances. For example, the utterance "how is the weather today?" might be considered out-of-range for a classifier trained to predict whether the utterance specifies an order for a particular food item.
[0025] Classification accuracy can be further improved by weighting one or more parameters of the logit function. For example, each intent class may be associated with a logit function which may be weighted by the centroid of the intent class. As used herein, the term “centroid” refers to the location of the central position of a cluster used to classify an utterance, where the cluster identifies data corresponding to a particular end-user intent class. In some examples, the centroid is determined using data from the corresponding dataset of the utterance (e.g., a training dataset). Weighting the logit function by the centroid of the distribution allows the logit function to more accurately predict the classification of a given utterance, particularly when the utterance is within a domain or range (e.g., an utterance trained to be recognized by a system).
[0026] 3. Overconfidence problems associated with machine learning models Deep neural networks suffer from the problem of overconfidence (in confidence scores), where the confidence scores generated by a neural network for a given class may be uncorrelated with the actual confidence scores. Deep neural network models can also produce erroneous high-accuracy classification predictions when the actual input is not well represented by the training data used to train the neural network model; that is, when the actual samples are drawn from outside the distribution observed during training. Therefore, while deep neural networks are desirable due to their high accuracy, the overconfidence problem associated with deep neural networks must be addressed to avoid performance issues with the neural networks.
[0027] Traditional techniques using the softmax function do not effectively address the overconfidence problem described above. In some cases, the softmax function perpetuates the overconfidence problem by not considering the individual intensities of the output signals of the neural network model. Instead, the softmax function considers the output signals in comparison to one another, which can result in an overestimation of the reliability of the predictions. This can be particularly true for logit values where only one element is positive. As an illustrative example, consider the logit values for a three-way classification for a first utterance to be [10,3,1] and for a second utterance to be [3,-2,-4]. For the second utterance, only one of the three classes is positive (e.g., 3), indicating that the model is not as confident in its prediction as it was in the prediction for the first utterance (e.g., 10). However, after softmax normalization, the confidence score for the positive output is amplified, resulting in a near 100% confidence score for both utterances. In this way, softmax normalization overestimates the model's reliability in predictions, affecting prediction accuracy.
[0028] Other conventional techniques have been attempted to address the overconfidence problem. For example, an n-binary classifier for n classes has been implemented as an alternative to an n-multiclass classifier. The n-binary classifier implements n classifiers that classify an input utterance as either "in" or "out" for each intent class. Thus, the n-binary approach corresponds to "one-to-all" classification, as opposed to the "one-to-many" approach. In addition, instead of calculating categorical cross-entropy loss as the softmax approach, the n-binary approach calculates binary cross-entropy loss for each class. For example, the n-binary classifier can use the sigmoid function as the output activation function instead of the softmax function.
[0029] While the use of n-binary classifiers can address the limitations of softmax normalization regarding the intensity of individual model output signals, n-binary classifiers themselves can exhibit their own drawbacks. For example, accuracy may be lower with n-binary classifiers than with the softmax approach. Furthermore, n-binary classifiers may not meet the threshold confidence margin for predicting a single class. For instance, a minimum confidence margin of 10% may be imposed to classify an utterance between the most likely and second most likely predictions. The softmax function distributes all classes in a probability distribution that sums to 100%, so if the top-performing prediction confidence score is ≥55%, the second-best prediction is ≤45%, thus satisfying the minimum 10% margin. However, in the n-binary classifier approach, the confidence score for each class is determined independently and defined as summing to 100%. The importance of confidence margins is highlighted, for example, in utterances containing multiple different intents. Therefore, there may be a higher probability that the confidence margin will not be met, and the utterance will be misclassified as unresolved, out of domain, or out of range.
[0030] Therefore, it is difficult to accurately determine the confidence level of a machine learning model when it predicts a specific class for a given utterance. This can lead to misinterpretation of the classification output if overconfidence occurs.
[0031] 4. Distance-based logit values for classifying utterances as having unresolved intents. To overcome the shortcomings described above, this technology includes a system and method for using distance-based logits in a machine learning model to accurately estimate the probability that an utterance belongs to a particular class. This can make the classification results of the machine learning model more accurate, i.e., the machine learning model can correctly classify utterances more frequently, thus improving utterance classification. The method includes an intent classifier of a chatbot system receiving one or more utterances or messages. The method includes the chatbot system using a set of binary classifiers (e.g., n binary classifiers) to determine the intent of one or more utterances or messages. Each binary classifier in the set of binary classifiers includes a modified logit function to output a corresponding distance-based logit value. For example, the distance-based logit value is obtained by modifying the logit function for a given class "C" i The modified logit function may be calculated by using it for the class "W i This involves finding the distance between the centroid of a given object and the corresponding intermediate output of the binary classifier "f(x)". In some examples, the distance between the centroid and the output vector is measured by different distance metrics such as the Euclidean distance and the cosine distance.
[0032] In some examples, the accuracy of the probability estimate can be further improved by implementing an enhanced activation function. An enhanced activation function involves scaling the distance-based logit using scaling values. The scaling values can be fixed values or learned parameters of the intent classifier, the fixed values can be determined through hyperparameter tuning, and the parameter values are learned during model training. As an addition or alternative, a machine learning model may include an enhanced loss function that incorporates several additional loss terms to improve the accuracy of the probability estimate of a given utterance. The loss terms of an enhanced loss function may include one or more of the following: (i) binary cross-entropy loss term, (ii) mean squared error term, (iii) margin loss term, and (iv) threshold loss term. In some examples, each term of the loss function is weighted by its respective weighting coefficient. The weighting coefficient can be tuned as part of the hyperparametric tuning of the intent classifier.
[0033] Therefore, such incorporation of distance-based logit values can facilitate the improvement of intent classifiers' accuracy in predicting the probability that an utterance corresponds to a particular intent class. In addition, distance-based logit values can normalize the output of n-binary classifiers, thereby mitigating the overconfidence problem that traditional softmax function-based techniques may encounter. Distance-based logit values can also be an improvement over traditional n-binary "one-to-all" classifiers because they can enable machine learning models to provide intent predictions for one or more utterances with threshold confidence levels above and with minimal margin between the most confident and second most confident intents.
[0034] B. Bots and Analysis Systems A bot (also known as a skill, chatbot, chatterbot, or talkbot) is a computer program that can engage in conversations with end users. Bots can generally respond to natural language messages (e.g., questions or comments) through messaging applications that use natural language messaging. Businesses may use one or more bot systems to communicate with end users through messaging applications. These messaging applications, sometimes called channels, can be the end user's preferred messaging application, one that the end user has already installed and is familiar with. Therefore, end users do not need to download and install a new application to chat with the bot system. Messaging applications may include, for example, over-the-top (OTT) messaging channels (e.g., Facebook Messenger, Facebook WhatsApp, WeChat, Line, Kik, Telegram, Talk, Skype, Slack, or SMS), virtual private assistants (e.g., Amazon Dot, Echo, or Show, Google® Home, Apple HomePod, etc.), mobile and web app extensions that extend native or hybrid / responsive mobile or web applications with chat capabilities, or voice-based input (e.g., devices or apps with interfaces that use Siri, Cortana, Google Voice, or other voice input for interaction).
[0035] In some examples, a bot system may be associated with a Unified Resource Identifier (URI). A URI can identify a bot system using a string. A URI can be used as a webhook for one or more messaging application systems. A URI can include, for example, a Unified Resource Location Specifier (URL) or a Unified Resource Name (URN). A bot system may be designed to receive messages (e.g., Hypertext Transfer Protocol (HTTP) post-call messages) from messaging application systems. HTTP post-call messages may be directed from messaging application systems to URIs. In some embodiments, messages may differ from HTTP post-call messages. For example, a bot system may receive messages from the Short Message Service (SMS). The discussion here may refer to communications that a bot system receives as messages, but it should be understood that messages can be HTTP post-call messages, SMS messages, or any other type of communication between two systems.
[0036] End users can interact with bot systems through conversational interactions (sometimes called conversational user interfaces (UIs)), similar to how people interact with each other. In some cases, the interaction may involve the end user saying "Hello" to the bot, the bot responding "Hi," and the bot asking the end user how it can help. In some cases, the interaction may also be a transactional interaction with a banking bot, such as transferring money from one account to another; an informational interaction with an HR bot, such as checking a vacation balance; or an interaction with a retail bot, such as discussing returning a purchased item or seeking technical support.
[0037] In some embodiments, a bot system can intelligently handle end-user interactions without interaction with the bot system's administrator or developer. For example, an end-user may send one or more messages to the bot system to achieve a desired goal. The messages may contain some content, such as text, emojis, audio, images, video, or other means of conveying the message. In some embodiments, the bot system can convert the content into a standardized format (e.g., a representational state transfer (REST) call to an enterprise service with appropriate parameters) and generate a natural language response. The bot system may also prompt the end-user for additional input parameters or request other additional information. In some embodiments, the bot system may also initiate communication with the end-user rather than passively responding to the end-user utterance. Here, various techniques for identifying explicit invocations of a bot system and determining input to the bot system being invoked are described. In some embodiments, explicit invocation analysis is performed by the master bot based on the detection of an invocation name in the utterance. In response to the detection of an invocation name, the utterance may be refined for input to a skill bot associated with the invocation name.
[0038] A conversation with a bot can follow a specific conversational flow that includes multiple states. The flow can define what happens next based on the input. In some embodiments, a bot system can be implemented using a state machine that includes user-defined states (e.g., end-user intents) and actions to be taken in or from a state. A conversation can take different paths based on end-user input, which can influence the decisions the bot makes about the flow. For example, in each state, based on end-user input or utterance, the bot can determine the end-user intent and decide on the appropriate next action. Here, and in the context of utterances, the term “intent” refers to the intent of the user who gave the utterance. For example, if a user intends to engage the bot in a conversation to order a pizza, the user’s intent might be expressed by the utterance “order a pizza.” A user’s intent can be directed towards a specific task that the user wants the chatbot to perform on their behalf. Thus, utterances can be expressed as questions, commands, requests, etc., that reflect the user’s intent. An intent can include goals that the end-user wishes to achieve.
[0039] In the context of chat configuration, the term “intent” is used here to refer to configuration information for mapping user utterances to specific tasks / actions or categories of tasks / actions that a chatbot can perform. To distinguish between utterance intents (i.e., user intents) and chatbot intents, the latter may be referred to here as “bot intents.” A bot intent may include a set of one or more utterances associated with that intent. For example, an intent to order a pizza could have various permutations of utterances expressing the desire to order a pizza. These associated utterances may be used to train the chatbot’s intent classifier, which can then determine whether an input utterance from the user matches the pizza order intent. A bot intent may be associated with one or more dialogue flows for initiating a conversation with the user in a certain state. For example, the first message for a pizza order intent might be the question, “What kind of pizza would you like?” In addition to associated utterances, a bot intent may further include named entities associated with that intent. For example, a pizza order intent might include variables or parameters used to perform the task of ordering a pizza, such as topping 1, topping 2, pizza type, pizza size, and pizza quantity. The entity's values are typically obtained through conversation with the user.
[0040] In one example, the utterance is analyzed to determine whether it contains a SkillBot invocation name. If no invocation name is found, the utterance is considered an implicit invocation, and the process proceeds to an intent classifier, such as a trained model. If a invocation name is found, the utterance is considered an explicit invocation, and the process proceeds to determine which part of the utterance is associated with the invocation name. If the trained model is invoked, the entire received utterance is provided as input to the intent classifier.
[0041] The intent classifier receiving the utterance may be the master bot's intent classifier (e.g., intent classifier 242 in Figure 2). The intent classifier may be a machine learning-based or rule-based classifier trained to determine whether the intent of the utterance matches a system intent (e.g., Exit, Help) or a specific skill bot. As described here, the intent analysis performed by the master bot may be limited to matching to a particular skill bot without determining which intent within that skill bot is the best match for the utterance. Thus, the intent classifier receiving the utterance may identify a specific skill bot to be invoked. Alternatively, if the utterance represents a specific system intent (e.g., the utterance contains the words "Exit" or "Help"), the intent classifier receiving the utterance may identify that specific system intent to trigger a conversation between the master bot and the user based on a dialogue flow configured for that particular system intent.
[0042] An intent classifier can use a binary cross-entropy loss function and distance-based logit values as part of predicting the intent of an utterance. Thus, distance refers to the distance calculated between the intent classifier's output vector and the centroid for a particular intent. The logit values for different intents then serve as inputs to a loss function included in the model's overall loss function. For example, the overall loss function may include a binary cross-entropy loss term, a margin loss term, and a threshold loss term. In this way, the intent classifier may predict an intent when the most likely intent satisfies the minimum difference between the most likely intent and the second most likely intent, and when the most likely intent satisfies the minimum threshold confidence associated with the distance measurement from the centroid of the intent.
[0043] If a call name exists, one or more explicit call rules are applied to determine which part of the utterance is associated with the call name. This determination can be based on an analysis of the utterance's sentence structure, using POS tags, dependency information, and / or other extracted information received with the utterance. For example, a part associated with a call name could be a noun phrase containing the call name, or a prepositional object corresponding to the call name. Any part associated with a call name, as determined based on the processing, is removed. Other parts of the utterance that are not needed to convey the meaning of the utterance (e.g., prepositional words) may also be removed. Removing specific parts of the utterance generates input for the skillbot associated with the call name. If there are any parts remaining in the received utterance after removal, those remaining parts, for example, as a text string, form a new utterance for input to the skillbot. Otherwise, if the received utterance has been completely removed, the input may be an empty string. The skillbot associated with the call name is then invoked, and the generated input is provided to that skillbot.
[0044] Upon receiving a generated input, the invoked skillbot processes the input by, for example, performing intent analysis using the trained skillbot's intent classifier to identify bot intents that match the user intents represented in the input. As a result of identifying matching bot intents, the skillbot may perform specific actions or initiate a conversation with the user according to the dialogue flow associated with the matching bot intent. For example, if the input is an empty string, the conversation may begin with a default state defined for the dialogue flow, such as a welcome message. Alternatively, if the input is not an empty string, the conversation may begin with some intermediate state, for example, because the input contains a value about an entity or some other information that the skillbot received as part of the input and no longer needs to ask the user for. In another example, the skillbot may determine that it cannot process the input (for example, because the confidence scores of all bot intents configured for the skillbot fall below a certain threshold). In this situation, the skillbot may return the input to the master bot for processing (for example, by intent analysis using the master bot's intent classifier), or the skillbot may prompt the user for clarification.
[0045] 1. Overall Environment Figure 1 is a simplified block diagram of an environment 100 incorporating a chatbot system according to a specific embodiment. Environment 100 includes a Digital Assistant Builder Platform (DABP) 102, which enables users of DABP 102 to create and deploy digital assistant or chatbot systems. DABP 102 can be used to create one or more digital assistants (or DAs) or chatbot systems. For example, as shown in Figure 1, a user 104 representing a specific company can use DABP 102 to create and deploy a digital assistant 106 for users of that company. For example, a bank can use DABP 102 to create one or more digital assistants for use by its customers. Multiple companies can use the same DABP 102 platform to create digital assistants. As another example, the owner of a restaurant (e.g., a pizza shop) can use DABP 102 to create and deploy a digital assistant that enables restaurant customers to order food (e.g., order pizza).
[0046] For the purposes of this disclosure, “digital assistant” is an entity that helps the user of the digital assistant accomplish various tasks through natural language conversation. A digital assistant may be implemented using only software (for example, a digital assistant is a digital entity implemented using a program, code, or instructions that can be executed by one or more processors), using hardware, or using a combination of hardware and software. A digital assistant may be embodied or implemented in various physical systems or devices, such as computers, mobile phones, watches, appliances, vehicles, etc. A digital assistant is also sometimes referred to as a chatbot system. Therefore, for the purposes of this disclosure, the terms digital assistant and chatbot system are interchangeable.
[0047] A digital assistant such as a digital assistant 106 built using DABP 102 can be used to perform various tasks through natural language-based conversations between the digital assistant and its user 108. As part of the conversation, the user may provide one or more user inputs 110 to the digital assistant 106 and receive responses 112 from the digital assistant 106. The conversation may include one or more of the inputs 110 and responses 112. Through these conversations, the user may request that one or more tasks be performed by the digital assistant 106, and in response, the digital assistant 106 is configured to perform the user-requested tasks and respond to the user with appropriate responses.
[0048] User input 110 is generally in natural language form and is called utterance. User utterance 110 can be in text form, such as when the user types a sentence, a question, a piece of text, or even a single word and provides it to the digital assistant 106 as input. In some embodiments, user utterance 110 can be in voice input or utterance form, such as when the user says or speaks something that is provided to the digital assistant 106 as input. Utterance is typically the language spoken by the user 108. For example, utterance may be English or some other language. If utterance is in voice form, voice input is converted to a text-form utterance in that particular language, and the text utterance is then processed by the digital assistant 106. Various speech-to-text processing techniques may be used to convert voice or auditory input to a text utterance, which is then processed by the digital assistant 106. In some embodiments, the speech-to-text conversion may be performed by the digital assistant 106 itself.
[0049] Utterances, which may be text utterances or voice utterances, may include fragments, sentences, multiple sentences, one or more words, one or more questions, or combinations of the aforementioned types. The digital assistant 106 is configured to apply natural language understanding (NLU) techniques to utterances in order to understand the meaning of user input. As part of the NLU processing of an utterance, the digital assistant 106 is configured to perform processing to understand the meaning of the utterance, which involves identifying one or more intents and one or more entities corresponding to the utterance. Once the meaning of the utterance is understood, the digital assistant 106 can perform one or more actions or behaviors in response to the understood meaning or intent. For the purposes of this disclosure, we assume that utterances are either text utterances provided directly by the user 108 of the digital assistant 106, or the result of a conversion of input voice utterances into text format. However, this is not intended to be limiting or restrictive in any way.
[0050] For example, user 108's input may be a request to order a pizza by providing an utterance such as "I want to order a pizza." Upon receiving such an utterance, the digital assistant 106 is configured to understand the meaning of the utterance and take appropriate action. Appropriate action may include responding to the user with a question requesting user input, such as the type of pizza the user wants to order, the size of the pizza, and any toppings. The responses provided by the digital assistant 106 may also be in natural language form and may typically be in the same language as the input utterance. As part of generating these responses, the digital assistant 106 may perform natural language generation (NLG). In order for the user to order a pizza, the digital assistant may guide the user through a conversation with the user to provide all the necessary information to order the pizza, and then, at the end of the conversation, have the user order the pizza. The digital assistant 106 may terminate the conversation by outputting information to the user indicating that the pizza has been ordered.
[0051] At a conceptual level, the digital assistant 106 performs various processes in response to utterances received from the user. In some embodiments, this process involves a series of processing steps or a pipeline of processing steps, including, for example, understanding the meaning of the input utterance (sometimes called natural language understanding (NLU)), determining what action should be taken in response to the utterance, triggering the action to be taken where appropriate, generating a response to be output to the user in response to the user utterance, and outputting the response to the user. NLU processing may include parsing the received input utterance to understand its structure and meaning, and refining and reconstructing the utterance to develop a more understandable form (e.g., logical form) or structure for the utterance. Generating a response may include using NLG techniques.
[0052] NLU processing performed by a digital assistant such as digital assistant 106 may include various NLP-related processes such as sentence analysis (e.g., tokenization, sorting, part-of-speech tagging for sentences, named entity recognition in sentences, generation of dependency trees to represent sentence structure, sentence splitting into clauses, analysis of individual clauses, resolution of anaphora, and chunking). In some embodiments, the NLU processing or a portion of it is performed by digital assistant 106 itself. In some other embodiments, digital assistant 106 may perform a portion of the NLU processing using other resources. For example, the syntax and structure of an input utterance may be identified by processing the sentence using parsing, part-of-speech tagging, and / or named entity recognition. In one implementation, for English, parsing, part-of-speech tagging, and named entity recognition, such as those provided by the Stanford Natural Language Processing (NLP) Group, are used to analyze sentence structure and syntax. These are provided as part of the Stanford CoreNLP toolkit.
[0053] The various examples provided in this disclosure demonstrate English utterances, but these are meant to be examples only. In certain embodiments, the digital assistant 106 may also process utterances in languages other than English. The digital assistant 106 may provide subsystems (e.g., components that implement NLU functionality) configured to perform processing for different languages. These subsystems may be implemented as pluggable units that can be invoked using service calls from the NLU core server. This makes the NLU processing flexible and extensible for each language, including allowing processing in different orders. Language packs may be provided for individual languages, and language packs may register a list of subsystems that can be serviced from the NLU core server.
[0054] Digital assistants such as the digital assistant 106 shown in Figure 1 can be made available or accessible to their user 108 through various different channels, including, but not limited to, a certain application, a social media platform, various messaging services and applications, and other applications or channels. A single digital assistant can have several channels configured for it, so that it can run on different services simultaneously and be accessed by different services simultaneously.
[0055] A digital assistant or chatbot system typically includes or is associated with one or more skills. In some embodiments, these skills are individual chatbots (referred to as skillbots) configured to interact with the user and fulfill specific types of tasks, such as tracking inventory, submitting time cards, creating expense reports, ordering food, verifying bank accounts, making reservations, and purchasing widgets. For example, in the embodiment shown in Figure 1, the digital assistant or chatbot system 106 includes skills 116-1, 116-2, etc. For the purposes of this disclosure, the term “skill” is used synonymously with the term “skillbot.”
[0056] Each skill associated with a digital assistant helps the user complete tasks through conversation with the user, and the conversation may include a combination of text or auditory input provided by the user and responses provided by the skill bot. These responses may take the form of text or auditory messages to the user, and / or use simple user interface elements (e.g., a selection list) that present the user with a choice to make.
[0057] There are various ways in which skills or skillbots can be associated with or added to a digital assistant. In one example, a skillbot may be developed by a company and then added to a digital assistant using DABP102. In another example, a skillbot may be developed and created using DABP102 and then added to a digital assistant created using DABP102. In yet another example, DABP102 provides an online digital store (called a "skill store") offering multiple skills aimed at a wide range of tasks. Skills offered through the skill store may also be published to various cloud services. To add skills to a digital assistant generated using DABP102, a DABP102 user can access the skill store via DABP102, select the desired skill, and indicate that the selected skill will be added to the digital assistant created using DABP102. Skills from the Skill Store can be added to a digital assistant either as is or in a modified form (for example, a DABP102 user may select and clone a specific skill bot provided by the Skill Store, customize or modify the selected skill bot, and then add the modified skill bot to a digital assistant created using DABP102).
[0058] Various different architectures may be used to implement a digital assistant or chatbot system. For example, in one embodiment, the digital assistant created and deployed using DABP102 may be implemented using a master-bot / child (or sub)bot paradigm or architecture. According to this paradigm, the digital assistant is implemented as a master bot that interacts with one or more child bots, which are skill bots. For example, in the embodiment shown in Figure 1, the digital assistant 106 includes a master bot 114 and skill bots 116-1, 116-2, etc., which are child bots of the master bot 114. In certain embodiments, the digital assistant 106 itself is considered to act as the master bot.
[0059] A digital assistant implemented according to a master-sub-bot architecture allows users of the digital assistant to interact with multiple skills through an integrated user interface, i.e., through the master bot. When a user engages with the digital assistant, user input is received by the master bot. The master bot then performs processing to determine the meaning of the user input utterance. The master bot then determines whether the task requested by the user in the utterance can be handled by the master bot itself. If not, the master bot selects an appropriate skill bot to handle the user request and routes the conversation to the selected skill bot. This allows the user to converse with the digital assistant through a common, single interface while still providing the ability to use several skill bots configured to perform specific tasks. For example, in the case of a digital assistant developed for an enterprise, the digital assistant's master bot can interface with skill bots having specific functions, such as a CRM bot to perform functions related to customer relationship management (CRM), an ERP bot to perform functions related to enterprise resource planning (ERP), and an HCM bot to perform functions related to human capital management (HCM). Thus, end-users or consumers of digital assistants only need to know how to access the digital assistant through a common master bot interface, with multiple skill bots provided behind the scenes to handle user requests.
[0060] In one embodiment, in a master-bot / child-bot infrastructure, the master bot is configured to recognize a list of available skill bots. The master bot may have access to various available skill bots and, for each skill bot, metadata that identifies the capabilities of each skill bot, including tasks that each skill bot can perform. Upon receiving a user request in the form of an utterance, the master bot is configured to identify or predict from among several available skill bots which particular skill bot is best suited to respond to or process the user request. The master bot then routes the utterance (or a portion of the utterance) to that particular skill bot for further processing. Thus, control flows from the master bot to the skill bots. The master bot may support multiple input and output channels.
[0061] The embodiment shown in Figure 1 illustrates a digital assistant 106 comprising a master bot 114 and skill bots 116-1, 116-2, and 116-3, but this is not intended to be limiting. The digital assistant may include various other components (e.g., other systems and subsystems) that provide the functionality of the digital assistant. These systems and subsystems may be implemented using software only (e.g., code, instructions stored on a computer-readable medium and executable by one or more processors), hardware only, or a combination of software and hardware.
[0062] DABP102 provides infrastructure, services, and features that enable DABP102 users to create digital assistants that include one or more skill bots associated with the digital assistant. In some cases, skill bots can be created by cloning existing skill bots, for example, by cloning skill bots provided by the skill store. As mentioned above, DABP102 provides a skill store or skill catalog that offers multiple skill bots for performing various tasks. DABP102 users can clone skill bots from the skill store. If necessary, they may modify or customize the cloned skill bots. In some other cases, DABP102 users have created skill bots from scratch using the tools and services provided by DABP102. As mentioned above, the skill store or skill catalog provided by DABP102 may offer multiple skill bots for performing various tasks.
[0063] In a particular embodiment, creating or customizing a skill bot at a higher level includes the following steps: (1) Configure settings for the new skillbot (2) Set one or more intents for SkillBot (3) Set up one or more entities for one or more intents (4) Train SkillBot (5) Create a dialog flow for SkillBot (6) Add custom components to the skillbot as needed (7) Test and deploy the skillbot. The following is a brief explanation of each step.
[0064] (1) Configure settings for a new skillbot - various settings may be configured for the skillbot. For example, a skillbot designer can specify one or more invocation names for the skillbot being created. These invocation names can then be used by the digital assistant user to explicitly invoke the skillbot. For example, a user can explicitly invoke the corresponding skillbot by typing the invocation name into their utterance.
[0065] (2) Setting up one or more intents and associated exemplary utterances for a skillbot - The skillbot designer specifies one or more intents (also called bot intents) for the skillbot being created. The skillbot is then trained based on these specified intents. These intents represent categories or classes for which the skillbot is trained to infer about input utterances. Upon receiving an utterance, the trained skillbot infers the intent for the utterance, and the inferred intent is selected from a predefined set of intents used to train the skillbot. The skillbot then takes the appropriate action to respond to the utterance based on the intent inferred for that utterance. In some cases, the intents for a skillbot represent tasks that the skillbot can perform for the user of the digital assistant. Each intent is given an intent identifier or intent name. For example, for a skillbot trained for a bank, the intents specified for that skillbot may include "CheckBalance," "TransferMoney," and "DepositCheck."
[0066] For each intent defined for a skillbot, the skillbot designer may also provide one or more exemplary utterances that represent that intent. These exemplary utterances are intended to represent utterances that a user may input to the skillbot for that intent. For example, for a balance inquiry intent, exemplary utterances may include "What's my savings account balance?", "How much is in my checking account?", and "How much money do I have in my account?". Thus, various permutations of typical user utterances may be designated as example utterances for an intent.
[0067] Intents and their associated exemplary utterances are used as training data to train a skillbot. Various different training techniques may be used. As a result of this training, a predictive model is generated, which is configured to take utterances as input and output intents inferred about the utterances by the predictive model. In some cases, the input utterances are provided to an intent analysis engine, which is configured to predict or infer intents for the input utterances using the trained model. The skillbot may then take one or more actions based on the inferred intents.
[0068] (3) Set up one or more entities for one or more intents - In some examples, additional context may be required to enable the skillbot to respond appropriately to user utterances. For example, there may be situations where user input utterances resolve to the same intent in the skillbot. For example, in the example above, the utterances "What's my savings account balance?" and "How much is in my checking account?" both resolve to the same balance inquiry intent, but these utterances are different requests that want different answers. To clarify such requests, one or more entities are added to the intent. Using the example of a banking skillbot, an entity called AccountType that defines values called "checking" and "saving" may enable the skillbot to parse user requests and respond appropriately. In the example above, the utterances resolve to the same intent, but the values associated with the AccountType entity are different for the two utterances. This allows SkillBot to perform potentially different actions for two utterances, even though they resolve to the same intent. One or more entities may be specified for a particular intent set for SkillBot. Thus, entities are used to add context to the intent itself. Entities help to better describe the intent, enabling SkillBot to complete the user request.
[0069] In one embodiment, there are two types of entities: (a) built-in entities provided by DABP102, and (2) custom entities that may be specified by the skillbot designer. Built-in entities are general-purpose entities that can be used with a wide variety of bots. Examples of built-in entities include, but are not limited to, entities related to time, date, address, number, email address, duration, cycle period, currency, telephone number, URL, etc. Custom entities are used for more customized applications. For example, for a banking skill, the AccountType entity may be defined by the skillbot designer to enable various banking transactions by checking user input for keywords such as current, savings, and credit card.
[0070] (4) Training the SkillBot - The SkillBot is configured to receive user input in the form of utterances, parse or otherwise process the received input, and identify or select intents related to the received user input. As described above, the SkillBot must be trained for this purpose. In one embodiment, the SkillBot is trained on intents set for it and exemplary utterances associated with those intents (collectively, the training data), so that the SkillBot can resolve user input utterances to one of the SkillBot's set intents. In a particular embodiment, the SkillBot uses a predictive model that is trained with the training data and enables the SkillBot to identify what the user is saying (or, in some cases, what the user is trying to say). DABP102 provides a variety of different training techniques that can be used by SkillBot designers to train SkillBots, including a variety of machine learning-based training techniques, rule-based training techniques, and / or combinations thereof. In one embodiment, a portion of the training data (e.g., 80%) is used to train the SkillBot model, and another portion (e.g., the remaining 20%) is used to test or validate the model. Once trained, the trained model (sometimes called a trained skillbot) can then be used to process and respond to user utterances. In some cases, a user utterance may be a question that requires only a single answer and does not require further conversation. To address such situations, a Q&A (question and answer) intent may be defined for the skillbot. This allows the skillbot to output a response to a user request without needing to update the dialogue definition. Q&A intents are generated in the same way as regular intents. The dialogue flow for Q&A intents may differ from the dialogue flow for regular intents.
[0071] (5) Create a dialogue flow for the skillbot - The dialogue flow specified for the skillbot describes how the skillbot responds when different intents to the skillbot are resolved in response to received user input. The dialogue flow defines the actions or behaviors that the skillbot takes, such as how the skillbot responds to user utterances, how the skillbot prompts the user for input, and how the skillbot returns data. The dialogue flow is like a flowchart that the skillbot follows. The skillbot designer specifies the dialogue flow using a language such as Markdown. In one embodiment, a version of YAML called OBotML can be used to specify the dialogue flow for the skillbot. The dialogue flow definition for the skillbot acts as a model of the conversation itself, allowing the skillbot designer to choreograph the interaction between the skillbot and the user it corresponds to.
[0072] In one embodiment, the SkillBot's dialog flow definition includes three sections: (a) Context section (b) Default transition section (c) State section.
[0073] Context Section - In the context section, skillbot designers can define variables used in the conversation flow. Other variables that may be designated in the context section include, but are not limited to, variables for error handling, variables for built-in or custom entities, and user variables that enable skillbot to recognize and persist user preferences.
[0074] Default Transition Section - Transitions for SkillBot can be defined in either a Dialogflow State section or a Default Transition section. Transitions defined in the Default Transition section act as fallbacks and are triggered when there are no applicable transitions defined within a state or when the conditions necessary to trigger a state transition are not met. The Default Transition section can be used to define routing that allows SkillBot to smoothly handle unexpected user actions.
[0075] The State Section – Dialog Flow and its associated behavior are defined as a set of transient states that govern the logic within the dialog flow. Each state node in the dialog flow definition designates a component that provides the functionality required for that point in the dialog. In this way, states are built around the components. Each state contains component-specific characteristics and defines transitions to other states that are triggered after the component has been executed.
[0076] Special case scenarios can be handled using the state section. For example, you might want to give a user the option to temporarily leave the first skill they are working on and do something in a second skill within the digital assistant. For instance, if a user is engaged in a conversation with a shopping skill (e.g., the user has made some selections for a purchase), they might want to jump to a banking skill (e.g., the user wants to make sure they have enough money for the purchase) and then return to the shopping skill to complete their order. To address this, an action in the first skill can be configured to initiate a conversation with a second, different skill within the same digital assistant, and then return to the original flow.
[0077] (6) Adding Custom Components to the SkillBot - As described above, the states specified in the dialog flow for the SkillBot designate the components that provide the necessary functionality corresponding to that state. The components enable the SkillBot to perform the functionality. In one embodiment, DABP102 provides a set of pre-configured components for performing a wide range of functions. The SkillBot designer can select one or more of these pre-configured components and associate them with states in the dialog flow for the SkillBot. The SkillBot designer can also create custom or new components using the tools provided by DABP102 and associate the custom components with one or more states in the dialog flow for the SkillBot.
[0078] (7) Test and deploy SkillBots - DABP102 provides several features that enable SkillBot designers to test SkillBots under development. The SkillBots can then be deployed and included in a digital assistant.
[0079] The above explanation describes how to create a skillbot, but similar techniques can also be used to create a digital assistant (or masterbot). At the masterbot or digital assistant level, you can set up built-in system intents for the digital assistant. These built-in system intents are used to identify common tasks that the digital assistant itself (i.e., the masterbot) can handle without calling the skillbot associated with the digital assistant. Examples of system intents defined for a masterbot include: (1) Exit: when the user wants to signal to the digital assistant that they wish to end the current conversation or context; (2) Help: when the user is asking for help or direction; (3) Unresolved Intent: for user input that does not well match the Exit intent or Help intent. The digital assistant also stores information about one or more skillbots associated with the digital assistant. This information allows the masterbot to select a specific skillbot to process an utterance.
[0080] At the master bot or digital assistant level, when a user inputs a phrase or utterance into the digital assistant, the digital assistant is configured to process how to route the utterance and the associated conversation. The digital assistant makes this determination using a routing model that can be rule-based, AI-based, or a combination of both. Using the routing model, the digital assistant determines whether the conversation corresponding to the user-input utterance should be routed to a specific skill for processing, processed by the digital assistant or master bot itself according to an embedded system intent, or processed as a different state in the current conversation flow.
[0081] In certain embodiments, as part of this process, the digital assistant determines whether the user input utterance explicitly identifies a skillbot using its invocation name. If an invocation name is present in the user input, it is treated as an explicit invocation of the skillbot corresponding to the invocation name. In such scenarios, the digital assistant can route the user input to the explicitly invoked skillbot for further processing. If there is no specific or explicit invocation, in some embodiments, the digital assistant evaluates the received user input utterance and calculates confidence scores for the system intents and skillbots associated with the digital assistant. The scores calculated for a skillbot or system intent represent the likelihood that the user input represents a task or system intent configured for the skillbot to perform. System intents or skillbots whose associated calculated confidence scores exceed a threshold (e.g., Confidence Threshold routing parameter) are selected as candidates for further evaluation. The digital assistant then selects a specific system intent or skillbot from the identified candidates for further processing of the user input utterance. In certain embodiments, after one or more skill bots are identified as candidates, the intents associated with those candidate skills are evaluated (according to the intent model for each skill), and a confidence score is determined for each intent. Generally, intents with a confidence score exceeding a threshold (e.g., 70%) are treated as candidate intents. If a specific skill bot is selected, the user utterance is routed to that skill bot for further processing. If a system intent is selected, one or more actions are performed by the master bot itself according to the selected system intent.
[0082] 2. Components of the MasterBot System Figure 2 is a simplified block diagram of a master bot (MB) system 200 according to one embodiment. The MB system 200 can be implemented using software only, hardware only, or a combination of hardware and software. The MB system 200 includes a preprocessing subsystem 210, a multiple intent subsystem (MIS) 220, an explicit call subsystem (EIS) 230, a skill bot call unit 240, and a data store 250. The MB system 200 shown in Figure 2 is merely an example of the configuration of components in a master bot. Those skilled in the art will recognize many possible variations, substitutions, and modifications. For example, in some implementations, the MB system 200 may have more or fewer systems or components than those shown in Figure 2, may combine two or more subsystems, or may have subsystems with different configurations or arrangements.
[0083] The preprocessing subsystem 210 receives the utterance "A" 202 from the user and processes the utterance through the language detection unit 212 and the language parser 214. As described above, the utterance can be provided in various ways, including speech or text. The utterance 202 may be a fragment, a complete sentence, multiple sentences, etc. The utterance 202 may include punctuation. For example, if the utterance 202 is provided as speech, the preprocessing subsystem 210 may convert the speech to text using a speech-to-text converter (not shown) that inserts punctuation, such as commas, semicolons, periods, etc., into the resulting text.
[0084] The language detection unit 212 detects the language of the utterance 202 based on the text of the utterance 202. Since each language has its own grammar and semantics, the way in which the utterance 202 is processed depends on that language. Language differences are taken into consideration when analyzing the syntax and structure of the utterance.
[0085] The language parser 214 syntactically analyzes the utterance 202 and extracts part-of-speech (POS) tags for each individual linguistic unit (e.g., word) within the utterance 202. POS tags include, for example, nouns (NN), pronouns (PN), verbs (VB), etc. The language parser 214 may also tokenize the linguistic units of the utterance 202 (e.g., to convert each word into a separate token) and make the words headwords. Headwords are the primary forms of the set of words represented in the dictionary (e.g., "run" is the headword for run, runs, ran, running, etc.). Other types of preprocessing that the language parser 214 can perform include chunking compound expressions, for example, combining "credit" and "card" into a single expression "credit_card". The language parser 214 may also identify relationships between words within the utterance 202. For example, in some embodiments, the language parser 214 generates a dependency tree that indicates which parts of the utterance (e.g., a specific noun) are direct objects, which parts of the utterance are prepositions, and so on. The results of the processing performed by the language parser 214 form extracted information 205, which is provided to the MIS 220 as input along with the utterance 202 itself.
[0086] As described above, utterance 202 may contain multiple sentences. For the purpose of detecting multiple intents and explicit calls, utterance 202 may be treated as a single unit, even if it contains multiple sentences. However, in some embodiments, preprocessing may be performed, for example by the preprocessing subsystem 210, to identify a single sentence among multiple sentences for multiple intent analysis and explicit call analysis. Generally, the results produced by MIS220 and EIS230 are substantially the same whether utterance 202 is processed at the level of individual sentences or as a single unit containing multiple sentences.
[0087] MIS220 determines whether utterance 202 represents multiple intents. While MIS220 can detect the presence of multiple intents in utterance 202, the processing performed by MIS220 does not involve determining whether the intents in utterance 202 match any intent configured for the bot. Instead, the processing to determine whether the intents in utterance 202 match a bot intent may be performed by the intent classifier 242 of the MB system 200 or by the skill bot's intent classifier (for example, as shown in the embodiment of Figure 3). The processing performed by MIS220 assumes that there is a bot (e.g., a specific skill bot or the master bot itself) that can process utterance 202. Therefore, the processing performed by MIS220 does not require knowledge of what bots are in the chatbot system (e.g., the identity of a skill bot registered with the master bot) or what intents are configured for a particular bot.
[0088] To determine that utterance 202 contains multiple intents, MIS220 applies one or more rules from the set of rules 252 in datastore 250. The rules applied to utterance 202 are language-dependent of utterance 202 and may include sentence patterns indicating the presence of multiple intents. For example, a sentence pattern may include a conjunction connecting two parts of a sentence (e.g., a coordinating term), where both parts correspond to separate intents. If utterance 202 matches a sentence pattern, it can be inferred that utterance 202 represents multiple intents. Note that an utterance with multiple intents does not necessarily have different intents (e.g., intents directed to different bots, or different intents within the same bot). Instead, the utterance may have separate instances of the same intent, e.g., "order a pizza using payment account X, then order a pizza using payment account Y."
[0089] As part of determining that utterance 202 represents multiple intents, MIS220 also determines which parts of utterance 202 are associated with each intent. For each intent represented in an utterance containing multiple intents, MIS220 constructs a new utterance for different processing in place of the original utterance, e.g., utterance "B" 206 and utterance "C" 208, as shown in Figure 2. Thus, the original utterance 202 can be split into two or more separate utterances, each handled one at a time. Using the extracted information 205 and / or from an analysis of utterance 202 itself, MIS220 determines which of the two or more utterances should be processed first. For example, MIS220 may determine that utterance 202 contains a marker word indicating that a particular intent should be handled first. The newly formed utterance corresponding to this particular intent (e.g., one of utterances 206 or 208) will be sent first for further processing by EIS230. After the conversation triggered by the first utterance has ended (or been temporarily interrupted), the next highest priority utterance (e.g., utterance 206 or the other of utterance 208) may then be sent to the EIS230 for processing.
[0090] The EIS230 determines whether an received utterance (e.g., utterance 206 or utterance 208) contains a skillbot invocation name. In one embodiment, each skillbot in the chatbot system is assigned a unique invocation name that distinguishes it from other skillbots in the chatbot system. A list of invocation names can be maintained in the data store 250 as part of the skillbot information 254. When an utterance contains a word that matches an invocation name, the utterance is considered an explicit invocation. If the bot is not explicitly invoked, the utterance received by the EIS230 is considered an implicit invocation utterance 234 and is fed into the master bot's intent classifier (e.g., intent classifier 242) to determine which bot to use to process the utterance. In some examples, the intent classifier 242 determines that the master bot should process implicit invocation utterances. In other examples, the intent classifier 242 determines which skillbot to route the utterance to for processing.
[0091] The explicit invocation feature provided by EIS230 offers several advantages. It can reduce the amount of processing that the master bot must perform. For example, with explicit invocation, the master bot does not have to perform any intent classification analysis (e.g., using intent classifier 242), or it may have to perform reduced intent classification analysis to select a skill bot. Thus, explicit invocation analysis may enable the selection of a specific skill bot without relying on intent classification analysis.
[0092] Furthermore, there may be situations where functionality overlaps among multiple skill bots. This can occur, for example, when intents handled by two skill bots overlap or are very close to each other. In such situations, it can be difficult for the master bot to identify which of the multiple skill bots to select based solely on intent classification analysis. In such scenarios, explicit invocation resolves the ambiguity regarding which specific skill bot should be used.
[0093] In addition to determining that an utterance is an explicit invocation, the EIS230 is responsible for determining whether any part of the utterance should be used as input to an explicitly invoked skill bot. Specifically, the EIS230 can determine whether any part of the utterance is not associated with an invocation. The EIS230 can make this determination through analysis of the utterance and / or analysis of the extracted information 205. Instead of sending the entire utterance received by the EIS230, the EIS230 can send the part of the utterance that is not associated with an invocation to the invoked skill bot. In some examples, the input to the invoked skill bot is formed simply by removing any part of the utterance that is associated with an invocation. For example, "I want to order a pizza using Pizza Bot" can be shortened to "I want to order a pizza" because "using Pizza Bot" relates to the invocation of Pizza Bot, but not to any processing performed by Pizza Bot. In some examples, the EIS230 may reformat the part to be sent to the invoked bot, for example, to form a complete sentence. Therefore, the EIS230 determines not only whether there is an explicit call, but also what should be sent to the skillbot when there is an explicit call. In some cases, there may be no text to input to the bot being called. For example, if the utterance is "Pizza Bot", the EIS230 may determine that the pizza bot is being called, but there is no text to be processed by the pizza bot. In such a scenario, the EIS230 can indicate to the skillbot call unit 240 that there is nothing to send.
[0094] The skillbot invocation unit 240 invokes skillbots in various ways. For example, the skillbot invocation unit 240 may invoke a bot in response to receiving instruction 235 that a particular skillbot has been selected as a result of an explicit invocation. Instruction 235 may be sent by the EIS 230 along with input to the explicitly invoked skillbot. In this scenario, the skillbot invocation unit 240 takes control of the conversation to the explicitly invoked skillbot. The explicitly invoked skillbot determines an appropriate response to the input from the EIS 230 by treating the input as an independent utterance. For example, the response may be to perform a specific action or to start a new conversation in a specific state, the initial state of the new conversation depending on the input sent from the EIS 230.
[0095] Another mode of invocation by the skillbot invocation unit 240 is through implicit invocation using the intent classifier 242. The intent classifier 242 is trained using machine learning and / or rule-based training techniques to determine the likelihood that a given utterance represents a task configured for a particular skillbot to perform. The intent classifier 242 is trained in different classes, one class for each skillbot. For example, each time a new skillbot is registered with the master bot, the intent classifier 242 can be trained using a list of exemplary utterances associated with the new skillbot to determine the likelihood that a particular utterance represents a task that the new skillbot can perform. The parameters generated as a result of this training (e.g., a set of values for parameters in a machine learning model) can be stored as part of the skillbot information 254.
[0096] In one embodiment, the intent classifier 242 is implemented using a machine learning model, as described in more detail here. Training the machine learning model may involve inputting at least a subset of utterances from exemplary utterances associated with various skill bots in order to generate inferences as the output of the machine learning model about which bot is the correct bot to process any particular training utterance. For each training utterance, instructions for the correct bot to use for that training utterance may be provided as ground truth information. The behavior of the machine learning model can then be adapted (e.g., through backpropagation) to minimize the difference between the generated inferences and the ground truth information.
[0097] In certain embodiments, the intent classifier 242 determines a confidence score for each skill bot registered with the master bot, indicating the likelihood that the skill bot can process a given utterance (e.g., an implicit invocation utterance 234 received from the EIS 230). The intent classifier 242 may also determine a confidence score for each configured system-level intent (e.g., Help, Exit). If a particular confidence score satisfies one or more conditions, the skill bot call unit 240 will call the bot associated with that particular confidence score. For example, a certain threshold confidence score value may need to be met. Thus, the output 245 of the intent classifier 242 is either an identification of a system intent or an identification of a particular skill bot. In some embodiments, in addition to meeting a threshold confidence score value, the confidence score must exceed the next higher confidence score by a certain win margin. Imposing such conditions allows routing to a particular skill bot when the confidence scores of multiple skill bots each exceed a threshold confidence score value.
[0098] After identifying a bot based on the confidence score evaluation, the skill bot call unit 240 hands over processing to the identified bot. In the case of a system intent, the identified bot is the master bot. Otherwise, the identified bot is a skill bot. Furthermore, the skill bot call unit 240 will determine what to provide as input 247 to the identified bot. As described above, in the case of an explicit call, input 247 may be based on a portion of an utterance not associated with the call, or input 247 may be nothing (e.g., an empty string). In the case of an implicit call, input 247 may be the entire utterance.
[0099] The data store 250 comprises one or more computing devices that store data used by various subsystems of the master bot system 200. As described above, the data store 250 includes rules 252 and skill bot information 254. Rules 252 include, for example, rules for determining by the MIS 220 when an utterance represents multiple intents and how to divide an utterance representing multiple intents. Rules 252 further include rules for determining by the EIS 230 which parts of an utterance that explicitly invokes a skill bot should be sent to the skill bot. Skill bot information 254 includes the invocation names of skill bots in the chatbot system, for example, a list of the invocation names of all skill bots registered with a particular master bot. Skill bot information 254 may also include information used by the intent classifier 242 to determine a confidence score for each skill bot in the chatbot system, for example, parameters of a machine learning model.
[0100] 3. Components of the SkillBot System Figure 3 is a simplified block diagram of a skillbot system 300 according to a particular embodiment. The skillbot system 300 is a computing system that can be implemented using software only, hardware only, or a combination of hardware and software. In some embodiments, such as the embodiment shown in Figure 1, the skillbot system 300 can be used to implement one or more skillbots within a digital assistant.
[0101] The SkillBot system 300 includes an MIS 310, an intent classifier 320, and a conversation manager 330. The MIS 310 is similar to the MIS 220 in Figure 2 and provides similar functionality, including being operable to determine, using rules 352 in the data store 350, whether (1) an utterance represents multiple intents, and if so, how to split the utterance into separate utterances for each of the multiple intents. In one embodiment, the rules applied by the MIS 310 to detect multiple intents and split the utterance are the same as the rules applied by the MIS 220. The MIS 310 receives an utterance 302 and extracted information 304. The extracted information 304 is similar to the extracted information 205 in Figure 1 and can be generated using a language parser 214 or a language parser local to the SkillBot system 300.
[0102] The intent classifier 320 can be trained in a similar manner to the intent classifier 242 discussed above in relation to the embodiment of Figure 2, as will be described in more detail here. For example, in a particular embodiment, the intent classifier 320 is implemented using a machine learning model. The machine learning model of the intent classifier 320 is trained for a particular skill bot using at least a subset of exemplary utterances associated with that skill bot as training utterances. The ground truth for each training utterance would be the particular bot intent associated with that training utterance.
[0103] Utterance 302 can be received directly from the user or supplied via a master bot. When utterance 302 is supplied via a master bot, for example, as a result of processing through MIS220 and EIS230 in the embodiment shown in Figure 2, MIS310 can be bypassed to avoid repeating processing already performed by MIS220. However, when utterance 302 is received directly from the user, for example during a conversation that occurs after routing to a skill bot, MIS310 can process utterance 302 to determine whether utterance 302 represents multiple intents. If utterance 302 represents multiple intents, MIS310 applies one or more rules to split utterance 302 into separate utterances for each intent, for example, utterance "D" 306 and utterance "E" 308. If utterance 302 does not represent multiple intents, MIS310 forwards utterance 302 to intent classifier 320 for intent classification without splitting it.
[0104] The intent classifier 320 is configured to match an received utterance (e.g., utterance 306 or 308) with an intent associated with the skillbot system 300. As described above, a skillbot can be configured with one or more intents, each intent including at least one exemplary utterance associated with that intent and used to train the classifier. In the embodiment of Figure 2, the intent classifier 242 of the masterbot system 200 is trained to determine the confidence score of individual skillbots and the confidence score of system intents. Similarly, the intent classifier 320 may be trained to determine the confidence score of each intent associated with the skillbot system 300. The classification performed by the intent classifier 242 is at the bot level, while the classification performed by the intent classifier 320 is at the intent level and therefore of finer granularity. The intent classifier 320 has access to intent information 354. The intent information 354, for each intent associated with the skillbot system 300, represents and indicates the meaning of that intent and typically includes a list of utterances associated with the tasks that can be performed by that intent. The intent information 354 may further include parameters generated as a result of training on this list of utterances.
[0105] The conversation manager 330 receives, as output from the intent classifier 320, an instruction 322 for a specific intent identified by the intent classifier 320 as the best match for the utterance input to the intent classifier 320. In some cases, the intent classifier 320 may be unable to determine any match. For example, the confidence score calculated by the intent classifier 320 may fall below a threshold confidence score value if the utterance is directed to a system intent or an intent of a different skillbot. When this occurs, the skillbot system 300 may leave the utterance to the master bot for processing, for example, to route it to a different skillbot. However, if the intent classifier 320 successfully identifies an intent within the skillbot, the conversation manager 330 initiates a conversation with the user.
[0106] A conversation initiated by the conversation manager 330 is a conversation specific to an intent identified by the intent classifier 320. For example, the conversation manager 330 may be implemented using a state machine configured to execute a certain dialogue flow for an identified intent. The state machine may include a default initiation state (for example, when an intent is invoked without any additional input) and one or more additional states, each associated with an action to be performed by the skillbot (e.g., execute a purchase transaction) and / or a dialogue to be presented to the user (e.g., a question, response). Thus, when the conversation manager 330 receives an instruction 322 that identifies an intent, it can determine an action / dialogue 335, and can determine additional actions or dialogues in response to subsequent utterances received during the conversation.
[0107] The data store 350 comprises one or more computing devices that store data used by various subsystems of the skillbot system 300. As shown in Figure 3, the data store 350 includes rule 352 and intent information 354. In certain embodiments, the data store 350 can be integrated with the data store of the master bot or digital assistant, for example, the data store 250 in Figure 2.
[0108] 4. A scheme for classifying utterances using a trained intent classifier. Figure 4 is a block diagram showing a phase of a chatbot system 400 configured to train and utilize a classifier (for example, the intent classifiers 242 or 320 described in relation to Figures 2 and 3) based on text data 405. As shown in Figure 4, the text classification performed by the chatbot system 400 in this example includes various stages, namely, a predictive model training stage 410, a skillbot invocation stage 415 for determining the likelihood that an utterance represents a task configured for a particular skillbot to perform, and an intent prediction stage 420 for classifying the utterance as one or more intents. The predictive model training stage 410 constructs and trains one or more predictive models 425a to 425n (where "n" represents any natural number) (which may be individually called predictive models 425 or collectively called predictive models 425) to be used by the other stages. For example, the predictive model 425 could include a model for determining the likelihood that an utterance represents a task configured for a particular skillbot to perform, another model for predicting intent from an utterance for a first type of skillbot, and another model for predicting intent from an utterance for a second type of skillbot. Further other types of predictive models may be implemented in other examples provided herein.
[0109] Predictive model 425 may be a machine learning ("ML") model such as a convolutional neural network ("CNN"), e.g., an inception neural network, a residual neural network ("Resnet"), or a recurrent neural network, e.g., a long short-term memory ("LSTM") model or a gated recurrent unit ("GRU") model, or other variants of a deep neural network ("DNN") (e.g., a multilevel n binary DNN classifier or a multiclass DNN classifier for single-intent classification). Predictive model 425 may also be any other suitable ML model trained for natural language processing, such as a naive Bayes classifier, a linear classifier, a support vector machine, a random forest model, a bagging model, a boosting model, a shallow neural network, or a combination of one or more such techniques, e.g., a CNN-HMM or MCNN (multiscale convolutional neural network). The chatbot system 400 may employ the same or different types of predictive models to determine the likelihood of a task configured for a particular skillbot to perform, to predict intents from utterances for a first type of skillbot, and to predict intents from utterances for a second type of skillbot. Further other types of predictive models may be implemented in other examples provided herein.
[0110] To train various predictive models 425, the training phase 410 consists of three main components: dataset preparation 430, feature engineering 435, and model training 440. Dataset preparation 430 includes the process of loading data assets 445, dividing the data assets 445 into training and validation sets 445a-n, and performing basic preprocessing so that the system can train and test the predictive models 425. Data assets 445 may include at least a subset of utterances from exemplary utterances associated with various skillbots. As mentioned above, utterances can be provided in various ways, including speech or text. Utterances can be fragments, complete sentences, multiple sentences, etc. For example, if utterances are provided as speech, data preparation 430 may convert speech to text using a speech-to-text converter (not shown) that inserts punctuation, e.g., commas, semicolons, periods, etc., into the resulting text. In some examples, exemplary utterances are provided by a client or customer. In other examples, exemplary utterances are automatically generated from a library of previous utterances (for example, identifying utterances from a specific library for the skills the chatbot learns). The data asset 445 for the predictive model 425 may include input text or speech (or input features of text or speech frames) and labels 450 corresponding to the input text or speech (or input features) as a matrix or table of values. For example, for each training utterance, instructions for the correct bot to use with that training utterance may be provided as ground truth information for the labels 450. The behavior of the predictive model 425 can then be adapted (for example, through backpropagation) to minimize the difference between the generated inferences and the ground truth information. Alternatively, the predictive model 425 may be trained for a particular skill bot using at least a subset of exemplary utterances associated with that particular skill bot as training utterances. The ground truth for the labels 450 for each training utterance would be the specific bot intent associated with that training utterance.
[0111] In some embodiments, feature engineering 435 involves converting the data asset 445 into feature vectors and / or creating new features using the data asset 445. Feature vectors may include count vectors as features, word-level, n-gram-level, or character-level word frequency-inverse document frequency (TF-IDF) vectors as features, word embeddings as features, text / NLP as features, topic models as features, or a combination thereof. A count vector is a matrix representation of the data asset 445 where each row represents an utterance, each column represents a word from the utterance, and each cell represents the frequency count of a particular word within the utterance. TF-IDF scores represent the relative importance of a word in an utterance. Word embeddings are a form of representing words and utterances using dense vector representations. The position of a word in vector space is learned from the text and is based on the words that surround that word when it is used. Text / NLP-based features may include the number of words in an utterance, the number of characters in an utterance, the average word density, the number of punctuation marks, the number of capital letters, the number of headwords, the frequency distribution of part-of-speech tags (e.g., nouns and verbs), or any combination thereof. Topic modeling is a technique for identifying groups of words (called topics) that contain the best information within a collection of utterances.
[0112] In some embodiments, model training 440 includes training a classifier using feature vectors and / or new features created in feature engineering 435. In some examples, the training process includes iterative operations to find a set of parameters for the predictive model 425 that minimizes a loss function or error function for the predictive model 425. Each iteration may involve finding a set of parameters for the predictive model 425 such that the value of the loss function or error function using a set of parameters for the predictive model 425 is smaller than the value of the loss function or error function using a different set of parameters in the previous iteration. The loss function or error function can be constructed to measure the difference between the output predicted using the predictive model 425 and the labels 450 contained in the data asset 445. Once the set of parameters is identified, the predictive model 425 is trained and can be used for prediction as designed.
[0113] In addition to the data asset 445, labels 450, feature vectors, and / or new features, other techniques and information may also be employed to improve the training process of the predictive model 425. For example, feature vectors and / or new features may be combined with each other to help improve the accuracy of the classifier or model. In addition, or alternatively, hyperparameters may be tuned or optimized, and several parameters such as tree length, leaves, and network parameters may be fine-tuned to obtain a best-fit model. However, the training mechanisms described herein primarily focus on training the predictive model 425. These training mechanisms may also be used to fine-tune an existing predictive model 425 trained from other data assets. For example, in some cases, the predictive model 425 may have been pre-trained using utterances specific to a different skillbot. In such cases, the predictive model 425 can be retrained using the data asset 445, as discussed herein.
[0114] The predictive model training stage 410 outputs a trained predictive model 425, which includes a task predictive model 460 and an intent predictive model 465. The task predictive model 460 may be used in the skillbot invocation stage 415 to determine the likelihood that an utterance represents a task configured for a particular skillbot to perform (470), and the intent predictive model 465 may be used in the intent predictive stage 420 to classify an utterance as one or more intents (475). In some examples, the skillbot invocation stage 415 and the intent predictive stage 420 may proceed independently, using separate models in some examples. For example, the trained intent predictive model 465 may be used in the intent predictive stage 420 to predict intents for a skillbot without first identifying the skillbot in the skillbot invocation stage 415. Similarly, the task prediction model 460 may be used in the skillbot invocation stage 415 to predict the task or skillbot that should be used for the utterance, without identifying the intent of the utterance in the intent prediction stage 420.
[0115] Alternatively, the skillbot invocation stage 415 and the intent prediction stage 420 may be performed sequentially, with one stage using the output of the other stage as input, or one stage being invoked in a specific manner for a particular skillbot based on the output of the other stage. For example, for a given text data 405, the skillbot invocation unit can invoke a skillbot through an implicit invocation using the skillbot invocation stage 415 and the task prediction model 460. The task prediction model 460 is trained using machine learning and / or rule-based training techniques to determine the likelihood that a given utterance represents a task configured for a particular skillbot 470 to perform. Then, for the identified or invoked skillbot and the given text data 405, the intent prediction stage 420 and the intent prediction model 465 can be used to match the received utterance (e.g., an utterance in a given data asset 445) to an intent 475 associated with the skillbot. As described herein, a skillbot can be composed of one or more intents, each intent including at least one exemplary utterance associated with that intent and used to train a classifier. In some embodiments, the skillbot call stage 415 and task prediction model 460 used in a masterbot system are trained to determine confidence scores for individual skillbots and for system intents. Similarly, the intent prediction stage 420 and intent prediction model 465 may be trained to determine confidence scores for each intent associated with the skillbot system. The classification performed by the skillbot call stage 415 and task prediction model 460 is at the bot level, while the classification performed by the intent prediction stage 420 and intent prediction model 465 is at the intent level and therefore of finer granularity.
[0116] C. Logit function Figure 5 shows schematic diagrams of exemplary neural networks 500 according to several embodiments. The neural network 500 can be a machine learning model trained by a training system and implemented by a chatbot system, where the machine learning model is trained to predict whether an utterance corresponds to a particular intent class. In some examples, the neural network 500 includes an input layer 502, a hidden layer 504, and an output layer 506. In some examples, the neural network 500 includes multiple hidden layers, where the hidden layer 504 corresponds to the final hidden layer of the neural network.
[0117] The input layer 502 receives input data or a representation of the input data (e.g., an n-dimensional array of values representing an utterance) and can apply one or more learned parameters to the input data to generate a set of outputs (e.g., a set of numbers). The set of outputs can be processed by the hidden layer 504.
[0118] The hidden layer 504 may include one or more learned parameters that transform the set of outputs into different feature spaces where input data points from different classes are better separated.
[0119] The output layer 506 may include a classification layer that maps the output from the hidden layer to logit values, each corresponding to one specific class (e.g., a resolvable class, an unresolvable class). In some examples, the output layer 506 includes an activation function to constrain the logit values to a set of probability values that sum to 1. Thus, the logit values generated by the classification layer (logit function) for each class can then be processed by an activation function in the output layer (also referred to herein as the “activation layer”) to predict the classification for an utterance.
[0120] As part of predicting a single intent from a set of output values, a machine learning model may employ a logit function (short for “logistic regression function”) in the network layers of a neural network 500. The output layer 506 may include a logit function for converting intermediate outputs (e.g., probability values predicting whether an utterance corresponds to a particular class) into logit values. In some cases, the logit function is the logarithm of odds, taking inputs corresponding to probability values between 0 and 1 for a particular class, and outputting logit values within an unbounded range between negative infinity and positive infinity. The logit function may be used to normalize each intermediate output in the set of intermediate outputs, so that the resulting set of logit values can be represented as a unimodal probability distribution symmetrical across the predicted output classes. Mathematically speaking, the logit function is,
[0121]
number
[0122] The logit function is defined as follows, where p is the probability of an input corresponding to a particular class. The probability p can be set within the range of (0,1). The output logit can correspond to logit values within the range of (-∞,+∞). In this way, a machine learning model may employ a logit function such that the subsequent activation function can predict the most likely output (e.g., intent) from the classifier's other less likely outputs.
[0123] As part of training a machine learning model (for example, the intent classifier 320 in Figure 3), the machine learning model may learn centroids for each class, where the centroids are part of the logit function. For a set of identified intents trained for the intent classifier to recognize, the centroids play a role in classifying utterances as belonging to a particular intent rather than others, for example, by using the centroids as positions to measure the distance between adjacent clusters and the distance between clusters and the model output.
[0124] The centroid can be used to weight the logit function, so that the logit function can be used as part of filtering the classifier output, for example, to separate possible intents from an utterance. In mathematical terms, the equation relating the logit function is logit. i = f(x)*W i It may also be the case that, in the formula, x is the input to the model, f(x) is a set of transformations (e.g., a highway network function), and W i is the centroid of intent "i", which acts as a weighting coefficient for the model output for that intent. Thus, for a set of identified intents that the intent classifier has been trained to recognize, the centroid plays a role in classifying an utterance as belonging to a particular intent rather than others, for example by using the centroid as a position to measure the distance between adjacent clusters.
[0125] Next, the logit values generated for each predicted output class can be processed by an activation function to map the odds represented by the logit values to a probability distribution across all predicted output classes. As an example of an activation function, the softmax function may be used to normalize the network's output (e.g., the logit values corresponding to the order_pizza class) to a probability distribution across all predicted output classes (e.g., order_pizza, unresolved intents).
[0126] Before applying softmax, the logit values may be negative, greater than 1, and their sum may not be 1. After applying softmax, each output will be in the interval (0,1), and the output will sum to 1. Furthermore, larger input logit values correspond to larger probabilities. In functional terms, the softmax function is expressed as follows:
[0127]
number
[0128] i = 1:K, and z is the set of K real numbers (z1: z K ). In some cases, the softmax function can be weighted by a base factor b that produces a probability distribution more concentrated around the location of the largest input value. In such cases, the softmax function is
[0129]
number
[0130] And in the formula, β is a real number. In the context of intent classification, z i is f(x)*w i It can also be used as a setting.
[0131] D. Techniques for distance-based logit determination for speech classification However, the denominator of the softmax function indicates that the value of the softmax function for a real number "i" is a function of the exponents of all other classes that the machine learning model is trained to distinguish. Therefore, softmax normalization may not be very sensitive to the individual strengths output by the classifier model. In addition, softmax can overestimate confidence values, especially if some of the model outputs are negative.
[0132] As an illustrative example, the logit values for a given three-way classification of two utterances are [10, 3, 1] and [3, -2, -4]. In the second utterance, the model is less confident about the prediction as reflected by the lower overall logit value and the inclusion of negative logit values, but after normalization using the softmax function, the confidence scores for both utterances are close to 100%. Since the nominal logit values should correspond to the confidence of the model in each class (e.g., a larger logit value should correspond to a higher probability), in this example, the softmax function introduces overconfidence and inaccuracy in the classifier part.
[0133] As part of addressing the drawbacks of the n - binary classifier approach, distance-based logit values can be generated to predict whether an utterance corresponds to a particular class. The distance-based logit value corresponding to the probability of an intent class can be obtained by measuring the distance (e.g., Euclidean distance) between the intermediate output “f(x)” generated by the final layer of a machine learning model and the centroid W i for a given class “i”.
[0134] For example, a machine learning model may be configured to produce a set of outputs, each output of which contains a probability predicting whether an utterance corresponds to a particular class in a set of classes. The machine learning model may include a set of binary classifiers. Each binary classifier in the set may produce an intermediate output representing whether an utterance corresponds to a particular class in the set of classes more than other classes. The intermediate output can be applied to a modified logit function to generate distance-based logit values for a particular class. The distance-based logit value can represent the odds that an utterance corresponds to a particular class, and the odds for a particular class are normalized based on the distance between the binary classifier's intermediate output and the centroid of that particular class. The logit function can be the logarithm of the odds for a particular class (e.g., the order_pizza intent class, the cancel_pizza intent class), transforming the intermediate output into corresponding logit values that fit within a probability distribution. The logit value distribution may range between (-∞, +∞). The logit values may be processed through an activation function to generate probability values for a particular class that range between [0, 1].
[0135] In some examples, the accuracy of the probabilities can be further improved by implementing an enhanced activation function. An enhanced activation function involves scaling the distance-based logit using a scaling value, which may be a fixed value determined during hyperparameter tuning. Alternatively, the scaling value may be a learned parameter of the intent classifier, the parameter value being learned during model training. As an addition or alternative, a machine learning model may incorporate the use of an enhanced loss function to improve the accuracy of the probabilistic estimate of a given utterance. The loss terms of an enhanced loss function may include one or more of the following: (i) binary cross-entropy loss term, (ii) mean squared error term, (iii) margin loss term, and (iv) threshold loss term. In some examples, each term of the loss function is weighted by its respective weighting coefficient. The weighting coefficient can be tuned as part of the hyperparametric tuning of the intent classifier.
[0136] Therefore, implementing distance-based logit values involves an automated process that can be integrated into the chatbot system whenever utterance classification (e.g., intent, range, skill, etc.) can be undertaken, as illustrated with respect to Figures 1, 2, and 3. Advantageously, the model and chatbot perform better with distance-based logits for utterances, at least in part, because the model reduces the effects of the overconfidence problem arising from the softmax function and is not plagued by the uncertainty drawbacks of n-binary "one-to-all" classifiers. Furthermore, since the process is applied automatically, customers or clients will not experience misdirected inquiries from the chatbot system.
[0137] 1. Distance-based logit value In some embodiments, an n-binary "one-to-all" approach is implemented in skillbot invocation 415 and / or intent prediction 420. Distance-based logits classify the centroid W of a given class "i" with respect to the utterance representation f(x). iThis describes a method that involves calculating the logit value by measuring the distance between two points. For example, the function "distance" can be defined as logits = -1.0*distance(W i It may also be defined as f(x), where "distance" may be measured by a Euclidean distance function. In this way, the confidence score measured by the class probability may be derived from the logit value by computing the scaled sigmoid activation of the logit value.
[0138] Figure 6 shows a flowchart illustrating an exemplary process 600 for modifying a logit function to obtain distance-based logit values, according to several embodiments. The process shown in Figure 6 may be implemented by software (e.g., code, instructions, programs), hardware, or a combination thereof, executed by one or more processing units (e.g., processors, cores) of each system. The software may be stored on a non-temporary storage medium (e.g., on a memory device). The methods presented in Figure 6 and described below are intended to be illustrative and non-limiting. Figure 6 shows various processing steps that occur in a particular sequence or order, but this is not intended to be limiting. In some embodiments, the steps are performed by a training subsystem to map probability values corresponding to unresolved classes to distance-based logit values of one or more machine learning models (e.g., intent classifiers 242 or 320). The training subsystem may be part of a data processing system (e.g., the chatbot system 400 described with respect to Figure 4) or a component of another system configured to train and deploy machine learning models.
[0139] In 605, the training subsystem receives a training dataset. The training dataset can contain a set of utterances or messages. Each utterance in the set is associated with a training label, which identifies the predicted intent class of the utterance. In some examples, the training dataset is grouped into one or more training sub-datasets, each containing training data (e.g., utterances) that can be used to train a binary classifier from a set of binary classifiers.
[0140] In 610, the training subsystem initializes the machine learning model. The machine learning model may be a convolutional neural network ("CNN"), e.g., an inception neural network, a residual neural network ("Resnet"), or a recurrent neural network, e.g., a long short-term memory ("LSTM") model or a gated recurrent unit ("GRU") model, or other variants of a deep neural network ("DNN") (e.g., a multilevel n binary DNN classifier or a multiclass DNN classifier for single-intent classification). The machine learning model may also be a naive Bayes classifier, a linear classifier, a support vector machine, a random forest model, a bagging model, a boosting model, a shallow neural network, or a combination of one or more such techniques, e.g., a CNN-HMM or MCNN (multiscale convolutional neural network), or any other suitable ML model trained for natural language processing.
[0141] In some examples, a machine learning model is configured to produce a set of outputs, each output containing a probability that predicts whether an utterance corresponds to a particular class in a set of classes. A machine learning model can include a set of binary classifiers. Each binary classifier in the set may produce an intermediate output containing a value that indicates whether an utterance corresponds to a particular class in the set of classes more than other classes. The intermediate outputs can be fed into a logit function to generate a logit value for a particular class. The logit value can represent the odds that an utterance corresponds to a particular class. The logit function is the logarithm of the odds for a particular class (e.g., the order_pizza intent class, the cancel_pizza intent class) and transforms the output of the machine learning model into a corresponding logit value that fits within a probability distribution. The logit value distribution ranges between (-∞, +∞).
[0142] Logit values can be processed through an activation function to generate probability values for a particular class. These probability values are in the range [0,1]. Initializing a machine learning model may include defining the number of layers, the type of each layer (e.g., fully connected, convolutional neural network), and the type of activation function for each layer (e.g., sigmoid).
[0143] In step 615, the training subsystem extracts a set of logit functions from the final layer of the machine learning model. As described above, the intermediate outputs of the binary classifiers can be input to each logit function in the set to generate logit values for a particular class. Thus, the logit functions of the set can be the logarithms of the odds corresponding to the probability of a particular class in the set of classes, and the logarithms of the odds are weighted by the centroid of the distribution associated with the class. Furthermore, each logit function in the set can be associated with a particular binary classifier in the set of binary classifiers of the machine learning model. To extract the set of logit functions, the training system can select the final layer from the set of layers in the fully connected neural network. The set of logit functions from the final layer can then be accessed for modification.
[0144] In 620, the training subsystem modifies a set of logit functions. For example, each logit function in the set modifies the intermediate output and centroid "W" of the binary classifier "f(x)" for a given class "i" of the set of classes. i It can be modified to find the distance between " and ". Therefore, the modified function is logits = -1.0*distance(W i This distance can be expressed by f(x). This distance may include the Euclidean or cosine distance between the intermediate output and the centroid of the class.
[0145] In 625, the training subsystem processes the training dataset and trains the machine learning model using the modified logit function. Training the machine learning model can include training each binary classifier. Training facilitates the machine learning model to generate distance-based logit values corresponding to the probability that an utterance corresponds to a particular class. Thus, the machine learning model can generate distance-based logit values output by each modified logit function in the set of modified logit functions. The training subsystem can train the machine learning model by training each binary classifier in the set of binary classifiers, with the centroid and values corresponding to the intermediate outputs of the binary classifiers being learned based on the training dataset. In some examples, the first training dataset used to train the first binary classifier of the machine learning model is different from the second training dataset used to train the second binary classifier. An activation function (e.g., a sigmoid function) can be applied to the distance-based logit values output by the modified logit function to generate a predicted output, which identifies the probability that an utterance corresponds to each class in the set of classes.
[0146] Next, one or more parameters of each binary classifier can be learned to minimize the total loss between the predicted output generated by the binary classifier and the expected output indicated by the training label of the corresponding utterance. The total loss can be calculated by applying the loss function to the predicted and expected outputs. Training of the machine learning model can be performed until the loss reaches a minimum error threshold.
[0147] In step 630, the training subsystem deploys the trained machine learning model to the chatbot system (for example, as part of a skillbot), where the trained machine learning model includes a modified logit function. Process 600 then terminates.
[0148] 2. Enhanced activation function In some cases, the accuracy of probability estimation can be further improved by implementing an enhanced activation function. An enhanced activation function involves scaling the distance-based logit using a scaling value. The scaling value can be a fixed value determined by hyperparameter tuning, or it can be a learned parameter of the intent classifier, the parameter value of which is learned during model training. The scaling value of the enhanced activation function can be learned to impose a minimum margin value between the highest and second-highest outputs of the machine learning model. By incorporating a minimum margin value, the uncertainty problem encountered by conventional n-binary "one-to-all" classifiers can be reduced.
[0149] Figure 7 shows a flowchart illustrating an exemplary process 700 for modifying an activation function to estimate the probability that an utterance corresponds to a particular class, according to several embodiments. The processes shown in Figure 7 may be implemented by software (e.g., code, instructions, programs), hardware, or a combination thereof, executed by one or more processing units (e.g., processors, cores) of each system. The software may be stored on a non-temporary storage medium (e.g., on a memory device). The methods presented in Figure 7 and described below are intended to be illustrative and non-limiting. Figure 7 shows various processing steps that occur in a particular sequence or order, but this is not intended to be limiting. In some embodiments, the steps are performed by a training subsystem to map probability values corresponding to unresolved classes to distance-based logit values of one or more machine learning models (e.g., intent classifiers 242 or 320). The training subsystem may be part of a data processing system (e.g., the chatbot system 400 described with respect to Figure 4) or a component of another system configured to train and deploy machine learning models.
[0150] In 705, the training subsystem receives a training dataset. The training dataset can contain a set of utterances or messages. Each utterance in the set is associated with a training label, which identifies the predicted intent class of the utterance. In some examples, the training dataset is grouped into one or more training sub-datasets, each containing training data (e.g., utterances) that can be used to train a binary classifier from a set of binary classifiers.
[0151] In 710, the training subsystem initializes the machine learning model. The machine learning model may be a convolutional neural network ("CNN"), e.g., an inception neural network, a residual neural network ("Resnet"), or a recurrent neural network, e.g., a long short-term memory ("LSTM") model or a gated recurrent unit ("GRU") model, or other variants of a deep neural network ("DNN") (e.g., a multilevel n binary DNN classifier or a multiclass DNN classifier for single-intent classification). The machine learning model may also be a naive Bayes classifier, a linear classifier, a support vector machine, a random forest model, a bagging model, a boosting model, a shallow neural network, or a combination of one or more such techniques, e.g., a CNN-HMM or MCNN (multiscale convolutional neural network), or any other suitable ML model trained for natural language processing.
[0152] In some examples, a machine learning model is configured to produce a set of outputs, each output containing a probability that predicts whether an utterance corresponds to a particular class in a set of classes. A machine learning model can include a set of binary classifiers. Each binary classifier in the set may produce an intermediate output containing a value indicating whether an utterance corresponds to a particular class in the set of classes more than other classes. These intermediate outputs can be fed into a logit function to generate a logit value for a particular class. The logit value can represent the odds that an utterance corresponds to a particular class. The logit function is the logarithm of the odds for a particular class (e.g., the order_pizza intent class, the cancel_pizza intent class) and transforms the output of the machine learning model into a corresponding logit value that fits within a probability distribution. The logit value ranges between (-∞, +∞).
[0153] Logit values can be processed through an activation function to generate probability values for a particular class. These probability values are in the range [0,1]. Initializing a machine learning model may include defining the number of layers, the type of each layer (e.g., fully connected, convolutional neural network), and the type of activation function for each layer (e.g., sigmoid).
[0154] In step 715, the training subsystem extracts a set of logit functions from the final layer of the machine learning model. As described above, the intermediate outputs of the binary classifiers can be input to each logit function in the set to generate logit values for a particular class. Thus, the logit functions of the set can be the logarithms of the odds corresponding to the probability of a particular class in the set of classes, and the logarithms of the odds are weighted by the centroid of the distribution associated with the class. Furthermore, each logit function in the set can be associated with a particular binary classifier in the set of binary classifiers of the machine learning model. To extract the set of logit functions, the training system can select the final layer from the set of layers in the fully connected neural network. The set of logit functions from the final layer can then be accessed for modification.
[0155] In 720, the training subsystem modifies a set of logit functions. For example, each logit function in the set modifies the intermediate output and centroid "W" of a binary classifier "f(x)" for a given class "i" in the set of classes. i It can be modified to find the distance between " and ". Therefore, the modified function is logits = -1.0*distance(W i This distance can be expressed by f(x). This distance may include the Euclidean or cosine distance between the intermediate output and the centroid of the class.
[0156] In 725, the training subsystem modifies the activation function of the machine learning model by including a scaling value. As mentioned above, the enhanced activation function includes scaling the distance-based logit using a scaling value. The scaling value can be a fixed value determined by hyperparameter tuning, or a learned parameter of the intent classifier, whose parameter value is learned during model training. The enhanced activation function is confidence_score = distance_scale * sigmoid(-1.0*dist(W i It can be expressed as f(x)), where confidence_score represents the output of the machine learning model and corresponds to the probability of predicting whether an utterance corresponds to each class in the set of classes. distance_scale can be a fixed value determined by hyperparameter tuning, or a trainable model parameter that is automatically determined as part of the training stage 410, as described below.
[0157] Therefore, probabilities can be derived from an enhanced activation function (e.g., a scaled sigmoid function) by normalizing the output between 0 and 1 and imposing a minimum margin value between the highest and second highest output generated by the machine learning model. For example, an enhanced activation function could be used to impose a minimum difference of 0.1 between the top two class scores. If the difference between the top two scores is less than 0.1, the output for the remaining classes can be explicitly reduced to 0.1. Then, the difference between the top two scores can be recalculated.
[0158] In 730, the training subsystem processes the training dataset and trains the machine learning model using a set of logit functions and an enhanced activation function. Training facilitates the machine learning model to produce predicted outputs corresponding to normalized probabilities that utterances belong to a particular class. The normalized probabilities can be determined based at least in part on learned parameters of the enhanced activation function. The training subsystem can train the machine learning model by training each binary classifier in a set of binary classifiers, with the centroid and values corresponding to the intermediate outputs of the binary classifiers being learned based on the training dataset. In some examples, the first training dataset used to train the first binary classifier of the machine learning model is different from the second training dataset used to train the second binary classifier.
[0159] In some examples, a machine learning model is trained to generate predicted outputs by applying an enhanced activation function to distance-based logit values output by a modified logit function. The predicted outputs correspond to the probability that an utterance corresponds to each class in a set of classes. The training subsystem can train the machine learning model so that the scaled values of the enhanced activation function are learned based on the training dataset.
[0160] Next, one or more parameters of each binary classifier can be learned to minimize the total loss between the predicted output generated by the binary classifier and the expected output indicated by the training label of the corresponding utterance. The total loss can be calculated by applying the loss function to the predicted and expected outputs. Training of the machine learning model can be performed until the loss reaches a minimum error threshold.
[0161] In step 735, the training subsystem deploys the trained machine learning model to the chatbot system (for example, as part of SkillBot), where the trained machine learning model includes a modified logit function. Process 700 then terminates.
[0162] 3. Enhanced loss function To further improve the accuracy of a machine learning model for classifying utterances, the loss function is modified to incorporate additional loss terms, thereby generating an enhanced loss function. The additional loss terms in the enhanced loss function may include one or more of the following: (i) binary cross-entropy loss term, (ii) mean squared error term, (iii) margin loss term, and (iv) threshold loss term. In some embodiments, the loss function combines four losses with different weights, each weight which can be learned using hyperparameter tuning. The use of an enhanced loss function can further facilitate training the machine learning model to provide an accurate estimate of its confidence in predicting whether a given utterance belongs to a particular class.
[0163] Figure 8 shows a flowchart illustrating an exemplary process 800 for modifying a loss function to estimate the probability that an utterance corresponds to a particular class, according to several embodiments. The processes shown in Figure 8 may be implemented by software (e.g., code, instructions, programs), hardware, or a combination thereof, executed by one or more processing units (e.g., processors, cores) of each system. The software may be stored on a non-temporary storage medium (e.g., on a memory device). The methods presented in Figure 8 and described below are intended to be illustrative and non-limiting. Figure 8 shows various processing steps that occur in a particular sequence or order, but this is not intended to be limiting. In some embodiments, the steps are performed by a training subsystem to map probability values corresponding to unresolved classes to distance-based logit values of one or more machine learning models (e.g., intent classifiers 242 or 320). The training subsystem may be part of a data processing system (e.g., the chatbot system 400 described with respect to Figure 4) or a component of another system configured to train and deploy machine learning models.
[0164] In 805, the training subsystem receives a training dataset. The training dataset can contain a set of utterances or messages. Each utterance in the set is associated with a training label, which identifies the predicted intent class of the utterance. In some examples, the training dataset is grouped into one or more training sub-datasets, each containing training data (e.g., utterances) that can be used to train a binary classifier from a set of binary classifiers.
[0165] In 810, the training subsystem initializes a machine learning model. The machine learning model may be a convolutional neural network ("CNN"), e.g., an inception neural network, a residual neural network ("Resnet"), or a recurrent neural network, e.g., a long short-term memory ("LSTM") model or a gated recurrent unit ("GRU") model, or other variants of a deep neural network ("DNN") (e.g., a multilevel n binary DNN classifier or a multiclass DNN classifier for single-intent classification). The machine learning model may also be a naive Bayes classifier, a linear classifier, a support vector machine, a random forest model, a bagging model, a boosting model, a shallow neural network, or a combination of one or more such techniques, e.g., a CNN-HMM or MCNN (multiscale convolutional neural network), or any other suitable ML model trained for natural language processing.
[0166] In some examples, a machine learning model is configured to produce a set of outputs, each output containing a probability that predicts whether an utterance corresponds to a particular class in a set of classes. A machine learning model can include a set of binary classifiers. Each binary classifier in the set may produce an intermediate output containing a value indicating whether an utterance corresponds to a particular class in the set of classes more than other classes. These intermediate outputs can be fed into a logit function to generate a logit value for a particular class. The logit value can represent the odds that an utterance corresponds to a particular class. The logit function is the logarithm of the odds for a particular class (e.g., the order_pizza intent class, the cancel_pizza intent class) and transforms the output of the machine learning model into a corresponding logit value that fits within a probability distribution. The logit value ranges between (-∞, +∞).
[0167] Logit values can be processed through an activation function to generate probability values for a particular class. The probabilities range between [0,1]. Initializing a machine learning model may include defining the number of layers, the type of each layer (e.g., fully connected, convolutional neural network), and the type of activation function for each layer (e.g., sigmoid).
[0168] In 815, the training subsystem extracts the loss function of the machine learning model. For a given utterance in the training dataset, the loss function can be used to find the error (i.e., loss) between the output of the machine learning model's activation function and the target value indicated in the training label of the utterance. Based on the error, the loss function can represent how far the calculated output is from the mark, and the error can be used to adjust the parameter weights of the machine learning model.
[0169] In some examples, the loss function is a binary cross-entropy loss function. Also called sigmoid cross-entropy loss, the binary cross-entropy loss function is defined for the first class "1" as follows:
[0170]
number
[0171] For each of the C classes (for example, for SkillBot with 3 defined classes, C=3), there are C independent binary classification problems.
[0172]
number
[0173] A function is defined where "f(s)" is the sigmoid function, "s" is the score, and "t" is the ground truth label for the class. In some examples, the cross-entropy loss may be realized by a one-hot vector method defining C terms. For example, the cross-entropy loss term may be realized as "xent_loss" = CE(logits, one_hot_labels), where "CE" is the cross-entropy loss function defined above, and "one_hot_labels" is the ground truth label for each class.
[0174]
number
[0175] This is a vector that defines (for example, if C=3, one_hot_labels may be equal to
[0100] ,
[0010] , and / or
[0001] ).
[0176] Other types of loss functions may be considered when a machine learning model classifies utterances. For example, a loss function may include, but is not limited to, the mean squared error loss function, mean squared log error loss function, mean absolute error loss function, likelihood loss function, hinge loss function, squared hinge loss function, multiclass cross-entropy loss function, spare multiclass cross-entropy loss, and Kullback-Leibler divergence loss function.
[0177] In 820, the training subsystem modifies the loss function to generate an enhanced loss function. The loss function (e.g., the binary cross-entropy loss function) can be modified to include an additional loss term. The additional loss term may include one or more of the following: ● Mean Squared Error (MSE). The MSE term can smooth the output of the activation function (e.g., confidence value). The MSE term can be expressed as "mse_loss" = MSE(distance_scale * sigmoid(-1.0*distance(Wi, f(x)), one_hot_labels)), where MSE is the mean squared error function; ● Margin Loss Term. The margin loss term can be used to guarantee a margin between the highest score in a class and the second highest score. For example, the margin loss term can be expressed as "margin_loss" = max(0, M - (top_1_confidence_score - top_2_confidence_score)); ●Threshold Loss Term. The threshold loss term can be used to constrain the true label confidence score for in-domain and user-defined out-of-domain utterances to be higher than a first threshold T1 (e.g., T1=0.7). In addition, the threshold loss term can also be used to constrain the confidence score for all classes to be lower than a second threshold T2 (e.g., T2=0.5). Thus, the threshold loss term can be expressed as "threshold_loss" = max(0, T1-true_label_confidence_score) + max(0, top_1_confidence_score - T2).
[0178] In some embodiments, the enhanced loss function uses four losses and their respective weights (λ i ) is combined with each weight, which can be tuned during training. For example, the enhanced loss function can be expressed as "overall loss" = λ1* xent_loss + λ2* mse_loss + λ3* margin_loss + λ4* threshold_loss, where λ i These are tunable parameters for hyperparametric tuning.
[0179] In step 825, the training subsystem processes the training dataset and trains the machine learning model using an enhanced loss function. In some examples, training the machine learning model involves training each binary classifier in a set of classifiers. Training the machine learning model with an enhanced loss function facilitates the machine learning model to accurately estimate the probability that an utterance belongs to a particular class. Training may include performing hyperparameter tuning of the weights associated with one of the loss terms of the enhanced loss function. Referring to the above expression in step 820, one or more weights of the enhanced loss function (e.g., λ1, λ2, λ3, λ4) may be tuned during training stage 410 as part of the hyperparametric tuning of the classifier used for skillbot invocation and / or intent classification.
[0180] In some examples, the training subsystem processes the training dataset and trains a machine learning model using a modified logit function, an enhanced activation function, and an enhanced loss function. Thus, in addition to the weights of the enhanced loss function, the training subsystem can train the machine learning model by training each binary classifier in a set of binary classifiers, with the centroid and values corresponding to the intermediate outputs of the binary classifiers learned based on the training dataset. In some examples, the machine learning model is also trained to apply the enhanced activation function to distance-based logit values output by the modified logit function to generate probabilities of whether an utterance corresponds to each class in a set of classes. The training subsystem can train the machine learning model so that the scaling values of the enhanced activation function are learned based on the training dataset.
[0181] Next, one or more parameters of each binary classifier can be learned to minimize the total loss between the predicted output generated by the binary classifier and the expected output indicated by the training label of the corresponding utterance. The total loss can be calculated by applying the loss function to the predicted and expected outputs. Training of the machine learning model can be performed until the loss reaches a minimum error threshold.
[0182] In step 830, the training subsystem deploys the trained machine learning model to the chatbot system (for example, as part of SkillBot), where the trained machine learning model includes a modified logit function. Process 800 then terminates.
[0183] 4. Experimental Results As described above, trained and tuned classifiers that implement distance-based logit values can provide improved accuracy and reliability for intent classification. In an example, implementing distance-based logits with an n-binary classifier for a suite of user-defined skills can improve the accuracy of classifier predictions by more than 6% overall and the accuracy of individual skill bots by more than 100%. As shown in Table 1 below, the performance of skill bots in correctly classifying intents on test data is significantly improved in the majority of cases and overall. For example, in the example in Table 1, intra-domain accuracy improved by 6%, intra-domain recall improved by 28%, out-of-domain precision remained unaffected overall, and out-of-domain recall improved by 8%.
[0184] [Table 1-1]
[0185] [Table 1-2]
[0186] [Table 1-3]
[0187] [Table 1-4]
[0188] E. Process for training a machine learning model that implements distance-based logit values for speech classification. Figure 9 is a flowchart of a process 900 for training a machine learning model that uses distance-based logit values to classify utterances, according to several embodiments. The processes shown in Figure 9 may be implemented by software (e.g., code, instructions, programs), hardware, or a combination thereof, executed by one or more processing units (e.g., processors, cores) of each system. The software may be stored on a non-temporary storage medium (e.g., on a memory device). The methods presented in Figure 9 and described below are intended to be illustrative and non-limiting. Figure 9 shows various processing steps that occur in a particular sequence or order, but this is not intended to be limiting. In certain alternative embodiments, those steps may be executed in some different order, or some steps may be executed in parallel. In certain embodiments, such as those in the embodiments shown in Figures 1 to 4, the processes shown in Figure 9 may be performed by a subsystem of the chatbot system (e.g., skillbot invocation 415 or intent prediction 420 in Figure 4) to classify utterances into user-defined classes.
[0189] In 905, the training subsystem receives a training dataset. The training dataset may include a set of utterances or messages. In some cases, utterances include text data converted from speech input (e.g., speech utterances), which may be converted into text utterances in a particular language, and then the text utterances may be processed. Each utterance in the set is associated with a training label, which identifies the predicted intent class of the utterance. In some examples, the training dataset is grouped into one or more training sub-datasets, each training sub-dataset containing training data (e.g., utterances) that may be used to train a binary classifier from a set of binary classifiers.
[0190] In 910, the training subsystem initializes the machine learning model. The machine learning model may include a set of binary classifiers. For example, the machine learning model may implement an n-binary "one-to-all" classifier, where "n" is the number of classes "C". Each binary classifier in the set of binary classifiers is configured to (i) estimate the probability that an utterance corresponds to a class in the set of classes, and (ii) is associated with a modified logit function that converts the probability for that class into a real number. The modified logit function is the logarithm of the odds corresponding to the probability for that class, and the logarithm of the odds is determined based on the distance measured between the probability for that class and the centroid of the distribution associated with that class. In some examples, the distance measured between the probability for that class and the centroid of the distribution associated with that class is either the Euclidean distance or the cosine distance.
[0191] Machine learning models can be convolutional neural networks ("CNNs"), such as inception neural networks, residual neural networks ("ResNets"), or recurrent neural networks, such as long short-term memory ("LSTM") models or gated recurrent unit ("GRU") models, or other variations of deep neural networks ("DNNs") (for example, a multilevel n-binary DNN classifier or a multiclass DNN classifier for single-intent classification). Machine learning models can also be naive Bayes classifiers, linear classifiers, support vector machines, bagging models such as random forest models, boosting models, shallow neural networks, or any other suitable ML model trained for natural language processing, such as CNN-HMM or MCNN (multiscale convolutional neural network).
[0192] Initializing a machine learning model can include defining the number of layers, the type of each layer (e.g., fully connected, convolutional neural network), and the type of activation function for each layer (e.g., sigmoid, ReLU, softmax).
[0193] In 915, the training subsystem uses the training dataset to train a machine learning model to predict whether an utterance or message represents a task configured for the SkillBot to perform, or to match an utterance or message to an intent associated with the SkillBot. Training the machine learning model involves training a set of binary classifiers of the machine learning model using the training dataset. For example, each binary classifier in the set of binary classifiers may be trained by finding the respective probabilities that utterances in the training dataset correspond to the classes associated with the binary classifier. Training each binary classifier may further involve mapping the respective probabilities for the classes associated with the binary classifier to distance-based logit values based on a modified logit function. In some examples, the mapping involves using the respective distance measured between each probability and the centroid of the distribution associated with the classes associated with the binary classifier.
[0194] Training each binary classifier may further include applying an enhanced activation function to distance-based logit values to generate predicted outputs for a class. The predicted outputs can identify normalized probabilities that predict whether an utterance corresponds to a class within a probability distribution. The enhanced activation function may include learned parameters for normalizing the initial output of the enhanced activation function to obtain the normalized probabilities. Training each binary classifier may further include applying an enhanced loss function to the predicted and expected outputs of an utterance to obtain the total loss. The enhanced loss function may include a set of loss terms to obtain the total loss, which may include (i) a binary cross-entropy loss term, (ii) a mean squared error term, (iii) a margin loss term, and (iv) a threshold loss term. Training each binary classifier may further include tuning one or more parameters of the binary classifier. In some examples, one or more parameters include learned parameters of the enhanced activation function.
[0195] Therefore, one or more parameters of each binary classifier can be learned to minimize the total loss between the predicted output generated by the binary classifier and the expected output indicated by the training label of the corresponding utterance. Training of the machine learning model can be performed until the loss reaches a minimum error threshold.
[0196] In step 920, the trained machine learning model may be deployed within the chatbot system (for example, as part of SkillBot) to predict whether an utterance or message represents a task configured for SkillBot to perform, or whether an utterance or message matches an intent associated with SkillBot, or whether an utterance or message corresponds to an unresolved class. The process then terminates in step 900.
[0197] F. Process for classifying utterances using distance-based logit values. Figure 10 is a flowchart of a process 1000 for classifying the intent of an utterance or message using distance-based logit values, according to several embodiments. The process shown in Figure 10 may be implemented by software (e.g., code, instructions, programs), hardware, or a combination thereof, executed by one or more processing units (e.g., processors, cores) of each system. The software may be stored on a non-temporary storage medium (e.g., on a memory device). The methods presented in Figure 10 and described below are intended to be illustrative and non-limiting. Figure 10 shows various processing steps that occur in a particular sequence or order, but this is not intended to be limiting. In certain alternative embodiments, those steps may be executed in some different order, or some steps may be executed in parallel. In certain embodiments, such as those in the embodiments shown in Figures 1 to 4, the process shown in Figure 10 may be performed by a subsystem of the chatbot system (e.g., the skillbot call 415 or intent prediction 420 in Figure 4) to classify utterances into user-defined classes.
[0198] In 1005, the chatbot system receives utterances generated by a user interacting with the chatbot system. Utterances may refer to a set of words (e.g., one or more sentences) exchanged during a conversation with the chatbot. In some cases, utterances may include text data converted from speech input (e.g., speech utterances), where the speech input may be converted into text utterances in a particular language, and then the text utterances may be processed.
[0199] In 1010, the chatbot system inputs utterances into a machine learning model. The machine learning model may include a set of binary classifiers. Each binary classifier in the set is configured to (i) estimate the probability that an utterance corresponds to a class in a set of classes, and (ii) is associated with a modified logit function that converts the probability for that class into a real number. The modified logit function is the logarithm of the odds corresponding to the probability for that class, and the logarithm of the odds is determined based on the distance measured between the probability for that class and the centroid of the distribution associated with that class. In some examples, the distance measured between the probability for that class and the centroid of the distribution associated with that class is either the Euclidean distance or the cosine distance.
[0200] The machine learning model can perform operations 1015 and 1020 to produce a predicted output that predicts whether an utterance corresponds to a particular class. In 1015, the machine learning model generates a set of distance-based logit values for the utterance. Each distance-based logit value in the set of distance-based logit values is generated by (i) each binary classifier in the set of binary classifiers finding the respective probability that the utterance corresponds to the class associated with its respective binary classifier, and (ii) each binary classifier mapping its respective probability to a distance-based logit value based on a modified logit function. The mapping involves using the respective distance measured between each probability and the centroid of the distribution associated with the class associated with its respective binary classifier.
[0201] In 1020, a machine learning model applies an enhanced activation function to a set of distance-based logit values to generate predicted outputs. These predicted outputs can identify normalized probabilities that predict whether an utterance corresponds to a particular class within a set of classes within a given probability distribution. In some examples, the enhanced activation function includes learned parameters for normalizing the initial output of the enhanced activation function in order to obtain the normalized probabilities.
[0202] For example, the enhanced activation function is confidence_score = distance_scale * sigmoid(-1.0*dist(W i It can be expressed as f(x)), where confidence_score represents the output of the machine learning model and corresponds to the normalized probability that predicts whether an utterance belongs to a particular class. distance_scale is a learned parameter for normalizing the output of the enhanced activation function.
[0203] In step 1025, the chatbot system classifies the utterances as belonging to a specific class based on the predicted output. Process 1000 then terminates.
[0204] G. Exemplary System Figure 11 shows a simplified diagram of a distributed system 1100. In the illustrated example, the distributed system 1100 includes one or more client computing devices 1102, 1104, 1106, and 1108 connected to a server 1112 via one or more communication networks 1110. The client computing devices 1102, 1104, 1106, and 1108 may be configured to run one or more applications.
[0205] In various examples, server 1112 may be adapted to run one or more services or software applications that enable one or more embodiments of the embodiments described herein. In some examples, server 1112 may also provide other services or software applications that may include non-virtual and virtual environments. In some examples, these services may be provided to users of client computing devices 1102, 1104, 1106 and / or 1108 as web-based services or cloud services, such as under the Software as a Service (SaaS) model. Users operating client computing devices 1102, 1104, 1106 and / or 1108 may access the services provided by these components by interacting with server 1112 using one or more client applications.
[0206] In the configuration shown in Figure 11, server 1112 may include one or more components 1118, 1120, and 1122 that implement the functions performed by server 1112. These components may include one or more processors, hardware components, or software components that can be executed by a combination thereof. It should be recognized that a wide variety of system configurations are possible, which may differ from the distributed system 1100. Therefore, the example shown in Figure 11 is an example of a distributed system for implementing the example system and is not intended to be limiting.
[0207] A user may use client computing devices 1102, 1104, 1106, and / or 1108 to run one or more applications, models, or chatbots, which may generate one or more events or models, which may then be implemented or processed in accordance with the teachings of this disclosure. A client device may provide an interface that allows a user of the client device to interact with the client device. A client device may also output information to the user through this interface. Although Figure 11 shows only four client computing devices, any number of client computing devices may be supported.
[0208] Client devices may include various types of computing systems, such as portable handheld devices, general-purpose computers like personal computers and laptops, workstation computers, wearable devices, game systems, thin clients, various messaging devices, sensors or other sensing devices. These computing devices may include various types and versions of software applications and operating systems (e.g., Microsoft Windows®, Apple Macintosh®, UNIX® or UNIX-like operating systems, Linux® or Linux-like operating systems, and various mobile operating systems, such as Google Chrome® OS, including Microsoft Windows Mobile®, iOS®, Windows Phone®, Android®, BlackBerry®, and Palm OS®). Portable handheld devices may include cellular phones, smartphones (e.g., iPhone®), tablets (e.g., iPad®), and personal digital assistants (PDAs). Wearable devices may include Google Glass® head-mounted displays and other devices. The game system may include various handheld game devices and internet-connected game devices (for example, Microsoft Xbox® game consoles with or without Kinect® gesture input devices, Sony PlayStation® systems, and various game systems provided by Nintendo®). Client devices may be capable of running a wide variety of applications, such as various internet-related applications and communication applications (for example, email applications and short message service (SMS) applications), and may use various communication protocols.
[0209] Network 1110 may be any type of network known to those skilled in the art that can support data communication using any of the various available protocols, including but not limited to TCP / IP (Transmission Control Protocol / Internet Protocol), SNA (System Network Architecture), IPX (Internet Packet Switching), AppleTalk®, etc. Just as an example, Network 1110 may include a local area network (LAN), an Ethernet®-based network, Token Ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (for example, a wireless network operating under any of the IEEE 1002.11 protocol suites, Bluetooth®, and / or any other wireless protocol), and / or any combination of these and / or other networks.
[0210] Server 1112 may consist of one or more general-purpose computers, dedicated server computers (including, for example, PC (personal computer) servers, UNIX® servers, midrange servers, mainframe computers, rack-mount servers, etc.), server farms, server clusters, or other appropriate configurations and / or combinations. Server 1112 may include one or more virtual machines running a virtual operating system, or other computing architectures with virtualization. This could be, for example, one or more flexible pools of logical storage that can be virtualized to maintain virtual storage for the server. In various examples, Server 1112 may be adapted to run one or more services or software applications that provide the functions described above.
[0211] The computing system within server 1112 may run one or more operating systems, including any of the above-mentioned operating systems, and commercially available server operating systems. Server 1112 may also run any of a variety of other server applications and / or middle-tier applications, including HTTP (Hypertext Transfer Protocol) servers, FTP (File Transfer Protocol) servers, CGI (Common Gateway Interface) servers, JAVA® servers, and database servers. Exemplary database servers include, but are not limited to, those commercially available from Oracle®, Microsoft®, Sybase®, IBM® (International Business Machines), and others.
[0212] In some implementations, server 1112 may include one or more applications for analyzing and organizing data feeds and / or event updates received from users of client computing devices 1102, 1104, 1106, and 1108. For example, data feeds and / or event updates may include, but are not limited to, Twitter® feeds, Facebook® updates, or real-time updates received from one or more third-party sources and continuous data streams, which may include real-time events related to sensor data applications, financial stock market boards, network performance measurement tools (e.g., network monitoring and traffic management applications), clickstream analysis tools, automotive traffic monitoring, etc. Server 1112 may also include one or more applications for displaying data feeds and / or real-time events via one or more display devices on client computing devices 1102, 1104, 1106, and 1108.
[0213] The distributed system 1100 may also include one or more data repositories 1114, 1116. In a particular example, these data repositories can be used to store data and other information. For example, one or more of the data repositories 1114, 1116 can be used to store information such as information related to chatbot performance or generated models for use by the chatbot used by the server 1112 when performing various functions according to various embodiments. The data repositories 1114, 1116 may reside in various locations. For example, the data repository used by the server 1112 may be located locally with the server 1112, or it may be located remotely from the server 1112 and communicates with the server 1112 via a network-based connection or a dedicated connection. The data repositories 1114, 1116 may be of different types. In a particular example, the data repository used by the server 1112 may be a database, such as a relational database, like a database provided by Oracle Corporation® and other manufacturers. One or more of these databases may be adapted to allow data to be stored, updated, and retrieved from the database in response to commands in SQL format.
[0214] In a particular example, one or more of the data repositories 1114, 1116 may be used by the application to store application data. The data repositories used by the application may be of various types, such as a key-value store repository, an object store repository, or a general-purpose storage repository supported by the file system.
[0215] In a particular example, the functions described herein may be provided as services through a cloud environment. Figure 12 is a simplified block diagram of a cloud-based system environment that may provide various services as cloud services in a particular example. In the example shown in Figure 12, the cloud infrastructure system 1202 may provide one or more cloud services that a user may request using one or more client computing devices 1204, 1206, and 1208. The cloud infrastructure system 1202 may include one or more computers and / or servers, which may include those described above with respect to server 1112. The computers within the cloud infrastructure system 1202 may be organized as general-purpose computers, dedicated server computers, server farms, server clusters, or any other appropriate arrangement and / or combination.
[0216] Network 1210 can facilitate data communication and exchange between clients 1204, 1206, and 1208 and the cloud infrastructure system 1202. Network 1210 may include one or more networks. The networks may be of the same type or different types. Network 1210 may support one or more communication protocols, including wired and / or wireless protocols, to facilitate communication.
[0217] The example shown in Figure 12 is merely one example of a cloud infrastructure system and is not intended to be limiting. It should be understood that in several other examples, the cloud infrastructure system 1202 may have more or fewer components than those shown in Figure 12, may combine two or more components, or may have components in different configurations or arrangements. For example, while Figure 12 shows three client computing devices, any number of client computing devices may be supported in alternative examples.
[0218] The term "cloud service" is generally used to refer to services made available to users on demand via communication networks such as the Internet, through a service provider's system (e.g., cloud infrastructure system 1202). Typically, in a public cloud environment, the servers and systems that make up the cloud service provider's system are different from the customer's own on-premises servers and systems. The cloud service provider's system is managed by the cloud service provider. Therefore, customers can use the cloud services provided by the cloud service provider without having to purchase separate licenses, support, or hardware and software resources for the service. For example, the cloud service provider's system can host applications, and users can order and use applications on demand via the Internet without having to purchase infrastructure resources to run the applications. Cloud services are designed to provide easy and scalable access to applications, resources, and services. Several providers offer cloud services. For example, some cloud services, such as middleware services, database services, and Java® cloud services, are offered by Oracle Corporation® in Redwood Shores, California.
[0219] In a particular example, the cloud infrastructure system 1202 may provide one or more cloud services using various models, including a hybrid service model, such as a Software as a Service (SaaS) model, a Platform as a Service (PaaS) model, and an Infrastructure as a Service (IaaS) model. The cloud infrastructure system 1202 may include a suite of applications, middleware, databases, and other resources that enable the provisioning of various cloud services.
[0220] The SaaS model enables the delivery of applications or software as a service to customers over a communication network such as the internet, without requiring customers to purchase the underlying hardware or software for the application. For example, the SaaS model can be used to allow customers to access on-demand applications hosted on a cloud infrastructure system 1202. Examples of SaaS services offered by Oracle Corporation® include, but are not limited to, various services for human resources / capital management, customer relationship management (CRM), enterprise resource planning (ERP), supply chain management (SCM), enterprise performance management (EPM), analytics services, and social applications.
[0221] The IaaS model is generally used to provide flexible computing and storage capabilities by offering infrastructure resources (such as servers, storage, hardware, and networking resources) to customers as cloud services. Various IaaS services are offered by Oracle Corporation®.
[0222] The PaaS model is generally used to provide a platform and environmental resources as a service, enabling customers to develop, run, and manage applications and services without having to procure, build, or manage those resources themselves. Examples of PaaS services offered by Oracle Corporation® include, but are not limited to, Oracle Java Cloud Service (JCS), Oracle Database Cloud Service (DBCS), data management cloud services, and various application development solution services.
[0223] Cloud services are generally delivered in an on-demand, self-service, subscription-based, flexibly scalable, reliable, highly available, and secure manner. For example, a customer may order one or more services provided by the cloud infrastructure system 1202 through a subscription order. The cloud infrastructure system 1202 then provides the services requested in the customer's subscription order by performing processing. For example, a user may use utterances to request the cloud infrastructure system to take a specific action (e.g., an intent) as described above, and / or to provide services for a chatbot system as described herein. The cloud infrastructure system 1202 may be configured to provide one cloud service or more cloud services.
[0224] The cloud infrastructure system 1202 can provide cloud services through various deployment models. In a public cloud model, the cloud infrastructure system 1202 may be owned by a third-party cloud service provider, and the cloud services are provided to a general public customer. This customer may be an individual or a company. In another example, under a private cloud model, the cloud infrastructure system 1202 may function within an organization (for example, within a corporate organization), and the services are provided to customers within this organization. For example, this customer may be various departments within the company, such as the human resources department or the payroll department, or an individual within the company. In yet another example, under a community cloud model, the cloud infrastructure system 1202 and the services provided may be shared among various organizations within the relevant community. Other models, such as hybrid models of the above models, may also be used.
[0225] The client computing devices 1204, 1206, and 1208 may be of different types (for example, the client computing devices 1102, 1104, 1106, and 1108 shown in Figure 11) and may be capable of operating one or more client applications. Users can interact with the cloud infrastructure system 1202, such as requesting services provided by the cloud infrastructure system 1202, by using the client devices. For example, a user can use a client device to request information or actions from a chatbot, as described in this disclosure.
[0226] In some examples, the processing performed by the cloud infrastructure system 1202 to provide services may include model training and deployment. This analysis may include training and deploying one or more models by using, analyzing, and processing a dataset. This analysis may be performed by one or more processors, which may, in some cases, process the data in parallel and run simulations using the data. For example, big data analysis may be performed by the cloud infrastructure system 1202 to generate and train one or more models for a chatbot system. The data used for this analysis may include structured data (e.g., data stored in a database or data structured according to a structured model) and / or unstructured data (e.g., data blobs (binary large objects)).
[0227] As shown in the example in Figure 12, the cloud infrastructure system 1202 may include infrastructure resources 1230 used to facilitate the provisioning of various cloud services provided by the cloud infrastructure system 1202. Infrastructure resources 1230 may include, for example, processing resources, storage or memory resources, networking resources, etc. In a particular example, a storage virtual machine available to handle storage requested by an application may be part of the cloud infrastructure system 1202. In other examples, the storage virtual machine may be part of a different system.
[0228] In certain examples, resources may be grouped into resource sets or resource modules (also referred to as "pods") to facilitate the efficient provisioning of these resources to support various cloud services provided by the cloud infrastructure system 1202 to different customers. Each resource module or pod may contain a pre-integrated and optimized combination of one or more types of resources. In certain examples, different pods may be pre-provisioned for different types of cloud services. For example, a first set of pods may be provisioned for a database service, and a second set of pods, which may contain different resource combinations than the pods in the first set, may be provisioned for a Java service, etc. For some services, resources allocated to provisioning these services may be shared among the services.
[0229] The cloud infrastructure system 1202 itself may internally use services 1232 that are shared by different components of the cloud infrastructure system 1202 and facilitate the provisioning of services by the cloud infrastructure system 1202. These internally shared services may include, but are not limited to, security and identity services, integration services, enterprise repository services, enterprise manager services, virus scanning and whitelisting services, high availability, backup and recovery services, services that enable cloud support, email services, notification services, and file transfer services.
[0230] The cloud infrastructure system 1202 may include multiple subsystems. These subsystems may be implemented in software, hardware, or a combination thereof. As shown in Figure 12, the subsystems may include a user interface subsystem 1212 that enables users or customers of the cloud infrastructure system 1202 to interact with the cloud infrastructure system 1202. The user interface subsystem 1212 may include various different interfaces, such as a web interface 1214, an online store interface 1216 where cloud services offered by the cloud infrastructure system 1202 are advertised and available for purchase by consumers, and other interfaces 1218. For example, a customer may use a client device to request (service request 1234) one or more services that the cloud infrastructure system 1202 offers using one or more of the interfaces 1214, 1216, and 1218. For example, a customer may access the online store, browse the cloud services offered by the cloud infrastructure system 1202, and place a subscription order for one or more services offered by the cloud infrastructure system 1202 that the customer wishes to subscribe to. This service request may include information identifying the customer and one or more services that the customer wishes to request. For example, a customer may submit a request order for services provided by the cloud infrastructure system 1202. As part of the order, the customer may provide information identifying the chatbot system on which the service will be provided, and optionally one or more credentials for the chatbot system.
[0231] In a specific example, such as the example shown in Figure 12, the cloud infrastructure system 1202 may include an order management subsystem (OMS) 1220 configured to process new orders. As part of this process, the OMS 1220 may be configured to prepare the order for provisioning by creating a customer account if one does not already exist, receiving billing and / or account information from the customer to be used to charge the customer in order to provide the requested services to the customer, verifying the customer information, reserving the order for the customer after verification, and coordinating various workflows.
[0232] If properly validated, OMS1220 may invoke Order Provisioning Subsystem (OPS)1224, configured to provision resources for this order, including processing, memory, and networking resources. Provisioning may include allocating resources for the order and configuring those resources to facilitate the services requested by the customer order. The way resources are provisioned for an order and the types of resources provisioned may depend on the type of cloud service ordered by the customer. For example, following a certain workflow, OPS1224 may be configured to determine the specific cloud service being requested and identify the number of pods that would have been pre-configured for that particular cloud service. The number of pods allocated for an order may depend on the size / volume / level / scope of the requested service. For example, the number of pods to allocate may be determined based on the number of users the service should support, the duration for which the service is requested, etc. The allocated pods may then be customized to suit the specific customer making the request in order to provide the requested service.
[0233] In certain cases, the setup phase process may be performed by the cloud infrastructure system 1202 as part of the provisioning process, as described above. The cloud infrastructure system 1202 can generate an application ID and select a storage virtual machine for the application from among the storage virtual machines provided by the cloud infrastructure system 1202 itself, or from storage virtual machines provided by other systems other than the cloud infrastructure system 1202.
[0234] The cloud infrastructure system 1202 may send a response or notification 1244 to the requesting customer to indicate when the requested service will be available. In some examples, the customer may be sent information (e.g., a link) that enables the customer to begin using and utilizing the benefits of the requested service. In certain examples, the response to the customer requesting the service may include a chatbot system ID generated by the cloud infrastructure system 1202, and information identifying the chatbot system selected by the cloud infrastructure system 1202 for the chatbot system corresponding to the chatbot system ID.
[0235] The cloud infrastructure system 1202 may provide services to multiple customers. For each customer, the cloud infrastructure system 1202 manages information related to one or more subscription orders received from the customer, maintains customer data related to the orders, and provides the requested services to the customer. The cloud infrastructure system 1202 may also collect usage statistics about the customer's use of the subscribed services. For example, statistics may be collected on the amount of storage used, the amount of data transferred, the number of users, and the amount of system uptime and system downtime. This usage information may be used to charge customers. Billing may be done, for example, on a monthly basis.
[0236] The cloud infrastructure system 1202 may provide services to multiple customers in parallel. The cloud infrastructure system 1202 may store information about these customers, which may include copyright information. In a particular example, the cloud infrastructure system 1202 includes an Identity Management Subsystem (IMS) 1228 configured to manage customer information and separate the managed information so that information about one customer cannot be accessed from information about another customer. The IMS 1228 may be configured to provide various security-related services, such as identity services including information access management, authentication and authorization services, and services for managing customer identities and roles and related capabilities.
[0237] Figure 13 shows an example of computer system 1300. In some examples, computer system 1300 could be used to implement any digital assistant or chatbot system in a distributed environment, as well as the various servers and computer systems described above. As shown in Figure 13, computer system 1300 includes various subsystems, including a processing subsystem 1304 that communicates with several other subsystems via a bus subsystem 1302. These other subsystems may include a processing acceleration unit 1306, an I / O subsystem 1308, a storage subsystem 1318, and a communication subsystem 1324. The storage subsystem 1318 may include non-temporary computer-readable storage media, including a storage medium 1322 and system memory 1310.
[0238] The bus subsystem 1302 provides a mechanism for various components and subsystems of the computer system 1300 to communicate with each other as intended. Although the bus subsystem 1302 is schematically shown as a single bus, alternative examples of the bus subsystem may utilize multiple buses. The bus subsystem 1302 may be one of several types of bus structures, including a memory bus or memory controller, peripheral bus, local bus, etc., using one of various bus architectures. For example, such architectures may include the Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, which can be implemented as a mezzanine bus manufactured according to the IEEE P1386.1 standard.
[0239] The processing subsystem 1304 controls the operation of the computer system 1300 and may include one or more processors, application-specific integrated circuits (ASICs), or field-programmable gate arrays (FPGAs). The processors may include single-core or multi-core processors. The processing resources of the computer system 1300 can be organized into one or more processing units 1332, 1334, etc. A processing unit may include one or more processors, one or more cores from the same or different processors, a combination of cores and processors, or other combinations of cores and processors. In some examples, the processing subsystem 1304 may include one or more dedicated coprocessors, such as graphics processors or digital signal processors (DSPs). In some examples, some or all of the processing units in the processing subsystem 1304 may use customized circuitry, such as application-specific integrated circuits (ASICs) or field-programmable gate arrays (FPGAs).
[0240] In some examples, processing units within the processing subsystem 1304 may execute instructions stored in system memory 1310 or computer-readable storage medium 1322. In various examples, processing units may execute various program or code instructions and maintain multiple programs or processes running concurrently. At any given time, some or all of the program code to be executed may reside in system memory 1310 and / or computer-readable storage medium 1322, which may contain one or more storage devices. Through appropriate programming, the processing subsystem 1304 may provide the various functions described above. In an example where the computer system 1300 is running one or more virtual machines, one or more processing units may be assigned to each virtual machine.
[0241] In a particular example, a processing acceleration unit 1306 may be optionally provided to perform customized processing to accelerate the overall processing performed by the computer system 1300, or to offload a portion of the processing performed by the processing subsystem 1304.
[0242] The I / O subsystem 1308 may include devices and mechanisms for inputting information into and / or outputting information from or through the computer system 1300. Generally, the use of the term “input device” is intended to include all conceivable types of devices and mechanisms for inputting information into the computer system 1300. User interface input devices may include, for example, pointing devices such as keyboards, mice or trackballs, touchpads or touchscreens integrated into displays, scroll wheels, click wheels, dials, buttons, switches, keypads, voice input devices with voice command recognition systems, microphones, and other types of input devices. User interface input devices may also include motion sensing and / or gesture recognition devices, such as Microsoft Kinect® motion sensors, Microsoft Xbox® 360 game controllers, and devices that provide interfaces for receiving input using gestures and voice commands, enabling users to control and interact with input devices. The user interface input device may also include an eye gesture recognition device, such as the Google Glass® blink detector, which detects eye movements from the user (e.g., blinking while taking a picture and / or making a menu selection) and translates the eye gestures into input to an input device (e.g., Google Glass®). The user interface input device may also include a voice recognition sensing device that enables the user to interact with a voice recognition system (e.g., Siri® Navigator) via voice commands.
[0243] Other examples of user interface input devices may include, but are not limited to, three-dimensional (3D) mice, joysticks or pointing sticks, gamepads and graphic tablets, as well as auditory / visual devices such as speakers, digital cameras, digital camcorders, portable media players, webcams, image scanners, fingerprint scanners, barcode readers, 3D scanners, 3D printers, laser rangefinders, and eye-tracking devices. User interface input devices may also include medical imaging input devices such as computed tomography, magnetic resonance imaging, positional emission tomography, and medical ultrasound devices. User interface input devices may also include audio input devices such as MIDI keyboards and digital musical instruments.
[0244] Generally, the use of the term "output device" is intended to include all conceivable types of devices and mechanisms for outputting information from the computer system 1300 to a user or another computer. User interface output devices may include non-visual displays such as display subsystems, indicator lights, or audio output devices. Display subsystems may include flat panel devices such as those using cathode ray tubes (CRTs), liquid crystal displays (LCDs), or plasma displays, planning devices, touchscreens, etc. For example, user interface output devices may include, but are not limited to, a variety of display devices that visually convey text, graphics, and audio / video information, such as monitors, printers, speakers, headphones, car navigation systems, plotters, audio output devices, and modems.
[0245] The storage subsystem 1318 provides a repository or datastore for storing information and data used by the computer system 1300. The storage subsystem 1318 provides a tangible, non-temporary, computer-readable storage medium for storing basic programming and data configurations that provide some example functionality. Software (e.g., programs, code modules, instructions) that, when executed by the processing subsystem 1304, provides the above-described functionality may be stored in the storage subsystem 1318. The software may be executed by one or more processing units of the processing subsystem 1304. The storage subsystem 1318 may also provide authentication in accordance with the teachings of this disclosure.
[0246] The storage subsystem 1318 may include one or more non-temporary memory devices, including volatile and non-volatile memory devices. As shown in Figure 13, the storage subsystem 1318 includes system memory 1310 and computer-readable storage medium 1322. The system memory 1310 may include several memories, including volatile primary random access memory (RAM) for storing instructions and data during program execution, and non-volatile read-only memory (ROM) or flash memory for storing fixed instructions. In some implementations, a basic input / output system (BIOS), which includes basic routines to assist in the transfer of information between elements within the computer system 1300 during startup, etc., may typically be stored in ROM. Typically, the RAM contains data and / or program modules currently being operated and executed by the processing subsystem 1304. In some implementations, the system memory 1310 may include several different types of memory, such as static random access memory (SRAM) and dynamic random access memory (DRAM).
[0247] As an example, without limitation, as shown in Figure 13, the system memory 1310 may load a running application program 1312, program data 1314, and an operating system 1316, which may include various applications such as a web browser, a middle-tier application, and a relational database management system (RDBMS). As an example, the operating system 1316 may include Microsoft Windows®, Apple Macintosh®, and / or Linux operating systems, various commercially available UNIX® or UNIX-like operating systems (including, but not limited to, various GNU / Linux operating systems and Google Chrome® OS), and / or various versions of mobile operating systems such as iOS®, Windows Phone, Android® OS, BlackBerry® OS, and Palm® OS.
[0248] The computer-readable storage medium 1322 can store programming and data structures that provide several example functions. The computer-readable storage medium 1322 can provide storage for computer-readable instructions, data structures, program modules, and other data for the computer system 1300. Software (programs, code modules, instructions) that, when executed by the processing subsystem 1304, provides the above functions may be stored in the storage subsystem 1318. As an example, the computer-readable storage medium 1322 may include non-volatile memory such as a hard disk drive, magnetic disk drive, optical disk drive such as a CD-ROM, DVD, or Blu-ray® disc, or other optical media. The computer-readable storage medium 1322 may also include, but is not limited to, a Zip® drive, flash memory card, Universal Serial Bus (USB) flash drive, Secure Digital (SD) card, DVD disc, digital videotape, etc. Computer-readable storage media 1322 may also include solid-state drives (SSDs) based on non-volatile memory such as flash memory-based SSDs, enterprise flash drives, and solid-state ROMs; SSDs based on volatile memory such as solid-state RAM, dynamic RAM, and static RAM; DRAM-based SSDs; magnetoresistive RAM (MRAM) SSDs; and hybrid SSDs that use a combination of DRAM and flash memory-based SSDs.
[0249] In certain examples, the storage subsystem 1318 may also include a computer-readable storage medium reader 1320 that can be further connected to the computer-readable storage medium 1322. The reader 1320 may be configured to receive and read data from memory devices such as disks, flash drives, etc.
[0250] In certain examples, computer system 1300 may support virtualization technologies, including but not limited to the virtualization of processing and memory resources. For example, computer system 1300 may provide support for running one or more virtual machines. In certain examples, computer system 1300 may run programs such as hypervisors that facilitate the configuration and management of virtual machines. Each virtual machine may be allocated memory, computing resources (e.g., processors, cores), I / O, and networking resources. Each virtual machine typically runs independently of other virtual machines. A virtual machine typically runs its own operating system, which may be the same as or different from the operating system run by other virtual machines run by computer system 1300. Thus, potentially multiple operating systems may run simultaneously by computer system 1300.
[0251] The communication subsystem 1324 provides interfaces to other computer systems and networks. It functions as an interface for sending and receiving data between other systems and the computer system 1300. For example, the communication subsystem 1324 may enable the computer system 1300 to establish communication channels to one or more client devices via the internet in order to send and receive information with one or more client devices. For instance, if the computer system 1300 is used to implement the bot system 120 shown in Figure 1, the communication subsystem may be used to communicate with a chatbot system selected for the application.
[0252] The communication subsystem 1324 may support both wired and / or wireless communication protocols. In some examples, the communication subsystem 1324 may include radio frequency (RF) transceiver components for accessing wireless voice and / or data networks (e.g., cellular telephone technology, 3G, 4G, or EDGE (High Speed Data Rate for Global Evolution)), a Global Positioning System (GPS) receiver component, and / or other components. In some examples, the communication subsystem 1324 may provide a wired network connection (e.g., Ethernet®) in addition to or instead of a wireless interface.
[0253] The communication subsystem 1324 can receive and transmit data in various formats. In some examples, in addition to other formats, the communication subsystem 1324 may receive input communications in the form of structured data feeds and / or unstructured data feeds 1326, event streams 1328, event updates 1330, etc. For example, the communication subsystem 1324 may be configured to receive (or transmit) data feeds 1326 in real time from users of other communication services such as social media networks and / or web feeds such as Twitter® feeds, Facebook® updates, Rich Site Summary (RSS) feeds, and / or real-time updates from one or more third-party sources.
[0254] In certain examples, communication subsystem 1324 may be configured to receive data in the form of a continuous data stream, which may include event stream 1328 and / or event updates 1330 of real-time events that are inherently continuous or infinite and have no explicit end. Examples of applications that generate continuous data include, for example, sensor data applications, financial stock market dashboards, network performance measurement tools (such as network monitoring and traffic management applications), clickstream analysis tools, automotive traffic monitoring, and the like.
[0255] Communication subsystem 1324 may be configured to transmit data from computer system 1300 to other computer systems or networks. This data may be communicated to one or more databases that can communicate with one or more streaming data source computers coupled to computer system 1300 in various different forms such as structured and / or unstructured data feeds 1326, event streams 1328, event updates 1330, and the like.
[0256] Computer system 1300 may be one of many types, including handheld portable devices (e.g., iPhone® cellular phone, iPad® computing tablet, PDA), wearable devices (e.g., Google Glass® head-mounted display), personal computers, workstations, mainframes, kiosks, server racks, or other data processing systems. Because the nature of computers and networks is constantly changing, the description of computer system 1300 shown in Figure 13 is intended only as a specific example. Many other configurations are possible, having more or fewer components than the system shown in Figure 13. Based on the disclosures and teachings herein, it should be recognized that there are other embodiments and / or methods for realizing various examples.
[0257] While specific examples have been described, various variations, modifications, alternative configurations, and equivalents are possible. The examples are not limited to operation within a specific data processing environment, but can freely operate within multiple data processing environments. Furthermore, although the examples were illustrated using a specific set of transactions and steps, it should be apparent to those skilled in the art that this is not intended as limitation. While some flowcharts illustrate operations as sequential processes, many of these operations may be executed in parallel or concurrently. In addition, the order of operations may be re-specified. Processes may have additional steps not shown in the diagrams. The various features and aspects of the above examples may be used individually or together.
[0258] Furthermore, while specific examples have been described using a specific combination of hardware and software, it should be understood that other combinations of hardware and software are also possible. The specific examples may be implemented using only hardware, or only software, or a combination thereof. The various processes described herein may be implemented on the same processor or different processors in any combination.
[0259] When a device, system, component or module is described as being configured to perform a particular operation or function, such a configuration can be achieved, for example, by designing an electronic circuit to perform the operation, by programming a programmable electronic circuit (such as a microprocessor) to perform the operation, by programming a computer instruction or code that executes code or instructions stored in a non-transitory memory medium or any combination thereof, or by executing a processor or core, etc. The processes can communicate using a variety of techniques including, but not limited to, conventional techniques for inter-process communication, different pairs of processes may use different techniques, and the same pair of processes may use different techniques at different times.
[0260] In this disclosure, examples are presented with specific details to enable a thorough understanding. However, the examples can be implemented without these specific details. For example, well-known circuits, processes, algorithms, structures, and techniques are shown without unnecessary detail to avoid obscuring the examples. This specification provides only exemplary examples and is not intended to limit the scope, applicability, or configuration of other examples. Rather, the above description of the examples provides those skilled in the art with an explanation that enables the realization of various examples. Various changes are possible within the scope of the functions and configurations of the elements.
[0261] Therefore, the specification and drawings should be considered illustrative rather than restrictive. However, it will be clear that additions, reductions, deletions, and other modifications and changes may be made to them without departing from the broader spirit and scope set forth in the claims. Thus, specific examples have been described, but these are not intended to be limiting. Various variations and equivalents are within the scope of the attached claims.
[0262] While the above specification illustrates aspects of the disclosure with reference to specific examples, those skilled in the art will recognize that the disclosure is not limited thereto. The various features and aspects of the above disclosure may be used individually or together. Furthermore, the examples can be used in a variety of environments and applications beyond those described herein, without departing from the broader spirit and scope of the specification. Therefore, the specification and drawings should be considered illustrative rather than restrictive.
[0263] In the above description, the method is presented in a specific order for illustrative purposes. It should be understood that in alternative examples, the method may be executed in a different order than described. It should also be understood that the above method may be executed by hardware components, or it may be embodied in a sequence of machine-executable instructions, which, when used, may cause a machine such as a general-purpose or dedicated processor or logic circuit programmed with such instructions to execute the method. These machine-executable instructions may be stored on one or more machine-readable media, or other types of machine-readable media suitable for storing electronic instructions, such as CD-ROMs or other types of optical discs, floppy disks, ROMs, RAMs, EPROMs, EEPROMs, magnetic or optical cards, or flash memory. Alternatively, these methods may be executed by a combination of hardware and software.
[0264] Where a component is described as being configured to perform a particular operation, such configuration may be achieved, for example, by designing an electronic circuit or other hardware to perform a particular operation, by programming a programmable electronic circuit (e.g., a microprocessor or other suitable electronic circuit) to perform a particular operation, or by any combination thereof.
[0265] While examples illustrating this application are described in detail here, it should be understood that the concepts of the present invention can be embodied and adopted in various other aspects, and that the claims are intended to be interpreted to include such variations, unless limited by the prior art.
Claims
1. It is a method, The chatbot system includes receiving utterances generated by a user interacting with the chatbot system, the utterances including text data converted from the user's voice input, and the method further includes: The chatbot system includes inputting the utterance into a machine learning model which includes a set of binary classifiers, each of which is configured to (i) estimate the probability that the utterance corresponds to a particular intent class in a set of intent classes, and (ii) is associated with a modified logit function which converts the probability for the particular intent class into a real number, the modified logit function which is the logarithm of the odds corresponding to the probability for the particular intent class, the logarithm of the odds which is determined based on the distance measured between the probability for the particular intent class and the centroid of the probability distribution associated with the particular intent class, and the method further, The chatbot system includes generating a set of distance-based logit values for the utterance using the machine learning model, where each distance-based logit value in the set of distance-based logit values is Each binary classifier in the set of binary classifiers calculates the probability that the utterance corresponds to the intent class associated with its respective binary classifier, Each of the binary classifiers is generated by mapping each of the probabilities to the distance-based logit values based on the modified logit function, the mapping comprising using each of the distances measured between each of the probabilities and the centroid of the probability distribution associated with the intent class associated with each of the binary classifiers, the method further, The chatbot system includes using the machine learning model to apply an enhanced activation function to the set of distance-based logit values to generate a predicted output, the predicted output identifying a normalized probability that predicts whether the utterance corresponds to a particular intent class among the set of intent classes within a certain probability distribution, the enhanced activation function including learned parameters for normalizing the initial output of the enhanced activation function in order to obtain the normalized probability, and the method further includes A method comprising classifying the chatbot system as relating to a particular intent class based on the predicted output.
2. The method according to claim 1, further comprising the chatbot system responding to the user based on the classification as associated with the particular intent class of the utterance.
3. The method according to claim 1 or 2, further comprising training the machine learning model by applying an enhanced loss function to the predicted output and the expected output corresponding to the utterance in order to determine the total loss, wherein the total loss is used to tune one or more parameters of the machine learning model, and the enhanced loss function includes a set of loss terms for determining the total loss, wherein the set of loss terms includes (i) a binary cross-entropy loss term, (ii) a mean squared error term, (iii) a margin loss term, and (iv) a threshold loss term.
4. The method according to claim 3, wherein each loss term in the set of loss terms is associated with a weight parameter, and the training of the machine learning model includes adjusting the weight parameter of the loss terms in the set of loss terms based on the total loss.
5. The method according to claim 3, wherein the training of the machine learning model includes adjusting the learned parameters of the enhanced activation function based on the total loss.
6. The method according to any one of claims 3 to 5, wherein the margin loss term specifies a minimum confidence margin of 0.
1.
7. The method according to any one of claims 3 to 5, wherein the threshold loss term specifies a minimum threshold confidence level of 0.
5.
8. The method according to any one of claims 1 to 7, wherein the distance measured between the probability for a certain intent class and the centroid of the probability distribution associated with the certain intent class is one of the Euclidean distance or the cosine distance.
9. It is a system, One or more data processors, The system comprises a non-temporary computer-readable storage medium storing a program for causing one or more data processors to perform an operation, and the operation is, The operation includes receiving utterances generated by a user interacting with the system, wherein the utterances include text data converted from the user's voice input, and the operation further includes: The process includes inputting the utterance into a machine learning model comprising a set of binary classifiers, each binary classifier in the set of binary classifiers being configured to (i) estimate the probability that the utterance corresponds to a particular intent class in a set of intent classes, and (ii) being associated with a modified logit function that converts the probability for the particular intent class into a real number, the modified logit function being the logarithm of the odds corresponding to the probability for the particular intent class, the logarithm of the odds being determined based on the distance measured between the probability for the particular intent class and the centroid of the probability distribution associated with the particular intent class, and the operation further includes: This includes using the machine learning model to generate a set of distance-based logit values for the utterance, wherein each distance-based logit value in the set of distance-based logit values is Each binary classifier in the set of binary classifiers calculates the probability that the utterance corresponds to the intent class associated with its respective binary classifier, Each of the binary classifiers is generated by mapping each of the probabilities to the distance-based logit values based on the modified logit function, the mapping includes using each of the distances measured between each of the probabilities and the centroid of the probability distribution associated with the intent class associated with each of the binary classifiers, and the operation further, The operation includes using the machine learning model to apply an enhanced activation function to the set of distance-based logit values to generate a predicted output, the predicted output identifying a normalized probability that predicts whether the utterance corresponds to a particular intent class among the set of intent classes within a certain probability distribution, the enhanced activation function including learned parameters for normalizing the initial output of the enhanced activation function to obtain the normalized probability, and the operation further includes: A system that includes classifying the utterance as belonging to a particular intent class based on the predicted output.
10. The program further causes one or more data processors to perform an operation, the operation being: The system according to claim 9, comprising responding to the user based on the classification as associated with the particular intent class of the utterance.
11. The program further causes one or more data processors to perform an operation, the operation being: The system according to claim 9 or 10, comprising training the machine learning model by applying an enhanced loss function to the predicted output and the expected output corresponding to the utterance in order to determine the total loss, wherein the total loss is used to tune one or more parameters of the machine learning model, and the enhanced loss function comprises a set of loss terms for determining the total loss, wherein the set of loss terms comprises (i) a binary cross-entropy loss term, (ii) a mean squared error term, (iii) a margin loss term, and (iv) a threshold loss term.
12. The system according to claim 11, wherein each loss term in the set of loss terms is associated with a weight parameter, and the training of the machine learning model includes adjusting the weight parameter of the loss terms in the set of loss terms based on the total loss.
13. The system according to claim 11, wherein the training of the machine learning model includes adjusting the learned parameters of the enhanced activation function based on the total loss.
14. The system according to any one of claims 11 to 13, wherein the margin loss term specifies a minimum confidence margin of 0.
1.
15. The system according to any one of claims 11 to 13, wherein the threshold loss term specifies a minimum threshold confidence level of 0.
5.
16. The system according to any one of claims 9 to 15, wherein the distance measured between the probability for a certain intent class and the centroid of the probability distribution associated with the certain intent class is either a Euclidean distance or a cosine distance.
17. A program for causing a computer to perform the method described in any one of claims 1 to 8.
18. It is a method, The training subsystem includes receiving a training dataset, the training dataset including a plurality of utterances generated by a user interacting with a chatbot system, at least one of the plurality of utterances including text data converted from the user's voice input, and the method further includes The training subsystem includes evaluating a machine learning model comprising a set of binary classifiers, each binary classifier in the set of binary classifiers being configured to (i) estimate the probability that the utterance corresponds to a certain intent class from a set of intent classes, and (ii) associated with a modified logit function that converts the probability for the intent class to a real number, the modified logit function being the logarithm of the odds corresponding to the probability for the intent class, the logarithm of the odds being determined based on the distance measured between the probability for the intent class and the centroid of the probability distribution associated with the intent class, and the method further, The training subsystem includes training the set of binary classifiers of the machine learning model using the training dataset, and the training is For each binary classifier in the set of binary classifiers, The process involves determining the probability that each utterance in the training dataset corresponds to an intent class associated with the binary classifier, The training further includes mapping the respective probabilities for the intent classes associated with the binary classifiers to distance-based logit values based on the modified logit function, the mapping including using the respective distance measured between the respective probability and the centroid of the probability distribution associated with the intent classes associated with the binary classifiers, and the training further includes for each binary classifier in the set of binary classifiers, The training includes applying an enhanced activation function to the distance-based logit value to generate a predicted output for the intent class, the predicted output identifying a normalized probability that predicts whether the utterance corresponds to the intent class within a certain probability distribution, the enhanced activation function including learned parameters for normalizing the initial output of the enhanced activation function to obtain the normalized probability, and the training further includes for each binary classifier in the set of binary classifiers, To determine the total loss, the training includes applying an enhanced loss function to the predicted output and the expected output of the utterance, the enhanced loss function includes a set of loss terms for determining the total loss, the set of loss terms includes (i) a binary cross-entropy loss term, (ii) a mean squared error term, (iii) a margin loss term, and (iv) a threshold loss term, and the training further includes for each binary classifier in the set of binary classifiers, The method further includes adjusting one or more parameters of the binary classifier, wherein the one or more parameters include the learned parameters of the enhanced activation function, and the method further includes A method comprising deploying the trained machine learning model, wherein the training subsystem includes deploying the trained machine learning model.
19. The method according to claim 18, wherein each loss term in the set of loss terms is associated with a weight parameter, and the training of the machine learning model includes adjusting the weight parameter of the loss terms in the set of loss terms based on the total loss.
20. The method according to claim 18 or 19, wherein the distance measured between the probability for a certain intent class and the centroid of the probability distribution associated with the certain intent class is one of the Euclidean distance or the cosine distance.
21. The training of the aforementioned machine learning model is Training the first binary classifier of the set of binary classifiers using the first training sub-dataset of the training dataset, The method according to any one of claims 18 to 20, comprising training a second binary classifier of the set of binary classifiers using a second training sub-dataset of the training dataset, wherein the second training sub-dataset includes one or more utterances from the plurality of utterances that are not present in the first training sub-dataset.
22. The method according to any one of claims 18 to 21, wherein the margin loss term specifies a minimum confidence margin of 0.
1.
23. The method according to any one of claims 18 to 21, wherein the threshold loss term specifies a minimum threshold confidence level of 0.
5.
24. It is a system, One or more data processors, The system comprises a non-temporary computer-readable storage medium storing a program for causing one or more data processors to perform an operation, and the operation is, The operation includes receiving a training dataset, the training dataset comprising a plurality of utterances generated by a user interacting with the chatbot system, at least one of the plurality of utterances comprising text data converted from the user's voice input, and the operation further includes: The process includes evaluating a machine learning model comprising a set of binary classifiers, each binary classifier in the set of binary classifiers being configured to (i) estimate the probability that the utterance corresponds to a particular intent class in a set of intent classes, and (ii) associated with a modified logit function that converts the probability for the particular intent class into a real number, the modified logit function being the logarithm of the odds corresponding to the probability for the particular intent class, the logarithm of the odds being determined based on the distance measured between the probability for the particular intent class and the centroid of the probability distribution associated with the particular intent class, and the operation further, The training includes training the set of binary classifiers of the machine learning model using the training dataset, and the training is For each binary classifier in the set of binary classifiers, The process involves determining the probability that each utterance in the training dataset corresponds to an intent class associated with the binary classifier, The training further includes mapping the respective probabilities for the intent classes associated with the binary classifiers to distance-based logit values based on the modified logit function, the mapping including using the respective distance measured between the respective probability and the centroid of the probability distribution associated with the intent classes associated with the binary classifiers, and the training further includes for each binary classifier in the set of binary classifiers, The training includes applying an enhanced activation function to the distance-based logit value to generate a predicted output for the intent class, the predicted output identifying a normalized probability that predicts whether the utterance corresponds to the intent class within a certain probability distribution, the enhanced activation function including learned parameters for normalizing the initial output of the enhanced activation function to obtain the normalized probability, and the training further includes for each binary classifier in the set of binary classifiers, To determine the total loss, the training includes applying an enhanced loss function to the predicted output and the expected output of the utterance, the enhanced loss function includes a set of loss terms for determining the total loss, the set of loss terms includes (i) a binary cross-entropy loss term, (ii) a mean squared error term, (iii) a margin loss term, and (iv) a threshold loss term, and the training further includes for each binary classifier in the set of binary classifiers, The operation further includes adjusting one or more parameters of the binary classifier, the one or more parameters including the learned parameters of the enhanced activation function, and the operation further includes A system including deploying the aforementioned trained machine learning model.
25. The system according to claim 24, wherein each loss term in the set of loss terms is associated with a weight parameter, and the training of the machine learning model includes adjusting the weight parameter of the loss terms in the set of loss terms based on the total loss.
26. The system according to claim 24 or 25, wherein the distance measured between the probability for a certain intent class and the centroid of the probability distribution associated with the certain intent class is one of the Euclidean distance or the cosine distance.
27. The training of the aforementioned machine learning model is Training the first binary classifier of the set of binary classifiers using the first training sub-dataset of the training dataset, The system according to any one of claims 24 to 26, comprising training a second binary classifier of the set of binary classifiers using a second training sub-dataset of the training dataset, wherein the second training sub-dataset includes one or more utterances from the plurality of utterances that are not present in the first training sub-dataset.
28. The system according to any one of claims 24 to 27, wherein the margin loss term specifies a minimum confidence margin of 0.
1.
29. The system according to any one of claims 24 to 27, wherein the threshold loss term specifies a minimum threshold confidence level of 0.
5.
30. A program for causing a computer to perform the method described in any one of claims 18 to 23.
Citation Information
Patent Citations
Method and system to handle queries whose intention are unclear in conversational system
JP2020140210A
Classification device, classification method, and program
JP2020144905A
Intent classification system
US20200097496A1