Fine-tuning multi-head networks from a single transformer layer on pre-trained language models

JP2024539003A5Pending Publication Date: 2025-08-04ORACLE INT CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024522110
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-05-03
Filing Date
2022-08-17
Publication Date
2025-08-04

AI Technical Summary

Technical Problem

Building chatbots is difficult due to the need for specialized knowledge and techniques, making it challenging for organizations to develop efficient models that can understand user intent in natural language conversations.

Method used

Fine-tuning a pre-trained language model by updating parameters in an incomplete subset of its layers using client-specific data, while fixing parameters in other layers, to create an updated model that can efficiently process user inputs and improve chatbot performance.

Benefits of technology

This approach allows for faster and more resource-efficient training of chatbots, maintaining accuracy comparable to full-parameter training, thus enabling more efficient development and deployment of intelligent chatbots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Techniques are provided for customizing or fine-tuning a pre-trained version of a machine learning model that includes a plurality of layers and is configured to process speech or text language input. Each of the plurality of layers is configured with a plurality of layer-specific pre-trained parameter values ​​corresponding to a plurality of parameters, and each of the plurality of layers is configured to perform multi-head attention. An incomplete subset of the plurality of layers is identified, for which the corresponding layer-specific pre-trained parameter values ​​are fine-tuned using a client dataset. The machine learning model is fine-tuned using the client dataset to generate an updated version of the machine learning model, and layer-specific pre-trained parameter values ​​configured for one or more layers of the plurality of layers that are not included in the incomplete subset are fixed during fine-tuning. Use of the updated version of the machine learning model is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to U.S. Non-provisional Application No. 17 / 735,651, filed May 3, 2022, which claims the benefit of and priority to U.S. Provisional Application No. 63 / 254,740, filed October 12, 2021, each of which is incorporated by reference in its entirety for all purposes.

[0002] FIELD OF THEINVENTION The present disclosure generally relates to selectively fine-tuning select layers of a pre-trained language model. More specifically, selective fine-tuning involves performing training that includes updating parameters in an incomplete subset of a set of layers in a pre-trained language model being updated while fixing parameters in one or more other layers of the pre-trained language model during training. [Background technology]

[0003] background Many users across the globe are present on instant messaging or chat platforms to get instant responses. Organizations often use these instant messaging or chat platforms to engage with customers (or end users) in live conversations. However, it can be very costly for organizations to employ service personnel to communicate live with customers or end users. To simulate conversations with end users, especially over the internet, chatbots or bots have started to be developed. End users can communicate with the bots through messaging apps that the end users already have installed and are using. Intelligent bots, usually equipped with artificial intelligence (AI), can communicate more intelligently and contextually in live conversations, thus enabling a more natural conversation between the bot and the end user and improving the conversation experience. Instead of the end user learning a fixed set of keywords or commands that the bot knows how to respond to, an intelligent bot can sometimes understand the end user's intent based on the user's utterances in natural language and respond accordingly. Summary of the Invention [Problem to be solved by the invention]

[0004] However, building chatbots is difficult because these automated solutions require specific knowledge in a domain and the application of certain techniques that may only be within the capabilities of specialized developers. As part of building such a chatbot, the developer may first understand the needs of the enterprise and the end user. The developer may then analyze and make decisions related to, for example, selecting the datasets to be used for the analysis, preparing the input datasets for the analysis (e.g., cleansing the data, extracting, formatting, and / or transforming the data prior to analysis, designing features of the data, etc.), identifying appropriate machine learning (ML) techniques or models to perform the analysis, and refining the techniques or models based on feedback to improve the results / outcomes. Identifying an appropriate model may involve developing multiple models, possibly simultaneously, iteratively testing, and trying these models before identifying a particular model (or models) to use. Furthermore, solutions based on supervised learning typically include a training phase, followed by an application (i.e., inference) phase, and an iterative loop between the training and application phases. The developer may be responsible for carefully implementing and monitoring these steps to achieve an optimal solution.

[0005] It would therefore be advantageous to identify techniques by which models for particular use cases may be more efficiently developed.

[0006] overview The technology disclosed herein generally relates to chatbots, and more particularly, but not exclusively, to training a chatbot by accessing a pre-trained model and fine-tuning parameters in an incomplete subset of layers in the model. [Means for solving the problem]

[0007] In various embodiments, a computer-implemented method is provided, the method including accessing a pre-trained version of a machine learning model configured to process speech or text language input, the machine learning model including a plurality of layers, each of the plurality of layers configured with a plurality of layer-specific pre-trained parameter values ​​corresponding to a plurality of parameters, each of the plurality of layers configured to perform multi-head attention, the method further including accessing a client dataset, identifying an incomplete subset of the plurality of layers, where the corresponding layer-specific pre-trained parameter values ​​are fine-tuned using the client dataset, and fine-tuning the machine learning model using the client dataset to generate an updated version of the machine learning model, where the layer-specific pre-trained parameter values ​​configured for one or more of the plurality of layers not included in the incomplete subset are fixed during fine-tuning, the method further including facilitating use of the updated version of the machine learning model.

[0008] In some embodiments, the pre-trained machine learning model includes a self-attention model, and the incomplete subset of the multiple layers includes at least one neural network in the self-attention model.

[0009] In some embodiments, the incomplete subset of the plurality of layers includes two layers or one layer, and the pre-trained machine learning model includes at least five layers.

[0010] In some embodiments, the plurality of parameters includes at least 500,000 parameters, and one or more central processing units are used to perform updating of the values ​​of the plurality of parameters.

[0011] In some embodiments, updating the parameter values ​​includes accessing a cached set of values ​​corresponding to one or more of the layers that are not included in the incomplete subset.

[0012] In some embodiments, the number of parameter values ​​configured for the incomplete subset of layers is 30% or less compared to the number of parameters configured for the machine learning model.

[0013] In some embodiments, facilitating use of the updated version includes translating linguistic input into a command or query.

[0014] In some embodiments, the plurality of layers includes at least four layers, and each of the incomplete subsets of the plurality of layers is disposed in layer 2 or higher of the plurality of layers.

[0015] In various embodiments, a system is provided that includes one or more data processors and a non-transitory 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 one or more of the methods disclosed herein.

[0016] In various embodiments, a computer program product is provided that includes instructions tangibly embodied in a non-transitory machine-readable storage medium and configured to cause one or more data processors to perform some or all of one or more of the methods disclosed herein.

[0017] The techniques described above and below can be implemented in multiple ways and multiple contexts. Several example implementations and contexts are provided with reference to the following figures, which are described in more detail below. However, the following implementations and contexts are only some of the many implementations and contexts. [Brief description of the drawings]

[0018] [Figure 1] FIG. 1 is a simplified block diagram of a distributed environment incorporating an example embodiment. [Diagram 2]FIG. 2 is a simplified block diagram of a computing system implementing a master bot according to one embodiment. [Diagram 3] FIG. 1 is a simplified block diagram of a computing system implementing a skillbot according to one embodiment. [Figure 4] FIG. 1 is a simplified block diagram of a chatbot training and deployment system according to various embodiments. [Diagram 5] FIG. 2 illustrates a process flow for augmenting a training dataset using keywords, according to various embodiments. [Figure 6] 1 is a simplified diagram of a distributed system for implementing various embodiments. [Figure 7] FIG. 1 is a simplified block diagram of one or more components of a system environment in which services provided by one or more components of an embodiment system may be offered as cloud services, according to various embodiments. [Figure 8] FIG. 1 illustrates an exemplary computer system that can be used to implement various embodiments. [Figure 9A] FIG. 1 illustrates an example model architecture that can be fine-tuned, according to various embodiments. [Figure 9B] FIG. 1 illustrates an example model architecture that can be fine-tuned, according to various embodiments. [Figure 9C] FIG. 1 illustrates an example model architecture that can be fine-tuned, according to various embodiments. [Figure 10] FIG. 1 shows a table presenting data corresponding to different approaches for fine-tuning the training of a model. [Figure 11] FIG. 1 illustrates layers in a model that can be pre-trained and fine-tuned in accordance with selected embodiments of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0019] Detailed Description In the following description, for purposes of explanation, specific details are set forth in order to provide a thorough understanding of certain embodiments. It will be apparent, however, that various embodiments can be practiced without those specific details. The figures and descriptions are not intended to be limiting. The word "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any embodiment or design described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments or designs.

[0020] Introduction 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 described herein as chatbots, bots, or skillbots) are individual bots that focus on a specific type of task, such as tracking inventory, submitting time cards, and creating expense reports. When an end user engages with a digital assistant, the digital assistant evaluates the end user input and routes the conversation to or from the appropriate chatbot. 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 carry chats exchanged between end users on various messaging platforms and the digital assistant and its various chatbots. Channels can also support user agent escalation, event-initiated conversations, and testing.

[0021] Intents allow the chatbot to understand what the user wants the chatbot to do. Intents consist of a sort of standard user requests and statements, also called utterances (e.g., get a bank balance, make a purchase, etc.). As used herein, an utterance or message may refer to a sequence of words (e.g., one or more sentences) exchanged during a conversation with a chatbot. An intent may be created by providing a name that indicates some user action (e.g., order a pizza) and collecting a set of real-world user statements or utterances that are commonly associated with triggering an action. Since the chatbot's cognition is derived from these intents, each intent may be created from a robust (one to two dozen utterances) and varying dataset so that the chatbot can interpret ambiguous user input. A rich set of utterances allows the chatbot to understand what the user wants when it receives messages like "Forget this order!" or "Cancel the delivery!", i.e., messages that mean the same thing but are expressed differently. Collectively, the intents and the utterances that belong to the intent constitute the training corpus of the chatbot. By training a model with a corpus, customers can essentially turn the model into a reference tool for resolving end-user input to a single intent. Customers can improve the cognitive acuity of their chatbot through multiple intent testing and intent training.

[0022] However, building a chatbot that can determine end-user intent based on user utterances is a challenging task due in part to the subtleties 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). Illustrative examples of this difficulty arise from properties of natural language, such as the use of euphemisms, synonyms, or ungrammatical ways of speaking to express intent. For example, an utterance may express an intent to order a pizza without clearly mentioning, ordering, or delivering a pizza. For example, in a regional dialect, "pizza" is called "pie." These tendencies in natural language, such as imprecision or variability, cause uncertainty and introduce reliability as a parameter for the prediction of intent, as opposed to an explicit indication of intent, for example, by including keywords. As such, chatbots may need to be trained, monitored, debugged, and retrained to improve the performance of the chatbot and the user experience with the chatbot. In conventional systems, training systems are provided to train and retrain machine learning models of digital assistants or chatbots in spoken language understanding (SLU) and natural language processing (NLP). Traditionally, models used for chatbot systems were trained in NLP using "crafted" utterances for any intent. For example, an utterance of "Would you like to change the price?" may be used to train a classifier model of the chatbot system to classify this type of utterance as the intent of "Would you like to offer a discount?". Training the model using crafted utterances helps to initially train the chatbot system to provide a service, which can then be retrained after it is deployed and starts receiving real utterances from users.

[0023] As part of the NLP processing of an utterance, the digital assistant is trained to understand the meaning of the utterance, including identifying one or more intents and one or more entities that correspond to the utterance. Entity extraction in a digital assistant involves two stages: named entity recognition and entity resolution by a named entity recognizer. The specific training problem addressed herein relates to named entity recognizers (NERs). An entity can be understood as a noun and is often referred to as a slot. An entity is typically something like a date, time, city, name, brand, etc. (Several common entities, called system entities, people, numbers, currencies, and date and time, used as examples herein, are domain-independent, but it should be understood that the present disclosure is not limited to these system entities and is applicable to any entity type, such as composite entities, entity roles, entity lists, etc.). For example, for a travel bot, capturing the starting city, destination, travel mode, price, date, and time is at the base of the interface. However, capturing entities is a challenging task for digital assistants because users input data in different languages ​​according to different contexts, randomly, and in no particular order. Table 1 below shows two examples of input (utterances) and output (entities) for an entity extraction problem.

[0024] [Table 1]

[0025] Yet capturing these entities is important for digital assistants to take action based on user intent.

[0026] Conventional training of models for named entity recognition starts from pre-labeled data. However, the number of unique tokens (e.g., words, symbols, date expressions, time expressions, etc.) that a chatbot system may receive is much larger, and the number of different ordered combinations of tokens is several orders of magnitude larger. Given a large complex input space, a named entity recognizer includes a very large number of parameters (e.g., hundreds of millions of parameters) to be able to accurately identify and classify the entities of interest. Training a named entity recognizer to reliably detect different tokens and token combinations and accurately map tokens and token combinations to corresponding entities requires the use of very large training sets and substantial training time.

[0027] One approach to reduce training time and the size of the training data set is to use transfer learning. That is, a model can be initialized using parameter values ​​learned in relation to a first context, and then the values ​​can be fine-tuned using training data associated with a second context. Transfer learning can bring about tremendous efficiency benefits, but the time and resources required for fine-tuning still depend on the number of parameters whose values ​​are fine-tuned. Thus, in the context of a chat box system, even if a machine learning model is trained using transfer learning, training may still require a large size of training data and the involvement of huge amounts of time and computational resources to train to achieve a performance index threshold.

[0028] Thus, a different approach to address these issues is needed. Some embodiments described herein relate to defining a model for a particular chatbot system use case by fine-tuning a portion of a pre-trained model using client-specific data. Client-specific data may include data provided by an individual client, data associated with a particular platform, data associated with a particular use, data associated with a particular context, and / or data associated with a particular time period.

