Distillation to target devices based on observed query patterns
By generating distilled models for client devices based on user query patterns, the method addresses bandwidth and privacy issues in cloud-based voice assistants, enabling local query processing and improved user experience.
Patent Information
- Application Number
- JP2024522377
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-10-13
- Filing Date
- 2021-12-15
- Publication Date
- 2025-08-20
- Estimated Expiration
- 2041-12-15
AI Technical Summary
Cloud-based voice assistant services face issues with network bandwidth consumption, increased latency, and reduced privacy due to the need to transfer audio data from user devices to the cloud for processing.
A method to generate distilled models of voice assistant services that can run on client devices by aggregating user queries, extracting attributes, and deploying optimized models tailored to specific device types and query verticals, allowing local processing of queries.
Improves latency, reduces bandwidth usage, and enhances user privacy by processing queries locally on client devices without transferring sensitive audio data to the cloud.
Smart Images

Figure 0007727104000001 
Figure 0007727104000002 
Figure 0007727104000003
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 voice-enabled assistant interfaces. For example, automatic speech recognition (ASR) models can recognize queries spoken by users, and text-to-speech (TTS) models can generate synthesized speech for output to the user that conveys a response to the spoken query. These assistant services generally run in cloud computing environments, which 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 present 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. Here, the distilled model of the cloud-based assistant service is configured to run 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 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 after fulfillment of the user query, or a transcription of the user query.
[0006] In some implementations, generating a distilled model for the cloud-based assistant service includes selecting a model configuration for the distilled model that satisfies memory and / or processing constraints of each of one or more target client devices. In some additional implementations, generating a distilled model for 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 supervised 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 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 the 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 indicating attributes associated with 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 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, wherein the another 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.
[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 executing the distilled model, a federated analysis indicating attributes associated with the new query 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 executing 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 transcriptions 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. Here, the distilled model of the cloud-based assistant service is configured to run 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 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.
[0011] In some examples, the operations also include, for each received user query directed to the cloud-based assistant service, processing 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 the 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 the user who spoke the user query, a text-to-speech response generated by the cloud-based assistant service after fulfillment of the user query, or a transcription of the user query.
[0012] In some implementations, generating a distilled model for the cloud-based assistant service includes selecting a model configuration for the distilled model that satisfies memory and / or processing constraints of each of one or more target client devices. In some additional implementations, generating a distilled model for 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 supervised 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 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 the 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 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 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 executing the distilled model, a federated analysis indicating attributes associated with the incoming query 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 executing 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 incoming queries processed by the distilled model and without receiving transcriptions of the incoming 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 be apparent from the description and drawings, and from the claims. [Brief explanation 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. [Figure 2] FIG. 1 is a schematic diagram of logging user queries into one or more category buckets based on attributes extracted from the user query. [Figure 3] FIG. 2 is a schematic diagram of an example distilled model generation process for generating one or more distilled 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. [Figure 5] FIG. 1 is a schematic diagram of an exemplary computing device that can be used to implement the systems and methods described herein. DETAILED DESCRIPTION OF THE INVENTION
[0017] Like reference symbols 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 voice-enabled assistant interfaces. For example, automatic speech recognition (ASR) models can recognize queries spoken by users, and text-to-speech (TTS) models can generate synthesized speech for output to the user that conveys a response to the spoken query. These assistant services typically run in cloud computing environments, which 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 aggregates user queries from client devices and can 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 user queries reveal 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 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 substantially all of the queries are fitness-related (e.g., belong to the fitness query vertical type). Thus, a 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 smartwatches, leading to improved latency and privacy for the developer's customers / users.
[0020] Furthermore, multiple distilled speech recognition models may be generated, each with a configuration appropriate for a different client device type (e.g., a specific make / model of 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 offer improved user experiences in latency, bandwidth usage, and privacy because the potentially high-dimensional and sensitive audio data characterizing the query can now be processed locally on the client device to process the query without having to use a cloud-based speech recognition model associated with the cloud-based assistant service. As used herein, client device may include any user computing device as well as on-premises devices of a customer of the cloud-based assistant service.
[0021] 1 , in some implementations, an exemplary system 100 includes multiple client devices 102 associated with one or more users 10 and communicating via a network 104 with a cloud-based assistant service 120 running on a remote system 111. 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, smart headphones, 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, converged access device, multiplexer, private server, etc.) associated with an enterprise or entity that provides user computing devices 102U with access over a network to a remote system 111. 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] Cloud-based assistant service 120 provides a digital assistant interface to client device 102 for performing actions specified by user queries 119 captured by client device 102. While examples herein describe user queries 119 as spoken utterances captured in streaming audio by microphone 106 of client device 102, some of user queries 119 may also include text queries entered by respective users into the client device without departing from the scope of this disclosure. Here, queries 119 spoken by user 10 may be captured in streaming audio by client device 102 and specify an action / operation / task to be performed by cloud-based assistant service 120. In this sense, user 10 may have a conversational interaction with cloud-based assistant service 120 running on a remote system to perform a computational activity or find an answer to a question.
[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 carrying out 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, which performs speech recognition and semantic interpretation to identify and ultimately carry out 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, from input text, a synthesized speech representation conveying a response 130 to the query 119 fulfilled by the assistant service 120. The user devices 102U may share federated analysis that aggregates the audio data 118 and / or transcriptions characterizing the query 119 such that the audio data 118 and / or transcriptions are not attributable to any particular user device 102U or its associated user.
[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 integrate 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 perform 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-setting assistant interface for the dental clinic. Here, 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 and schedule dental-related appointments for procedures at the dental clinic. The user computing devices 102U may access the cloud-based assistant service 120 through a corresponding application downloaded by the user 10 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 set by the patient 10 and / or communicate secure messages with the patient. 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 this 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 over the network 104 to the cloud-based assistant service 120. 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. Accordingly, 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 wants to know whether 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 for performing 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 available in February for performing 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 synthesized voice announcing 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 synthesized 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 text 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 time 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 exam with Dr. Zematol for March 23rd," 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 wants to schedule a dental exam with Dr. Zematol for March 23rd. In this scenario, the assistant service 120 may cancel the patient 10n's existing appointment with Dr. Zematol for March 23rd 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 exam with the dentist, namely 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 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 to 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 that 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 device type associated with the client device from which the user query was received. For example, the device category associated with the client device 102 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. Additionally, 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 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 some 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 the 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 the TTS response 130 generated by the assistant service after fulfilling 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] As incoming user queries 119 are logged into corresponding category buckets 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 among 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 each time 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 a query categorization log 312 to determine when at least one of a plurality of category buckets 210 contains a threshold number of user queries 119 logged in the at least one category bucket 210. When at least one of a plurality of category buckets 210 contains 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., booking an 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, such as a threshold number of queries or a portion of queries over a specified time window, may also be used. 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 that will execute the distilled model 350. 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 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, distilled model generation process 300 sends distillation request 332 to developer 190, requesting approval from developer 190, before generating distilled assistant model 350. In other scenarios, process 300 sends distillation request 332 to developer 190 after generating distilled assistant model 350, whereby distillation request 332 prompts developer 190 of cloud-based assistant service 120 to accept the generated distilled assistant model 350 for execution on one or more target client devices 102. Here, developer 190 may return distillation approval 334 indicating that the developer accepts generated distilled assistant model 350 for execution on the target client devices 102 specified in distillation request 332. By the same concept, developer 190 may refuse to deploy generated distilled assistant model 350 for execution on the target device(s).
[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 having 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, as 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 run 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 executing the distilled assistant model 350 a federated analysis indicating attributes associated with the incoming 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 incoming 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 incoming 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 incoming queries 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 mentioned, 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] Additionally or alternatively, the cloud-based assistant service 120 may use the federated analysis received from the target client devices to generate an updated distilled model by updating the parameters of the distilled model. Here, the federated analysis may further include performance metrics for the distilled assistant model during execution on 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. Accordingly, the assistant service 120 may deploy the updated distilled model for execution on each of 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 the parameters of the distilled model running thereon.
[0038] 2 shows 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 incoming user queries are 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 after fulfilling the user query 119; audio data 118 characterizing the user query; or a transcription 123 of the user query.
[0039] Each category bucket 210 among 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 specific classification within each category. For example, the first group of category buckets 210 shown along the top row of FIG. 2 includes category buckets 210 representing 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 specific device types that represent different makes / models of smartphones (e.g., Phone A through Phone N) that all fall into the same device category (e.g., smartphones), thereby providing a more granular classification for logging user queries 119 received by the cloud-based assistant service 120. Furthermore, specific device types may further classify specific operating systems or operating system versions. 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 distillation assistant model 350 for execution on a target client device involves selecting a model configuration (i.e., model architecture, number of weights / parameters assigned to the model, etc.) for distillation assistant model 350 based on the memory and / or processing constraints of the client target device.
[0040] Continuing with reference 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 saying I'll 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 developer-defined custom query vertical types 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 the query vertical type, the assistant service 120 may observe that the transcriptions 123 for 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 can simply run the transcriptions 123 for all queries 119 through a language model to ascertain the frequency of terms / proper nouns and identify specific terms / phrases / proper nouns that are frequent and unique to the assistant service 120.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 and 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 the background noise level 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 or 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 (e.g., British English) indicating the language and / or accent associated with the user who spoke the user query, a query type vertical indicator (e.g., Scheduling Vertical) indicating the query vertical type, 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 multiple category buckets 210, each bucket representing a specific 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 Language A / Accent N associated with British English speakers; and a category bucket representing medium background noise levels. Note that the category bucket representing a device type of Phone A also represents a device category of smartphones, 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 shows the query categorization log 312 with a query count indicator 313 for each category bucket that indicates 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 the 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, and the spoken query language A each contain a threshold number of queries, as indicated by the fully shaded query count indicator 313. Notably, 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 process 300 determining that category buckets 210 representing device type N, scheduling / appointment-related query vertical type, and spoken query language A each contain a threshold number of queries 119, distilled model candidate identification stage 310 identifies one or more distilled assistant model candidates 315, 315a-n for cloud-based assistant service 120. The distilled assistant model candidates 315 identified during 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 into 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 on 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 on 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 execute 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 execute on device type N. Here, selecting a model configuration may include assigning some model weights to the corresponding model candidate 315 based on the available memory of device type N and / or assigning some operations that can be performed by the corresponding model candidate 315 based on the processing capacity of 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 the 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 candidate 315 includes a distilled ASR model candidate adapted to recognize terms / phrases related to scheduling / appointment confirmation 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 data storage 170 that are spoken in language A and belong to a query vertical type related to scheduling / appointment confirmation. Here, at least a portion of the training queries in the set of training queries 325 may include previous user queries selected from among a threshold number of user queries logged in each of the category buckets 210 representing a query vertical type related to scheduling / appointment making 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 a query vertical type related to scheduling / appointment making and that were spoken in Language A. Furthermore, 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 include a threshold number of queries 119.
[0049] Each training query in the set of training queries 325 may include corresponding audio data characterizing 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 phase 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 characterizing 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 including at least one of input text to the cloud-based TTS model 126 or a synthesized 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. 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 examples 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 to include terms / phrases related to scheduling / appointment confirmation. The cloud-based ASR model may include very large multilingual models 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 distillation assistant model candidate for each distillation assistant model candidate 315 identified during the identification phase 310.
[0051] After training phase 320 generates and trains each distillation assistant model 350, evaluation phase 330 may evaluate each distillation assistant model 350 with respect to a corresponding teacher model 380. In some examples, teacher model 380 includes a corresponding cloud-based model of cloud-based assistant service 120 associated with distillation assistant model 350. For example, for any distillation assistant model 350 that includes a distilled ASR model, evaluation phase 330 uses cloud-based ASR model 122 of assistant service 120 as teacher model 380 for evaluating each of the distillation 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 also 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 may include a message stating, "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," "app," or "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 data processing hardware 112 of a remote system 111. 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, method 400 includes receiving user queries 119 directed to the cloud-based assistant service 120 from multiple 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, 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 execute 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 functionality are intended to be exemplary only and do not limit the implementation of the invention as 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 a high-speed expansion port 550, and a low-speed interface / controller 560 that connects to a 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 memory, 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), and disk or tape.
[0061] The storage device 530 is capable of providing mass storage for 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, a 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 or machine-readable medium, such as the memory 520, the storage device 530, or memory on the processor 510.
[0062] The high-speed controller 540 manages bandwidth-intensive operations for the computing device 500, while 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 a 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, etc., or to a network device, such as a switch or router, for example, through a network adapter.
[0063] Computing device 500 may be implemented in a number of different ways, as shown in the figure. For example, 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 including 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 code) 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, that 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, such as an FPGA (field-programmable gate array) or an ASIC (application-specific integrated circuit). 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, such as magnetic, magneto-optical, or optical disks, for storing data, or is operably coupled to a mass storage device to receive data from, transfer data to, 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 can 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; for example, feedback given 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. Furthermore, a computer can interact with a 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 present 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 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 the 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 of the cloud-based assistant service when the at least one of the plurality of category buckets includes the threshold number of the user queries, the distilled model of the cloud-based assistant service being configured to execute on one or more target client devices of the plurality of client devices.
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; the query vertical type identified for the user query (119); the language and / or location associated with the user who spoke the user query (119); the background noise level in the audio data (118) containing the user query (119); a text-to-speech response generated by the cloud-based assistant service (120) after fulfillment of the user query (119); or 10. The computer-implemented method of claim 1, further comprising: at least one of: a transcription of the user query;
3. The operation includes, for each received user query (119) directed to the cloud-based assistant service (120): further comprising 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 query interpretation on the transcription (123) of the user query (119) to identify a query vertical type for the user query (119); 2. 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 is 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); 2. The computer-implemented method of claim 1, further comprising, when the developer accepts the generated distilled model, deploying the distilled model to the one or more of the target client devices.
5. The operation is determining whether the accuracy of the generated distilled model (350) for an evaluation dataset (335) is within a threshold range of the accuracy of a teacher model (380) for the evaluation dataset (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. 2. The computer-implemented method of claim 1, wherein 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.
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 with the set of training queries and the corresponding training labels generated for the training queries in the set of training queries.
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. 8. The computer-implemented method of claim 7, 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. 8. 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 attribute 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 the 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); 2. The computer-implemented method of claim 1, 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, wherein the another 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.
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 the 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); and 2. The computer-implemented method of claim 1, further comprising: deploying the updated distillation model for execution on each of the one or more target client devices.
13. 13. The computer-implemented method of claim 12, wherein the federated analysis is received from each target client device without receiving audio data characterizing any of the incoming queries processed by the distillation model and without receiving transcriptions of the incoming queries processed by the distillation model.
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 the 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 of the cloud-based assistant service when the at least one of the plurality of category buckets includes the threshold number of the user queries, the 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.
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; the query vertical type identified for the user query (119); the language and / or location associated with the user who spoke the user query (119); the background noise level in the audio data (118) containing the user query (119); a text-to-speech response generated by the cloud-based assistant service (120) after fulfillment of the user query (119); or 20. The system (100) of claim 17, including at least one of a transcription (123) of the user query (119).
19. The operation includes, for each received user query (119) directed to the cloud-based assistant service (120): further comprising 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 query interpretation on the transcription (123) of the user query (119) to identify a query vertical type for the user query (119); 20. The system of claim 17, 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.
20. The operation is 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); 20. The system (100) of claim 17, 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 is determining whether the accuracy of the generated distilled model (350) for an evaluation dataset (335) is within a threshold range of the accuracy of a teacher model (380) for the evaluation dataset (335); 21. The system of claim 20, wherein prompting the developer of the cloud-based assistant service further comprises 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. 20. The system of claim 17, wherein 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.
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 with the set of training queries and the corresponding training labels generated for the training queries in the set of training queries.
24. 24. The system of claim 23, 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.
25. 24. The system of claim 23, wherein at least a portion of the training queries in the set of training queries includes a new query having the attribute associated with the at least one of the plurality of category buckets that includes the threshold number of the user queries.
26. 24. The system of claim 23, wherein at least a portion of the training queries in the set of training queries are selected from an offline data sample having the attribute associated with the at least one of the plurality of category buckets that includes the threshold number of the user queries.
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 the 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); 18. 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, wherein the another distilled model of the cloud-based assistant service is 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 the 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); and 20. The system (100) of claim 17, 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 transcriptions 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