Distillation to target devices based on observed query patterns
Patent Information
- Application Number
- JP2024522377
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-10-13
- Filing Date
- 2021-12-15
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-12-15
AI Technical Summary
【0015】 本開示の1つまたは複数の実装形態の詳細が、添付の図面および以下の説明に記載される。他の態様、特徴、および利点は、説明および図面から、ならびに特許請求の範囲から明らかになろう。
Smart Images

Figure 2024539644000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to observing query patterns to distill models to target devices. [Background technology]
[0002] Users frequently interact with voice-enabled assistant interfaces on smart devices such as phones, watches, and smart speakers / displays. These assistant interfaces enable users to get things done and find answers to questions they may have, all the while through natural conversational interactions. Developers are creating assistant services that leverage the voice-enabled assistant interfaces. For example, an automatic speech recognition (ASR) model can recognize queries spoken by a user, and a text-to-speech (TTS) model can generate synthetic speech for output to the user that conveys a response to the spoken query. Generally, these assistant services run in cloud computing environments that provide flexibility and extensive query processing capabilities. Disadvantages of cloud-based assistant services include network bandwidth consumption, increased latency, and reduced privacy, as audio data characterizing the spoken query must be transferred from the user device to the cloud-based service. Summary of the Invention [Means for solving the problem]
[0003] One aspect of the disclosure provides a computer-implemented method that, when executed on data processing hardware, causes the data processing hardware to perform operations including receiving user queries from a plurality of client devices, each associated with a respective user, directed to a cloud-based assistant service executing on the data processing hardware. For each received user query directed to the cloud-based assistant service, the operations also include extracting one or more attributes from the user query and logging the user query into one or more of a plurality of category buckets based on the one or more attributes extracted from the user query. The operations also include determining when at least one of the plurality of category buckets includes a threshold number of user queries logged in the at least one category bucket, and generating a distilled model of the cloud-based assistant service when at least one of the plurality of category buckets includes the threshold number of user queries. Wherein, the distilled model of the cloud-based assistant service is configured to execute on one or more target client devices of the plurality of client devices.
[0004] Implementations of the present disclosure may include one or more of the following optional features. In some implementations, the operations further include prompting a developer of the cloud-based assistant service to accept the generated distilled model for execution on one or more target client devices, and deploying the distilled model to one or more of the target client devices when the developer accepts the generated distilled model. In these implementations, the operations may also include determining whether the accuracy of the generated distilled model for the evaluation dataset is within a threshold range of the accuracy of the teacher model for the evaluation dataset. Here, prompting the developer of the cloud-based assistant service may include prompting the developer of the cloud-based assistant service when the accuracy of the generated distilled model for the evaluation dataset is within a threshold range of the accuracy of the teacher model for the evaluation dataset.
[0005] In some examples, the operations also include, for each received user query directed to the cloud-based assistant service, processing the audio data characterizing the user query to generate a transcription of the user query using an automatic speech recognition (ASR) model of the cloud-based assistant service. In these examples, extracting one or more attributes from the user query includes performing query interpretation on the transcription of the user query to identify a query vertical type for the user query, and logging the user query includes logging the user query to a corresponding one of a plurality of category buckets associated with the query vertical type identified for the user query. The one or more attributes extracted from the user query may include at least one of a device category and / or device type associated with a client device from which the user query was received, a query vertical type identified for the user query, a language and / or location associated with a user who spoke the user query, a text-to-speech response generated by the cloud-based assistant service following fulfillment of the user query, or a transcription of the user query.
[0006] In some implementations, generating the distilled model of the cloud-based assistant service includes selecting a model configuration for the distilled model that satisfies memory and / or processing constraints of each of the one or more target client devices. In some additional implementations, generating the distilled model of the cloud-based assistant service may include obtaining a set of training queries having attributes associated with at least one of a plurality of category buckets that includes a threshold number of user queries, generating corresponding training labels for the training queries in the set of training queries using a teacher model of the cloud-based assistant service, and training a distilled model with the set of training queries and the corresponding training labels generated for the training queries in the set of training queries. Here, at least a portion of the training queries in the set of training queries may include previous user queries selected from among the threshold number of user queries logged in each of at least one of the plurality of category buckets. Optionally, at least a portion of the training queries in the set of training queries may include new queries having attributes associated with at least one of a plurality of category buckets that includes a threshold number of user queries. Moreover, at least a portion of the training queries in the set of training queries may be selected from an offline data sample having attributes associated with at least one of a plurality of category buckets that includes a threshold number of user queries.
[0007] In some examples, after deploying the generated distilled model for execution on each of the one or more target devices, the operations further include receiving federated analytics from each target client device executing the distilled model indicative of attributes associated with the incoming queries processed by the distilled model executing on the corresponding target client device, logging the incoming queries into one or more of the plurality of category buckets based on the federated analytics, determining when at least another one of the plurality of category buckets includes a threshold number of user queries and new user queries, and generating another distilled model of the cloud-based assistant service when at least another one of the plurality of category buckets includes the threshold number of user queries and new user queries, where the another distilled model of the cloud-based assistant service is configured to execute on the one or more target client devices of the plurality of client devices.
[0008] In some implementations, after deploying the generated distilled model for execution on each of the one or more target devices, the operations further include receiving, from each target client device that executes the distilled model, a federated analysis indicating attributes associated with the new queries processed by the distilled model executing on the corresponding target client device, generating an updated distilled model by updating parameters of the distilled model based on the federated analysis received from each target device that executes the distilled model, and deploying the updated distilled model for execution on each of the one or more target client devices. In these implementations, the federated analysis may be received from each target client device without receiving audio data characterizing any of the new queries processed by the distilled model and without receiving a transcription of the new queries processed by the distilled model. The distilled model may include a speech recognition model, a text-to-speech model, or a natural language understanding (NLU) model.
[0009] Another aspect of the present disclosure provides a system including data processing hardware and memory hardware in communication with the data processing hardware. The memory hardware stores instructions that, when executed on the data processing hardware, cause the data processing hardware to perform operations including receiving user queries from a plurality of client devices, each associated with a respective user, directed to a cloud-based assistant service executing on the data processing hardware. For each received user query directed to the cloud-based assistant service, the operations also include extracting one or more attributes from the user query and logging the user query into one or more of a plurality of category buckets based on the one or more attributes extracted from the user query. The operations also include determining when at least one of the plurality of category buckets includes a threshold number of user queries logged in the at least one category bucket, and generating a distilled model of the cloud-based assistant service when at least one of the plurality of category buckets includes the threshold number of user queries. Wherein, the distilled model of the cloud-based assistant service is configured to execute on one or more target client devices of the plurality of client devices.
[0010] This aspect may include one or more of the following optional features. In some implementations, the operations further include prompting a developer of the cloud-based assistant service to accept the generated distilled model for execution on one or more target client devices, and deploying the distilled model to one or more of the target client devices when the developer accepts the generated distilled model. In these implementations, the operations may also include determining whether the accuracy of the generated distilled model for the evaluation dataset is within a threshold range of accuracy of the teacher model for the evaluation dataset. Here, prompting the developer of the cloud-based assistant service may include prompting the developer of the cloud-based assistant service when the accuracy of the generated distilled model for the evaluation dataset is within a threshold range of accuracy of the teacher model for the evaluation dataset.
[0011] In some examples, the operations also include, for each received user query directed to the cloud-based assistant service, processing the audio data characterizing the user query to generate a transcription of the user query using an automatic speech recognition (ASR) model of the cloud-based assistant service. In these examples, extracting one or more attributes from the user query includes performing query interpretation on the transcription of the user query to identify a query vertical type for the user query, and logging the user query includes logging the user query to a corresponding one of a plurality of category buckets associated with the query vertical type identified for the user query. The one or more attributes extracted from the user query may include at least one of a device category and / or device type associated with a client device from which the user query was received, a query vertical type identified for the user query, a language and / or location associated with a user who spoke the user query, a text-to-speech response generated by the cloud-based assistant service following fulfillment of the user query, or a transcription of the user query.
[0012] In some implementations, generating the distilled model of the cloud-based assistant service includes selecting a model configuration for the distilled model that satisfies memory and / or processing constraints of each of the one or more target client devices. In some additional implementations, generating the distilled model of the cloud-based assistant service may include obtaining a set of training queries having attributes associated with at least one of a plurality of category buckets that includes a threshold number of user queries, generating corresponding training labels for the training queries in the set of training queries using a teacher model of the cloud-based assistant service, and training the distilled model with the set of training queries and the corresponding training labels generated for the training queries in the set of training queries. Here, at least a portion of the training queries in the set of training queries may include previous user queries selected from among the threshold number of user queries logged in each of at least one of the plurality of category buckets. Optionally, at least a portion of the training queries in the set of training queries may include new queries having attributes associated with at least one of a plurality of category buckets that includes a threshold number of user queries. Moreover, at least a portion of the training queries in the set of training queries may be selected from an offline data sample having attributes associated with at least one of a plurality of category buckets that includes a threshold number of user queries.
[0013] In some examples, after deploying the generated distilled model for execution on each of the one or more target devices, the operations further include receiving, from each target client device executing the distilled model, a federated analysis indicating attributes associated with the incoming queries processed by the distilled model executing on the corresponding target client device; logging the incoming queries into one or more of the plurality of category buckets based on the federated analysis; determining when at least another one of the plurality of category buckets includes a threshold number of user queries and new user queries; and generating, when at least another one of the plurality of category buckets includes the threshold number of user queries and new user queries, another distilled model of the cloud-based assistant service configured to execute on the one or more target client devices of the plurality of client devices.
[0014] In some implementations, after deploying the generated distilled model for execution on each of the one or more target devices, the operations further include receiving, from each target client device that executes the distilled model, a federated analysis indicating attributes associated with the new queries processed by the distilled model executing on the corresponding target client device, generating an updated distilled model by updating parameters of the distilled model based on the federated analysis received from each target device that executes the distilled model, and deploying the updated distilled model for execution on each of the one or more target client devices. In these implementations, the federated analysis may be received from each target client device without receiving audio data characterizing any of the new queries processed by the distilled model and without receiving a transcription of the new queries processed by the distilled model. The distilled model may include a speech recognition model, a text-to-speech model, or a natural language understanding (NLU) model.
[0015] The details of one or more implementations of the disclosure are set forth in the accompanying drawings and the description below. Other aspects, features, and advantages will become apparent from the description and drawings, and from the claims. [Brief description of the drawings]
[0016] [Figure 1] FIG. 1 is a schematic diagram of an example system for distilling an assistant model to a client device based on a user query directed to a cloud-based assistant service. [Diagram 2] FIG. 1 is a schematic diagram of logging user queries into one or more category buckets based on attributes extracted from the user queries. [Diagram 3] FIG. 2 is a schematic diagram of an example distillation model generation process for generating one or more distillation assistant models for the cloud-based assistant service of FIG. [Figure 4] 1 is a flowchart of an example sequence of operations for a method of distilling an assistant model to a client device based on a user query directed to a cloud-based assistant service. [Diagram 5] FIG. 1 is a schematic diagram of an example computing device that can be used to implement the systems and methods described herein. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0017] Like reference numbers in the various drawings indicate like elements.
[0018] Users frequently interact with voice-enabled assistant interfaces on smart devices such as phones, watches, and smart speakers / displays. These assistant interfaces enable users to get things done and find answers to questions they may have, all the while through natural conversational interactions. Developers are creating assistant services that leverage the voice-enabled assistant interfaces. For example, an automatic speech recognition (ASR) model can recognize queries spoken by a user, and a text-to-speech (TTS) model can generate synthetic speech for output to the user that conveys a response to the spoken query. Generally, these assistant services run in cloud computing environments that provide flexibility and extensive query processing capabilities. Disadvantages of cloud-based assistant services include network bandwidth consumption, increased latency, and reduced privacy, as audio data characterizing the spoken query must be transferred from the user device to the cloud-based service.
[0019] Implementations herein are directed to a cloud-based assistant service that can aggregate user queries from client devices and detect when any components / models of the cloud-based assistant service may be present on some or all of the client devices based on patterns / attributes identified in the user queries. For example, when a user query reveals that a vast majority of the user queries belong to a particular query vertical type, the cloud-based assistant service may determine to generate a distilled speech recognition model and / or a distilled natural language understanding (NLU) module that is optimized to recognize and / or interpret queries within that query vertical type. To illustrate, a developer may create a voice and cloud-based assistant service tailored to run on a smartwatch product, whereby spoken queries captured by the smartwatch are recognized by a cloud-based speech recognition model. By extracting attributes from queries received and processed by the cloud-based assistant service, the cloud-based assistant service may learn that nearly all of the queries are fitness-related (e.g., belong to a fitness query vertical type). Thus, the service may distill custom speech recognition and NLU models tailored to recognize and understand fitness-related queries, and then the service may deploy these distilled custom models directly for execution on the smartwatch, leading to improved latency and privacy for the developer's customers / users.
[0020] Still further, multiple distilled speech recognition models may be generated, each with a configuration suitable for a different respective client device type (a particular make / model smartphone) on which the model runs. The client device type and category (e.g., phone, smart speaker, smart watch, etc.) associated with the client device issuing a query to the cloud-based assistant service may be extracted as an attribute of the query. Client devices currently running distilled speech recognition models provide improved user experience in latency, bandwidth usage, and privacy, because audio data that characterizes the query, which may be high-dimensional and sensitive, can now be processed locally on the client device without the need to use a cloud-based speech recognition model associated with the cloud-based assistant service to process the query. As used herein, a client device may include any user computing device as well as premises devices of a customer of the cloud-based assistant service.
[0021] Referring to FIG. 1, in some implementations, an exemplary system 100 includes multiple client devices 102 associated with one or more users 10 and communicating with a cloud-based assistant service 120 running on a remote system 111 via a network 104. The client devices 102 may correspond to user computing devices 102Ua-b and edge devices 102E. Each user computing device 102U may include a mobile phone, a computer (laptop or desktop), a tablet, a smart speaker / display, a smart appliance, a smart headphone, a wearable, a vehicle infotainment system, etc., and is equipped with data processing hardware 103 and memory hardware 105. Each user computing device 102U includes or communicates with one or more microphones 106 for capturing vocal utterances from the respective user 10. Each edge device 102E may include any premises device (e.g., router, routing switch, integrated access device, multiplexer, private server, etc.) associated with an enterprise or entity that provides access to the remote system 111 over a network to the user computing devices 102U. The remote system 111 may be a single computer, multiple computers, or a distributed system (e.g., a cloud environment) having scalable / elastic computational resources 112 (e.g., data processing hardware) and / or storage resources 114 (e.g., memory hardware).
[0022] The cloud-based assistant service 120 provides a digital assistant interface to the client device 102 to perform actions specified by the user queries 119 captured by the client device 102. Although the examples herein describe the user queries 119 as spoken utterances captured in streaming audio by the microphone 106 of the client device 102, some of the user queries 119 may also include text queries entered by the respective users into the client device without departing from the scope of the present disclosure. Here, the queries 119 spoken by the user 10 are captured by the client device 102 in streaming audio and may specify actions / operations / tasks to be performed by the cloud-based assistant service 120. In this sense, the user 10 may have a conversational interaction with the cloud-based assistant service 120 running on a remote system to perform computational activities or find answers to questions.
[0023] The cloud-based assistant service 120 generally facilitates receiving audio data 118 captured by the microphone 106 of the user computing device 102U and corresponding to a spoken query 119, adjusting voice processing on the audio data 118, performing semantic interpretation on the audio data 118 to identify a query 119 for performing an action, and performing the action. When the microphone 106 of the device 102 captures an utterance in streaming audio and converts the audio into audio data 118, the audio data 118 corresponding to the user query is transmitted over the network 104 to the cloud-based assistant service 120 for performing speech recognition and semantic interpretation to identify and ultimately perform the query 119 conveyed in the spoken utterance. In the illustrated example, the assistant service 120 executes an automatic speech recognition (ASR) model 122 configured to generate speech recognition results for received audio data 118 characterizing a query 119 spoken by the user 10, a natural language understanding (NLU) model 124 configured to perform semantic interpretation on the speech recognition results to identify the query 119, and a text-to-speech (TTS) model 126 configured to generate a synthetic voice representation from the input text that conveys a response 130 to the query 119 fulfilled by the assistant service 120. The user devices 102U may share a federated analysis that aggregates the audio data 118 and / or the transcriptions characterizing the query 119 such that the audio data 118 and / or the transcriptions are not attributable to any particular user device 102U or user associated therewith.
[0024] In some implementations, a developer 190 creates a cloud-based assistant service 120 to provide a digital assistant interface that interfaces with one or more applications on or accessible to the device 102. An application generally refers to any application configured to run on the device 102. Some types of applications include media applications (e.g., video streaming applications, audio streaming applications, media player applications, media gallery applications, etc.), word processing applications, navigation applications, social media applications, communication applications (e.g., messaging applications, email applications, etc.), financial applications, organizational applications (e.g., address book applications), retail applications, entertainment applications (e.g., news applications, weather applications, sports applications), casting applications, etc. The assistant service 120 may be integrated with these applications to enable the user 10 to control the applications on the device 110 using their voice. For example, the assistant service 120 may provide an application programming interface (API) or any other type of program or application configured to execute the functionality of the application.
[0025] In the illustrated example, a developer 190 creates a cloud-based assistant service 120 for a dental clinic, where the cloud-based assistant service 120 provides an appointment confirmation assistant interface for the dental clinic, where at least some of the users 10, 10a-n correspond to patients of the dental clinic, who use their corresponding client devices 102, 102Ua-Un to access the cloud-based assistant service 120 to schedule dental-related appointments for procedures at the dental clinic. The user computing devices 102U may access the cloud-based assistant service 120 via a corresponding application that the user 10 has downloaded to their device 102U, a general assistant application pre-installed on the device, or a web-based application by entering a uniform resource locator (URL) associated with the dental clinic. In some examples, some of the users 10 correspond to employees / staff of the dental clinic who also access the assistant service 120 to review / confirm appointments confirmed by the patients 10 and / or communicate secure messages with the patients. Thus, the edge device 102E may correspond to a private server / computer at the dental clinic to which employees / staff connect to gain access to the cloud-based assistant service 120.
[0026] Continuing with the example, the first patient 10a speaks (or optionally types) a query 119a, "Schedule a root canal with Dr. Zematol in February," which is captured in the streaming audio by the microphone 106 of the client device 102Ua and converted into corresponding audio data 118, which the client device 102Ua transmits to the cloud-based assistant service 120 over the network 104. Optionally, the edge device 102E may initially receive the audio data 118 and facilitate transmission of the audio data 118 to the assistant service 120. Thus, the cloud-based ASR model 122 performs speech recognition on the audio data 118 to generate a transcription 123, and the NLU model 124 performs semantic interpretation on the transcription 123 to identify the query 119a, and more specifically, the action that the query 119a specifies for the assistant service 120 to perform. Of course, the NLU model 124 may receive text queries 119 entered directly by a user without the need for the ASR model 122. Here, the NLU model 124 identifies a first query 119a indicating that a particular patient 10a would like to know if dentist "Dr. Zematol" has openings in his schedule in February to perform a root canal procedure. The assistant service 120 may thereby access the dentist's schedule, retrieve available appointment slots in February to perform a root canal procedure, and return a response 130 to the patient's 10a's client device 102Ua indicating the appointment slots that Dr. Zematol has in February to perform a root canal procedure. The response 130 may include a text-to-speech response that the client device 102Ua outputs (via the acoustic speaker 108) as a synthesized voice conveying the available appointment slots and prompting the patient 10a to select one of the slots.In this scenario, the TTS model 126 may convert the input text for the response 130 into a synthetic speech representation, which the assistant service 120 may send as a corresponding audio file to the client device 102Ua for audible output via the speaker 108. Additionally or alternatively, the response 130 may include a textual representation displayed graphically on a graphical user interface of the client device 102 that allows the patient 10a to select one of the available appointment slots to confirm the root canal treatment appointment.
[0027] 1 also shows another patient 10n uttering another query 119n, "I need to reschedule my dental appointment with Dr. Zematol for March 23," which is captured in the streaming audio by the microphone 106 of the client device 102Un and converted into corresponding audio data 118, which the client device 102Un transmits to the cloud-based assistant service over the network 104. The cloud-based assistant service 120 similarly executes the cloud-based ASR and NLU models 122, 124 to transcribe the audio data 118 and identify another query 119n indicating that another patient 10n would like to schedule a dental appointment with Dr. Zematol for March 23. In this scenario, the assistant service 120 may cancel the existing appointment that the patient 10n has with Dr. Zematol for March 23 and provide a corresponding response 130 confirming that the appointment has been canceled. The response 130 may further include an available date / time for the patient 10n to select to reschedule the dental examination with the dentist, ie, Dr. Zematol.
[0028] For each received user query 119, the cloud-based assistant service 120 extracts one or more attributes 121 from the user query 119 and logs the user query 119 to one or more of a plurality of category buckets 210 stored on a data storage 170 based on the one or more extracted attributes 121. The data storage 170 may reside on a storage resource (e.g., memory hardware) of the remote system 111. The attributes 121 extracted from the user query 119 may include audio data 118 characterizing the query 119, a transcription 123 of the query 119, a query vertical type identified for the query 119, and / or one or more other properties associated with the query 119. For example, the NLU model 124 may perform a semantic interpretation on the transcription 123 of the query 119 generated by the ASR model 122 to identify a query vertical type for the user query. As a result, logging the user query 119 includes logging the user query 119 into a corresponding one of a plurality of category buckets 210 associated with the query vertical type identified for the user query 119. In this example, the query vertical type attribute 121 extracted from each of the queries 119a, 119n indicates a vertical associated with appointment / scheduling confirmation, and may be more specific to indicate the vertical is associated with scheduling a dentist visit appointment.
[0029] The attributes 121 extracted from each query may further include a device category and / or a device type associated with the client device from which the user query was received. For example, the device category associated with the client device 102Un from which the query 119n was received may include a smart speaker, and the device category associated with the client device 102 from which the first query 119a was received may include a smartphone. Moreover, the attributes 121 may specify a device type indicating the make / model of the client device. For example, the make and model of the type of smartphone that the user 10a used to issue the query 119a may be specified by the device type attribute 121.
[0030] In some examples, the one or more attributes 121 extracted from the query 119 include a language and / or a location associated with the user 10 who spoke the user query 119, where the language and / or location may be extracted from any combination of the audio data 118, the transcription 123, or any identifier indicating the language and / or location of the spoken query 119. In an additional example, the front-end audio processing component and / or the ASR model 122 extracts a background noise level from the audio 118 that includes the user query 119 as one of the query attributes 121.
[0031] The query attributes 121 may further include attributes associated with a TTS response 130 generated by the assistant service after fulfillment of the user query 119. The attributes 121 associated with the TTS response 130 may include at least one of a text input conveying the response 130 to be converted by the TTS model 126 into a corresponding synthetic speech representation, an audio file of the synthetic speech representation, or TTS modeling parameters, such as prosodic / style features, language or voice characteristics, on which the TTS model 126 was conditioned to generate the synthetic speech representation.
[0032] When an incoming user query 119 is logged into a corresponding category bucket 210, the assistant service 120 maintains a query categorization log 312 that includes several queries 119 logged into each of the category buckets 210. A distilled model generation process 300 analyzes the query categorization log 312 to identify patterns / similarities among the user queries 119 in order to opportunistically generate one or more distilled assistant models 350 for execution on one or more target client devices of the plurality of client devices 102. In some examples, the distilled model generation process 300 continuously analyzes the query categorization log 312 as the log 312 dynamically updates based on attributes 121 extracted from the query whenever a new query 119 is logged into one or more category buckets 210. In other examples, the process 300 analyzes the query categorization log 312 periodically (e.g., hourly, daily, weekly, etc.).
[0033] Implementations herein are directed to a distilled model generation process 300 that examines the query categorization log 312 to determine when at least one of the multiple category buckets 210 includes a threshold number of user queries 119 logged in at least one category bucket 210. When at least one of the multiple category buckets 210 includes a threshold number of user queries 119, the distilled model generation process 300 may generate one or more distilled models 350 for the cloud-based assistant service 120. For example, the process 300 may generate a distilled ASR model 350 trained to recognize common terms / phrases associated with a query vertical type (e.g., make appointment) and / or vocabulary (e.g., dentist terms) and proper nouns (e.g., Dr. Zematol) associated with a customer of the assistant service (e.g., dental clinic). Although a threshold number of user queries 119 is used as a condition, other metrics may be used, such as a threshold number of queries or a portion of queries over a specified time window. In some examples, process 300 may generate multiple distilled ASR models 350, each having a respective model configuration that satisfies memory and / or processing constraints for a device category and / or device type associated with a target client device 102 on which the distilled model 350 will run. For example, process 300 may generate a first distilled ASR model 350 having a first model configuration for a target client device that includes a smartphone and generate a second distilled ASR model 350 having a different second model configuration for a target client device that includes a smart speaker.
[0034] In some scenarios, the distillation model generation process 300 sends a distillation request 332 to the developer 190 requesting approval from the developer 190 before generating the distillation assistant model 350. In other scenarios, the process 300 sends a distillation request 332 to the developer 190 after generating the distillation assistant model 350, whereby the distillation request 332 prompts the developer 190 of the cloud-based assistant service 120 to accept the generated distillation assistant model 350 for execution on one or more target client devices 102. Here, the developer 190 may return a distillation approval 334 indicating that the developer accepts the generated distillation assistant model 350 for execution on the target client device 102 specified in the distillation request 332. By the same concept, the developer 190 may refuse to deploy the generated distillation assistant model 350 for execution on the target device.
[0035] In a scenario when the distilled assistant model 350 includes a distilled ASR model, each target client device 102 may perform speech recognition on audio data characterizing a query spoken by a respective user 10 of the client device 102 without the need to transmit the audio data over the network 104 for processing by the cloud-based ASR model 122. In addition to improving latency and reducing bandwidth, executing the distilled ASR model 350 on each of the target client devices 102 also preserves user privacy since potentially sensitive audio recordings of the user 10 are not transmitted over the network 104 and shared with the cloud-based assistant service 120. The distilled NLU and TTS models may be generated and deployed for execution on the target client device 102 so that the cloud-based assistant service 120 may not need to execute the cloud-based ASR, NLU, and / or TTS models 122, 124, 126 to process user queries. In some scenarios, when the distilled model 350 running on the target client device is unable to process an incoming user query, the target client device 102 may hand off the query 119 (i.e., send the audio data 118 and / or transcription 123 of the user query) to the cloud-based assistant service 120, which may be running much larger cloud-based models 122, 124, 126 to process the query 119.
[0036] In some examples, after deploying the generated distilled model 350 for execution on each of one or more target devices 102, the cloud-based assistant service 120 receives from each target client device 102 that executes the distilled assistant model 350 a federated analysis indicating attributes associated with the new queries 119 processed by the distilled assistant model 350 executing on the corresponding target client device 102. Here, the federated analysis may indicate attributes extracted from the new queries 119 that are the same as the attributes 121 extracted from the queries 119 as described above. However, the federated analysis received from each target device aggregates the audio data and transcriptions characterizing any of the new queries processed by the distilled model such that the audio data and transcriptions are not attributable to any particular user associated with the target device. Assistant service 120 may now log the incoming query into one or more of the plurality of category buckets 210 based on the federated analysis, and distilled model generation process 300 may analyze query categorization log 312 to determine when at least another one of the plurality of category buckets 210 contains a threshold number of user queries and new user queries. As previously described, distilled model generation process 300 may generate another distilled model 350 of cloud-based assistant service 120 for execution on one or more target client devices of the plurality of client devices 102.
[0037] The cloud-based assistant service 120 may additionally or alternatively use the federated analysis received from the target client devices to generate an updated distilled model by updating parameters of the distilled model, where the federated analysis may further include performance metrics for the distilled assistant model during execution of the target client device 102. In these scenarios, the cloud-based assistant service 120 may collect the federated analysis shared by each target client device and determine when the distilled model can be updated / improved. Thus, the assistant service 120 may deploy the updated distilled model for execution on each of the one or more target client devices. In some examples, the assistant service 120 sends the parameter updates to each of the target client devices, and the target client device 102 locally generates the updated distilled model by using the parameter updates to update parameters of the distilled model executing thereon.
[0038] 2 illustrates a schematic diagram of logging an example query 119 into one or more category buckets 210, 210a-n based on one or more query attributes 121 extracted from the query 119. The category buckets 210 may be pre-populated, defined by a developer 190, dynamically generated by the assistant service 120 based on patterns observed when an incoming user query is received, or some combination thereof. As described above, the one or more query attributes extracted from the user query 119 may include at least one of the following possible attribute types: a device category and / or device type associated with the client device 102 from which the query was received, a query vertical type identified for the user query, a language and / or location associated with the user who spoke the user query, a background noise level in the audio data 118 including the user query 119, a TTS response 130 generated by the cloud-based assistant service 120 following fulfillment of the user query 119, the audio data 118 characterizing the user query, or a transcription 123 of the user query.
[0039] Each category bucket 210 in the plurality of category buckets 210a-n not only represents a respective category of different possible attribute types that can be extracted from a user query, but also represents a particular classification within each category. For example, a first group of category buckets 210 shown along the top row of FIG. 2 includes category buckets 210 that represent different device categories, such as, but not limited to, smartphones, smart speakers, smart watches, edge devices, smart headphones (not shown), or vehicle infotainment devices (not shown). Furthermore, some of the category buckets 210 in this group are associated with a particular device type that represents different makes / models of smartphones (e.g., Phone A through Phone N) that are all separated into the same device category (e.g., smartphones), thereby providing a finer classification for logging user queries 119 received by the cloud-based assistant service 120. Moreover, a particular device type may further classify a particular operating system or version of the operating system. Each device category may be associated with different constraints on available computational / memory resources. Similarly, particular device types within a given device category may have different constraints with respect to disk space, memory, and / or processing capacity. As described in more detail below, generating the distillation assistant model 350 for execution on a target client device involves selecting a model configuration for the distillation assistant model 350 (i.e., model architecture, number of weights / parameters assigned to the model, etc.) based on the memory and / or processing constraints of the client target device.
[0040] Continuing to refer to FIG. 2, a second group of category buckets 210, shown along the second row from the top of FIG. 2, includes category buckets 210 associated with different query vertical types. For example, the category buckets 210 in this second group may include buckets for logging user queries directed to the assistant service 120 that are media-related (e.g., "Assistant, stream my music playlist" or "Assistant, pause the movie"), as well as other buckets for logging user queries that are fitness-related and for logging user queries related to scheduling. Some category buckets representing different query vertical types are non-limiting and may include buckets associated with query vertical types related to navigation (e.g., "navigate to Uncle John's house in Sebastopol, California"), word processing, messaging (e.g., "send a message to Mom that I'm going to be late"), and shopping (e.g., "reorder cold brew coffee for delivery"), to name a few. The developer 190 may further create additional custom category buckets based on custom query vertical types defined by the developer that may be of particular interest to the developer 190 for logging incoming user queries. By the same concept, the assistant service 120 may dynamically create custom query vertical types on the fly. For example, while logging queries to category buckets related to scheduling / appointment confirmation of query vertical types, the assistant service 120 may observe that the transcriptions 123 in most of these queries contain dental terms as well as rare proper nouns (e.g., the name "Dr. Zematol"). In fact, the assistant service 120 may simply run the transcriptions 123 for all queries 119 through a language model to ascertain the frequency of terms / proper nouns and identify certain terms / phrases / proper nouns that are unique to the assistant service 120 that are frequent.Thus, the assistant service 120 may dynamically create one or more custom category buckets associated with learned query vertical types and / or terms unique to the assistant service 120.
[0041] 2, includes category buckets 210 that represent different languages and / or accents associated with a user who has spoken an incoming user query 119 directed to the cloud-based assistant service. For example, the third group may include category buckets for different languages A-N, as well as different accents / dialects within each of the different languages. For example, the third group may include multiple category buckets 210 that represent language A corresponding to English, whereby each category bucket 210 represents a particular accent / dialect of English (e.g., American English, American English with a Southern accent, British English, British English with a Manchester accent, etc.).
[0042] A fourth group of category buckets 210 depicted along the bottom row of FIG. 2 includes category buckets 210 representing different background noise levels in audio data 118 including user queries 119. For example, this fourth group of category buckets 210 may include three buckets for classifying background noise levels in an incoming query as low, medium, or high. That is, a category bucket representing a low background noise level may include any user query 119 having audio data with a background noise level below a minimum noise level threshold, and a category bucket representing a high background noise level may include any user query 119 having audio data with a background noise level above a maximum noise level threshold, where the maximum noise level threshold is greater than the minimum noise level threshold. Similarly, a category bucket representing a medium background noise level may include any user query 119 having audio data with a background noise level above a minimum noise level threshold and below a maximum noise level threshold. There may be more / less than three category buckets to represent different ranges of background noise levels.
[0043] 2 illustrates a user query 119 received by a cloud-based assistant service 120 with query attributes 121 extracted from the query, including audio data 118, a transcription 123 generated by a cloud-based ASR model 122, a device type indicator indicating the make / model of the client device from which the query 119 was received, a language / accent identifier indicating the language and / or accent associated with the user who spoke the user query (e.g., British English), a query type vertical indicator indicating the query vertical type (e.g., Scheduling Vertical), and a noise level indicator indicating the background noise level (e.g., in decibels (Db)) of the audio data 118 including the user query 119 captured by the client device 102. Based on the extracted query attributes 121, the assistant service 120 logs the user query 119 into a number of category buckets 210, each of which represents a particular classification within a respective category among the different attribute types extracted from the user query 119. For example, a query 119 is logged in each of the following category buckets: a category bucket representing a device type of Phone A, a category bucket representing a query vertical type related to scheduling / appointment confirmation, a category bucket representing a language A / accent N associated with British English speakers, and a category bucket representing a medium background noise level. Note that the category bucket representing a device type of Phone A also represents a device category of smartphone, and the category bucket representing British English also represents English queries broadly. Solid rectangles within each category bucket 210 may indicate logged queries 119, and dashed rectangles may indicate available slots for logging queries. A bucket with all solid rectangles may indicate that the category bucket contains a threshold number of queries 119.
[0044] 3 illustrates an example of the distilled model generation process 300 of FIG. 1 for generating one or more distilled assistant models 350 for execution on one or more target client devices 102. The process 300 includes a distilled model candidate identification phase (“candidate identification phase”) 310, a distilled model training phase (“training phase”) 320, and an evaluation phase 330.
[0045] During the identification phase 310, the process 300 receives from the data storage 170 a query categorization log 312 indicating the number of user queries 119 received by the assistant service 120 that are logged in each corresponding category bucket among the plurality of category buckets 210. For example, FIG. 3 illustrates the query categorization log 312 with a query count indicator 313 for each category bucket indicating the number of queries 119 logged in the corresponding category bucket 210. The process 300 analyzes / examines the query categorization log 312 to determine when at least one of the plurality of category buckets 210 includes a threshold number of user queries 119 logged in the corresponding at least one category bucket 210. A fully shaded query count indicator 313 indicates that a threshold number of queries have been logged in the corresponding category bucket 210, and a query count indicator 313 with no shading at all indicates that zero queries have been logged in the corresponding category bucket 210. In the illustrated example, the query categorization log 312 indicates that the category bucket 210 representing device type N, the query vertical type related to scheduling / booking confirmation, and the spoken query language A each contain a threshold number of queries, as indicated by the fully shaded query count indicator 313. Of note, the completely unshaded query count indicator 313 for the category bucket 210 representing the media query vertical type and language N reveals that none of the user queries 119 received at the cloud-based assistant service were spoken in language N or contained media-related queries.
[0046] Based on the process 300 determining that the category buckets 210 representing the device type N, the scheduling / appointment related query vertical type, and the spoken query language A each contain a threshold number of queries 119, the distilled model candidate identification stage 310 identifies one or more distilled assistant model candidates 315, 315a-n for the cloud-based assistant service 120. The distilled assistant model candidates 315 identified during the identification stage 310 may include one or more distilled ASR model candidates, one or more NLU model candidates, one or more TTS model candidates, or any combination of any other types of models or components used by the cloud-based assistant process in the query processing pipeline. For example, other types of models / components that can be distilled to the target device may include language models and / or speech processing models for processing background noise levels and / or noise cancellation.
[0047] The identification stage 310 may identify multiple distillation assistant model candidates associated with the same type of model (e.g., ASR model), where each candidate is adapted for use in a respective set of target devices associated with a respective device category or particular device type. Optionally, multiple candidates associated with the same type of model and intended for use in the same set of target devices may be identified and ultimately evaluated to select a top candidate for distillation to the target client device. Thus, the identification stage may select a respective model configuration for each distillation assistant model candidate 315 that satisfies the memory and / or processing constraints of each of one or more target client devices intended to run the distillation model candidate 315. For example, the identification stage 310 may obtain (e.g., look up) the memory and / or processing constraints for device type N and select a model configuration for the distillation assistant model candidate 315 intended to run on device type N. Here, selecting a model configuration may include assigning a number of model weights to the corresponding model candidate 315 based on the available memory of the device type N and / or assigning a number of operations that can be performed by the corresponding model candidate 315 based on the processing capacity of the device type N. Additionally or alternatively, selecting a model configuration for a model candidate 315 to be distilled to a target device may include assigning model weights and / or operation constraints based on a lowest common denominator for available memory and / or processing constraints for the target device.
[0048] During the training phase 320, the distilled model generation process 300 generates a corresponding distilled assistant model 350 for each distilled assistant model candidate 315 identified during the identification phase 310. In some implementations, for each distilled assistant model candidate 315, the process 300 obtains a set of training queries 325 having query attributes 121 associated with one or more of the category buckets 210 that contain a threshold number of queries 119. For example, when the distilled assistant model candidates 315 include a distilled ASR model candidate adapted to recognize terms / phrases related to scheduling / appointment and spoken in language A, the training phase 320 may issue a data retrieval request 332 to retrieve a set of training queries 325 stored on the data storage 170 that are spoken in language A and belong to a query vertical type related to scheduling / appointment reservation. Here, at least a portion of the training queries in the set of training queries 325 may include previous user queries selected from among the threshold number of user queries logged in each of the category buckets 210 representing the scheduling / appointment-making related query vertical type and queries spoken in language A. At least a portion of the training queries in the set of training queries 325 may additionally or alternatively include new queries received at the cloud-based assistant service 120 having query attributes 121 associated with one or more of the category buckets 210 that include the threshold number of queries 119. By way of example, and continuing with this example, the training stage 320 may obtain at least a portion of the training queries in the set of training queries 325 by filtering out new queries 119 that belong to the scheduling / appointment-making related query vertical type and that were spoken in language A. Further, at least a portion of the training queries obtained in the set of training queries 325 may be selected from an offline data sample stored on data storage 170 having attributes 121 associated with one or more of the category buckets 210 that contain a threshold number of queries 119.
[0049] Each training query in the set of training queries 325 may include corresponding audio data that characterizes the training query spoken by the respective user. Each training query 325 associated with a previous query 119 processed by the assistant service may be paired with a corresponding transcription 123 generated by the cloud-based ASR model 122 of the assistant service 120. Thus, the training stage 320 may use the cloud-based ASR model 122 as a teacher model to generate corresponding training labels (i.e., ground truth transcriptions) for each sample of audio data that characterizes a training query in the set of training queries. Similarly, each training query 325 associated with a previous query 119 processed by the assistant service may be paired with a corresponding TTS response 130 that includes at least one of input text to the cloud-based TTS model 126 or a synthetic speech representation generated by the cloud-based TTS model 126.
[0050] Once the set of training queries and corresponding training labels are obtained / generated, the training stage 320 trains the corresponding distilled assistant model 350 with the set of training queries and the corresponding training labels generated for the training queries in the set of training queries. The training may include training for a specific amount of time, training with a specified number of training steps, training with a specified number of training queries in the set of training queries, and / or until the training loss for training the model stabilizes. It should be noted that in an example where the distilled assistant model 350 includes a distilled ASR model, the distilled ASR model may include a drastic reduction in size and processing requirements compared to the corresponding cloud-based ASR model 322 because the distilled ASR model 350 is customized to recognize queries spoken in language A and include terms / phrases related to scheduling / booking. The cloud-based ASR model may include a very large multi-language model trained to recognize speech in many different languages and across many different query vertical types. However, because the query categorization log 312 identifies a threshold number of queries that share common attributes 121, the distilled ASR model may be trained as a reduced size custom model with configuration and parameters suitable for processing queries with a limited set of attributes. The training phase 320 repeats these steps to train and generate a corresponding distilled assistant model candidate for each distilled assistant model candidate 315 identified during the identification phase 310.
[0051] After training phase 320 generates and trains each distilled assistant model 350, evaluation phase 330 may evaluate each distilled assistant model 350 with respect to a corresponding teacher model 380. In some examples, teacher model 380 includes a corresponding cloud-based model of the cloud-based assistant service 120 associated with the distilled assistant model 350. For example, for any distilled assistant model 350 that includes a distilled ASR model, evaluation phase 330 uses cloud-based ASR model 122 of the assistant service 120 as the teacher model 380 for evaluating each of the distilled ASR models.
[0052] In some implementations, the evaluation stage 330 determines whether the accuracy of the generated distilled assistant model 350 for the evaluation dataset 335 is within a threshold range of the accuracy of the corresponding teacher model 380 for the evaluation dataset 335. In these implementations, the evaluation stage prompts the developer 190 of the cloud-based assistant service 120 to accept the generated distilled assistant model 350 for execution on one or more target client devices 102 when the accuracy of the generated distilled model 350 for the evaluation dataset is within a threshold range of the accuracy of the corresponding teacher model 350. In some examples, the evaluation set 335 includes audio data characterizing a live set of incoming queries, and the distilled assistant and teacher models 350, 380 correspond to ASR models. In these examples, the word error rate (WER) of the speech recognition results output by the models 350, 380 for the incoming queries may be used as a metric to indicate the accuracy / performance of each of the models 350, 380. Other metrics may be used to indicate the accuracy / performance of the models 350, 380.
[0053] The evaluation stage 330 may prompt the developer 190 to accept the generated distilled assistant model 350 by sending a distillation request 332 to the developer 190. In some examples, the distillation request 332 includes a message describing the characteristics of the distilled assistant model 350, the target device 102 on which the distilled assistant model 350 is intended to run, and / or the evaluation results of the distilled assistant model. For example, the distillation request 332 sent to the developer 190 includes a message saying, "There is a distilled model available that can run on device X. It is within 1% accuracy of the cloud-based model, but it reduces latency and improves privacy." As shown in FIG. 1, the developer 190 may return a distillation acceptance 334 indicating that the developer accepts the generated distilled assistant model 350 for execution on the target client device 102 specified by the distillation request 332. By the same concept, the developer 190 may refuse to deploy the generated distilled assistant model 350 for execution on the target device.
[0054] A software application (i.e., a software resource) may refer to computer software that causes a computing device to perform a task. In some examples, a software application may be referred to as an "application," an "app," or a "program." Exemplary applications include, but are not limited to, system diagnostic applications, system management applications, system maintenance applications, word processing applications, spreadsheet applications, messaging applications, media streaming applications, social networking applications, and gaming applications.
[0055] Non-transitory memory may be a physical device used to temporarily or permanently store programs (e.g., sequences of instructions) or data (e.g., program state information) for use by a computing device. Non-transitory memory may be volatile and / or non-volatile addressable semiconductor memory. Examples of non-volatile memory include, but are not limited to, flash memory and read-only memory (ROM) / programmable read-only memory (PROM) / erasable programmable read-only memory (EPROM) / electronically erasable programmable read-only memory (EEPROM) (e.g., typically used for firmware such as boot programs). Examples of volatile memory include, but are not limited to, random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), phase change memory (PCM), and disk or tape.
[0056] 4 is a flowchart of an example sequence of operations for a method 400 of distilling an assistant model 350 to a client device 102 based on a user query 119 directed to a cloud-based assistant service 120 executing on the data processing hardware 112 of the remote system 111. The method 400 may include a computer-implemented method executing on the data processing hardware 112 of the remote system 111 to cause the data processing hardware 112 to perform operations. At operation 402, the method 400 includes receiving user queries 119 directed to the cloud-based assistant service 120 from a plurality of client devices 102, each associated with a respective user. At operation 404, for each received user query 119 directed to the cloud-based assistant service 120, the method 400 also includes extracting one or more attributes 121 from the user query 119 and logging the user query 119 into one or more of a plurality of category buckets 210 based on the one or more attributes 121 extracted from the user query 119.
[0057] At operation 406, method 400 also includes determining when at least one of the plurality of category buckets 210 includes a threshold number of user queries logged in the at least one category bucket 210. At operation 408, when at least one of the plurality of category buckets 210 includes the threshold number of user queries, method 400 also includes generating a distilled model 350 of cloud-based assistant service 120, where distilled model 350 of cloud-based assistant service 120 is configured to run on one or more target client devices 102 of the plurality of client devices 102.
[0058] 5 is a schematic diagram of an exemplary computing device 500 that can be used to implement the systems and methods described herein. Computing device 500 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The components shown, their connections and relationships, and their functions are intended to be exemplary only and are not intended to limit the implementation of the invention described and / or claimed herein.
[0059] Computing device 500 includes a processor 510, a memory 520, a storage device 530, a high-speed interface / controller 540 that connects to memory 520 and high-speed expansion port 550, and a low-speed interface / controller 560 that connects to low-speed bus 570 and storage device 530. Each of components 510, 520, 530, 540, 550, and 560 are interconnected using various buses and may be mounted on a common motherboard or in other manners as desired. Processor 510 can process instructions for execution within computing device 500, including instructions stored in memory 520 or on storage device 530 for displaying graphical information for a graphical user interface (GUI) on an external input / output device, such as a display 580 coupled to high-speed interface 540. In other implementations, multiple processors and / or multiple buses may be used along with multiple memories and multiple types of memories as desired. Also, multiple computing devices 500 may be connected, each providing a portion of the required operations (eg, as a bank of servers, a group of blade servers, or a multi-processor system).
[0060] The memory 520 stores information non-transiently within the computing device 500. The memory 520 may be a computer-readable medium, a volatile memory unit, or a non-volatile memory unit. The non-transient memory 520 may be a physical device used to temporarily or permanently store programs (e.g., sequences of instructions) or data (e.g., program state information) for use by the computing device 500. Examples of non-volatile memory include, but are not limited to, flash memory and read-only memory (ROM) / programmable read-only memory (PROM) / erasable programmable read-only memory (EPROM) / electronically erasable programmable read-only memory (EEPROM) (e.g., typically used for firmware such as boot programs). Examples of volatile memory include, but are not limited to, random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), phase change memory (PCM), as well as disks or tapes.
[0061] The storage device 530 is capable of providing mass storage to the computing device 500. In some implementations, the storage device 530 is a computer-readable medium. In various different implementations, the storage device 530 may be a floppy disk device, a hard disk device, an optical disk device, or a tape device, a flash memory or other similar solid-state memory device, or an array of devices including devices in a storage area network or other configuration. In additional embodiments, the computer program product is tangibly embodied in an information carrier. The computer program product includes instructions that, when executed, perform one or more methods, such as those described above. The information carrier is a computer-readable medium or a machine-readable medium, such as the memory 520, the storage device 530, or a memory on the processor 510.
[0062] The high-speed controller 540 manages bandwidth-intensive operations for the computing device 500, and the low-speed controller 560 manages less bandwidth-intensive operations. Such allocation of duties is merely exemplary. In some implementations, the high-speed controller 540 is coupled to the memory 520, the display 580 (e.g., through a graphics processor or accelerator), and a high-speed expansion port 550 that can accept various expansion cards (not shown). In some implementations, the low-speed controller 560 is coupled to the storage device 530 and the low-speed expansion port 590. The low-speed expansion port 590 may include various communication ports (e.g., USB, Bluetooth, Ethernet, wireless Ethernet), but may also be coupled to one or more input / output devices, such as a keyboard, pointing device, scanner, or a network device, such as a switch or router, for example, through a network adapter.
[0063] The computing device 500 may be implemented in a number of different ways, as shown in the figure. For example, the computing device 500 may be implemented as a standard server 500a, or multiple times in a group of such servers 500a, or as a laptop computer 500b, or as part of a rack server system 500c.
[0064] Various implementations of the systems and techniques described herein may be realized in digital electronic and / or optical circuitry, integrated circuitry, specially designed ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementation in one or more computer programs executable and / or translatable on a programmable system that includes at least one programmable processor, which may be special or general purpose coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0065] These computer programs (also known as programs, software, software applications or codes) include machine instructions for a programmable processor and may be implemented in a high-level procedural and / or object-oriented programming language and / or in an assembly / machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, non-transitory computer-readable medium, apparatus and / or device (e.g., magnetic disk, optical disk, memory, programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processor including a machine-readable medium that receives the machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.
[0066] The processes and logic flows described herein can be implemented by one or more programmable processors, also referred to as data processing hardware, which execute one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be implemented by special purpose logic circuitry, for example, FPGAs (field programmable gate arrays) or ASICs (application specific integrated circuits). Processors suitable for executing computer programs include, by way of example, both general purpose and special purpose microprocessors, as well as any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a processor for executing instructions, and one or more memory devices for storing instructions and data. Generally, a computer also includes one or more mass storage devices, for example, magnetic, magneto-optical, or optical disks, for storing data, or is operatively coupled to a mass storage device to receive data from or transfer data to the mass storage device, or both. However, a computer need not have such devices. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including, by way of example, semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices, magnetic disks, e.g., internal hard disks or removable disks, magneto-optical disks, and CD-ROM and DVD-ROM disks. The processor and the memory may be supplemented by, or incorporated in, special purpose logic circuitry.
[0067] To enable interaction with a user, one or more aspects of the present disclosure can be implemented on a computer having a display device, e.g., a CRT (cathode ray tube), LCD (liquid crystal display) monitor, or touch screen, for displaying information to the user, and optionally a keyboard and pointing device, e.g., a mouse or trackball, for allowing the user to provide input to the computer. Other types of devices can also be used to provide interaction with the user, e.g., feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback, and input from the user can be received in any form, including acoustic, speech, or tactile input. Additionally, the computer can interact with the user by sending documents to and receiving documents from a device used by the user, e.g., by sending a web page to a web browser on the user's client device in response to a request received from the web browser.
[0068] Although several implementations have been described, it will be understood that various modifications can be made without departing from the spirit and scope of the disclosure. Accordingly, other implementations are within the scope of the following claims. [Explanation of symbols]
[0069] 100 Systems 102 Client Device, Device 102E Edge Device 102U User Computing Device, User Device, Client Device, Device 103 Data Processing Hardware 104 Network 105 Memory Hardware 106 Microphones 108 Acoustic Speaker 111 Remote System 112 Computational Resources 114 Memory Resources 120 Cloud-based assistant service, assistant service 122 Speech Recognition (ASR) Model, Cloud-Based Model 124 Natural Language Understanding (NLU) models, cloud-based models 126 Text-to-Speech (TTS) Models, Cloud-Based Models 170 Data Storage 312 Query Categorization Log 350 Distillation Assistant Model, Distillation Model, Distillation ASR Model 380 Teacher Model 500 computing devices 500a Server 500b Laptop Computer 500c Rack Server System 510 Processor, components 520 Memory, components 530 Storage devices, components 540 High Speed Interface / Controller, Components 550 High Speed Expansion Port, Components 560 Low-speed interface / controller, components 570 Slow Bus 580 Display 590 Low Speed Expansion Port
Claims
1. A computer-implemented method (400) that, when executed on data processing hardware, causes the data processing hardware (112) to perform operations, the operations including: receiving user queries (119) from a plurality of client devices (102), each associated with a respective user, directed to a cloud-based assistant service (120) executing on the data processing hardware (112); For each received user query (119) directed to the cloud-based assistant service (120), extracting one or more attributes (121) from said user query (119); logging the user query (119) into one or more of a plurality of category buckets (210) based on the one or more attributes (121) extracted from the user query (119); determining when at least one of the plurality of category buckets (210) contains a threshold number of the user queries (119) logged in the at least one category bucket (210); generating a distilled model (350) of the cloud-based assistant service (120) when the at least one of the plurality of category buckets (210) includes the threshold number of the user queries (119), the distilled model (350) of the cloud-based assistant service (120) configured to execute on one or more target client devices (102) of the plurality of client devices (102).
2. The one or more attributes (121) extracted from the user query (119) include: a device category and / or device type associated with the client device (102) from which the user query (119) was received; a query vertical type identified for the user query (119); a language and / or location associated with the user who spoke the user query (119); the background noise level in the audio data (118) including said user query (119); a text-to-speech response generated by the cloud-based assistant service (120) following fulfillment of the user query (119); or 2. The computer-implemented method of claim 1, further comprising at least one of: a transcription of the user query.
3. The operations include, for each received user query (119) directed to the cloud-based assistant service (120): processing audio data (118) characterizing the user query (119) to generate a transcription (123) of the user query (119) using an automatic speech recognition (ASR) model (122) of the cloud-based assistant service (120); extracting the one or more attributes (121) from the user query (119) includes performing a query interpretation on the transcription (123) of the user query (119) to identify a query vertical type for the user query (119); 3. The computer-implemented method of claim 1, wherein logging the user query includes logging the user query to a corresponding one of the plurality of category buckets associated with the query vertical type identified for the user query.
4. The operation includes: Prompting a developer (190) of the cloud-based assistant service (120) to accept the generated distilled model (350) for execution on the one or more target client devices (102); 4. The computer-implemented method (400) of claim 1, further comprising, when the developer (190) accepts the generated distilled model (350), deploying the distilled model (350) to the one or more of the target client devices (102).
5. The operation includes: determining whether the accuracy of the generated distilled model (350) for an evaluation data set (335) is within a threshold range of accuracy of a teacher model (380) for the evaluation data set (335); 5. The computer-implemented method of claim 4, wherein prompting the developer of the cloud-based assistant service includes prompting the developer of the cloud-based assistant service when the accuracy of the generated distilled model for the evaluation dataset is within the threshold range of the accuracy of the teacher model for the evaluation dataset.
6. 6. The computer-implemented method (400) of claim 1, wherein generating the distilled model (350) of the cloud-based assistant service (120) includes selecting a model configuration (315) for the distilled model (350) that satisfies memory and / or processing constraints of each of the one or more target client devices (102).
7. Generating the distilled model (350) of the cloud-based assistant service (120) includes: obtaining a set of training queries (325) having attributes (121) associated with the at least one of the plurality of category buckets (210) that includes the threshold number of the user queries (119); generating corresponding training labels for the training queries (325) in the set of training queries (325) using a teacher model (380) of the cloud-based assistant service (120); training the distillation model (350) with the set of training queries (325) and the corresponding training labels generated for the training queries (325) in the set of training queries (325).
8. 8. The computer-implemented method of claim 7, wherein at least a portion of the training queries in the set of training queries comprises previous user queries selected from among the threshold number of the user queries logged in each of the at least one of the plurality of category buckets.
9. 9. The computer-implemented method of claim 7 or 8, wherein at least a portion of the training queries in the set of training queries includes new queries having the attribute associated with the at least one of the plurality of category buckets that includes the threshold number of the user queries.
10. 10. The computer-implemented method of claim 7, wherein at least a portion of the training queries in the set of training queries are selected from an offline data sample having the attributes associated with the at least one of the plurality of category buckets that includes the threshold number of the user queries.
11. The operations include, after deploying the generated distillation model (350) for execution on each of the one or more target devices (102), receiving, from each target client device (102) executing the distillation model (350), a federated analysis indicating attributes (121) associated with incoming queries processed by the distillation model (350) executing on a corresponding target client device (102); logging the incoming query into one or more of the plurality of category buckets (210) based on the federated analysis; determining when at least another one of the plurality of category buckets (210) contains a threshold number of the user queries (119) and new user queries (119); 11. The computer-implemented method (400) of claim 1, further comprising: generating another distilled model (350) of the cloud-based assistant service (120) when the at least another one of the plurality of category buckets (210) includes the threshold number of the user queries (119) and the new user query (119), the another distilled model (350) of the cloud-based assistant service (120) configured to execute on one or more target client devices (102) of the plurality of client devices (102).
12. The operations include, after deploying the generated distillation model (350) for execution on each of the one or more target devices (102), receiving, from each target client device (102) executing the distillation model (350), a federated analysis indicating attributes (121) associated with incoming queries processed by the distillation model (350) executing on a corresponding target client device (102); generating an updated distillation model (350) by updating parameters of the distillation model (350) based on the federated analysis received from each target device that executes the distillation model (350); 12. The computer-implemented method (400) of claim 1, further comprising: deploying the updated distillation model (350) for execution on each of the one or more target client devices (102).
13. 13. The computer-implemented method (400) of claim 12, wherein the federated analysis is received from each target client device (102) without receiving audio data (118) characterizing any of the incoming queries processed by the distillation model (350) and without receiving a transcription of the incoming queries processed by the distillation model (350).
14. 14. The computer-implemented method (400) of any one of claims 1 to 13, wherein the distillation model (350) comprises a speech recognition model.
15. 14. The computer-implemented method (400) of any one of claims 1 to 13, wherein the distillation model (350) comprises a text-to-speech model.
16. 14. The computer-implemented method (400) of any one of claims 1 to 13, wherein the distillation model (350) comprises a natural language understanding (NLU) model.
17. Data processing hardware (112); and memory hardware (114) in communication with the data processing hardware (112), storing instructions that, when executed on the data processing hardware (112), cause the data processing hardware (112) to perform operations, the operations including: receiving user queries (119) from a plurality of client devices (102), each associated with a respective user, directed to a cloud-based assistant service (120) executing on the data processing hardware (112); For each received user query (119) directed to the cloud-based assistant service (120), extracting one or more attributes (121) from said user query (119); logging the user query (119) into one or more of a plurality of category buckets (210) based on the one or more attributes (121) extracted from the user query (119); determining when at least one of the plurality of category buckets (210) contains a threshold number of the user queries (119) logged in the at least one category bucket (210); and generating a distilled model (350) of the cloud-based assistant service (120) when the at least one of the plurality of category buckets (210) includes the threshold number of the user queries (119), the distilled model (350) of the cloud-based assistant service (120) being configured to execute on one or more target client devices (102) of the plurality of client devices (102).
18. The one or more attributes (121) extracted from the user query (119) include: a device category and / or device type associated with the client device (102) from which the user query (119) was received; a query vertical type identified for the user query (119); a language and / or location associated with the user who spoke the user query (119); the background noise level in the audio data (118) including said user query (119); a text-to-speech response generated by the cloud-based assistant service (120) following fulfillment of the user query (119); or 20. The system (100) of claim 17, further comprising at least one of a transcription (123) of the user query (119).
19. The operations include, for each received user query (119) directed to the cloud-based assistant service (120): processing audio data (118) characterizing the user query (119) to generate a transcription (123) of the user query (119) using an automatic speech recognition (ASR) model (122) of the cloud-based assistant service (120); extracting the one or more attributes (121) from the user query (119) includes performing a query interpretation on the transcription (123) of the user query (119) to identify a query vertical type for the user query (119); 19. The system (100) of claim 17 or 18, wherein logging the user query (119) includes logging the user query (119) to a corresponding one of the plurality of category buckets (210) associated with the query vertical type identified for the user query (119).
20. The operation includes: Prompting a developer (190) of the cloud-based assistant service (120) to accept the generated distilled model (350) for execution on the one or more target client devices (102); The system (100) of any one of claims 17 to 19, further comprising, when the developer (190) accepts the generated distilled model (350), deploying the distilled model (350) to the one or more of the target client devices (102).
21. The operation includes: determining whether the accuracy of the generated distilled model (350) for an evaluation data set (335) is within a threshold range of accuracy of a teacher model (380) for the evaluation data set (335); 21. The system of claim 20, further comprising: prompting the developer of the cloud-based assistant service when the accuracy of the generated distilled model for the evaluation dataset is within the threshold range of the accuracy of the teacher model for the evaluation dataset.
22. 22. The system (100) of any one of claims 17 to 21, wherein generating the distilled model (350) for the cloud-based assistant service (120) includes selecting a model configuration (315) for the distilled model (350) that satisfies memory and / or processing constraints of each of the one or more target client devices (102).
23. Generating the distilled model (350) of the cloud-based assistant service (120) includes: obtaining a set of training queries (325) having attributes (121) associated with the at least one of the plurality of category buckets (210) that includes the threshold number of the user queries (119); generating corresponding training labels for the training queries (325) in the set of training queries (325) using a teacher model (380) of the cloud-based assistant service (120); and training the distillation model (350) with the set of training queries (325) and the corresponding training labels generated for the training queries (325) in the set of training queries (325).
24. 24. The system (100) of claim 23, wherein at least a portion of the training queries (325) in the set of training queries (325) include previous user queries (119) selected from among the threshold number of the user queries (119) logged in each of the at least one of the plurality of category buckets (210).
25. 25. The system (100) of claim 23 or 24, wherein at least a portion of the training queries (325) in the set of training queries (325) includes a new query having the attribute (121) associated with the at least one of the plurality of category buckets (210) that includes the threshold number of the user queries (119).
26. 26. The system (100) of any one of claims 23 to 25, wherein at least a portion of the training queries (325) in the set of training queries (325) are selected from an offline data sample having the attributes (121) associated with the at least one of the plurality of category buckets (210) that includes the threshold number of the user queries (119).
27. The operations include, after deploying the generated distillation model (350) for execution on each of the one or more target devices (102), receiving, from each target client device (102) executing the distillation model (350), a federated analysis indicating attributes (121) associated with incoming queries processed by the distillation model (350) executing on a corresponding target client device (102); logging the incoming query into one or more of the plurality of category buckets (210) based on the federated analysis; determining when at least another one of the plurality of category buckets (210) contains a threshold number of the user queries (119) and new user queries (119); 27. The system of claim 17, further comprising: generating another distilled model of the cloud-based assistant service when the at least another one of the plurality of category buckets includes the threshold number of the user queries and the new user query, the another distilled model of the cloud-based assistant service being configured to run on one or more target client devices of the plurality of client devices.
28. The operations include, after deploying the generated distillation model (350) for execution on each of the one or more target devices (102), receiving, from each target client device (102) executing the distillation model (350), a federated analysis indicating attributes (121) associated with incoming queries processed by the distillation model (350) executing on a corresponding target client device (102); generating an updated distillation model (350) by updating parameters of the distillation model (350) based on the federated analysis received from each target device that executes the distillation model (350); 28. The system (100) of any one of claims 17 to 27, further comprising: deploying the updated distillation model (350) for execution on each of the one or more target client devices (102).
29. 30. The system (100) of claim 28, wherein the federated analysis is received from each target client device (102) without receiving audio data (118) characterizing any of the incoming queries processed by the distillation model (350) and without receiving a transcription of the incoming queries processed by the distillation model (350).
30. 30. The system (100) of any one of claims 17 to 29, wherein the distilled model (350) comprises a speech recognition model.
31. 30. The system (100) of any one of claims 17 to 29, wherein the distillation model (350) comprises a text-to-speech model.
32. 30. The system (100) of any one of claims 17 to 29, wherein the distilled model (350) comprises a natural language understanding (NLU) model.
Citation Information
Patent Citations
Device and method for collecting utterance data for speech recognition, and computer program
JP2005062398A
On-device machine learning platform
JP2020528589A
Information processing device and information processing method
JP2021163112A
Gradient-Based Adversarial Training of Neural Networks
JP2021523468A