[0029] In some embodiments, the machine learning model is NER and is trained using a training dataset. The machine learning model may include at least two, at least three, at least five, at least seven, at least ten, or at least fifteen layers. The machine learning model may include at least two layers using multi-head attention techniques (e.g., including a multi-head attention network), at least three layers using multi-head attention techniques, at least five layers using multi-head attention techniques, at least seven layers using multi-head attention techniques, at least ten layers using multi-head attention techniques, or at least fifteen layers using multi-head attention techniques. The multi-head attention techniques may include self-attention techniques. Using multi-head attention techniques may include (for example) using a self-attention model, using a multi-head model, or using a transformer model. The machine learning model may include a Bidirectional Encoder Representations from Transformers (BERT) model. The trained machine learning model may include a multilingual BERT model. The trained machine learning model can include one or more transformer layers (e.g., at least two transformer layers, at least four transformer layers, at least six transformer layers, or at least eight transformer layers) and an embedding layer.

[0030] Training the machine learning model can include learning values ​​for each parameter of a set of parameters of the machine learning model. The set of parameters can include (for example) at least 100,000 parameters, at least 200,000 parameters, at least 500,000 parameters, at least 1,000,000 parameters, at least 5,000,000 parameters, at least 10,000,000 parameters, at least 50,000,000 parameters, at least 100,000,000 parameters, at least 200,000,000 parameters, or at least 500,000,000 parameters.

[0031] The training data may be associated with (e.g., provided by, accessed in connection with, selected in connection with, or automatically identified in connection with) a particular use case, a particular combination of use cases, a particular application, a particular combination of applications, a particular client, and / or a particular combination of clients. The trained model may then be used to initialize a model that is fine-tuned against the training dataset using client datasets corresponding to different use cases, different combinations of use cases, different applications, different combinations of applications, different clients, and / or different combinations of clients.

[0032] To at least temporarily prevent parameter value changes after initialization, values ​​of parameters associated with at least one layer, at least two layers, at least three layers, at least five layers, at least eight layers may be fixed, at least temporarily. Each of one, more than one, or all of the layers for which the parameter values ​​are fixed may be at a lower level than each layer for which the parameter values ​​were not fixed. For example, determining which layers' parameter values ​​should be fixed may include selecting a threshold layer such that the values ​​of the parameters of layers below the threshold layer should be fixed, but the values ​​of the parameters of the threshold layer and all layers above the threshold layer are not fixed (and may be fine-tuned using a client data set).

[0033] In some alternative or additional embodiments, for one or more of the layers of the model (e.g., for each layer not selected for fixing parameter values), a first subset of the layer's parameters are identified for fixing parameter values ​​and a second subset of the layer's parameters are identified to avoid fixing parameter values ​​(such that the values ​​may be fine-tuned using a client dataset).

[0034] The first subset may include parameters of one or more networks and / or submodels in the layer, and the second subset may include parameters of one or more other networks and / or submodels in the layer. For example, the first subset may include parameters associated with a multi-head attention network or a self-attention network, and the second subset may include a feedforward network.

[0035] One advantage of this approach is that the machine learning model may be fine-tuned using less data than would be required to fine-tune all of the parameters in the machine learning model. Additionally, performing fine-tuning of the values ​​of an incomplete subset of the parameters may be performed more quickly compared to fine-tuning all of the values ​​of the parameters.

[0036] When the values ​​of the parameters of one or more layers below the threshold layer are fixed, during one fine-tuning iteration, intermediate values ​​corresponding to the output from the fixed layers can be calculated and cached and used across other iterations in fine-tuning. Thus, the model does not need to determine intermediate values ​​for each data set in the training data. This caching can reduce the speed of fine-tuning and reduce the computational resources used during fine-tuning.

[0037] Thus, fine-tuning a machine learning model in a manner in which the values ​​of only an incomplete subset of the model's parameters are adjusted has advantages over fine-tuning a model by adjusting the values ​​of more or all parameters. For example, fine-tuning can be performed more quickly, using smaller data sets, and / or using fewer computational resources when only an incomplete subset of the model's parameters are adjusted. By allowing caching of intermediate values, these advantages are realized to an even greater extent. Nevertheless, the inventors have discovered that the accuracy of predictions generated by a machine learning model in which the values ​​of only an incomplete subset of parameters are updated during fine-tuning is comparable to the accuracy of an equivalent model in which the values ​​of all parameters are updated during fine-tuning.

[0038] Bots and Analytics Systems A bot (also called a skill, chatbot, chatterbot, or talkbot) is a computer program that can conduct a conversation with an end user. A bot can respond to natural language messages (e.g., questions or comments), typically through a messaging application that uses natural language messages. A business can use one or more bot systems to communicate with end users through messaging applications. The messaging application, sometimes called a channel, can be an end user's preferred messaging application that the end user already has installed and is familiar with. Thus, an end user does not need to download and install a new application to chat with a bot system. Messaging applications may include, for example, over-the-top (OTT) messaging channels (such as Facebook Messenger, Facebook WhatsApp, WeChat, Line, Kik, Telegram, Talk, Skype, Slack, or SMS), virtual private assistants (such as Amazon Dot, Echo, or Show, Google® Home, Apple HomePod), mobile and web app extensions that extend native or hybrid / responsive mobile apps or web applications with chat capabilities, or voice-based input (such as devices or apps with an interface that uses Siri, Cortana, Google Voice, or other voice input for interaction).

[0039] In some examples, the bot system may be associated with a Uniform Resource Identifier (URI). The URI may identify the bot system using a character string. The URI may be used as a webhook for one or more messaging application systems. The URI may include, for example, a Uniform Resource Locator (URL) or a Uniform Resource Name (URN). The bot system may be designed to receive a message (e.g., a hypertext transfer protocol (HTTP) post-invoke message) from the messaging application system. The HTTP post-invoke message may be directed to the URI from the messaging application system. In some embodiments, the message may be different than an HTTP post-invoke message. For example, the bot system may receive a message from a Short Message Service (SMS). Although the description herein refers to the communication received by the bot system as a message, it should be understood that the message may be an HTTP post-invoke message, an SMS message, or any other type of communication between the two systems.

[0040] An end user may interact with a bot system through conversational interactions (sometimes called a conversational user interface (UI)) similar to human interactions. In some cases, an interaction may include an end user saying "hello" to a bot, with the bot responding "hey" and asking the end user how they can help. In some cases, an interaction may be a transactional interaction, e.g., with a banking bot, such as transferring money from one account to another, an informational interaction, e.g., with an HR bot, such as checking remaining vacation days, or an interaction, e.g., with a retail bot, such as discussing returning a purchased item or requesting technical assistance.

[0041] In some embodiments, the bot system may intelligently process end user interactions without interaction with an administrator or developer of the bot system. For example, an end user may send one or more messages to the bot system to achieve a desired goal. The messages may include some content, such as text, emojis, voice, images, videos, or other ways of conveying a message. In some embodiments, the bot system may convert the content into a standardized form (e.g., a representational state transfer (REST) ​​call to a service of the enterprise 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's utterances. Various techniques are described herein for identifying explicit invocations of the bot system and determining the input of the bot system being invoked. In some embodiments, an analysis of the explicit invocation is performed by the master bot based on detecting an invocation name in the utterance. In response to detecting the invocation name, the utterance may be refined for input to a skill bot associated with the invocation name.

[0042] A conversation with a bot may follow a specific conversation flow that includes multiple states. This flow may define what happens next based on the input. In some embodiments, a state machine that includes user-defined states (e.g., end user intent) and actions to take in or between states may be used to implement the bot system. A conversation may proceed in different ways based on end user input that may affect the decisions the bot makes regarding the flow. For example, at each state, based on the end user input or utterance, the bot may determine the end user intent to determine the appropriate action to take next. As used herein, in the context of an utterance, the term "intent" refers to the intent of the user who provided the utterance. For example, a user may attempt to converse with a bot to order a pizza, such that the user's intent may be expressed by the utterance "order a pizza". The user's intent may be directed to a specific task that the user wants the chatbot to perform on his or her behalf. Thus, an utterance may be phrased as a question, command, request, etc. that reflects the user's intent. The intent may include a goal that the end user wants to achieve.

[0043] In the context of configuring a chatbot, the term "intent" is used herein to refer to configuration information for mapping a user's utterance to a specific task / action or a category of tasks / actions that the chatbot can perform. To distinguish between an utterance intent (i.e., a user's intent) and a chatbot's intent, the latter may be referred to herein as a "bot's intent." A bot's intent may include a set of one or more utterances associated with the intent. For example, an intent to order a pizza may include various permutations of utterances expressing a desire to order a pizza. These related utterances may be used to train a chatbot's intent classifier such that the intent classifier can later determine whether an input utterance from a user matches the intent to order a pizza. A bot's intent may be associated with one or more dialogue flows at a state to start a conversation with a user. For example, a first message for an intent to order a pizza may be the question, "What kind of pizza do you like?" In addition to the related utterances, a bot's intent may further include a named entity associated with the intent. For example, an intent to order a pizza may include variables or parameters that are used to perform the task of ordering a pizza, such as topping 1, topping 2, type of pizza, size of pizza, number of pizzas, etc. The values ​​of the entities are typically obtained through a conversation with the user.

[0044] FIG. 1 is a simplified block diagram of an environment 100 incorporating a chatbot system according to an embodiment. The environment 100 includes a digital assistant builder platform (DABP) 102 that allows a user of the DABP 102 to create and deploy a digital assistant or chatbot system. The DABP 102 can be used to create one or more digital assistants (or DAs) or chatbot systems. For example, as shown in FIG. 1, a user 104 representing a particular business can use the DABP 102 to create and deploy a digital assistant 106 for users of the particular business. For example, the DABP 102 can be used by a bank to create one or more digital assistants for use by customers of the bank. The same DABP 102 platform can be used by multiple businesses to create digital assistants. As another example, an owner of a restaurant (e.g., a pizza place) can use the DABP 102 to create and deploy a digital assistant that allows customers of the restaurant to order food (e.g., order pizza).

[0045] For purposes of this disclosure, a "digital assistant" is an entity that assists a user of the digital assistant in accomplishing various tasks through natural language conversation. A digital assistant may be implemented using only software (e.g., a digital assistant is a digital entity implemented using programs, codes, or instructions executable by one or more processors), using hardware, or using a combination of hardware and software. A digital assistant may be embodied or implemented in a variety of physical systems or devices, such as a computer, a mobile phone, a watch, an appliance, a vehicle, etc. A digital assistant may also be referred to as a chatbot system. Thus, for purposes of this disclosure, the terms digital assistant and chatbot system are interchangeable.

[0046] A digital assistant, such as a digital assistant 106 built using DABP 102, can be used to perform various tasks via a natural language-based conversation between the digital assistant and its user 108. As part of the conversation, the user can provide one or more user inputs 110 to the digital assistant 106 and receive responses 112 back from the digital assistant 106. A conversation can include one or more of the inputs 110 and responses 112. Through these conversations, the user can request one or more tasks to be performed by the digital assistant, and in response, the digital assistant is configured to perform the task requested by the user and respond to the user with an appropriate response.

[0047] The user input 110 is typically in the form of natural language and is considered an utterance. The user's utterance 110 can be in the form of text, such as when the user inputs a sentence, a question, a fragment of text, or a single word and provides it as an input to the digital assistant 106. In some embodiments, the user's utterance 110 can be in the form of voice input or utterance, such as when the user says or speaks something that is provided as an input to the digital assistant 106. The utterance is typically in the language spoken by the user 108. For example, the utterance may be in English or some other language. If the utterance is in the form of utterance, the voice input is converted into a textual utterance in that particular language, and the textual utterance is then processed by the digital assistant 106. Various speech-to-text processing techniques may be used to convert the voice input or voice input into a textual utterance, and the textual utterance 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.

[0048] The utterance, which may be a text utterance or a voice utterance, may be a fragment, a sentence, multiple sentences, one or more words, one or more questions, a combination of the aforementioned types, etc. The digital assistant 106 is configured to apply natural language understanding (NLU) techniques to the utterance to understand the meaning of the user input. As part of the NLU processing of the utterance, the digital assistant 106 is configured to perform processing to understand the meaning of the utterance, including identifying one or more intents and one or more entities corresponding to the utterance. Once the digital assistant 106 understands the meaning of the utterance, it may perform one or more actions or behaviors in response to the understood meaning or intent. For purposes of this disclosure, it is assumed that the utterance is a voice of text provided directly by a user 108 of the digital assistant 106 or is the result of a voice conversion of an input voice utterance into a form of text. However, this is not intended to be limiting or restrictive in any way.

[0049] For example, user 108 input may request that a pizza be ordered by providing an utterance such as "I would like to order a pizza." When the digital assistant 106 receives such an utterance, it is configured to understand the meaning of the utterance and take appropriate action. The appropriate action may include, for example, responding to the user with a question requesting user input regarding the type of pizza the user would like to order, the size of the pizza, any toppings on the pizza, etc. The responses provided by the digital assistant 106 may be in the form of natural language, and typically in the same language as the input utterance. As part of generating these responses, the digital assistant 106 may perform natural language generation (NLG). If the user orders a pizza via a conversation between the user and the digital assistant 106, the digital assistant may guide the user to provide all necessary information regarding the pizza order, and then, upon termination of the conversation, cause the pizza to be ordered. The digital assistant 106 may end the conversation by outputting information to the user indicating that the pizza has been ordered.

[0050] At a conceptual level, the digital assistant 106 performs various processing in response to utterances received from a user. In some embodiments, this processing includes a series or pipeline of processing steps, including, for example, understanding the meaning of the input utterance (sometimes referred to as natural language understanding (NLU)), determining an action to be performed in response to the utterance, causing the action to be performed, if appropriate, generating a response to be output to the user in response to the user's utterance, outputting the response to the user, etc. NLU processing can include parsing the received input utterance to understand the structure and meaning of the utterance, and improving and modifying the utterance to develop a better understandable form (e.g., logical form) or structure of the utterance. Generating the response can include using NLG techniques.

[0051] NLU processing performed by a digital assistant such as digital assistant 106 can include various NLP-related processing such as parsing (e.g., tokenization, lemmatization, identifying part-of-speech tags for sentences, identifying named entities within sentences, generating dependency trees to represent sentence structure, splitting sentences into clauses, analyzing individual clauses, resolving anaphora, performing chunking, etc.). In an embodiment, the NLU processing, or portions thereof, is performed by the digital assistant 106 itself. In some other embodiments, the digital assistant 106 may use other resources to perform portions of the NLU processing. For example, the syntax and structure of sentences of an input utterance may be identified by processing the sentences using a parser, a part-of-speech tagger, and / or a named entity recognizer. In one implementation, for English, a parser, a part-of-speech tagger, and a named entity recognizer such as those provided by the Stanford University Natural Language Processing (NLP) Group are used to analyze sentence structure and syntax. These are provided as part of the Stanford CoreNLP toolkit.

[0052] Although the various examples provided in this disclosure show speech in English, this is intended to be merely an example. In an embodiment, the digital assistant 106 can also process speech in languages ​​other than English. The digital assistant 106 can provide subsystems (e.g., components implementing NLU functions) configured to perform processing for different languages. These subsystems can be implemented as connectable units that can be invoked using service calls from the NLU core server. This makes NLU processing flexible and extensible for each language, including allowing different orders of processing. Language packs for individual languages ​​can be provided, and the language packs can register a list of subsystems that can be provided from the NLU core server.

[0053] A digital assistant, such as the digital assistant 106 shown in FIG. 1, may be made available for use or access by its user 108 through a wide variety of channels, such as, but not limited to, through an application, through social media platforms, through various messaging services and applications, and through other applications or channels. A single digital assistant can have multiple channels configured for it such that it can be simultaneously running and accessed by different services.

[0054] A digital assistant or chatbot system typically includes or is associated with one or more skills. In an embodiment, these skills are individual chatbots (called skillbots) configured to interact with a user and perform specific types of tasks, such as tracking inventory, submitting a timecard, creating an expense report, ordering food, checking a bank account, making a reservation, purchasing a widget, etc. For example, for the embodiment shown in FIG. 1, the digital assistant or chatbot system 106 includes skills 116-1, 116-2, etc. For purposes of this disclosure, the terms "skill" and "skills" are used interchangeably with the terms "skillbot" and "skillbot," respectively.

[0055] Each skill associated with the digital assistant assists a user of the digital assistant in completing a task through a conversation with the user that can include a combination of text or voice input provided by the user and responses provided by the skill bot. These responses can be in the form of text or voice messages to the user and / or using simple user interface elements (e.g., list selections) that are presented to the user for the user to make a selection.

[0056] There are various ways in which skills or skillbots can be associated with or added to a digital assistant. In some examples, skillbots can be developed by a company and then added to a digital assistant using DABP 102. In other examples, skillbots can be developed and created using DABP 102 and then added to a digital assistant created using DABP 102. In yet other examples, DABP 102 provides an online digital store (referred to as a "skill store") that offers multiple skills covering a wide range of tasks. Skills offered by the skill store may also expose various cloud services. To add a skill to a digital assistant being created using DABP 102, a user of DABP 102 can access the skill store via DABP 102, select the desired skill, and indicate that the selected skill is to be added to a digital assistant created using DABP 102. Skills from the skill store can be added to the digital assistant as is or in modified form (e.g., a user of DABP102 can select and clone a particular skillbot provided by the skill store, make customizations or modifications to the selected skillbot, and then add the modified skillbot to a digital assistant created using DABP102).

[0057] A variety of different architectures may be used to implement a digital assistant or chatbot system. For example, in one embodiment, a digital assistant created and deployed using DABP 102 may be implemented using a masterbot / child (or sub)bot framework or architecture. According to this framework, the digital assistant is implemented as a masterbot that interacts with one or more child bots, which are skillbots. For example, in the embodiment shown in FIG. 1, the digital assistant 106 comprises a masterbot 114 and skillbots 116-1, 116-2, etc., that are child bots of the masterbot 114. In one embodiment, the digital assistant 106 is considered to function as a masterbot itself.

[0058] A digital assistant implemented according to the master / child bot architecture allows a user of the digital assistant to interact with multiple skills through a unified user interface, i.e., through the master bot. When a user interacts with the digital assistant, user input is received by the master bot. The master bot then performs processing to determine the meaning of the utterance of the user input. The master bot then determines whether the task requested by the user in the utterance can be handled by the master bot itself, and if not, the master bot selects a suitable skill bot to handle the user request and routes the conversation to the selected skill bot. This allows a user to converse with the digital assistant through a single common interface and further provides the ability for a skill to use multiple 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 may interface with skill bots with specific capabilities, such as a CRM bot for performing functions related to customer relationship management (CRM), an ERP bot for performing functions related to enterprise resource planning (ERP), and an HCM bot for performing functions related to human capital management (HCM). In this way, the end user or consumer of the digital assistant only needs to know how to access the digital assistant through a common master bot interface, and behind the scenes, multiple skill bots are provided to handle user requests.

[0059] In an embodiment, in a masterbot / childbot infrastructure, the masterbot is configured to recognize an available list of skillbots. The masterbot may have access to metadata that identifies various available skillbots and, for each skillbot, identifies the skillbot's capabilities, including the tasks that may be performed by the skillbot. When receiving a user request in the form of an utterance, the masterbot is configured to identify or predict, from multiple available skillbots, a specific skillbot that can best serve and optimally process the user request. The masterbot then routes the utterance (or a portion of the utterance) to that specific skillbot for further processing. In this manner, control flows from the masterbot to the skillbot. The masterbot may support multiple input and output channels. In an embodiment, the routing may be performed with the aid of processing performed by one or more available skillbots. For example, as described below, a skillbot may be trained to reason about an utterance and determine whether the inferred intent matches the intent used to configure the skillbot. Thus, the routing performed by the master bot may include communicating to the master bot an indication of whether the skill bot is configured with an intent that is suitable for the skill bot to process the utterance.

[0060] 1 illustrates a digital assistant 106 with a masterbot 114 and skillbots 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 solely in software (e.g., code, instructions stored on a computer-readable medium and executable by one or more processors), solely in hardware, or in an implementation using a combination of software and hardware.

[0061] DABP 102 provides infrastructure and various services and features that enable a user of DABP 102 to create a digital assistant that includes one or more skill bots associated with the digital assistant. In some examples, a skill bot may be created by duplicating an existing skill bot, for example, duplicating a skill bot provided by a skill store. As previously indicated, DABP 102 provides a skill store or skill catalog that provides multiple skill bots for performing various tasks. A user of DABP 102 can duplicate a skill bot from the skill store. Modifications or customizations may be made to the duplicated skill bot as needed. In some other examples, a user of DABP 102 creates a skill bot from scratch using tools and services provided by DABP 102. As previously indicated, a skill store or skill catalog provided by DABP 102 may provide multiple skill bots for performing various tasks.

[0062] In one embodiment, at a high level, creating or customizing a skillbot includes the following steps: (1) Configure the settings for your new skill bot (2) Configure one or more intents for the skill bot (3) constitute one or more entities with respect to one or more intentions (4) Training the Skillbot (5) Create a dialogue flow for the skill bot (6) Optionally, add custom components to your skill bot (7) Test and deploy the skill bot Each of the above steps is briefly described below.

[0063] (1) Configure Settings for a New Skillbot - Various settings may be configured for a skillbot. For example, a skillbot designer may specify one or more invocation names for the skillbot being created. These invocation names may then be used by a user of the digital assistant to explicitly invoke the skillbot. For example, a user may enter an invocation name in the user's utterance to explicitly invoke the corresponding skillbot.

[0064] (2) Configure one or more intents and associated example utterances for the skillbot - A 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 that the skillbot is trained to infer about input utterances. Upon receiving an utterance, the trained skillbot infers the intent of the utterance, and the inferred intent is selected from a predefined set of intents used to train the skillbot. The skillbot then takes an appropriate action in response to the utterance based on the intent inferred about the utterance. In some examples, the intents of the skillbot represent tasks that the skillbot can perform for a user of the digital assistant. Each intent is given an intent identifier or intent name. For example, for a skillbot trained on banking, the intents specified for this skillbot may include "check balance", "transfer money", "check deposit", etc.

[0065] For each intent defined for a skillbot, the skillbot designer may also provide one or more example utterances that express and illustrate the intent. These example utterances are intended to represent utterances that a user might input to the skillbot for that intent. For example, for a check balance intent, example utterances may include "What's the balance in my savings account?", "How much is in my checking account?", "How much money do I have in my account?", etc. Thus, various permutations of standard user utterances may be specified as example utterances for the intent.

[0066] The intents and their associated example utterances are used as training data to train the skill bot. A variety of different training techniques may be used. As a result of this training, a predictive model is generated that is configured to receive an utterance as input and output an intent inferred for the utterance by the predictive model. In some examples, the input utterance is provided to an intent analysis engine that is configured to predict or infer an intent of the input utterance using the trained model. The skill bot may then take one or more actions based on the inferred intent.

[0067] (3) Configuring an entity for one or more intents of the skillbot - In some examples, additional context may be required to enable the skillbot to respond appropriately to a user utterance. For example, there may be situations where a user input utterance resolves to the same intent in the skillbot. For example, in the above example, the utterances "What is the balance in my savings account?" and "How much is in my checking account?" both resolve to the same balance check intent, but these utterances are different requests asking to do different things. To disambiguate such requests, one or more entities are added to the intent. Using the banking skillbot example, an entity called account type that defines values ​​called "checking" and "savings" may enable the skillbot to parse the user request and respond appropriately. In the above example, the utterance resolves to the same intent, but the values ​​associated with the account type entity are different in the two utterances. This allows the skillbot to perform potentially different actions for the two utterances, even though the two utterances resolve to the same intent. One or more entities may be specified for an intent configured for the skillbot. Thus, entities are used to add context to the intent itself: they help to more fully express the intent, enabling the skill bot to complete the user request.

[0068] In an embodiment, there are two types of entities: (a) built-in entities provided by DABP 102, and (2) custom entities that may be specified by a skillbot designer. Built-in entities are general entities that may be used in 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, recurring period, currency, phone number, URL, etc. Custom entities are used for more customized applications. For example, for a banking skill, an account type entity may be defined by the skillbot designer that allows various banking transactions by checking user input for keywords such as checking, savings, and credit card.

[0069] (4) Train 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 an intent associated with the received user input. As indicated above, the skillbot needs to be trained for this. In an embodiment, the skillbot is trained based on the intents configured for the skillbot and example utterances associated with the intents (collectively, training data) so that the skillbot can resolve the user input utterance to one of the configured intents. In an embodiment, the skillbot uses a predictive model, which is trained using the training data to enable the skillbot to identify what the user is saying (or, in some cases, what they are trying to say). DABP 102 provides a variety of different training techniques that may be used by the skillbot designer to train the skillbot, including various machine learning based training techniques, rule-based training techniques, and / or combinations thereof. In an 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 be used to process and respond to user utterances. In some cases, the user utterance can be a question that requires only a single answer and no further dialogue. To handle such situations, a Q&A (Question and Answer) intent can be defined for the skillbot, which allows the skillbot to output an answer to a user request without the need to update the dialogue definition. A Q&A intent is created in a similar manner as a standard intent. The dialogue flow of a Q&A intent can differ from that of a standard intent.

[0070] (5) Create a dialogue flow for the skillbot - The dialogue flow specified for the skillbot represents how the skillbot reacts when the different intents of the skillbot are resolved in response to the received user input. The dialogue flow defines the actions or behaviors that the skillbot takes, for example, 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 language. In one embodiment, a version of YAML called OBotML may be used to specify the dialogue flow of the skillbot. The dialogue flow definition for the skillbot serves as a model of the conversation itself, i.e., a model that allows the skillbot designer to direct the interaction between the skillbot and the user that the skillbot serves.

[0071] In one embodiment, a skill bot's dialogue flow definition includes three sections: (a) Context Section (b) Default transition section (c) Status Section Context Section - In the context section, the skillbot designer can define variables that will be used in the conversation flow. Other variables that may be specified in the context section include, but are not limited to, variables for error handling, variables for built-in or custom entities, user variables that allow the skillbot to recognize and retain user preferences, etc.

[0072] Default Transitions Section - In the dialogue flow states section or in the default transitions section, transitions for the skill bot can be defined. Transitions defined in the default transitions section act as fallbacks and are triggered if there are no applicable transitions defined within a state or the conditions required to trigger a state transition cannot be met. The default transitions section can be used to define routing that allows the skill bot to gracefully handle unexpected user behavior.

[0073] State Section - The dialogue flow and its associated behaviors are defined as a set of temporary states that govern the logic within the dialogue flow. Each state node in the dialogue flow definition specifies a component that provides the functionality required at that point in the dialogue. Thus, states are built around components. A state contains characteristics specific to a component and defines the transitions to other states that are triggered after the execution of the component.

[0074] The state section can be used to handle special case scenarios. For example, there may be times when you want to provide a user with the option to temporarily leave a first skill they are interacting with in order to do something in a second skill within the digital assistant. For example, if a user is engaged in a conversation using a shopping skill (e.g., the user has selected something for purchase), the user may want to jump to a banking skill (e.g., the user may want to ensure they have enough money for the purchase) and then return to the shopping skill to complete the user's order. To address this, an action in the first skill can be configured to initiate an interaction with a second, different skill within the same digital assistant and then return to the original flow.

[0075] (6) Adding Custom Components to a Skillbot - As previously described, a state specified in a skillbot's dialogue flow specifies a component that provides the required functionality corresponding to the state. The component enables the skillbot to perform the functionality. In an embodiment, DABP 102 provides a set of pre-configured components to perform a wide range of functions. A skillbot designer can select one or more of these pre-configured components and associate them with a state in the skillbot's dialogue flow. A skillbot designer can also create custom or new components using tools provided by DABP 102 and associate the custom components with one or more states in the skillbot's dialogue flow.

[0076] (7) Test and Deploy Skillbots - DABP 102 provides several features that enable skillbot designers to test the skillbots being developed, which can then be deployed and included in the digital assistant.

[0077] Although the above description describes how to create a skillbot, similar techniques may be used to create a digital assistant (or masterbot). At the masterbot or digital assistant level, built-in system intents may be configured 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 invoking a skillbot associated with the digital assistant. Examples of system intents defined for a masterbot include: (1) exit: applies when a user indicates a desire to end a current conversation or context in the digital assistant, (2) assist: applies when a user requests assistance or guidance, and (3) unresolved intent: applies to user input that does not sufficiently match the exit and assist intents. The digital assistant also stores information about one or more skillbots associated with the digital assistant. This information enables the masterbot to select a specific skillbot to process an utterance.

[0078] At the MasterBot or Digital Assistant level, when a user inputs a phrase or utterance into the digital assistant, the digital assistant is configured to execute a process to determine how to route the utterance and associated conversation. The digital assistant determines this using a routing model, which can be rule-based, AI-based, or a combination of these. The digital assistant uses the routing model to determine whether the conversation corresponding to the user input utterance is routed to a specific skill for processing, is processed by the digital assistant or MasterBot itself according to built-in system intent, or is processed as a different state within the current conversation flow.

[0079] In an embodiment, as part of this processing, the digital assistant determines whether the user input utterance explicitly identifies a skill bot using its invocation name. If the invocation name is present in the user input, the invocation name is treated as an explicit invocation of the skill bot corresponding to the invocation name. In such a scenario, the digital assistant may route the user input to the explicitly invoked skill bot for further processing. If neither a specific invocation nor an explicit invocation is present, in an embodiment, the digital assistant evaluates the received user input utterance and calculates a reliability score for the system intent and the skill bot associated with the digital assistant. The calculated score for the skill bot or system intent represents the degree of likelihood that the user input represents the work that the skill bot is configured to perform or represents the system intent. All system intents or skill bots with an associated calculated reliability score that exceeds a threshold (e.g., a reliability threshold routing parameter) are selected as candidates for further evaluation. The digital assistant then selects a specific system intent or skill bot from the identified candidates for further processing of the user input utterance. In an embodiment, after one or more skill bots are identified as candidates, the intents associated with those candidate skills (according to the intent model for each skill) are evaluated, and a reliability score is determined for each intent. In general, all intents with a reliability score above a threshold (e.g., 70%) are treated as candidate intents. If a particular skill bot is selected, the user's 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.

[0080] FIG. 2 is a simplified block diagram of a master bot (MB) system 200, according to an embodiment. The MB system 200 may be implemented in software only, hardware only, or a combination of hardware and software. The MB system 200 includes a pre-processing subsystem 210, a multiple intent subsystem (MIS) 220, an explicit invocation subsystem (EIS) 230, a skill bot invoker 240, and a data store 250. The MB system 200 shown in FIG. 2 is only an example of an arrangement of components in a master bot. Those skilled in the art will recognize many possible variations, alternatives, and modifications. For example, in some implementations, the MB system 200 may include more or fewer systems or components than those shown in FIG. 2, may combine two or more subsystems, or may include a different configuration or arrangement of subsystems.

[0081] The pre-processing subsystem 210 receives an utterance "A" 202 from a user and processes the utterance via a language detector 212 and a language parser 214. As indicated above, the utterance may be provided in a variety of ways, including as audio or text. The utterance 202 can be a sentence fragment, a complete sentence, multiple sentences, etc. The utterance 202 may include punctuation marks. For example, if the utterance 202 is provided as audio, the pre-processing subsystem 210 may convert the speech to text using a speech-to-text converter (not shown) that inserts punctuation marks (e.g., commas, semicolons, periods, etc.) into the resulting text.

[0082] The language detector 212 detects the language of the utterance 202 based on the text of the utterance 202. The way in which the utterance 202 is processed is language dependent, as each language has its own grammar and semantics. Differences between languages ​​are taken into account when analyzing the syntax and structure of the utterance.

[0083] The linguistic parser 214 parses the utterance 202 to extract part of speech (POS) tags of individual linguistic units (e.g., words) in the utterance 202. POS tags include, for example, noun (NN), pronoun (PN), verb (VB), etc. The linguistic parser 214 may also tokenize the linguistic units of the utterance 202 (e.g., to convert each word into a separate token) and lemmatize the words. A lemma is the primary form of a set of words as represented in a dictionary (e.g., "run" is a lemma for run, runs, ran, running, etc.). Other types of preprocessing that the linguistic parser 214 can perform include chunking of compound expressions, for example, combining "credit" and "card" into a single expression "credit card." The linguistic parser 214 may identify relationships between words in the utterance 202. For example, in some embodiments, the linguistic parser 214 generates a dependency tree that indicates which parts of the utterance (e.g., particular nouns) are direct objects, which parts of the utterance are prepositions, etc. The results of the processing performed by the linguistic parser 214 form the extracted information 205, which is provided as input to the MIS 220 along with the utterance 202 itself.

[0084] As indicated above, the utterance 202 may include more than one sentence. For purposes of detecting multiple intents and explicit invocation, the utterance 202 may be treated as a single unit even if it includes multiple sentences. However, in an embodiment, preprocessing may be performed, for example by the preprocessing subsystem 210, to identify a single sentence of the multiple sentences for multiple intents analysis and explicit invocation analysis. In general, the results generated by the MIS 220 and the EIS 230 are substantially the same regardless of whether the utterance 202 is processed at the level of individual sentences or as a single unit including multiple sentences.

[0085] The MIS 220 determines whether the utterance 202 expresses multiple intents. Although the MIS 220 can detect the presence of multiple intents in the utterance 202, the process performed by the MIS 220 does not include determining whether the intent of the utterance 202 matches any intent configured for the bot. Instead, the process to determine whether the intent of the utterance 202 matches the intent of the bot may be performed by the intent classifier 242 of the MB system 200 or by the intent classifier of the skill bot (e.g., as shown in the embodiment of FIG. 3). The process performed by the MIS 220 assumes that there exists a bot (e.g., a particular skill bot or the master bot itself) that can process the utterance 202. Thus, the process performed by the MIS 220 does not require knowledge of which bots exist in the chatbot system (e.g., the identity of the skill bot registered with the master bot), nor knowledge of which intents are configured for a particular bot.

[0086] To determine that an utterance 202 includes multiple intents, the MIS 220 applies one or more rules from a set of rules 252 in the data store 250. The rules applied to the utterance 202 depend on the language of the utterance 202 and may include a sentence pattern that indicates the presence of multiple intents. For example, the sentence pattern may include a coordinating conjunction (e.g., a conjunction) that joins two parts of a sentence, both parts corresponding to separate intents. If the utterance 202 matches the sentence pattern, it may be inferred that the utterance 202 represents multiple intents. It should be noted that an utterance that includes multiple intents does not necessarily include different intents (e.g., intents targeting different bots or different intents within the same bot). Instead, the utterance may include separate instances of the same intent, such as, for example, "order pizza using payment account X, then order pizza using payment account Y."

[0087] As part of the determination that the utterance 202 represents multiple intents, the MIS 220 also determines which portions of the utterance 202 are associated with each intent. For each intent represented in the utterance that includes multiple intents, the MIS 220 constructs a new utterance for separate processing in place of the original utterance, e.g., utterance “B” 206 and utterance “C” 208 as shown in FIG. 2 . Thus, the original utterance 202 may be split into two or more separate utterances that are processed one by one. The MIS 220 determines which of the two or more utterances should be processed first using the extracted information 205 and / or from an analysis of the utterance 202 itself. For example, the MIS 220 may determine that the utterance 202 includes an indicator word that indicates that a particular intent should be processed first. The newly formed utterance corresponding to this particular intent (e.g., one of the utterances 206 or utterance 208) is first sent for further processing by the EIS 230. After the conversation triggered by the first utterance has ended (or been temporarily stopped), the next highest priority utterance (e.g., the other one of utterance 206 or utterance 208) may be sent to EIS 230 for processing.

[0088] The EIS 230 determines whether the utterance it receives (e.g., utterance 206 or utterance 208) includes an invocation name of a skillbot. In an embodiment, each skillbot in the chatbot system is assigned a unique invocation name that distinguishes the skillbot from other skillbots in the chatbot system. A list of invocation names may be maintained as part of the skillbot information 254 in the data store 250. An utterance is considered to be an explicit invocation if the utterance includes a word match with the invocation name. If the bot is not explicitly invoked, the utterance received by the EIS 230 is considered an implicit invocation utterance 234 and is input to the masterbot's intent classifier (e.g., intent classifier 242) to determine which bot should be used to process the utterance. In some examples, the intent classifier 242 determines that the masterbot should process the implicit invocation utterance. In other examples, the intent classifier 242 determines which skillbot the utterance should be routed to for processing.

[0089] The explicit call feature provided by the EIS 230 has several advantages. This feature can reduce the amount of processing that the masterbot needs to perform. For example, if an explicit call is present, the masterbot may not need to perform any intent classification analysis (e.g., using the intent classifier 242) or may need to perform a reduced intent classification analysis to select a skillbot. Thus, analysis of the explicit call may enable selection of a particular skillbot without using intent classification analysis.

[0090] Also, there may be situations where there is overlap in functionality between multiple skillbots. This may occur, for example, when the intents handled by two skillbots overlap or are very close to each other. In such situations, it may be difficult for the masterbot to identify which of the multiple skillbots to select based solely on the analysis of the intent classification. In such scenarios, the explicit invocation disambiguates the specific skillbot to be used.

[0091] In addition to determining that an utterance is an explicit invocation, EIS 230 is responsible for determining whether any portion of the utterance should be used as input to the skill bot being explicitly invoked. In particular, EIS 230 may determine whether any portion of the utterance is not associated with an invocation. EIS 230 may perform this determination by analysis of the utterance and / or analysis of extracted information 205. Instead of sending the entire utterance received by EIS 230, EIS 230 may send the portion of the utterance that is not associated with the invocation to the invoked skill bot. In some examples, the input to the invoked skill bot is formed by simply removing any portion of the utterance that is associated with the invocation. For example, "I want to order a pizza using Pizza Bot" may be shortened to "I want to order a pizza" because "using Pizza Bot" is related to the invocation of Pizza Bot but is unrelated to any processing performed by Pizza Bot. In some examples, EIS 230 may reformat the portion sent to the invoked bot, for example to form a complete sentence. Thus, EIS 230 not only determines that an explicit call exists, but also determines what to send to the skill bot if an explicit call exists. In some instances, there may be no text to input to the bot being called. For example, if the utterance was "pizza bot," EIS 230 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, EIS 230 may indicate to the skill bot invoker 240 that there is nothing to send.

[0092] The skillbot invoker 240 invokes a skillbot in a variety of ways. For example, the skillbot invoker 240 can invoke the bot in response to receiving an indication 235 that a particular skillbot has been selected as a result of an explicit invocation. The indication 235 can be sent by the EIS 230 along with the input of the explicitly invoked skillbot. In this scenario, the skillbot invoker 240 hands over 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 can be to perform a particular action or to start a new conversation in a particular state, where the initial state of the new conversation depends on the input sent from the EIS 230.

[0093] Another way that the skillbot invoker 240 can invoke a skillbot is by implicit invocation using the intent classifier 242. The intent classifier 242 can be trained using machine learning techniques and / or rule-based training techniques to determine the likelihood that an utterance represents a task that a particular skillbot is configured to perform. The intent classifier 242 is trained for different classes, one class per skillbot. For example, each time a new skillbot is registered with a masterbot, a list of example utterances associated with the new skillbot can be used to train the intent classifier 242 to determine the likelihood that a particular utterance represents a task that the new skillbot can perform. Parameters (e.g., a set of values ​​for parameters of a machine learning model) generated as a result of this training can be stored as part of the skillbot information 254.

[0094] In an embodiment, the intent classifier 242 is implemented using a machine learning model, as described in further detail herein. Training the machine learning model may include inputting at least a subset of utterances from example utterances associated with various skill bots, and generating, as an output of the machine learning model, an inference as to which bot is the correct bot for processing any particular training utterance. For each training utterance, an indication of the correct bot to use for the training utterance may be provided as ground truth information. The behavior of the machine learning model may then be adapted (e.g., by backpropagation) to minimize the difference between the generated inference and the ground truth information.

[0095] In an embodiment, the intent classifier 242 determines, for each skill bot registered with the master bot, a reliability score indicating the likelihood that the skill bot can process the utterance (e.g., the implicit invocation utterance 234 received from the EIS 230). The intent classifier 242 may also determine a reliability score for each configured system-level intent (e.g., assist, terminate). If a particular reliability score meets one or more conditions, the skill bot invoker 240 will invoke the bot associated with this particular reliability score. For example, a threshold reliability score value may need to be met. Thus, the output 245 of the intent classifier 242 is either an identity of the system intent or an identity of the particular skill bot. In some embodiments, in addition to meeting the threshold reliability score value, the reliability score must exceed the next highest reliability score by a certain win margin. Imposing such a condition allows routing to a particular skill bot when each reliability score of multiple skill bots exceeds the threshold reliability score value.

[0096] After identifying the bot based on the evaluation of the reliability score, the skillbot invoker 240 hands over the processing to the identified bot. In case of system intent, the identified bot is a master bot. Otherwise, the identified bot is a skill bot. Furthermore, the skillbot invoker 240 decides what to provide to the identified bot as input 247. As indicated above, in case of an explicit invocation, the input 247 can be based on a portion of the utterance that is not associated with the invocation, or the input 247 can be nothing (e.g., an empty string). In case of an implicit invocation, the input 247 can be the entire utterance.

[0097] The data store 250 comprises one or more computing devices that store data used by various subsystems of the masterbot system 200. As described above, the data store 250 includes rules 252 and skillbot information 254. The rules 252 include rules for determining, for example, by the MIS 220, when an utterance expresses multiple intents and how to split an utterance expressing multiple intents. The rules 252 further include rules for determining, by the EIS 230, which part of an utterance that explicitly invokes a skillbot is sent to the skillbot. The skillbot information 254 includes the invocation names of the skillbots in the chatbot system, for example, a list of the invocation names of all skillbots registered to a particular masterbot. The skillbot information 254 can also include information used by the intent classifier 242 to determine a confidence score for each skillbot in the chatbot system, for example, parameters of a machine learning model.

[0098] 3 is a simplified block diagram of a Skillbot system 300, according to an embodiment. The Skillbot system 300 is a computing system that may be implemented in software only, hardware only, or a combination of hardware and software. In an embodiment, such as the embodiment shown in FIG. 1, the Skillbot system 300 may be used to implement one or more Skillbots in a digital assistant.

[0099] 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 of FIG. 2 and provides similar functionality, including being operable to determine, using rules 352 in a data store 350, (1) whether an utterance represents multiple intents, and if so, (2) how to split the utterance into separate utterances for each of the multiple intents. In an embodiment, the rules applied by the MIS 310 to detect multiple intents and to split the utterance are the same as the rules applied by the MIS 220. The MIS 310 receives the utterance 302 and the extracted information 304. The extracted information 304 is similar to the extracted information 205 of FIG. 1 and may be generated using the language parser 214 or a language parser local to the Skillbot system 300.

[0100] The intent classifier 320 may be trained in a manner similar to the intent classifier 242, as described above in connection with the embodiment of FIG. 2 and in further detail herein. For example, in an 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 the example utterances associated with that particular skill bot as training utterances. The ground truth for each training utterance is the intent of the particular bot associated with the training utterance.

[0101] The utterance 302 may be received directly from a user or provided via a masterbot. For example, as a result of processing by the MIS 220 and EIS 230 in the embodiment shown in FIG. 2, if the utterance 302 is provided via a masterbot, the MIS 310 may be bypassed to avoid repeating processing already performed by the MIS 220. However, if the utterance 302 is received directly from a user, for example during a conversation occurring after routing to a skillbot, the MIS 310 may process the utterance 302 and determine whether the utterance 302 represents multiple intents. If the utterance 302 represents multiple intents, the MIS 310 applies one or more rules to split the utterance 302 into separate utterances for each intent, e.g., utterance "D" 306 and utterance "E" 308. If the utterance 302 does not represent multiple intents, the MIS 310 forwards the utterance 302 to the intent classifier 320 for intent classification and does not split the utterance 302.

[0102] The intent classifier 320 is configured to match the received utterance (e.g., utterance 306 or 308) with the intent associated with the skillbot system 300. As described above, a skillbot can be configured with one or more intents, with each intent including at least one example utterance associated with the intent that is used to train the classifier. In the embodiment of FIG. 2, the intent classifier 242 of the masterbot system 200 is trained to determine the reliability score of the individual skillbot and the reliability score of the system intent. Similarly, the intent classifier 320 can be trained to determine the reliability score for each intent associated with the skillbot system 300. The classification performed by the intent classifier 242 is at the level of the bot, whereas the classification performed by the intent classifier 320 is at the level of the intent and is therefore more fine-grained. The intent classifier 320 can have access to intent information 354. The intent information 354 includes, for each intent associated with the skillbot system 300, a list of utterances that represent and indicate the meaning of the intent and are typically associated with the tasks that can be performed by the intent. The intent information 354 may further include parameters generated as a result of training on this list of utterances.

[0103] The conversation manager 330 receives as an output of the intent classifier 320 an indication 322 of a particular intent identified by the intent classifier 320 as the best match to the utterance input to the intent classifier 320. In some instances, the intent classifier 320 is 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 targets the system intent or the intent of a different skill bot. If this occurs, the skill bot system 300 may refer the utterance to the master bot for processing, e.g., for routing to a different skill bot. However, if the intent classifier 320 is successful in identifying the intent within the skill bot, the conversation manager 330 initiates a conversation with the user.

[0104] A conversation initiated by the conversation manager 330 is a conversation specific to the intent identified by the intent classifier 320. For example, the conversation manager 330 may be implemented using a state machine configured to execute the dialogue flow of the identified intent. The state machine may include a default starting state (e.g., for when the intent is invoked without any additional input) and one or more additional states, each state associating with the state an action to be performed by the skill bot (e.g., performing a purchase transaction) and / or a dialogue to be presented to the user (e.g., questions, responses). Thus, the conversation manager 330 may determine an action / dialogue 335 upon receipt of an instruction 322 identifying the intent, and may determine the additional action or dialogue in response to subsequent utterances received during the conversation.

[0105] 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 rules 352 and intent information 354. In an embodiment, the data store 350 may be integrated into a masterbot or digital assistant data store, such as data store 250 of Figure 2.

[0106] Fine adjustment It has been discovered that fine-tuning a machine learning model (e.g., NER) on a new context by training an incomplete subset of layers implementing multi-head attention techniques can significantly improve the efficiency of training (e.g., in terms of training time, computational resource usage for training, time to collect a dataset for use in fine-tuning, and / or computational resource usage for use in fine-tuning) compared to the efficiency of an equivalent training in which all parameters were configurable during fine-tuning. Moreover, the accuracy of the fine-tuned model can nevertheless be reliably comparable to an equivalent model in which all parameters were trained on client data corresponding to the new context (e.g., can match the equivalent model, can be at least 90% of the equivalent model, can be at least 80% of the equivalent model, can be at least 70% of the equivalent model, can be at least 60% of the equivalent model, or can be at least 50% of the equivalent model). The fine-tuned machine learning model and / or the fine-tuned machine learning model can be implemented in a chat system as described with respect to Figures 1, 2, and 3.

[0107] 4 shows a block diagram illustrating an embodiment of a chatbot system 400 configured to train one or more models, for example implemented as a named entity recognizer, based on text data. As shown in FIG. 4, in this example, the entity recognition performed by the chatbot system 400 includes various stages: a pre-training stage 402 for building and training a predictive model (such that each parameter in the predictive model is learned), a fine-tuning stage 404 for fine-tuning the predictive model (such that at least some of each of the parameters of the predictive model are changed), and a chatbot implementation stage 406 for implementing one or more chatbots. Thus, in the pre-training stage 402, a pre-trained machine learning model 408 is generated, in the fine-tuning stage 404, the pre-trained machine learning model 408 is fine-tuned to generate a fine-tuned machine learning model 410, and in the chatbot implementation stage 406, the fine-tuned machine learning model 410 is used to support one or more chatbots that process received text data 412.

[0108] Each of the pre-trained machine learning model 408 and the fine-tuned machine learning model 410 can be (for example) a named entity recognizer model configured and used to recognize one or more entities in an utterance. During the chatbot implementation stage, the fine-tuned machine learning model 410 can be used in combination with one or more other models, such as another model for determining the likelihood that an utterance represents a task that a particular skillbot is configured to perform, another model for predicting intent from utterances of a first type of skillbot, and / or another model for predicting intent from utterances of a second type of skillbot.

[0109] Each of the pre-trained machine learning model 408 and the fine-tuned machine learning model 410 can be and / or include a transformer, model that uses multi-head attention techniques, a convolutional neural network (CNN) such as an Inception Neural Network, a residual neural network (Resnet), a recurrent neural network such as a long short-term memory (LSTM) model or a gated recurrent unit (GRU) model, and / or other variants of a deep neural network (DNN) (e.g., a multi-label n-binary DNN classifier or a multi-class DNN classifier for single intent classification).

[0110] Each of the pre-trained machine learning model 408 and the fine-tuned machine learning model 410 can be or include any other suitable machine learning 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 such as a boosting model, a shallow neural network, or a combination of one or more of such techniques, e.g., a CNN-HMM or a Multi-Scale Convolutional Neural Network (MCNN).

[0111] Each of the pre-trained machine learning model 408 and the fine-tuned machine learning model 410 may include multiple layers, including multiple layers using multi-head attention techniques, multiple layers including transformer models, and multiple layers using multi-head self-attention techniques, where each of the multiple heads performs the self-attention technique using a linear projection of a different query, key, and value.

[0112] Each of the pre-trained machine learning model 408 and the fine-tuned machine learning model 410 may include multiple layers that use self-attention techniques. The self-attention techniques may convert a particular input into each of a query representation (generated by using a linear projection of the query), a key representation (generated by using a linear projection of the key), and a value representation (generated by using a linear projection of the value). The query representation may be multiplied by the key representation (possibly with an activation function such as a softmax function) to generate an attention score that indicates how much attention should be paid to the value at a particular location when evaluating values ​​at another location. The attention score may then be multiplied by the value representation to generate an output.

[0113] In some examples, the architecture and / or hyperparameters of the pre-trained machine learning model 408 are the same as the architecture and / or hyperparameters of the fine-tuned machine learning model 410.

[0114] The chatbot system 400 may employ the same or different types of predictive models for recognizing one or more entities in an utterance, determining the likelihood that an utterance represents a task that a particular skillbot is configured to perform, predicting intent from an utterance of a first type of skillbot, and predicting intent from an utterance of a second type of skillbot. In other examples, still other types of predictive models may be implemented in accordance with the present disclosure.

[0115] In the pre-training stage 402, pre-training data assets 414 are loaded and split into training and validation sets so that the system can train and test the model being built. The splitting of the pre-training data assets 414 into training and validation sets may be performed randomly (e.g., 90 / 10% or 70 / 30%), or the splitting may be performed according to more complex validation techniques, such as K-fold cross-validation, leave-one cross-validation, leave-one cross-validation, nested cross-validation, etc., to minimize sampling bias and overfitting.

[0116] The pre-training data assets 414 may include at least a subset of utterances from example utterances associated with one or more skill bots. As indicated above, the utterances may be provided in a variety of ways, including audio or text. The utterances can be sentence fragments, complete sentences, multiple sentences, etc. In some examples, the example utterances are provided by a previous or existing client or customer. In other examples, the example utterances are automatically generated from a previous library of utterances (e.g., identifying utterances from a library specific to the skill that the chatbot is specified to learn). The pre-training data assets 414 may include input text or audio (or input features of text or audio frames).

[0117] In the pre-training stage, pre-training labels 416 may be obtained, each of which corresponds to a separate pre-training data asset. The pre-training labels may be stored in or as a matrix or table of values. For each training utterance, an indication of the correct entity to be inferred and its classification may be provided as ground truth information for the pre-training labels 416. The behavior of the pre-trained model may then be adapted (e.g., by backpropagation) to minimize the difference between the inferences generated for various entities and the ground truth information.

[0118] Pre-training may include selecting hyperparameters for the pre-trained machine learning model 408 and performing an iterative operation of inputting utterances from at least a portion of the pre-training data assets 414 into the pre-trained machine learning model 408 to find a set of model parameters (e.g., weights and / or biases) that maximize or minimize an objective function, e.g., minimize a loss function, of the pre-trained machine learning model 408. Hyperparameters are settings that can be tuned or optimized to control the behavior of the pre-trained machine learning model 408. Most models explicitly define hyperparameters that control various aspects of the model, such as memory or execution costs. However, additional hyperparameters may be defined to adapt the model to a particular scenario. For example, hyperparameters may include the number of hidden units or layers of the model, the learning rate of the model, the width of the convolution kernel, or the number of parameters of the model. Each iteration of training may include finding a set of model parameters for the model 408 (configured using a defined set of hyperparameters) such that the value of the objective function using the set of model parameters is less than the value of the objective function using a different set of model parameters in the previous iteration. An objective function may be constructed to measure the difference between the output inferred using the model 408 and a ground truth annotated with the labels 416 on a subset of the augmented pre-training data assets 414.

[0119] Pre-training may include processing each of one or more pre-training data assets using a current version of the model to generate a prediction, calculating a loss based on the prediction and the label corresponding to the data asset, and updating one or more parameters of the model based on the loss. To generate a prediction, multiple intermediate values ​​may be generated for each pre-training data asset. For example, the intermediate values ​​may include outputs from layers in the model. Each layer may generate multiple outputs (e.g., more than 100 outputs, more than 1,000 outputs, more than 10,000 outputs, or more than 100,000 outputs). In some examples, the model is configured to generate consistent outputs as long as the inputs are the same, the hyperparameters of the model are the same, and the parameters of the model are the same overall.

[0120] Fine-tuning a model may include fine-tuning a portion of all parameters of the model while keeping other parameters of the model fixed to values ​​identified during training. For example, fine-tuning may include adjusting parameters associated with one or more particular layers while keeping parameter values ​​of one or more lower layers fixed. In this case, unless the model uses different hyperparameters (e.g., random number seeds) between learning iterations, the output from one or more lower layers should be the same for a particular input data asset between learning iterations. Thus, after the model is pre-trained, one or more intermediate values ​​corresponding to the output by the layer below each layer to be fine-tuned may be stored in the cache data store 418 for each pre-training data asset (in association with the identifier of the data asset and / or the corresponding label). In some examples, the architecture of at least one layer to be fine-tuned is the same as the architecture of at least one layer to be fixed.

[0121] Caching intermediate values ​​has the advantage of facilitating fine-tuning of the model for each of multiple environments or multiple contexts. For example, a model may be pre-trained to learn elements of a particular language (e.g., English) and then fine-tuned multiple times to learn how to respond to text or audio received in association with a particular website or particular merchant.

[0122] In a fine-tuning stage 404, the cached intermediate values ​​and fine-tuning labels 420 are used to fine-tune the subset of parameters originally learned during the pre-training stage 402. For example, the pre-training data asset may include the text "I have not received my shipment." The output by the pre-trained model may correspond to a request for an update to the shipping status. The output from a lower layer in the model may represent the words "product" and "not received." The output by the fine-tuned model may correspond to a request for the shipping to be completed as soon as possible.

[0123] In some examples, fine-tuning may be performed without using the underlying data assets 414, assuming cached data can be used instead of the input dataset. Fine-tuning the model may include learning parameters of one or more layers using self-attention and / or multi-head attention techniques.

[0124] The fine-tuned model 420 may be defined to be constructed using at least some of the parameters learned during the pre-training phase 402 and at least some of the parameters learned during the fine-tuning phase 404.

[0125] The fine-tuned model 420 can be an entity recognition model or a part of an entity recognition model. The fine-tuned model 420 can be used in the implementation phase 406 to process new text data 424.

[0126] In the implementation stage 406, the fine-tuned model 420 may be deployed and used as part of or as a trained entity recognition model implementing one or more chatbots. For example, one or more chatbots may be configured using the fine-tuned model 420 to receive text data 424 from one or more users and recognize and extract entities from various utterances received by the one or more chatbots. The text data 424 may include text data received in an environment or context corresponding to the environment or context for which the fine-tuned machine learning model 422 was fine-tuned. The entities may be part of extracted information (e.g., extracted information 205, 304 described in Figures 2 and 3, respectively) obtained from the text data 460 and may be used in downstream processing such as intent classification. Output generated based on the extracted entities may then be transmitted to and / or presented on a device corresponding to the source of the utterances.

[0127] Techniques for generating and using models fine-tuned for specific environments FIG. 5 is a flow chart illustrating a process 500 for generating and using a fine-tuned model for a particular environment, according to an embodiment. The process illustrated in FIG. 5 may be implemented in software (e.g., code, instructions, programs) executed by one or more processing units (e.g., processors, cores) of the respective system, hardware, or a combination thereof. The software may be stored in a non-transitory storage medium (e.g., in a memory device). The method presented in FIG. 5 and described below is intended to be exemplary and non-limiting. Although FIG. 5 illustrates various processing steps occurring in a particular sequence or order, this is not intended to be limiting. In an alternative embodiment, these steps may be performed in some different order, or some steps may be performed in parallel. In an embodiment, such as in the embodiment illustrated in FIGS. 1-4, the process illustrated in FIG. 5 may be performed by a pre-processing subsystem (e.g., pre-processing subsystem 210 or predictive model training stage 410) to generate a keyword-augmented dataset for training by one or more predictive models (e.g., intent classifier 242 or 320 or predictive model 425).

[0128] At 505, a pre-trained version of the machine learning model is accessed. The machine learning model includes a plurality of layers configured to implement a self-attention technique (e.g., a plurality of layers configured to implement a multi-head attention technique).

[0129] At block 510, a client dataset is accessed. The client dataset may include a set of labels, where each label corresponds to an input dataset used to pre-train the machine learning model. Additionally or alternatively, the client dataset includes pairs of input datasets and labels, where each of the input datasets and labels are provided, selected, and / or identified by a client.

[0130] At block 515, an incomplete subset of layers in the machine learning model is identified to fine-tune the model using the client dataset. The incomplete subset of layers may be identified based on stored information indicating which layers should be fine-tuned during the fine-tuning phase. In some examples, the incomplete subset of layers is identified based on the size of the client dataset, a selection from the client device, the number of layers in the machine learning model, and / or a preliminary comparison of variances corresponding to the data and / or labels in the client dataset compared to variances corresponding to the data and / or labels used to pre-train the model. The incomplete subset of layers may include one or more layers above each other layer not included in the subset. For example, the incomplete subset of layers may include 8 or more layers in the model, while layers 1-7 are not included in the subset (the model is configured such that the output from layer 7 is fed into layer 8).

[0131] At block 520, the machine learning model is fine-tuned using the client dataset to generate an updated, fine-tuned version of the model. During fine-tuning, parameter values ​​associated with layers that are not included in the incomplete subset of layers may be fixed (e.g., may be retrieved from a cache of the initial model's configuration), while parameter values ​​for the subset of layers may be learned.

[0132] At 525, use of the updated and fine-tuned version of the machine learning model is facilitated. For example, the updated version of the machine learning model may be used to convert an utterance into an intent expression and / or to identify a response to the utterance.

[0133] Exemplary System 6 shows a simplified diagram of a distributed system 600. In the illustrated example, the distributed system 600 includes one or more client computing devices 602, 604, 606, and 608 coupled to a server 612 via one or more communication networks 610. The client computing devices 602, 604, 606, and 608 may be configured to execute one or more applications.

[0134] In various examples, the server 612 may be adapted to execute one or more services or software applications that enable one or more embodiments described in this disclosure. In some examples, the server 612 may also provide other services or software applications, which may include non-virtual and virtual environments. In some examples, these services may be provided as web-based or cloud services, such as according to a Software as a Service (SaaS) model to users of the client computing devices 602, 604, 606, and / or 608. Users operating the client computing devices 602, 604, 606, and / or 608 may then utilize one or more client applications to interact with the server 612 and utilize the services provided by these components.

[0135] In the configuration shown in Figure 6, server 612 may include one or more components 618, 620, and 622 that perform the functions performed by server 612. These components may include software components that may be executed by one or more processors, hardware components, or a combination thereof. It should be understood that various system configurations are possible that may differ from distributed system 600. Thus, the example shown in Figure 6 is one example of a distributed system for implementing an exemplary system and is not intended to be limiting.

[0136] A user may use client computing devices 602, 604, 606, and / or 608 to execute one or more applications, models, or chatbots that may then generate one or more events or models that may be implemented or serviced in accordance with the teachings of this disclosure. The client device may provide an interface that allows a user of the client device to interact with the client device. The client device may output information to the user through this interface. Although FIG. 6 shows only four client computing devices, any number of client computing devices may be supported.

[0137] Client devices may include various types of computing systems, such as portable handheld devices, general purpose computers such as personal computers and laptops, workstation computers, wearable devices, gaming systems, thin clients, various messaging devices, sensors or other sensing devices. These computing devices may run 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 such as Google Chrome OS), including various mobile operating systems (e.g., Microsoft Windows Mobile, iOS, Windows Phone, Android, BlackBerry, Palm OS). Portable handheld devices may include cellular phones, smartphones (e.g., iPhone), tablets (e.g., iPad), personal digital assistants (PDAs), and the like. Wearable devices may include Google Glass head-mounted displays and other devices. Gaming systems may include various handheld gaming devices, Internet-enabled gaming devices (e.g., Microsoft Xbox® gaming consoles with or without a Kinect® gesture input device, Sony PlayStation® systems, various gaming systems offered by Nintendo®, etc.), and the like.The client device may be capable of running a variety of different applications, such as various Internet-related apps, communication applications (e.g., email applications, short message service (SMS) applications), etc., and may use a variety of communication protocols.

[0138] Network 610 may be any type of network familiar to those skilled in the art that is capable of supporting data communications using any of a variety of available protocols, including, but not limited to, TCP / IP (transmission control protocol / Internet protocol), SNA (systems network architecture), IPX (Internet packet exchange), AppleTalk, etc. By way of example only, network 610 may be 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 (e.g., a network operating according to any of the IEEE (Institute of Electrical and Electronics Engineers) 1002.11 protocol suite, Bluetooth, and / or any other wireless protocol), and / or any combination of these and / or other networks.

[0139] The servers 612 may be comprised of one or more general purpose computers, dedicated server computers (including, by way of example, personal computer (PC) servers, UNIX servers, mid-range servers, mainframe computers, rack-mounted servers, etc.), server farms, server clusters, or any other suitable arrangement and / or combination. The servers 612 may include other computing architectures that include virtualization, such as one or more virtual machines running a virtual operating system, or one or more flexible pools of logical storage devices that may be virtualized to maintain the server's virtual storage devices. In various examples, the servers 612 may be adapted to run one or more services or software applications that provide the functionality described in the preceding disclosure.

[0140] The computing system of server 612 may run one or more operating systems, including any of the operating systems mentioned above, as well as any commercially available server operating system. Server 612 may run any of a variety of additional server and / or mid-tier applications, including a hypertext transport protocol (HTTP) server, a file transfer protocol (FTP) server, a common gateway interface (CGI) server, a JAVA server, a database server, and the like. Examples of database servers include, but are not limited to, commercially available database servers from Oracle, Microsoft, Sybase, IBM (International Business Machines), and the like.

[0141] In some implementations, the server 612 may include one or more applications for analyzing and consolidating data feeds and / or event updates received from users of the client computing devices 602, 604, 606, and 608. Examples of 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 information sources and continuous data streams, which may include real-time events related to sensor data applications, financial tickers, network performance measurement tools (e.g., network monitoring and traffic management applications), clickstream analysis tools, automobile traffic monitoring, etc. The server 612 may also include one or more applications for displaying the data feeds and / or real-time events via one or more display devices of the client computing devices 602, 604, 606, and 608.

[0142] The distributed system 600 may also include one or more data repositories 614, 616. These data repositories may be used to store data and other information in some examples. For example, one or more of the data repositories 614, 616 may be used to store information such as information related to the performance of the chatbot or models generated for use by the chatbot that are used by the server 612 in performing various functions according to various embodiments. The data repositories 614, 616 may reside in various locations. For example, the data repository used by the server 612 may be local to the server 612 or may be remote from the server 612 and communicate with the server 612 via a network-based or dedicated connection. The data repositories 614, 616 may be various types of data repositories. In some examples, the data repository used by the server 612 may be a database, for example, a relational database such as databases provided by Oracle Corporation® and other vendors. One or more of these databases may be adapted to allow data to be stored, updated, and retrieved from the database in response to SQL-formatted commands.

[0143] In one example, one or more of the data repositories 614, 616 may be used by an application to store application data. The data repository used by the application may be various types of data repositories, such as, for example, a key-value store repository, an object store repository, or a general storage repository supported by a file system.

[0144] In an example, the functionality described in this disclosure may be provided as a service via a cloud environment. FIG. 7 is a simplified block diagram of a cloud-based system environment in which various services may be provided as cloud services, according to an example. In the example shown in FIG. 7, a cloud infrastructure system 702 may provide one or more cloud services that may be requested by a user using one or more client computing devices 704, 706, and 708. The cloud infrastructure system 702 may comprise one or more computers and / or servers, which may include the computers and / or servers described above with respect to server 612. The computers in the cloud infrastructure system 702 may be organized as general purpose computers, dedicated server computers, server farms, server clusters, or any other suitable arrangement and / or combination.

[0145] The network 710 may facilitate communication and exchange of data between the clients 704, 706, and 708 and the cloud infrastructure system 702. The network 710 may include one or more networks. The networks may be of the same or different types of networks. The network 710 may support one or more communication protocols, including wired and / or wireless protocols, to facilitate communication.

[0146] The example shown in Figure 7 is just one example of a cloud infrastructure system and is not intended to be limiting. It should be understood that in some other examples, cloud infrastructure system 702 may include more or fewer components than those shown in Figure 7, may combine two or more components, or may have a different configuration or arrangement of components. For example, while Figure 7 shows three client computing devices, in alternative examples, any number of client computing devices may be supported.

[0147] The term cloud service is typically used to refer to services made available to users on demand over a communications network such as the Internet by a service provider's system (e.g., cloud infrastructure system 702). 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-premise servers and systems. The cloud service provider's system is managed by the cloud service provider. Thus, customers may utilize the cloud services provided by the cloud service provider itself without needing to purchase separate licenses, support, or hardware and software resources for the services. For example, the cloud service provider's system may host applications, and users may order and use the applications over the Internet on demand, without the user having to purchase infrastructure resources to run the applications. Cloud services are designed to provide easy and scalable access to applications, resources, and services. Multiple providers offer cloud services. For example, multiple cloud services are offered by Oracle Corporation of Redwood Shores, California, such as middleware services, database services, Java cloud services, etc.

[0148] In one example, cloud infrastructure system 702 may provide one or more cloud services using various models, such as according to a Software as a Service (SaaS) model, a Platform as a Service (PaaS) model, an Infrastructure as a Service (IaaS) model, and other models including hybrid service models. Cloud infrastructure system 702 may include a suite of applications, middleware, databases, and other resources that enable the provision of various cloud services.

[0149] The SaaS model allows applications or software to be delivered as a service to customers over a communications network such as the Internet, without the customer having to purchase either hardware or software for the underlying application. For example, the SaaS model may be used to provide customers with access to on-demand applications hosted by the cloud infrastructure system 702. Examples of SaaS services offered by Oracle Corporation include, but are not limited to, various services for human capital / capital management, customer relationship management (CRM), enterprise resource planning (ERP), supply chain management (SCM), enterprise performance management (EPM), analytical services, social applications, and the like.

[0150] The IaaS model is typically used to provide infrastructure resources (e.g., server resources, storage resources, hardware resources, and network resources) for providing elastic computing and storage capabilities to customers as cloud services. Various IaaS services are provided by Oracle Corporation.

[0151] The PaaS model is typically used to provide platform and environment resources that enable customers to develop, run, and manage applications and services as a service, without the customer having to procure, build, or maintain such resources. Examples of PaaS services provided 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.

[0152] Cloud services are typically provided on an on-demand self-service basis, on a subscription basis, in an elastically scalable, reliable, highly available, and secure manner. For example, a customer may order one or more services provided by cloud infrastructure system 702 through a subscription order. Cloud infrastructure system 702 then executes processing to provide the services requested in the customer's subscription order. For example, a user may use speech to request the cloud infrastructure system to take an action (e.g., an intent), as previously described, and / or provide a service of a chatbot system, as described herein. Cloud infrastructure system 702 may be configured to provide one or more cloud services.

[0153] Cloud infrastructure system 702 may provide cloud services through a variety of deployment models. In a public cloud model, cloud infrastructure system 702 may be owned by a third-party cloud service provider and cloud services may be offered to any public customer, which may be an individual or a business. In one other example, according to a private cloud model, cloud infrastructure system 702 may be operated within an organization (e.g., within a corporate organization) and services may be offered to customers within the organization. For example, the customers may be various departments of a business, such as human resources, payroll, etc., or individuals within the business. In one other example, according to a community cloud model, cloud infrastructure system 702 and the services offered may be shared by multiple organizations within an associated community. Various other models may be used, such as hybrids of the aforementioned models.

[0154] Client computing devices 704, 706, and 708 may be different types of client computing devices (such as client computing devices 602, 604, 606, and 608 shown in FIG. 6) and may be capable of operating one or more client applications. Users may use the client devices to interact with cloud infrastructure system 702, such as to request services provided by cloud infrastructure system 702. For example, users may use client devices to request information or actions from a chatbot, as described in this disclosure.

[0155] In some examples, the processing performed by cloud infrastructure system 702 to provide services may include training and deployment of models. This analysis may include using, analyzing, and manipulating a data set to train and deploy one or more models. This analysis may be performed by one or more processors, possibly processing the data in parallel, running simulations using the data, etc. For example, big data analysis may be performed by cloud infrastructure system 702 to generate and train one or more models for a chatbot system. The data used in this analysis may include structured data (e.g., data stored in a database or structured according to a structured model) and / or unstructured data (e.g., data blobs (binary large objects)).

[0156] 7, cloud infrastructure system 702 may include infrastructure resources 730 utilized to facilitate the provision of various cloud services provided by cloud infrastructure system 702. Infrastructure resources 730 may include, for example, processing resources, storage or memory resources, network resources, etc. In one example, a storage virtual machine available to provide storage services requested by an application may be part of cloud infrastructure system 702. In other examples, the storage virtual machine may be part of a different system.

[0157] In one example, to facilitate efficient provisioning of these resources to support various cloud services offered by cloud infrastructure system 702 to various customers, resources may be organized into a set of resources or resource modules (also referred to as "pods"). Each resource module or pod may include a pre-integrated and optimized combination of one or more types of resources. In one example, different pods may be pre-provisioned for different types of cloud services. For example, a first set of pods may be provisioned for database services, a second set of pods may be provisioned for Java services, which may include a different combination of resources than the pods in the first set of pods, etc. For some services, resources allocated to provision a service may be shared between services.

[0158] Cloud infrastructure system 702 itself may use services 732 internally that are shared by various components of cloud infrastructure system 702 to facilitate provisioning of services by cloud infrastructure system 702. These internal shared services may include, but are not limited to, security and identity services, integration services, enterprise repository services, enterprise manager services, virus scanning and whitelist services, high availability, backup and recovery services, services to enable support of the cloud, email services, notification services, file transfer services, etc.

[0159] Cloud infrastructure system 702 may comprise multiple subsystems. These subsystems may be implemented in software, or hardware, or a combination thereof. As shown in FIG. 7, the subsystems may include a user interface subsystem 712 that allows users or customers of cloud infrastructure system 702 to interact with cloud infrastructure system 702. User interface subsystem 712 may include a variety of different interfaces, such as a web interface 714, an online store interface 716 where cloud services offered by cloud infrastructure system 702 are advertised and may be purchased by consumers, and other interfaces 718. For example, a customer may use one or more of interfaces 714, 716, and 718 using a client device to request one or more services offered by cloud infrastructure system 702 (service request 734). For example, a customer may access an online store, browse cloud services offered by cloud infrastructure system 702, and order a subscription for one or more services offered by cloud infrastructure system 702 for which the customer wishes to sign up. The service request may include information identifying the customer and the one or more services for which the customer wishes to sign up. For example, a customer may order a subscription to a service provided by cloud infrastructure system 702. As part of the order, the customer may provide information identifying the chatbot system for which the service is to be provided and, optionally, one or more credentials for the chatbot system.

[0160] 7, cloud infrastructure system 702 may include an order management subsystem (OMS) 720 configured to process new orders. As part of this processing, OMS 720 may be configured to create an account for the customer if one has not already been created, receive billing and / or accounting information from the customer that is used to invoice the customer for providing the customer with the requested services, verify the customer information, and upon verification, book the customer's order and coordinate various workflows to prepare the order for provisioning.

[0161] After proper validation, OMS 720 may invoke order provisioning subsystem (OPS) 724 configured to provision resources for the order, including processing resources, memory resources, and network resources. This provisioning may include allocating resources to the order and configuring the resources to facilitate the services requested by the customer order. The manner in which resources for the order are provisioned and the types of resources provisioned may depend on the type of cloud service ordered by the customer. For example, according to one workflow, OPS 724 may be configured to determine the specific cloud service being requested and identify the number of pods that may be pre-configured for that specific cloud service. The number of pods allocated to the order may depend on the size / amount / level / scope of the requested service. For example, the number of pods allocated may be determined based on the number of users supported by the service, the duration for which the service is requested, etc. The allocated pods may then be customized for the specific requesting customer to provide the requested service.

[0162] In one example, the configuration phase process as described above may be performed by cloud infrastructure system 702 as part of the provisioning process. Cloud infrastructure system 702 may generate an application ID and select a storage virtual machine for the application from among those provided by cloud infrastructure system 702 itself or from those provided by other systems other than cloud infrastructure system 702.

[0163] Cloud infrastructure system 702 may send a response or notification 744 to the requesting customer to indicate if the requested service is now ready for use. In some examples, information (e.g., a link) may be sent to the customer that enables the customer to begin using and enjoy the benefits of the requested service. In one example, for the customer requesting the service, the response may include a chatbot system ID generated by cloud infrastructure system 702 and information identifying the chatbot system selected by cloud infrastructure system 702 for the chatbot system corresponding to this chatbot system ID.

[0164] Cloud infrastructure system 702 may provide services to multiple customers. For each customer, cloud infrastructure system 702 is responsible for managing information related to one or more subscription orders received from the customer, maintaining customer data related to the orders, and providing the requested services to the customer. Cloud infrastructure system 702 may also collect usage statistics regarding the customer's use of the registered services. For example, statistics may be collected regarding the amount of storage used, the amount of data transferred, the number of users, and the amount of system up-time and down-time, etc. This usage information may be used to bill the customer. Billing may be performed, for example, on a monthly cycle.

[0165] Cloud infrastructure system 702 may provide services to multiple customers simultaneously. Cloud infrastructure system 702 may store information about these customers, possibly including confidential information. In one example, cloud infrastructure system 702 comprises an identity management subsystem (IMS) 728 configured to manage customer information and provide separation of managed information such that information related to one customer is not accessible by another customer. IMS 728 may be configured to provide various security-related services, such as identity services, e.g., services for managing customer identities as well as roles and associated capabilities, such as information access management, authentication, and authorization services.

[0166] 8 illustrates an example of a computer system 800. In some examples, the computer system 800 may be used to implement either a digital assistant or chatbot system in a distributed environment, as well as the various servers and computer systems previously described. As illustrated in FIG. 8, the computer system 800 includes various subsystems, including a processing subsystem 804 that communicates with multiple other subsystems via a bus subsystem 802. These other subsystems may include a processing acceleration unit 806, an I / O subsystem 808, a storage subsystem 818, and a communication subsystem 824. The storage subsystem 818 may include non-transitory computer-readable storage media, including a storage medium 822 and a system memory 810.

[0167] Bus subsystem 802 provides a mechanism for allowing the various components and subsystems of computer system 800 to communicate with each other as intended. Although bus subsystem 802 is shown diagrammatically as a single bus, alternative examples of the bus subsystem may utilize multiple buses. Bus subsystem 802 may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, a local bus using any of a variety of bus architectures, and the like. For example, such architectures may include an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, a Peripheral Component Interconnect (PCI) bus, which may be implemented as a mezzanine bus manufactured to the IEEE P1386.1 standard, and the like.

[0168] The processing subsystem 804 controls the operation of the computer system 800 and may comprise 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 800 may be organized into one or more processing units 832, 834, etc. The processing units may include one or more processors, one or more cores of the same or different processors, combinations of cores and processors, or other combinations of cores and processors. In some examples, the processing subsystem 804 may include one or more dedicated co-processors, such as a graphics processor, digital signal processor (DSP), etc. In some examples, some or all of the processing units of the processing subsystem 804 may be implemented using customized circuitry, such as an application specific integrated circuit (ASIC) or field programmable gate array (FPGA).

[0169] In some examples, the processing units of the processing subsystem 804 may execute instructions stored in the system memory 810 or the computer-readable storage medium 822. In various examples, the processing units may execute various program or code instructions and may maintain multiple simultaneously executing programs or processes. At any particular time, some or all of the program code being executed may reside in the system memory 810 and / or in the computer-readable storage medium 822, including possibly on one or more storage devices. With appropriate programming, the processing subsystem 804 may provide the various functions discussed above. In examples where the computer system 800 is running one or more virtual machines, one or more processing units may be assigned to each virtual machine.

[0170] In one example, a processing acceleration unit 806 may be optionally provided to perform customized processing or to offload some of the processing performed by the processing subsystem 804 so as to accelerate the overall processing performed by the computer system 800.

[0171] I / O subsystem 808 may also include devices and mechanisms for inputting information into computer system 800 and / or outputting information from or through computer system 800. In general, use of the term input device is intended to include all possible types of devices and mechanisms for inputting information into computer system 800. User interface input devices may include, for example, keyboards, pointing devices such as 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 include motion detection and / or gesture recognition devices, such as a Microsoft Kinect® motion sensor that allows a user to control and interact with the input device, a Microsoft Xbox® 360 game controller, and devices that provide an interface for receiving input using gestures and spoken commands. The user interface input devices may also include eye gesture recognition devices, such as a Google Glass® blink detector that detects a user's eye activity (e.g., "blinking" when taking a photo and / or selecting a menu) and translates the eye gestures as input to the input device (e.g., Google Glass®). Additionally, the user interface input devices may include a voice recognition detection device that allows a user to interact with a voice recognition system (e.g., the Siri® navigator) via voice commands.

[0172] Other examples of user interface input devices include, but are not limited to, three dimensional (3D) mice, joysticks or pointing sticks, game pads, and graphic tablets, as well as audio / visual devices such as speakers, digital cameras, digital video cameras, portable media players, webcams, image scanners, fingerprint scanners, barcode readers 3D scanners, 3D printers, laser range finders, and eye tracking devices. Additionally, user interface input devices may include medical imaging input devices, such as, for example, computed tomography, magnetic resonance imaging, positron emission tomography, and medical ultrasound devices. User interface input devices may also include audio input devices, such as, for example, MIDI keyboards, digital musical instruments, and the like.

[0173] In general, use of the term output device is intended to include all possible types of devices and mechanisms for outputting information from computer system 800 to a user or to another computer. User interface output devices may include a display subsystem, indicator lights, or non-visual displays such as audio output devices. The display subsystem may be a flat panel device such as a flat panel device using a cathode ray tube (CRT), a liquid crystal display (LCD), or a plasma display, a projection device, a touch screen, and the like. For example, user interface output devices may include, but are not limited to, a variety of display devices that visually convey textual, graphical, and audio / video information, such as monitors, printers, speakers, headphones, navigation systems, plotters, audio output devices, and modems.

[0174] The storage subsystem 818 provides a repository or data store for storing information and data used by the computer system 800. The storage subsystem 818 provides a tangible, non-transitory computer-readable storage medium for storing basic programming and data configurations that provide some example functionality. The storage subsystem 818 may store software (e.g., programs, code modules, instructions) that, when executed by the processing subsystem 804, provide the aforementioned functionality. The software may be executed by one or more processing units of the processing subsystem 804. The storage subsystem 818 may also provide authentication in accordance with the teachings of the present disclosure.

[0175] The storage subsystem 818 may include one or more non-transitory memory devices, including volatile and non-volatile memory devices. As shown in FIG. 8, the storage subsystem 818 includes a system memory 810 and a computer-readable storage medium 822. The system memory 810 may include multiple memories, including a volatile main random access memory (RAM) for storing instructions and data during program execution, and a non-volatile read only memory (ROM) or flash memory in which fixed instructions are stored. In some implementations, a basic input / output system (BIOS), containing the basic routines that help to transfer information between elements within the computer system 800, such as during start-up, may typically be stored in a ROM. The RAM typically contains data and / or program modules currently being operated on and executed by the processing subsystem 804. In some implementations, the system memory 810 may include multiple different types of memories, such as static random access memory (SRAM), dynamic random access memory (DRAM), etc.

[0176] 8, system memory 810 may load application programs 812 to be executed, which may include various applications such as a web browser, mid-tier applications, a relational database management system (RDBMS), program data 814, and an operating system 816. Examples of operating system 816 may include various versions of 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, Google Chrome OS, etc.), and / or mobile operating systems such as iOS, Windows Phone, Android OS, BlackBerry OS, Palm OS operating systems, etc.

[0177] The computer readable storage medium 822 may store programming and data configurations that provide some example functionality. The computer readable medium 822 may provide storage of computer readable instructions, data structures, program modules, and other data for the computer system 800. Software (programs, code modules, instructions) that provide the aforementioned functionality when executed by the processing subsystem 804 may be stored in the storage subsystem 818. Examples of the computer readable storage medium 822 may include non-volatile memory, such as hard disk drives, magnetic disk drives, optical disk drives such as CD ROMs, DVDs, Blu-ray disks, or other optical media. The computer readable storage medium 822 may include, but is not limited to, Zip drives, flash memory cards, universal serial bus (USB) flash drives, secure digital (SD) cards, DVD disks, digital video tapes, and the like. The computer-readable storage medium 822 may also include flash memory-based solid-state drives (SSDs), enterprise flash drives, solid-state drives (SSDs) based on non-volatile memory such as semiconductor ROM, semiconductor RAM, dynamic RAM, static RAM, DRAM-based SSDs, volatile memory-based SSDs such as magnetoresistive RAM (MRAM) SSDs, as well as hybrid SSDs that use a combination of DRAM and flash memory-based SSDs.

[0178] In one example, storage subsystem 818 may include a computer readable storage medium reader 820 that may be further connected to a computer readable storage medium 822. Reader 820 may be configured to receive and read data from a memory device such as a disk, a flash drive, or the like.

[0179] In an example, computer system 800 may support virtualization techniques, including but not limited to virtualization of processing and memory resources. For example, computer system 800 may support running one or more virtual machines. In an example, computer system 800 may run a program such as a hypervisor that facilitates configuration and management of virtual machines. Each virtual machine may be assigned memory resources, computational resources (e.g., processors, cores), I / O resources, and network 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 or different from the operating systems run by other virtual machines being run by computer system 800. Thus, multiple operating systems may be run simultaneously by computer system 800.

[0180] The communication subsystem 824 provides an interface to other computer systems and networks. The communication subsystem 824 serves as an interface for receiving data from other systems and for transmitting data from the computer system 800 to other systems. For example, the communication subsystem 824 may enable the computer system 800 to establish a communication channel over the Internet to one or more client devices to receive and transmit information to and from the client devices. For example, if the computer system 800 is used to implement the bot system 120 shown in FIG. 1, the communication subsystem may be used to communicate with a chatbot system selected for the application.

[0181] The communications subsystem 824 may support both wired and / or wireless communications protocols. In some examples, the communications subsystem 824 may include radio frequency (RF) transceiver components for accessing wireless voice and / or data networks (e.g., using cellular technology, advanced data network technologies such as 3G, 4G, or EDGE (enhanced data rates for global evolution), WiFi (IEEE 802.XX family of standards), or other mobile communications technologies, or any combination thereof), global positioning system (GPS) receiver components, and / or other components. In some examples, the communications subsystem 824 may provide a wired network connection (e.g., Ethernet) in addition to or instead of a wireless interface.

[0182] The communications subsystem 824 may receive and transmit data in a variety of forms. In some examples, the communications subsystem 824 may receive incoming communications in the form of structured and / or unstructured data feeds 826, event streams 828, event updates 830, etc., among other forms. For example, the communications subsystem 824 may be configured to receive (or transmit) data feeds 826 in real time from users of social media networks and / or other communications services, such as Twitter® feeds, Facebook® updates, web feeds, such as rich site summary (RSS) feeds, and / or real-time updates from one or more third-party information sources.

[0183] In an example, the communications subsystem 824 may be configured to receive data in the form of a continuous data stream, which may include an event stream 828 of real-time events and / or event updates 830 that may have no explicit end and may be continuous in nature or without boundaries. Examples of applications that generate continuous data may include, for example, sensor data applications, financial tickers, network performance measurement tools (e.g., network monitoring and traffic management applications), clickstream analysis tools, automobile traffic monitoring, etc.

[0184] Communications subsystem 824 may be configured to communicate data from computer system 800 to other computer systems or networks. Data may be communicated in a variety of forms, such as structured and / or unstructured data feeds 826, event streams 828, event updates 830, etc., to one or more databases that may be in communication with one or more streaming data source computers coupled to computer system 800.

[0185] The computer system 800 may be one of a variety of types, including a handheld portable device (e.g., an iPhone® mobile phone, an iPad® computing tablet, a PDA), a wearable device (e.g., a Google Glass® head-mounted display), a personal computer, a workstation, a mainframe, an automated ticket machine, a server rack, or any other data processing system. Due to the ever-changing nature of computers and networks, the description of the computer system 800 shown in FIG. 8 is intended to be merely a specific example. Many other configurations are possible that include more or fewer components than the system shown in FIG. 8. It should be understood that there are other approaches and / or methods for implementing the various examples based on the disclosure and teachings provided herein.

[0186] Working Example Example 1 A machine learning model was constructed that included a BERT model and a decoder model. The BERT model included a 12-layer bidirectional transformer encoder (shown in FIG. 9A) that included 12 bidirectional self-attention heads. The transformer includes an encoder in each layer. As shown in FIG. 9B, the transformer's encoder includes a multi-head attention layer that uses values ​​(V: value), keys (K: key), and queries (Q: query) as described herein to determine how to transform an input not only based on individual values ​​in the input, but also based on other values ​​and attention paid to other values ​​(see FIG. 9C).

[0187] A BERT model (e.g., a multilingual BERT model) was trained using a training dataset. During this training, parameter values ​​across all 12 layers were learned. Then, each of multiple fine-tuning processes was performed to fine-tune the model. Each process corresponds to a specific dataset for use in fine-tuning and identifying one or more layers in which parameter values ​​in the multi-head self-attention network are fine-tuned. The trained BERT model may include a model as identified at https: / / github.com / google-research / bert / blob / master / multilingual.md, which is incorporated herein by reference for all purposes. Throughout the fine-tuning process, each of eight datasets was used for fine-tuning. Each of these eight datasets is a public dataset identified in the heading in the table shown in FIG. 10. Different rows in the table shown in FIG. 10 indicate the number of fine-tuned layers of the multi-head self-attention network. For each combination of dataset used for fine-tuning and the number of layers the multi-head self-attention network was fine-tuned on, the table shown in Figure 10 identifies the labels predicted by the fine-tuned model and the micro-F1 score generated by using the test data of the corresponding public dataset. The last column shows the average micro-F1 score for fine-tuning the indicated number of layers across the entire dataset.

[0188] As shown in Figure 10, the best accuracy was achieved when the self-attention network between 5 and 9 layers was fine-tuned, instead of all 12 layers. On average, the best accuracy was achieved only when layer 8 of the multi-head self-attention network was fine-tuned. Furthermore, by fine-tuning only the multi-head self-attention network in the transformer block at selected layers, the time taken for fine-tuning was reduced by 75%.

[0189] Example 2 A machine learning model is constructed that includes the same architecture as identified in Example 1 (including layers as shown in FIG. 11). The architecture includes a BERT model 1105 with a 12-layer bidirectional transformer encoder and an activation layer 1110. An initial set of layers 1115 (including all layers in the BERT model and the decoder model / activation layer) is trained during an initial training stage using an initial training dataset. A set of fine-tuning layers 1120 is identified as being an incomplete subset of the initial set of layers 1115. Only a portion of a single layer (e.g., each multi-head attention component) in the fine-tuning layers 1120 is fine-tuned using a different (e.g., context-specific) training set. The fine-tuned model is then configured to process data corresponding to the context while using less context-specific data than would be required if the entire machine learning model were trained using the context-specific data.

[0190] Additional Considerations While specific details and examples have been described, various modifications, variations, alternative constructions, and equivalents are possible. The examples are not limited to operation in one particular data processing environment, but can freely operate in multiple data processing environments. Moreover, it should be apparent to one skilled in the art that while certain examples have been described using a particular sequence of transactions and steps, this is not intended to be limiting. Although some flow charts describe operations as a sequential process, many of the operations may be performed in parallel or simultaneously. Additionally, the order of operations may be rearranged. A process may include additional steps not included in the figures. Various features and aspects of the examples described above may be used individually or together.

[0191] Additionally, while certain embodiments have been described using a particular combination of hardware and software, it should be recognized that other combinations of hardware and software are possible. An embodiment may be implemented exclusively in hardware, exclusively in software, or using a combination thereof. The various processes described herein may be performed on the same processor or on different processors in any combination.

[0192] When a device, system, component, or module is described as being configured to perform a certain operation or function, such configuration may 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, such as by executing computer instructions or code, or by programming a processor or core that is programmed to execute code or instructions stored on a non-transitory storage medium, or any combination thereof. Processes may communicate using a variety of techniques, including, but not limited to, conventional techniques for inter-process communication, and different pairs of processes may use different techniques, or the same pair of processes may use different techniques at different times.

[0193] In this disclosure, specific details are given to enable a thorough understanding of the embodiments. However, the embodiments may be practiced without these specific details. For example, well-known circuits, processes, algorithms, structures, and techniques are shown without unnecessary detail to avoid obscuring the embodiments. This description merely provides exemplary embodiments and is not intended to limit the scope, applicability, or configuration of other embodiments. Rather, the foregoing description of the embodiments provides those skilled in the art with an enabling description for implementing various embodiments. Various changes may be made in the function and arrangement of elements.

[0194] Accordingly, the specification and drawings are to be regarded in an illustrative rather than restrictive sense. However, it will be apparent that additions, subtractions, deletions, and other modifications and alterations may be made without departing from the broader spirit and scope as set forth in the appended claims. Thus, although specific embodiments have been described, these are not intended to be limiting. Various modifications and equivalents are within the scope of the following claims.

[0195] Although aspects of the disclosure have been described in the foregoing specification with reference to specific examples, those skilled in the art will recognize that the disclosure is not limited thereto. Various features and aspects of the foregoing disclosure may be used individually or together. Moreover, the embodiments may be utilized in any number of environments and applications beyond those described herein without departing from the broader spirit and scope of the present specification. Accordingly, the present specification and drawings should be regarded as illustrative rather than restrictive.

[0196] In the preceding description, the methods have been described in a particular order for purposes of illustration. It should be understood that in alternative embodiments, the methods may be performed in an order different from that described. It should also be understood that the methods described above may be embodied in a series of machine-executable instructions that may be performed by hardware components or that may be used to cause a machine, such as a general-purpose or special-purpose processor or logic circuitry programmed with the instructions, to perform the method. These machine-executable instructions may be stored on one or more machine-readable media, such as a CD-ROM or other type of optical disk, floppy disk, ROM, RAM, EPROM, EEPROM, magnetic or optical card, flash memory, or other type of machine-readable medium suitable for storing electronic instructions. Alternatively, the methods may be performed by a combination of hardware and software.

[0197] Where a component is described as being configured to perform a certain operation, such configuration may be achieved, for example, by designing electronic circuitry or other hardware to perform the operation, by programming a programmable electronic circuit (e.g., a microprocessor or other suitable electronic circuitry) to perform the operation, or by any combination thereof.

[0198] Although illustrative embodiments of the present application have been described in detail herein, it is to be understood that the inventive concepts may be embodied and employed in various other ways, and that the appended claims are intended to be construed to include such modifications except insofar as limited by the prior art.

Claims

**Claim 1** A method comprising: accessing a pre-trained version of a machine learning model that includes a plurality of layers and is configured to process voice or text language input, wherein each of the plurality of layers is configured using a plurality of pre-trained parameter values corresponding to a plurality of parameters and specific to the layer, and each of the plurality of layers is configured to implement a multi-head attention technique, the method comprising: accessing a client dataset; identifying an incomplete subset of the plurality of layers for which the pre-trained parameter values specific to the corresponding layer are to be fine-tuned using the client dataset; further comprising using the client dataset to fine-tune the machine learning model to generate an updated version of the machine learning model, wherein the pre-trained parameter values specific to the layer configured for each one or more of the plurality of layers not included in the incomplete subset are fixed during the fine-tuning, the method comprising: further comprising facilitating use of the updated version of the machine learning model. **Claim 2** The method of claim 1, wherein the multi-head attention technique includes a self-attention technique. **Claim 3** The method of claim 1, wherein the incomplete subset of the plurality of layers includes two or one layer, and the pre-trained machine learning model includes at least five layers. **Claim 4** The method of claim 1, wherein the plurality of parameters includes at least 500,000 parameters, and the pre-trained parameter values specific to the corresponding layer are updated using one or more central processing units. **Claim 5** The pre-trained parameter values specific to the corresponding layer are: updated during the fine-tuning by accessing a set of cached values corresponding to the one or more of the plurality of layers not included in the incomplete subset. **Claim 6** The method of claim 1, wherein the number of pre-trained parameter values specific to the corresponding layer configured for the incomplete subset of the plurality of layers is 30% or less compared to the number of parameters configured for the machine learning model. **Claim 7** The method of claim 1, wherein facilitating use of the updated version includes converting language input into a command or query. **Claim 8** The method of claim 1, wherein the plurality of layers includes at least four layers, and each of the incomplete subsets of the plurality of layers is arranged in two or more of the plurality of layers. **Claim 9** One or more processors, and a memory coupled to the one or more processors, the memory storing a plurality of instructions executable by the one or more processors, the plurality of instructions including instructions that, when executed by the one or more processors, cause the one or more processors to perform a set of operations, the operations including accessing a pre-trained version of a machine learning model that includes a plurality of layers and is configured to process voice or text language input, each of the plurality of layers being configured using pre-trained parameter values specific to the plurality of layers corresponding to a plurality of parameters, each of the plurality of layers being configured to implement multi-head attention techniques, the operations including accessing a client dataset, identifying an incomplete subset of the plurality of layers for which pre-trained parameter values specific to the corresponding layers are to be fine-tuned using the client dataset, further including fine-tuning the machine learning model using the client dataset to generate an updated version of the machine learning model, wherein the pre-trained parameter values specific to the layers configured for each one or more of the plurality of layers not included in the incomplete subset are fixed during the fine-tuning, and the operations including a system further including facilitating use of the updated version of the machine learning model. **Claim 10** The system of claim 9, wherein the multi-head attention technique includes self-attention technique. **Claim 11** The system of claim 9 or 10, wherein the incomplete subset of the plurality of layers includes two or one layer, and the pre-trained machine learning model includes at least five layers. **Claim 12** The plurality of parameters includes at least 500,000 parameters, and the plurality of pre-trained parameter values specific to the corresponding layer are updated using one or more central processing units, the system according to claim 9 or 10.

13. The pre-trained parameter values specific to the corresponding layer are updated during the fine-tuning by accessing a set of cached values corresponding to the one or more of the plurality of layers not included in the incomplete subset, the system according to claim 9 or 10.

14. The number of pre-trained parameter values specific to the corresponding layer configured for the incomplete subset of the plurality of layers is 30% or less compared to the number of parameters configured for the machine learning model, the system according to claim 9 or 10.

15. Facilitating the use of the updated version includes converting a language input into a command or query, the system according to claim 9 or 10.

16. The plurality of layers includes at least four layers, and each of the incomplete subsets of the plurality of layers is arranged in layer 2 or higher of the plurality of layers, the system according to claim 9 or 10.

17. A computer program for causing one or more processors to execute the method according to any one of claims 1 to 8.