Mixed client-server federated learning of machine learning models
Patent Information
- Application Number
- JP2023537166
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-03-10
- Filing Date
- 2021-12-13
- Publication Date
- 2024-09-26
- Estimated Expiration
- 2041-12-13
Smart Images

Figure 0007557075000005 
Figure 0007557075000006 
Figure 0007557075000009
Abstract
Description
[Background technology]
[0001] Federated learning of machine learning (ML) models is an increasingly popular ML technique for training ML models. In traditional federated learning, a local ML model is stored locally at a user's client device, and a global ML model, which is a cloud-based counterpart of the local ML model, is stored remotely at a remote system (e.g., a cluster of servers). The client device can process user inputs detected at the client device to generate predicted outputs using the local ML model, and can compare the predicted outputs to ground truth outputs to generate client gradients. Additionally, the client device can send the client gradients to the remote system. The remote system can utilize the client gradients, and optionally additional client gradients generated in a similar manner at additional client devices, to update the weights of the global ML model. The remote system can send the global ML model, or updated weights of the global ML model, to the client device. The client device can then replace the local ML model with the global ML model, or replace the weights of the local ML model with the updated weights of the global ML model, thereby updating the local ML model.
[0002] In particular, these global ML models are generally pre-trained at a remote system based on multiple remote gradients generated remotely at the remote system, without using any client gradients generated locally at the client device, before being utilized in federated learning. This pre-training is generally based on proxy data or biased data that may not reflect the data encountered when the global ML model is deployed at the client device. Following pre-training, the weights of these global ML models are typically updated based only on client gradients generated based on data encountered when the global ML model is deployed at the client device, without using any remote gradients generated remotely at the remote system. However, updating the weights of these global ML models in this manner may cause catastrophic forgetting of information learned during pre-training. Furthermore, client gradients generated based on certain data (e.g., false positives, false negatives, etc.) may be difficult to obtain at the client device, thereby resulting in poor performance of the ML model trained using federated learning. Summary of the Invention [Means for solving the problem]
[0003] Implementations disclosed herein are directed to federated learning of machine learning (ML) models based on gradients generated at corresponding client devices and remote systems. A processor of a corresponding client device can process client data generated locally at the corresponding client device using a corresponding on-device ML model to generate corresponding predicted outputs, generate corresponding client gradients based on the corresponding predicted outputs, and transmit the corresponding client gradients to a remote system. A processor of the remote system can process remote data retrieved from a remote database using a global ML model to generate additional corresponding predicted outputs, and generate corresponding remote gradients based on the additional corresponding predicted outputs. Furthermore, the remote system can utilize the corresponding client gradients and the corresponding remote gradients to update the global ML model or its weights. The updated global ML model and / or its updated weights can be sent back to the corresponding client device. In particular, the remote gradients described herein are utilized in updating an already trained global ML model.
[0004] For example, assume that audio data capturing the utterance "Assistant, call Ron Smith" is generated at a given client device of a user. In this example, the given client device can use an on-device hotword detection model to process the audio data to generate a prediction output indicating whether a portion of the utterance includes one or more specific words or phrases for invoking an automated assistant (e.g., "Assistant," "Hey Assistant," and / or any other words or phrases for invoking or otherwise controlling an automated assistant). In this example, the prediction output can be a prediction measure (e.g., a probability, a binary value, a log-likelihood value, or any other prediction measure). For example, assume that the prediction output is a probability of 0.80 that meets a threshold probability (e.g., 0.75) indicating that the utterance includes one or more of the specific words or phrases for invoking an automated assistant. Furthermore, the given client device can compare the prediction output (e.g., a probability of 0.80) with a corresponding ground truth output (e.g., a probability of 1.0 that assumes that the user intends to invoke an automated assistant). A given client device can compare the predicted output with the corresponding ground truth output to generate client gradients, or more specifically, hotword detection client gradients associated with the hotword detection model. The hotword detection client gradients can be transmitted to a remote system, which can utilize the hotword detection client gradients to update the weights of the global hotword detection model.
[0005] Although the above example is described with respect to hotword detection client gradients, it should be understood that this is for illustration purposes and is not meant to be limiting. For example, a given client device may additionally or alternatively use an automatic speech recognition (ASR) model to process audio data to generate a predicted output associated with a term corresponding to the utterance. In this example, the predicted output may be a plurality of speech hypotheses corresponding to the utterance (and optionally a predictive measure associated with one or more of the plurality of speech hypotheses). For example, assume that the predicted output for the "Ron" portion of the utterance includes a "Ron" term hypothesis associated with a probability of 0.55 and a "Don" term hypothesis associated with a probability of 0.45. A given client device may compare the predicted output (e.g., the "Ron" and "Don" term hypotheses and their associated probabilities) with a corresponding ground truth output (e.g., the term "Ron" and a probability of 1.0 assuming that the user intends to call "Ron"). A given client device can compare the predicted output with the corresponding ground truth output to generate another client gradient, or more specifically, the ASR client gradient associated with the ASR model. Similarly, the ASR client gradient can be transmitted to a remote system, which can utilize the ASR client gradient to update the weights of a global ASR model. Additionally, while the above examples are described with respect to an audio-based ML model, it should also be understood that this is for purposes of example and not meant to be limiting, and that the techniques described herein can also be utilized to generate client gradients for image-based ML models, text-based ML models, and / or other types of ML models.In other words, the type of gradient generated by a given client device may be based on the client data generated or received at the given client device, and may additionally or alternatively be based on the particular ML model utilized to process the client data.
[0006] The remote system can retrieve remote data from a remote database (optionally in response to receiving client gradients from a corresponding client device). In some implementations, the remote data can be retrieved, for example, from an online video sharing platform, an image sharing platform, an audio sharing platform, and / or a text-based platform that is not access restricted (i.e., like client data generated and / or received locally at the corresponding client device). In additional or alternative implementations, with the permission of the corresponding user of the corresponding client device, the remote data can be data that is the corresponding user's access controlled data accessible to the remote system. The remote gradients can be generated at the remote system in the same or similar manner as described above for a given client device, but based on the remote data and using components of the remote system and a global ML model accessible to the remote system.
[0007] In some implementations, the remote system can analyze client gradients received from a corresponding client device and obtain remote data associated with the client data. For example, assume that a given client gradient is generated based on audio data capturing the utterance of "Assistant, call Ron Smith," but an automated assistant was not invoked based on a predicted output (e.g., a false-negative hot-word detection client gradient). In this example, the remote system may obtain remote audio data that may result in another false positive (e.g., by filtering the remote audio data to slur or otherwise affect "Assistant"). Notably, in a federated learning framework, the client gradient may be transmitted to the server without transmitting either the underlying client data or the predicted output. However, the remote system may know that the gradient is a false-negative hot-word detection client gradient generated based on the audio data. In contrast, the remote system may obtain remote audio data that may result in a false positive (e.g., an automated assistant was invoked but should not have been invoked), which may be more difficult to obtain than a false negative, since the intent of the user of the given client device may not be easily ascertained. Nevertheless, the remote system may acquire remote audio data that may result in false positives to ensure that the gradients utilized to update the global hot word detection model are sufficiently diverse.
[0008] In some versions of those implementations, the remote system can analyze the distribution of gradients to be utilized in updating the corresponding global ML model. In analyzing the distribution, the remote system can identify the type of client gradients received at the remote system from the corresponding client device and / or the type of remote gradients generated at the remote system. Furthermore, the remote system can determine that there is a need to generate gradients of specific types based on the distribution of gradients lacking the specific types or a sufficient amount thereof. In response to determining that there is a need to generate gradients of these specific types, the remote system can generate those specific types of gradients (and optionally the specific amount thereof). For example, assume that multiple hotword-free invocation client gradients have been generated at the corresponding client device based on gestures provided by the corresponding user of the corresponding client device (e.g., based on hand movements, eye movements, lip movements, etc.) to invoke or otherwise control an automated assistant. However, it may be difficult to obtain hotword-free invocation client gradients at the client device that do not invoke an automated assistant (e.g., due to privacy considerations). In this example, the remote system may determine that there is a need for hotword-free invocation remote gradients that include a human making a gesture that is not directed at invoking an automated assistant. Thus, the remote system can obtain remote image data of a human performing one or more gestures that do not invoke an automated assistant to ensure that there is sufficient volume and diversity among the hotword-free invocation gradients that are utilized to update the global hotword-free invocation model.
[0009] Further, the remote system can utilize client gradients received from corresponding client devices and remote gradients generated by the remote system to update the corresponding global ML model. In some implementations, the remote system can select a set of corresponding client gradients to be utilized in updating the weights of the corresponding global ML model for a particular iteration of the update. In some versions of those implementations, the remote system can select the set of corresponding client gradients based on one or more criteria. The one or more criteria can include, for example, a type of client gradients available to the remote system, a threshold amount of client gradients available to the remote system, a threshold duration of an update using client gradients, and / or other criteria. For example, the remote system can select a set of 500 audio-based client gradients to be utilized to update an audio-based model (e.g., a single audio-based model or multiple heterogeneous audio-based models), select a set of 200 hotword client gradients to be utilized to update a hotword model, etc. As another example, the system can select a set of 600 image-based client gradients to be utilized to update an image-based model (e.g., a single image-based model or multiple heterogeneous image-based models), select a set of 300 hotword-free call client gradients to be utilized to update a hotword model, etc. In other implementations, the set of client gradients may include any combination of audio-based client gradients, image-based client gradients, text-based client gradients, and / or any other type of client gradients (or specific types of client gradients).
[0010] In some versions of those implementations, the remote system may also select a corresponding set of remote gradients to be utilized in updating the weights of the corresponding global ML model. In some further versions of those implementations, the remote system may select a corresponding set of remote gradients based on the type of gradients included in the corresponding set of client gradients. For example, if the corresponding selected set of client gradients includes a set of audio-based gradients (or a particular type of audio-based gradients), the corresponding selected set of remote gradients may also include audio-based gradients. In additional or alternative versions of those further implementations, the remote system may select a corresponding set of remote gradients based on the amount of client gradients included in the corresponding selected set of client gradients. For example, if the corresponding selected set of client gradients includes a set of 500 audio-based gradients (or a particular type of audio-based gradients), the corresponding selected set of remote gradients may also include 500 audio-based gradients. As another example, if the corresponding selected set of client gradients includes a set of 500 audio-based gradients (or audio-based gradients of a particular type), the corresponding selected set of remote gradients may also include proportional amounts of audio-based gradients (e.g., 750 for 150%, 250 for 50%, 100 for 20%, etc.).
[0011] In implementations in which corresponding sets of client gradients and remote gradients are utilized to update the weights of a corresponding global ML model, the corresponding global ML model may be updated in various ways. For example, the weights of the corresponding ML model may be updated first based on a selected set of corresponding client gradients and then based on a selected set of corresponding remote gradients. As another example, the weights of the corresponding ML model may be updated first based on a selected set of corresponding remote gradients and then based on a selected set of corresponding client gradients. As yet another example, a first weight of a first instance of the corresponding ML model may be updated based on a selected set of corresponding client gradients, and in parallel or successively, a second weight of a second instance of the corresponding ML model may be updated based on a selected set of corresponding remote gradients. In this example, an average (or some other statistical measure) of the first and second weights may be utilized as the updated weights of the corresponding ML model. In other implementations, the remote system may utilize the client gradients and the remote gradients to update the corresponding global ML model in a first-in-first-out (FIFO) manner without allocating gradients to a particular iteration of updating the global ML model.
[0012] By utilizing the techniques described herein, various technical advantages may be achieved. As one non-limiting example, by utilizing both the client gradients and the remote gradients generated in the manner described herein, the corresponding global ML model may be updated based on diverse and balanced data, thereby reducing the effects of catastrophic forgetting and resulting in a more robust global ML model with higher precision and / or recall. For example, a remote system may generate remote gradients based on an identified need for a particular type of gradient for a particular global ML model that may not otherwise be obtainable within a federated learning framework due to privacy considerations. As a result, when the corresponding global ML model (or its weights) is deployed to a client device, the on-device ML model will also be more robust and have higher precision and / or recall.
[0013] The above description is provided as a summary of some implementations of the present disclosure. Further descriptions of these and other implementations are described in more detail below. [Brief description of the drawings]
[0014] [Figure 1A] FIG. 1 illustrates an exemplary process flow demonstrating various aspects of the present disclosure, according to various implementations. [Figure 1B] FIG. 1 illustrates an exemplary process flow demonstrating various aspects of the present disclosure, according to various implementations. [Figure 1C] FIG. 1 illustrates an exemplary process flow demonstrating various aspects of the present disclosure, according to various implementations. [Figure 1D] FIG. 1 illustrates an exemplary process flow demonstrating various aspects of the present disclosure, according to various implementations. [Diagram 2] FIG. 1 is a block diagram of an example environment in which implementations disclosed herein may be implemented. [Diagram 3]1 is a flowchart illustrating an example method for generating client gradients locally at a client device to be utilized in updating a machine learning model, according to various implementations. [Figure 4] 1 is a flowchart illustrating an example method for remotely generating remote gradients at a remote system to be utilized in updating a machine learning model, according to various implementations. [Diagram 5] 1A-1C are flowcharts illustrating various example methods for blending a set of client gradients and a set of remote gradients when updating a global machine learning model, according to various implementations. [Figure 6] FIG. 1 illustrates an exemplary architecture of a computing device, according to various implementations. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] 1A-1D show example process flows demonstrating various aspects of the disclosure. A client device 150 is shown in FIG. 1A and includes the components enclosed within the box of FIG. 1A illustrating the client device 150. An on-device machine learning (ML) engine 132A can process the client data 101A using an on-device ML model stored in an on-device ML model database 154A to generate a predicted output 102. A gradient engine 134A can generate client gradients 103 based on the predicted output 102. In some implementations, the gradient engine 134A can generate the client gradients 103 based on comparing the predicted output 102 to a ground truth output 101B corresponding to the client data 101A using supervised learning techniques. In additional or alternative implementations, such as when a ground truth output 101B corresponding to the client data 101A is not available, the gradient engine 134A can generate the client gradients 103 using supervised and / or unsupervised learning techniques (e.g., as described with respect to FIG. 3). Client device 150 can then transmit client gradients 103 to remote system 160 over one or more networks (e.g., any combination of a local area network (LAN), a wide area network (WAN), and / or any other type of network), and optionally without transmitting any of the client data 101A, the ground truth output 101B, the prediction output 102, and / or any other personally identifiable information. In various implementations, client device 150 can transmit client gradients 103 to remote system 160 in response to determining that one or more conditions (e.g., as described with respect to FIG. 3) have been met.
[0016] In some implementations, the client gradients 103 (and other gradients described herein) may be derived from a loss function used to train the ML model, such that the gradients represent values of that loss function (or a derivative thereof) obtained from a comparison of the ground truth outputs 101B and the predicted outputs 102 (e.g., using supervised learning techniques). For example, if the ground truth outputs 101B and the predicted outputs 102 match, the gradient engine 134A may generate a zero gradient. Also, for example, if the ground truth outputs 101B and the predicted outputs 102 do not match, the gradient engine 134A may optionally generate a non-zero gradient depending on the degree of discrepancy. The degree of discrepancy may be based on the degree of discrepancy between a deterministic comparison of the ground truth outputs 101B and the predicted outputs 102. In additional or alternative implementations, the client gradients 103 (and other gradients described herein) may be derived from a loss function used to train the ML model, such that the gradients represent values of the loss function (or a derivative thereof) determined based on the predicted outputs 102 (e.g., using supervised or semi-supervised learning techniques).
[0017] As described below, the client data 101A may be audio data generated by a microphone of the client device 150 (e.g., as described with respect to FIG. 1B), text segments provided as input by a user of the client device 150 and / or stored in on-device memory (e.g., as described with respect to FIG. 1C), image data generated by a visual component of the client device (e.g., as described with respect to FIG. 1D), and / or any other data generated locally at the client device 150 and processed using an ML model. In some implementations, the client data 101A may be processed to generate the gradient 103 as the client data 101A is generated or provided to the client device 150 synchronously. In additional or alternative implementations, the client data 101A may be stored in the client data database 152A as the client data 101A is generated or provided to the client device 150, and the client data 101A may then be utilized to generate the gradient 103 asynchronously. In additional or alternative implementations, the on-device ML engine 132A can process the client data 101A to generate the predicted output 102, which may be stored in a client data database 152A (optionally in association with the client data 101A associated with the predicted output 102), and the predicted output 102 may then be utilized to asynchronously generate gradients 103. The client device database 152A (also referred to herein as on-device memory or on-device storage) may include any data generated or provided to the client device, including, but not limited to, audio data, image data, contact lists, electronic messages (e.g., text messages, emails, social media messages, etc.) sent by a user of the client device 150 or received by a user of the client device 150, and / or any other client data.In particular, client data 101A corresponds to restricted access data or data that is not publicly available and / or is not available to remote systems 160.
[0018] The global ML engine 132B can process the remote data 104A using a global ML model stored in the global ML model database 154B to generate the predicted output 105. The remote data 104A can be obtained from the remote data database 152B. The remote data database 152B can include any data accessible by the remote system 160, including, but not limited to, public data repositories including audio data, text data, and / or image data, as well as private data repositories. Additionally, the remote data database 152B can include data from different types of client devices having different device characteristics or components (e.g., different from the client device 150 and / or the multiple additional client devices 170 described below). For example, the remote data database 152B can include audio data captured by a near-field microphone (e.g., similar to the audio data captured by the client device 150) and audio data captured by a far-field microphone (e.g., audio data captured by other devices). As another example, the remote data database 152B can include image data (or other visual data) captured by different visual components, such as RGB image data, RGB-D image data, CMYK image data, and / or other types of image data captured by various different visual components. Additionally, the remote system 160 can use one or more techniques on the remote data 104A to modify the remote data 104B. These techniques can include filtering the audio data to add or remove noise if the remote data 104A is audio data, blurring the image if the remote data 104A is image data, and / or other techniques to manipulate the remote data 104A.This allows the remote system 160 to better reflect client data generated by multiple different client devices and / or meet needs for particular types of data (e.g., inducing false positives or false negatives as described herein, ensuring sufficient diversity of audio data as described herein, etc.).
[0019] The gradient engine 134B can generate the remote gradients 106 based on the predicted output 105. In some implementations, the gradient engine 134B can generate the remote gradients 106 based on comparing the predicted output 105 to the ground truth output 104B corresponding to the remote data 104A using supervised learning techniques. In additional or alternative implementations, such as when the ground truth output 104B corresponding to the remote data 104A is not available, the gradient engine 134B can generate the remote gradients 106 using supervised and / or unsupervised learning techniques. In some implementations, the remote system 160 can simulate a client device as a "canary" user such that the remote gradients 106 appear to be generated by an actual client device. The remote gradients 106 (and any additional remote gradients) may be stored in a gradient database 185 (e.g., long-term memory and / or short-term memory such as a buffer), optionally along with client gradients 103 received from client device 150 and corresponding additional gradients 107 received from multiple additional client devices 170 (which may optionally be limited to the same type of client device as client device 150 (e.g., mobile phone, standalone interactive speaker, in-vehicle computing system, etc.)). The additional gradients 107 received from the multiple additional client devices 170 may each be generated based on the same or similar techniques as described above with respect to generating gradients 103, but based on client data generated or provided locally at a respective one of the multiple additional client devices 170.
[0020] As described above, the gradients 103, 106, and / or 107 may be stored in the gradient database 185 (or other memory (e.g., buffer)) as the gradients 103, 106, and / or 107 are generated and / or received. In some implementations, the gradients 103, 106, and / or 107 may be indexed by a type of gradient determined based on a corresponding on-device ML model that processed the client data 101A and / or a corresponding global ML model that processed the remote data 104A from among multiple different types of gradients. The multiple different types of gradients may be defined with various granularities. 1B-1C and 2, the types of gradients may be specifically defined as, for example, hot-word gradients generated based on processing audio data using a hot-word model, ASR gradients generated based on processing audio data, VAD gradients generated based on processing audio data using a VAD model, continuous conversation gradients generated based on processing audio data using a continuous conversation model, voice identification gradients generated based on processing audio data using a voice identification model, face identification gradients generated based on processing image data using a face identification model, hot-word-free gradients generated based on processing image data using a hot-word-free model, object detection gradients generated based on processing image data using an object detection model, text-to-speech (TTS) gradients generated based on processing text segments using a TTS model, and / or any other gradients that may be generated based on processing data using any other ML model. In particular, a given one of the gradients 103, 106, and / or 107 may belong one-to-one to one of a plurality of different types of gradients.Thus, as another example, a gradient type may be defined more generally as, for example, audio-based gradients generated based on processing audio data using one or more audio-based models, image-based gradients generated based on processing image data using one or more image-based models, or text-based gradients generated based on processing text segments using a text-based model.
[0021] The remote training engine 136 can utilize at least the client gradients 103, the remote gradients 106, and the additional gradients 107 to update one or more weights of a global ML model stored in the global ML model database 154B. For example, the remote training engine 136 can identify a particular global ML model among the global ML models stored in the global ML model database 154B to update its weights. In some implementations, the remote training engine 136 can identify a particular global ML model based on the type of gradient stored in the gradient database 185. For example, if multiple hotword gradients are stored in the gradient database 185, the remote training engine 136 can identify a global hotword model to update based on the multiple hotword gradients. As another example, if multiple audio-based gradients are stored in the gradient database 185, the remote training engine 136 can identify a global audio-based model to update based on the multiple audio-based gradients. In particular, the remote training engine 136 can identify a single global ML model to be updated at a given time instance, or multiple global ML models to be updated in parallel at a given time instance.
[0022] In some implementations, the remote system 160 can assign gradients 103, 106, and / or 107 to a particular iteration that updates the global ML model based on one or more criteria. The one or more criteria can include, for example, the type of gradients available to the remote training engine 136, a threshold amount of gradients available to the remote training engine 136, a threshold duration of updates using gradients, and / or other criteria. In particular, the remote training engine 136 can identify multiple sets or subsets of gradients generated by the client device 110 and / or sets generated by the remote system 160. Furthermore, the remote training engine 136 can update the global ML model based on these sets or subsets of gradients. In some further versions of those implementations, the amount of gradients in the set of client gradients and the set of remote gradients are the same or vary (e.g., proportional to each other, with more client gradients or more remote gradients). In further versions of those implementations, each of the subsets of client gradients can optionally include client gradients from at least one unique client device that is not included in another of the subsets. In other implementations, the remote system 160 utilizes the client gradients and the remote gradients to update the corresponding global ML model in a first-in-first-out (FIFO) manner, without allocating gradients 103, 106, and / or 107 to a particular iteration that updates the global ML model. Utilizing gradients 103, 106, and / or 107 to update the ML model is described herein (e.g., with respect to Figures 4 and 5).
[0023] The update distribution engine 138 can transmit the updated ML model 108 and / or its weights to the client device 150 and / or one or more of the multiple additional client devices 170. In some implementations, the update distribution engine 138 can transmit the updated ML model 108 and / or its weights in response to one or more conditions being met to the client device 150, one or more of the multiple additional client devices 170, and / or a remote system (e.g., as described with respect to FIG. 3 and FIG. 4). Upon receiving the updated ML model and / or its weights, the client device can replace the corresponding on-device ML model with the updated ML model 108 (e.g., in the on-device ML model database 154A) or replace the weights of the corresponding on-device ML model with the weights of the updated ML model 108. Furthermore, the client device 150 can subsequently use the updated ML model 108 and / or its weights to make predictions based on further user input detected at the client device 150 (e.g., as described in further detail with respect to FIG. 2). Client device 150 and multiple additional client devices 170 can continue to generate additional client gradients in the manner described herein and continue to send the additional client gradients to remote system 160. Additionally, remote system 160 can continue to generate additional remote gradients in the manner described herein and continue to update the global ML model based on the additional client gradients and the additional remote gradients.
[0024] 1B, in some implementations, the client data 101A may be audio data 109A generated by a microphone of the client device 150. The audio data 109A may capture a user's speech directed at the client device 150, ambient noise of the environment in which the client device 150 is located, such as background noise or surrounding conversations, and / or any other sounds that may be captured by the microphone of the client device 150. In implementations in which the client data 101A is audio data 109A, the on-device ML engine 132A may process the audio data 109A using one or more on-device audio-based ML models to generate predicted outputs 110 that are utilized to generate the audio-based client gradients.For example, the on-device ML engine 132A may perform on-device voice activity detection (VAD) to predict whether the audio data 109A captures human speech. The audio data 109A can be processed using an on-device automatic speech recognition (ASR) model, an on-device hotword detection model to predict whether the audio data 109A captures speech that includes one or more specific words or phrases that will invoke an automated assistant or cause an automated assistant to control the client device 150 or other device (e.g., another client device or smart device), an on-device automatic speech recognition (ASR) model to generate recognized text based on any speech captured in the audio data 109A, an on-device voice identification model that can process the audio data 109A to determine whether any speech captured in the audio data 109A is from a particular user (e.g., a user of the client device 150), an on-device continuing conversation model that can process the audio data 109A to determine whether the audio data 109A captures follow-up input provided by a user of the client device 150, an on-device endpoint model that can process the audio data 109A to predict whether and / or when a user providing the utterance will end the utterance, and / or any other on-device audio-based ML model. It should be understood that the foregoing on-device ML models are provided for purposes of example and are not meant to be limiting.
[0025] In particular, the predicted output 110 may include corresponding predicted outputs generated over one or more of the aforementioned on-device ML models. For example, if the audio data 109A is processed using an on-device VAD model and an on-device hotword detection model, the predicted output 110 may include corresponding predicted outputs associated with the on-device VAD model and corresponding predicted outputs associated with the on-device hotword detection model. As another example, if the audio data 109A is processed using an on-device voice identification model, an on-device hotword detection model, and an on-device ASR model, the predicted output 110 may include corresponding predicted outputs associated with the on-device voice identification model, corresponding predicted outputs associated with the on-device hotword detection model, and corresponding predicted outputs associated with the on-device ASR model. Thus, the predicted output 110 may include predicted outputs generated over one or more of the on-device ML models. Thus, any resulting client gradients may be a particular type of gradient based on the on-device ML model utilized to process the audio data 109A.
[0026] In some implementations, the gradient engine 134A can compare the predicted output 110 with the corresponding ground truth output 109B to generate the client gradient 111 using supervised learning techniques (e.g., as described with respect to FIG. 3). In additional or alternative implementations, such as when the corresponding ground truth output 109B is not available, the gradient engine 134A can utilize unsupervised learning techniques to generate the client gradient 111 (e.g., as described with respect to FIG. 3). In other words, the gradient engine 134A can evaluate the predicted output 110 with respect to some actual output that would have been generated over the model to identify errors generated over the on-device ML model. For example, assume that the predicted output generated over the on-device hot word recognition model is a probability (e.g., or other predictive measure such as log-likelihood, binary value, or other measure) indicating whether the audio data 109A contains a particular word or phrase for invoking an automated assistant. Further assume that the probability is 0.75 and the threshold probability for invoking an automated assistant is 0.80. In this example, the automated assistant may not be invoked. However, further assume that the automated assistant is invoked within a threshold time period of receiving the audio data 109A. The client device 150 can utilize this as a monitoring signal indicating that the automated assistant should have been invoked in response to receiving the utterance captured in the audio data 109A (e.g., a false negative). In this example, the corresponding ground truth output may be a probability of 1.0 indicating that the automated assistant should have been invoked, and the resulting client gradient may be a false negative gradient for the hot word detection model.
[0027] Further, the client gradients 111 may be transmitted to the remote system 160 and stored in the gradient database 185. The remote data 104A may be audio data 112A obtained from the remote system data database 152B. The remote system 160 may have the audio data 112A processed in the same or similar manner as described above with respect to the client device 150, but using the global ML engine 132B and a corresponding audio-based global ML model stored in the global ML model database 154B, to generate the predicted output 112. Further, the gradient engine 134B may compare the predicted output 113 with the corresponding ground truth output 112B to generate the audio-based remote gradients 114, which may be stored in the gradient database 185.
[0028] In an additional or alternative implementation, now referring to FIG. 1C, the client data 101A may be a text segment 115A accessible to the client device 150. The text segment 115A may include any text accessible to the client device 150. For example, the text segment 115A may include one or more terms obtained from a contact list (e.g., name, physical address, email address, and / or other contact information), a message (e.g., text message, email message, and / or any other electronic message), a calendar or task entry, a document, a reminder, and / or other text available at the client device 150. In an implementation in which the client data 101A is a text segment, the on-device ML engine 132A may process the text segment 115A using one or more on-device text-based ML models to generate a prediction output 117 that is utilized to generate the text-based client gradients. For example, on-device ML engine 132A can cause on-device TTS engine 132A1 to process text segment 115A using an on-device TTS model stored in on-device ML model database 154A to generate synthetic speech audio data 116 including synthetic speech corresponding to text segment 115A. Additionally, on-device ML engine 132A can cause on-device ASR engine 132A2 to process synthetic speech audio data 116 using an on-device ASR model stored in on-device ML model database 154A to generate predicted output 117.
[0029] In some implementations, the on-device ASR model may be an end-to-end model used to generate predictive text on a character-by-character (or another token-by-token) basis. One non-limiting example of such an end-to-end model used to generate predictive text on a character-by-character basis is a recurrent neural network transducer (RNN-T). The RNN-T model is a form of sequence-to-sequence model that does not use an attention mechanism. Unlike most sequence-to-sequence models that typically require processing of the entire input sequence (e.g., audio data waveform, or mel-frequency cepstral coefficients (MFCCs), or other representations) to generate an output of a predictive text segment as the predicted output 116, the RNN-T model may be used to process input samples continuously and stream output symbols (e.g., letters of the alphabet). In other implementations, the on-device ASR model is not an end-to-end speech recognition model. In those other implementations, the on-device ASR engine 132A2 may instead generate predicted phonemes (and / or other representations). For example, in such a model, the predicted phonemes (and / or other representations) are then utilized by the on-device ASR engine 132A2 to determine a predicted text segment that matches the sequence of phonemes as the predicted output 117. In doing so, the on-device ASR engine 132A2 can optionally use a decoding graph, a lexicon, and / or other resources.
[0030] In particular, the prediction output 117 in the example of FIG. 1C may include multiple speech hypotheses for the text segment 115A and / or the synthetic speech audio data 116 (and / or acoustic features thereof) generated over the on-device ASR model. For example, the text segment 115A processed using the on-device ML engine 132A may correspond to a text segment "Ron Smith" obtained as a name associated with a contact entry of the client device. In this example, the on-device TTS engine 132A1 may process the text segment to generate synthetic speech audio data including synthetic speech corresponding to the contact entry of "Ron Smith." Furthermore, the synthetic speech (or acoustic features thereof) corresponding to "Ron Smith" may be utilized as the prediction output 117 and may then be utilized in generating text-based gradients to update the on-device TTS model, and the multiple speech hypotheses may be utilized as the prediction output 117 and may then be utilized in generating ASR gradients to update the on-device ASR model. For example, the gradient engine 134A can compare acoustic features (e.g., Mel filter bank features, audio waveforms, prosodic features, MFCCs, and / or other acoustic features) of synthetic speech corresponding to “Ron Smith” with audio data of an utterance of “Ron Smith” provided by a user of the client device 150 (e.g., corresponding ground truth output 115B) to generate the text-based client gradients 118. Additionally, the gradient engine 134A can compare multiple speech hypotheses for “Ron Smith” with the actual text segments 110 of “Ron Smith” (e.g., corresponding ground truth output 115B) to generate the ASR client gradients 118.
[0031] Further, the client gradients 118 may be transmitted to the remote system 160 and stored in the gradient database 185. The remote data 104A may be the text segment 119A retrieved from the remote system data database 152B. The remote system 160 may have the text segment 112A processed in the same or similar manner as described above with respect to the client device 150, but using the global ML engine 132B (e.g., the global TTS engine 132A1 generating the synthetic voice audio data 120 and the global ASR engine 132A2 generating the predicted text segment as part of the predicted output 121) and the corresponding audio-based global ML model stored in the global ML model database 154B, to generate the predicted output 121. Further, the gradient engine 134B may compare the predicted output 121 with the corresponding ground truth output 119B to generate the remote gradients 122, which may be stored in the gradient database 185.
[0032] In an additional or alternative implementation, now referring to FIG. 1D , the client data 101A may be image data 124A generated by a visual component of the client device 150. The image data 124A may capture one or more portions of an environment in which the client device 150 is located, including, for example, people, objects, and / or other things in the environment that may be captured in the image data 124A. Although referred to as image data, it should be understood that this may include still images, as well as sequences of images (e.g., video). In an implementation in which the client data 101A is image data 124A, the on-device ML engine 132A may process the image data 124A using one or more on-device image-based ML models to generate predicted outputs 125 that are utilized to generate image-based client gradients. For example, the on-device ML engine 132A may process the image data 124A using an on-device object detection model that may process the image data 124A to detect objects or features thereof captured within the environment of the client device 150, an on-device object classification model that may process the image data 124A to predict a classification of an object captured within the environment of the client device 150, an on-device face identification model that may process the image data 124A to determine whether any humans captured within the environment correspond to a particular user (e.g., a user of the client device 150), and / or any other on-device image-based ML model. It should be understood that the aforementioned on-device ML models are provided for purposes of example and are not meant to be limiting.
[0033] In particular, the prediction output 110 may include corresponding prediction outputs generated across one or more of the aforementioned on-device ML models. For example, if the image data 109A is processed using an on-device object detection model and an on-device object classification model, the prediction output 125 may include corresponding prediction outputs associated with the on-device object detection model and corresponding prediction outputs associated with the on-device object classification model. Thus, the prediction output 125 may include prediction outputs generated across one or more of the on-device ML models. Thus, any resulting client gradients may be of a particular type based on the on-device ML model utilized to process the image data 124A.
[0034] In some implementations, the gradient engine 134A can compare the predicted output 125 with the corresponding ground truth output 124B to generate the client gradient 126 using supervised learning techniques (e.g., as described with respect to FIG. 3). In additional or alternative implementations, such as when the corresponding ground truth output 124B is not available, the gradient engine 134A can utilize unsupervised learning techniques to generate the client gradient 126 (e.g., as described with respect to FIG. 3). In other words, the gradient engine 134A can evaluate the predicted output 125 with respect to some actual output that would have been generated over the model to identify errors generated over the on-device ML model. For example, assume that the predicted output generated over the on-device hot word recognition model is a probability (e.g., or other predictive measure, such as a log-likelihood, binary value, or other measure) indicating whether the image data 124A includes a user associated with the client device 150. Further assume that the probability is 0.65 and the threshold probability for classifying a human as a user of the client device 150 is 0.85. In this example, the user of the client device 150 may not be recognized as such. However, further assume that the automated assistant is invoked within a threshold time period of receiving the image data 124A via another authentication means, such as a passcode for the client device 150. The client device 150 can utilize this as a supervisory signal indicating that the human captured in the image data 124A is in fact the user of the client device 150 (e.g., a false negative). In this example, the corresponding ground truth output may be a probability of 1.0 indicating that the image data 124A includes the user of the client device 150, and the resulting client gradient may be a false negative gradient for the face identification model.
[0035] Additionally, the client gradients 126 may be transmitted to the remote system 160 and stored in the gradient database 185. The remote data 104A may be image data 127A obtained from the remote system data database 152B. The remote system 160 may have the image data 127A processed in the same or similar manner as described above with respect to the client device 150, but using the global ML engine 132B and a corresponding audio-based global ML model stored in the global ML model database 154B, to generate the predicted output 128. Additionally, the gradient engine 134B may compare the predicted output 128 to the corresponding ground truth output 127B to generate an image-based remote gradient 129, which may be stored in the gradient database 185.
[0036] Returning to FIG. 1A, in various implementations, the remote training engine 136 can analyze the distribution of gradients. In analyzing the distribution, the remote training engine 136 can identify the types of client gradients received at the remote system 160 from the client device 150 and / or the additional client device 170 and / or the types of remote gradients generated at the remote system 160. Furthermore, the remote training engine 136 can determine that gradients of specific types need to be generated based on the distribution of gradients lacking a specific type or a sufficient amount thereof. In response to determining that gradients of these specific types need to be generated, the remote training 136 can cause the remote system 160 to generate those specific types of gradients (and optionally a specific amount of them). For example, assume that multiple hotword-free call client gradients are generated at the client device 150 based on gestures provided by the user of the client device 150 (e.g., based on hand movements, eye movements, lip movements, etc.) to call an automated assistant. However, it may be difficult to obtain hotword-free call client gradients that do not call an automated assistant at the client device 150 (e.g., due to privacy considerations). In this example, the remote training engine 136 may determine that there is a need for gradients that include humans making gestures that are not directed toward invoking an automated assistant. Thus, the remote system 160 can obtain remote data that is image data of humans making gestures that do not invoke an automated assistant to ensure that there is sufficient volume and diversity among the gradients utilized to update the global hotword-free invocation model.
[0037] In other words, the remote gradients generated in the remote system 160 can act as proxies for client data that is difficult to obtain. This data can include, for example, false positives and false negatives for ML models trained to make predictions (e.g., hotword detection models, hotword free call models, voice identification models, face identification models, etc.). Additionally, the remote gradients generated in the remote system 160 can be generated based on specific words or phrases identified by the remote training engine 136 that commonly cause problems and errors for various ML models described herein. For example, homonyms can cause errors for ASR models and hotword detection models. The remote system 160 can generate remote gradients based on homonymous words or phrases that commonly cause errors in these models to strengthen the ML models and avoid catastrophic forgetting.
[0038] By using the techniques described herein, various technical advantages may be achieved. As one non-limiting example, by utilizing both the client gradients and the remote gradients generated in the manner described herein, the corresponding global ML model may be updated based on diverse and balanced data, thereby reducing the effects of catastrophic forgetting and resulting in a more robust global ML model with higher precision and / or recall. For example, a remote system may generate remote gradients based on an identified need for a particular type of gradient for a particular global ML model that may not otherwise be obtainable within a federated learning framework due to privacy considerations. As a result, when the corresponding global ML model (or its weights) is deployed to a client device, the on-device ML model will also be more robust and have higher precision and / or recall.
[0039] 2, a client device 250 is shown in an implementation in which various on-device ML engines are included as part of (or in communication with) the automated assistant client 240. Respective ML models are also shown interfacing with the various on-device ML engines. Other components of the client device 250 are not shown in FIG. 2 for simplicity. FIG. 2 shows one example of how the various on-device ML engines and their respective ML models may be utilized by an automated assistant in performing various actions.
[0040] The client device 250 in FIG. 2 is shown with one or more microphones 211, one or more speakers 212, one or more visual components 213, and a display 214 (e.g., a touch-sensitive display). The client device 250 may further include pressure sensors, proximity sensors, accelerometers, magnetometers, and / or other sensors that are utilized to generate other sensor data in addition to the audio data captured by the one or more microphones 211. The client device 250 at least selectively executes the automated assistant client 240. The automated assistant client 240 includes, in the example of FIG. 2, a hotword detection engine 222, a hotword-free call engine 224, a continuous conversation engine 226, an ASR engine 228, an object detection engine 230, an object classification engine 232, a voice identification engine 234, and a face identification engine 236. The automated assistant client 240 further includes a voice capture engine 216 and a vision capture engine 218. It should be understood that the ML engines and ML models shown in FIG. 2 are provided for purposes of example and are not meant to be limiting. For example, the automated assistant client 240 can further include additional and / or alternative engines, such as a TTS engine and a respective TTS model, a VAD engine and a respective VAD model, an endpoint detector engine and a respective endpoint detector model, a lip action engine and a respective lip action model, and / or other engines having associated machine learning models. Furthermore, it should be understood that one or more of the engines and / or models described herein can be combined such that a single engine and / or model can perform the functions of multiple engines and / or models described herein.
[0041] One or more cloud-based automated assistant components 270 may optionally be implemented on one or more computing systems (collectively referred to as "cloud" computing systems) communicatively coupled to the client device 250 via one or more of the networks described with respect to FIGS. 1A-1D, as generally indicated by 299. The cloud-based automated assistant components 270 may be implemented, for example, via a cluster of high performance servers. In various implementations, an instance of the automated assistant client 240, by interacting with one or more cloud-based automated assistant components 270, may form what appears from the user's perspective to be a logical instance of an automated assistant, as generally indicated by 295, with which the user may engage in human-computer interactions (e.g., verbal, gesture-based, and / or touch-based interactions).
[0042] The client device 250 may be, for example, a desktop computing device, a laptop computing device, a tablet computing device, a mobile phone computing device, a computing device in the user's vehicle (e.g., an in-car communication system, an in-car entertainment system, an in-car navigation system), a standalone interactive speaker, a smart appliance such as a smart television (or a standard television with a network dongle with automated assistant functionality), and / or a user's wearable device that includes a computing device (e.g., a user's watch with a computing device, a user's glasses with a computing device, a virtual reality or augmented reality computing device). Additional and / or alternative client devices may be provided.
[0043] The one or more vision components 213 can take a variety of forms, such as a monocular camera, a stereo camera, a LIDAR component (or other laser-based component), a radar component, etc. The one or more vision components 213 can be used, for example, by the vision capture engine 218 to capture image data corresponding to a visual frame (e.g., an image frame, a laser-based visual frame) of an environment in which the client device 250 is located. In some implementations, such visual frames can be utilized to determine whether a user is present near the client device 250 and / or the distance of the user (e.g., the user's face) relative to the client device 250. Such a determination can be utilized, for example, in determining whether to invoke various on-device machine learning engines and / or other engines illustrated in FIG. 2. Additionally, the audio capture engine 216 can be configured to capture user speech and / or other audio data captured via one or more of the microphones 211.
[0044] As described herein, such audio data and other non-microphone sensor data (also referred to as client data) may be processed by various engines shown in FIG. 2 to make predictions at client device 250 using corresponding ML models (including the updated global ML model and / or updated weights thereof) generated in the manner described above with respect to FIGS. 1A-1D.
[0045] As one non-limiting example, the hotword detection engine 222 may detect whether the audio data is a specific word or phrase (e.g., "Ok Google," "Hey Google," "What is the weather, Google") to invoke the automated assistant 295 or a specific function of the automated assistant 295.The hotword detection model 222A can be utilized to predict whether the non-microphone sensor data (e.g., image data) includes a gesture or cue to invoke the automated assistant 295 (e.g., based on the user's gaze and, optionally, further based on the user's mouth movements), the hotword-free invocation engine 224 can be utilized to predict whether the non-microphone sensor data (e.g., image data) includes a gesture or cue to invoke the automated assistant 295 (e.g., based on the user's gaze and, optionally, based on the user's mouth movements), the continuing conversation engine 226 can be utilized to predict whether further audio data is directed to the automated assistant 295 (e.g., or is directed to an additional user in the environment of the client device 250), the ASR engine 228 can be utilized to generate recognized text or to predict phonemes and / or tokens corresponding to the audio data detected at the client device 250 and generate recognized text based on the phonemes and / or tokens, and the object detection engine 226 can be utilized to predict whether the non-microphone sensor data (e.g., image data) includes a gesture or cue to invoke the automated assistant 295 (e.g., based on the user's gaze and, optionally, further based on the user's mouth movements), the continuing conversation engine 226 can be utilized to predict whether further audio data is directed to the automated assistant 295 (e.g., or is directed to an additional user in the environment of the client device 250), the ASR engine 228 can be utilized to generate recognized text or to predict phonemes and / or tokens corresponding to the audio data detected at the client device 250 and generate recognized text based on the phonemes and / or tokens, and the object detection engine 228 can be utilized to predict whether the non-microphone sensor data (e.g., image data) includes a gesture or cue to invoke the automated assistant 295 (e.g., based on the user's gaze and, optionally, further based on the user's mouth movements), and the object detection 30 may utilize object detection model 230A to predict the location of an object contained within image data of an image captured at client device 250, object classification engine 232 may utilize object classification model 232A to predict the object classification of an object contained within image data of an image captured at client device 250, voice identification engine 234 may utilize voice identification model 234A to predict whether audio data captures the speech of one or more users of client device 250 (e.g., by generating speaker embeddings or other representations that may be compared to corresponding actual embeddings for one or more of the users of client device 250), and face identification engine 236 may utilize face identification model to predict whether image data captures one or more of users in the environment of client device 250 (e.g., by generating image embeddings or other representations that may be compared to corresponding image embeddings for one or more of the users of client device 250).
[0046] In some implementations, the client device 250 may further include a natural language understanding (NLU) engine 238 and a fulfillment engine 240. The NLU engine 238 may utilize the NLU model 238A to perform on-device natural language understanding on the recognized text, predicted phonemes, and / or predicted tokens generated by the ASR engine 228 to generate NLU data. The NLU data may include, for example, an intent corresponding to the utterance, and optionally slot values for parameters related to the intent. Furthermore, the fulfillment engine 240 may utilize the on-device fulfillment model 240A to generate fulfillment data based on processing the NLU data. This fulfillment data may define local and / or remote responses (e.g., answers) to utterances provided by a user of the client device 250, interactions to perform in locally installed applications based on the utterance, commands to send to Internet-of-things (IoT) devices (directly or via a corresponding remote system) based on the utterance, and / or other resolution actions to perform based on the utterance. The fulfillment data is then provided for local and / or remote fulfillment / execution of the determined action to resolve the utterance. Execution may include, for example, rendering a local and / or remote response (e.g., visually and / or audibly (optionally utilizing an on-device TTS module)), interacting with a locally installed application, sending a command to the IoT device, and / or other actions. In other implementations, the NLU engine 234 and the fulfillment engine 240 may be omitted and the ASR engine 228 may generate the fulfillment data based directly on the audio data.For example, assume that ASR engine 228 processes an utterance of "turn on the lights" using ASR model 228A. In this example, ASR engine 228 can then generate a semantic output that is sent to a software application associated with the light and / or sent directly to the light indicating that the light should be turned on.
[0047] In particular, the cloud-based automated assistant component 270 includes a cloud-based counterpart to the engines and models described herein with respect to FIG. 2. However, in various implementations, as described above with respect to FIGS. 1A-1D, the engines and models may not be invoked, since they may be sent directly to the client device 250 and executed locally at the client device 250. Nevertheless, a remote execution module that performs remote execution based on locally or remotely generated NLU data and / or fulfillment data may also be optionally included. Additional and / or alternative remote engines may be included. As described herein, in various implementations, on-device speech processing, on-device image processing, on-device NLU, on-device fulfillment, and / or on-device execution may be prioritized at least for the reduced latency and / or network usage they provide when resolving utterances (because no client-server round trips are required to resolve utterances). However, one or more cloud-based automated assistant components 280 may be utilized, at least selectively. For example, such components may be utilized in parallel with on-device components, and outputs from such components may be utilized when the local components fail. For example, if any of the on-device engines and / or models fail (e.g., due to the relatively limited resources of the client device 150), the more robust resources of the cloud may be utilized.
[0048] 3, a flow chart is shown illustrating an example method 300 of generating client gradients locally at a client device to be utilized in updating a machine learning model. For convenience, the operations of the method 300 are described with reference to a system that performs the operations. The system of the method 300 includes one or more processors and / or other components of a client device (e.g., the client device 150 of FIG. 1, the client device 250 of FIG. 2, the computing device 610 of FIG. 6, and / or other client devices). Furthermore, although the operations of the method 300 are shown in a particular order, this is not meant to be limiting. One or more operations may be reordered, omitted, or added.
[0049] In block 352, the system identifies client data at the client device. In some implementations, block 352 includes optional sub-block 352A. In optional sub-block 352A, the system detects audio data capturing speech in an environment of the client device via one or more microphones of the client device. The audio data may capture at least a portion of the speech of a user of the client device. In other implementations, block 352 includes optional sub-block 352B. In optional sub-block 352B, the system detects non-microphone sensor data via a non-microphone sensor of the client device. The non-microphone sensor data may include, for example, image data capturing an environment of the client device via a visual component of the client device, and / or text segments.
[0050] At block 354, the system processes the client data to generate a predicted output using an on-device ML model stored locally at the client device. The predicted output generated using the on-device ML model may be based on the client data identified at block 352 and the on-device ML model utilized to process the client data at block 354. For example, in an implementation where the client data corresponds to audio data, one or more audio-based models may be utilized to process the client data to generate a corresponding predicted output. For example, a hotword model may be utilized to process the audio data to generate a predicted output related to whether the audio data includes a particular word or phrase for invoking an automated assistant, an ASR model may be utilized to process the audio data to generate a predicted output related to predictive text related to the audio data, etc. As another example, in an implementation where the client data corresponds to image data, one or more image-based models may be utilized to process the client data to generate a corresponding predicted output. For example, a hotword-free invocation model may be utilized to process the image data to generate a predicted output related to whether the image data includes a gesture or mouth movement to invoke an automated assistant, an object recognition model may be utilized to process the image data to generate a predicted output related to a classification of one or more objects captured within the image data, etc.
[0051] In block 356, the system generates gradients based on the predicted output. In some implementations, block 356 includes optional sub-block 356A. In optional sub-block 356A, the system generated the gradients using supervised learning locally at the client device. In these implementations, the system can compare the predicted output to a corresponding ground truth output. The system can utilize one or more monitoring signals as the corresponding ground truth output. For example, assume that a client device generates audio data that captures a particular word or phrase for invoking an automated assistant, but generates a hot word model where the predicted output indicates that the audio data does not contain the particular word or phrase for invoking an automated assistant. Further assume that the user subsequently invokes the automated assistant (e.g., via an additional utterance or other user input (e.g., a squeeze of the client device or a touch input directed at an automated assistant graphical element) to invoke the automated assistant). In this example, the system can determine that the automated assistant should have been invoked based on the utterance (e.g., a false negative), and the corresponding ground truth output for the predicted output indicates that the automated assistant should have been invoked.
[0052] As another example, assume that a client device generates audio data capturing a particular word or phrase for invoking an automated assistant, and generates a hotword model in which the prediction output indicates that the audio data contains the particular word or phrase for invoking an automated assistant. Further assume that the user subsequently cancels the invocation of the automated assistant (e.g., via an additional utterance to invoke the automated assistant or other user input (e.g., squeezing the client device or touch input directed at an automated assistant graphical element)). In this example, the system may determine that the automated assistant should not have been invoked based on the utterance (e.g., a false positive), and the corresponding ground truth output for the prediction output indicates that the automated assistant should not have been invoked. Although block 356 is described with respect to a monitoring signal for the hotword model, this is for purposes of example and is not meant to be limiting, and it should be understood that any monitoring signal generated and / or inferred by the system based on user feedback may be utilized. For example, if an ASR model processes audio data and a transcription of one or more ASR speech hypotheses is presented to the user, any changes to the transcription may be utilized as a monitoring signal. Also, for example, if a voice recognition model processes audio data to authenticate a user's identity, but the user is not recognized and then the user provides a password or other authentication information, this other authentication information may be used as a monitoring signal.
[0053] In other implementations, block 356 includes optional sub-block 356B. In optional sub-block 356B, the system generated the gradients using unsupervised learning (or semi-supervised learning) locally at the client device. Notably, in these implementations, there is no supervisory signal for the system to utilize in generating the gradients. For example, assume that the client data identified at the client device is image data captured via a visual component of the client device, and an on-device image-based ML model attempts to reconstruct the image data based on an encoding of the image data, resulting in predicted image data. In this example, the system can compare the image data and the predicted image data to determine a difference between them, and the system can generate a gradient based on the determined difference. As another example, assume that the client data detected at the client device is audio data captured via a microphone of the client device, including a first portion and a second portion following the first portion, and an on-device ML model attempts to predict the second portion of the audio data based on an encoding of the first portion of the audio data, resulting in a predicted second portion of the audio data. In this example, the system may compare the second portion of the audio data to the predicted second portion of the audio data to determine a difference between them, and the system may generate a gradient based on the determined difference.
[0054] At block 358, the system determines whether a condition for transmitting the gradient generated at block 356 is met. The conditions may include, for example, the client device being charged, the client device having at least a threshold state of charge, the temperature of the client device (based on one or more on-device temperature sensors) being below a threshold, the client device not being held by a user, a temporal condition associated with the client device (e.g., for a particular period of time, every N hours where N is a positive integer, and / or other temporal conditions associated with the client device), whether a threshold number of gradients have been generated by the client device, and / or other conditions. If, in an iteration of block 358, the system determines that the condition for transmitting the gradient generated at block 356 is not met, the system may continually monitor whether the condition at block 358 is met. In particular, when the system monitors for fulfillment of the condition at block 358, the system may continue to generate additional gradients according to blocks 352-356 of method 300. If, in the iteration of block 358, the system determines that the conditions for transmitting the gradient generated in block 356 are met, the system may proceed to block 360.
[0055] At block 360, the system transmits the generated gradients from the client device to the remote system to have the remote system utilize the generated gradients to update weights of a global ML model stored remotely at the remote system. Additionally, multiple additional client devices can generate additional gradients according to method 300 and transmit the additional gradients to the remote system when respective conditions are met at the additional client devices (e.g., additional client device 170 of FIG. 1).
[0056] In block 362, the system receives, at the client device, the updated ML model and / or its updated weights from the remote system. Notably, blocks 360 and 362 are not connected by an arrow. This indicates that the updated ML model and / or its updated weights are received at the client device when the remote system decides to send the updated ML model and / or its updated weights to the client device based on the satisfaction of one or more conditions at the client device and / or the remote system. The client device can replace the corresponding on-device ML model and / or its corresponding weights with the updated ML model and / or its updated weights in local memory.
[0057] In block 364, the system uses the updated ML model to make at least one prediction based on the additional client data identified at the client device. The prediction made at the client device may depend on the updated ML model received from the remote system in block 362.
[0058] It should be understood that while the method 300 of FIG. 3 is generally described with respect to an audio-based model, this is by way of example and not meant to be limiting. For example, the techniques described herein may also be utilized to generate client gradients and send client gradients to a remote system to update an image-based model, a text-based model, and / or any other ML model. Additionally, multiple instances of the method 300 of FIG. 3 may be executed in parallel at a user's and / or other users' client devices and / or additional client devices to generate and / or send various gradients to a remote system.
[0059] 4, a flow chart is shown illustrating an example method 400 of remotely generating remote gradients at a remote system to be utilized in updating a machine learning model. For convenience, the operations of method 400 are described with reference to a system that performs the operations. The system of method 400 includes one or more processors and / or other components of a remote system (e.g., remote system 160 of FIG. 1, computing device 610 of FIG. 6, and / or any other computing device). Furthermore, although the operations of method 400 are shown in a particular order, this is not meant to be limiting. One or more operations may be reordered, omitted, or added.
[0060] At block 452, the system receives, at the remote system, from the multiple client devices, multiple client gradients generated locally at the multiple client devices based on corresponding client data. Each of the multiple client gradients may be generated at the multiple client devices in the same or similar manner as described with respect to method 300 of FIG.
[0061] In block 454, the system generates a plurality of remote gradients. Block 454 may, for example, perform the operations of sub-blocks 454A, 454B, and 454C to generate remote gradients. In sub-block 454A, the system obtains remote data accessible to the remote system. In some implementations, the remote data may be obtained from an online video sharing platform, an image sharing platform, an audio sharing platform, and / or a text-based platform that is not access restricted as the client data generated locally at the corresponding one of the client devices and / or the client data received locally at the corresponding one of the client devices. In additional or alternative implementations, with the permission of the corresponding user of the corresponding one of the multiple client devices, the remote data may be data that is access restricted data accessible to the remote system. Furthermore, the remote data may correspond to data generated by devices having different characteristics (e.g., different types of microphones, different types of visual components, etc.). In sub-block 454B, the system processes the remote data to generate a predicted output using a global ML model. In sub-block 454C, the system generates remote gradients for inclusion in the plurality of remote gradients based on the predicted output. The system can return to sub-block 454A to obtain additional remote data to generate additional gradients, and / or can return to sub-block 454B to generate additional predicted outputs based on the same remote data. The system can process the remote data to generate predicted outputs in the same or similar manner as described with respect to block 354 of method 300 of FIG. 3, but using a global ML model instead of an on-device ML model.Further, the system may generate a remote gradient based on the predicted output in the same or similar manner as described with respect to block 356 of the method of FIG. 3, but based on the predicted output generated based on the remote data.
[0062] In some implementations, the system can repeat this process of generating remote gradients until a threshold amount of remote gradients are generated. For example, the system can continue to generate remote gradients until the amount of gradients matches the amount of client gradients received from multiple client devices, a developer-defined threshold amount, or some other quantitative threshold. In some versions of those implementations, the threshold amount of remote gradients generated by the remote system can be based on the corresponding type of client gradients received from multiple client devices. For example, assume that 1000 client gradients are received from multiple client devices, and assume that 500 of the 1000 client gradients are audio-based client gradients and another 500 of the 1000 client gradients are image-based client gradients. In this example, the system can obtain audio-based remote data, process the audio-based remote data using various audio-based global ML models to generate predicted outputs, and process the predicted outputs to generate audio-based remote gradients. This process can be repeated until there are 500 audio-based remote gradients. Further assume that of those 500 audio-based client gradients, 300 of the audio-based client gradients are client hotword gradients and another 200 of the audio-based client gradients are client ASR gradients. In this example, the system can process the remote audio data using a global hotword model to generate the 300 remote hotword gradients and can process the remote audio data using an ASR model to generate the 200 remote ASR gradients.
[0063] At block 456, the system selects a set of client gradients from among the plurality of client gradients received at block 452. In some implementations, the system may select a set of client gradients based on one or more criteria. The one or more criteria may include, for example, a type of client gradients available to the system, a threshold amount of client gradients available to the system, a threshold duration of updates using client gradients, and / or other criteria. For example, the system may select a set of 500 audio-based client gradients to be utilized to update an audio-based model (e.g., a single audio-based model or multiple heterogeneous audio-based models), a set of 200 hotword client gradients to be utilized to update a hotword model, etc. As another example, the system may select a set of 600 image-based client gradients to be utilized to update an image-based model (e.g., a single image-based model or multiple heterogeneous image-based models), a set of 300 hotword client gradients to be utilized to update a hotword-free call model, etc. In other implementations, the set of client gradients may include any combination of audio-based client gradients, image-based client gradients, text-based client gradients, and / or any other type of client gradients (or specific types of client gradients).
[0064] In block 458, the system selects a set of remote gradients from among the multiple remote gradients. In some implementations, block 458 includes optional sub-block 458A. In optional sub-block 458A, the system selects a set of remote gradients based on the type of gradients included in the set of client gradients. For example, if the set of client gradients selected in block 456 includes a set of audio-based gradients (or a particular type of audio-based gradients), the set of remote gradients selected in block 458 may also include audio-based gradients. In additional or alternative implementations, block 458 includes optional sub-block 458B. In optional sub-block 458B, the system additionally or alternatively selects a set of remote gradients based on the amount of client gradients included in the set of client gradients. For example, if the set of client gradients selected in block 456 includes a set of 500 audio-based gradients (or a particular type of audio-based gradients), the set of remote gradients selected in block 458 may also include 500 audio-based gradients. As another example, if the set of client gradients selected in block 456 includes a set of 500 audio-based gradients (or audio-based gradients of a particular type), the set of remote gradients selected in block 458 may also include a proportional amount of audio-based gradients (e.g., 250 for 50%, 100 for 20%, etc.). In other implementations, the set of remote gradients may include any combination of audio-based remote gradients, image-based remote gradients, text-based remote gradients, and / or any other types of remote gradients (or remote gradients of a particular type).
[0065] At block 460, the system utilizes the set of client gradients and the set of remote gradients to update the weights of the global ML model. In particular, the system can update the weights of the corresponding ML model based on the gradients contained in the set of client gradients and / or the set of remote gradients. For example, briefly referring to FIG. 5, various example methods of blending the set of client gradients and the set of remote gradients in updating the global machine learning model at block 460 of FIG. 4 are shown.
[0066] In some implementations, as illustrated by method 460A of FIG. 5, the system can utilize the set of client gradients to update the weights of a global ML model in block 552A, and then utilize the set of remote gradients to further update the weights of the global ML model. For example, assume that the set of client gradients includes multiple ASR client gradients and the set of remote gradients includes multiple ASR remote gradients. In this example, the system can update one or more global ASR model weights based on the multiple ASR client gradients, and then subsequently update one or more global ASR model weights based on the multiple ASR remote gradients.
[0067] In other implementations, as illustrated by method 460B of FIG. 5, the system can utilize the set of remote gradients to update the weights of the global ML model in block 552B, and then utilize the set of client gradients to further update the weights of the global ML model. For example, assume that the set of client gradients includes multiple ASR client gradients, and assume that the set of remote gradients includes multiple ASR remote gradients. In this example, the system can update one or more global ASR model weights based on the multiple ASR remote gradients, and then subsequently update one or more global ASR model weights based on the multiple ASR client gradients.
[0068] In yet another implementation, as illustrated by method 460C of FIG. 5, the system may utilize a set of client gradients to update a first weight of a first instance of a global ML model in block 552C1, and in parallel or successively utilize a second set of gradients to update a second weight of a second instance of the global ML model in block 552C2. Furthermore, the system may then utilize the first weight and the second weight to update the weight of the global ML model. For example, assume that the set of client gradients includes a plurality of ASR client gradients and assume that the set of remote gradients includes a plurality of ASR remote gradients. In this example, the system may update a first weight of one or more first instances of one or more global ASR models based on the plurality of ASR client gradients, and in parallel or successively update a second weight of a second instance of one or more global ASR models based on the plurality of ASR remote gradients. Furthermore, the system may analyze the updated first weights and the updated second weights and utilize some combination of the updated first weights and the updated second weights to update one or more of the global ASR models. For example, the system may determine an average of the updated first weights and the updated second weights and utilize the average weights as updated weights for one or more of the global ASR models.
[0069] 5 are described with respect to ASR gradients utilized to update one or more global ASR models, it should be understood that this is for purposes of example and is not meant to be limiting. For example, the techniques described herein may be utilized to update various global ML models or their weights based on corresponding gradients associated with the various global ML models.
[0070] 4, in some alternative implementations, the system can utilize the client gradients received at block 452 and the remote gradients generated at block 456 to update the weights of the global ML model without performing the operations of blocks 456 and 458. In these implementations, the system can process the client gradients and the remote gradients in a FIFO manner. For example, the system can identify the type of client gradient received and / or the type of remote gradient generated, identify a corresponding global ML model associated with the type of client gradient and / or remote gradient, and update the corresponding global ML model as the gradients are received at and / or generated by the remote system.
[0071] In particular, the system may repeat the operations of blocks 452-460 (or simply 452, 454, and 460) until the update of the global ML model is complete. The system may determine that the update of the global ML model is complete based on, for example, a threshold duration amount of time spent updating the global ML model, a threshold amount of gradients (remote gradients and / or client gradients) since the global ML model weights were last updated, measured improvements to the global ML model, and / or the passage of a threshold duration since the global ML model was last trained, and / or other criteria. Once the global ML model has been updated, the system may then proceed to block 458.
[0072] In block 462, the system determines whether the conditions for transmitting the global ML model and / or its weights in block 460 are met. The conditions can be based on whether the client device is ready to receive the global ML model and / or its weights (e.g., the same conditions as described above with respect to block 358 of FIG. 3), other conditions specific to the remote system, such as based on the performance of the global ML model meeting a performance threshold, based on the global ML model being updated based on a threshold amount of gradients, and / or some combination of these conditions. If, in an iteration of block 462, the system determines that the conditions for transmitting the updated global ML model and / or its weights in block 460 are not met, the system can continuously monitor whether the conditions are met in block 462. In particular, when the system monitors for the fulfillment of the conditions in block 462, the system can continue to update the global ML model according to blocks 452-460 of method 400. If, in an iteration of block 462, the system determines that the conditions for transmitting the updated global ML model and / or its weights in block 460 are met, the system can proceed to block 464.
[0073] At block 464, the system transmits the updated global ML model and / or its weights from the remote system to one or more of the multiple client devices. The system may transmit the updated global ML model and / or its weights to each of the multiple client devices that sent client gradients to the remote system, to additional client devices other than the client devices that sent client gradients to the remote system, or to a subset of those client devices that sent client gradients to the remote system.
[0074] In various implementations, an updated global ML model and / or its weights may be sent to a client device based on a geographic region and / or other characteristics (e.g., primary language) of the multiple client devices or users of the multiple client devices. For example, the updated global ML model may be one of N available machine learning models (e.g., N is a positive integer) for a given language, but may be specific to a particular geographic region and updated based on client gradients provided to client devices located primarily within the particular geographic region. This allows, for example, an instance of a global ASR model to be trained based on client ASR gradients that are specific to a particular region and may be updated to account for various accents and dialects.
[0075] It should be understood that while method 400 of FIG. 4 is generally described with respect to audio-based models, this is by way of example and not meant to be limiting. For example, the techniques described herein may also be utilized to generate client gradients and send client gradients to a remote system to update image-based models, text-based models, and / or any other ML models. Additionally, multiple instances of method 400 of FIG. 4 may be executed in parallel by a remote system to generate various remote gradients and / or update various global ML models.
[0076] 6, there is shown a block diagram of an example computing device 610 that may be optionally utilized to perform one or more aspects of the techniques described herein. In some implementations, one or more of the client device, cloud-based automated assistant component, and / or other components may comprise one or more components of the example computing device 610.
[0077] Computing device 610 typically includes at least one processor 614 that communicates with a number of peripheral devices via a bus subsystem 612. These peripheral devices may include, for example, a storage subsystem 624, including a memory subsystem 625 and a file storage subsystem 626, user interface output devices 620, user interface input devices 622, and a network interface subsystem 616. The input and output devices allow a user to interact with the computing device 610. The network interface subsystem 616 provides an interface to external networks and is coupled to corresponding interface devices in other computing devices.
[0078] The user interface input devices 622 may include a keyboard, a pointing device such as a mouse, a trackball, a touchpad, or a graphics tablet, a scanner, a touch screen integrated into a display, an audio input device such as a voice recognition system, a microphone, and / or other types of input devices. In general, use of the term "input device" is intended to include all possible types of devices and methods for inputting information into the computing device 610 or a communications network.
[0079] The user interface output devices 620 may include a display subsystem, a printer, a fax machine, or a non-visual display such as an audio output device. The display subsystem may include a flat panel device such as a cathode ray tube (CRT), a liquid crystal display (LCD), a projection device, or some other mechanism for creating a visible image. The display subsystem may also provide a non-visual display, such as via an audio output device. In general, use of the term "output device" is intended to include all possible types of devices and methods for outputting information from the computing device 610 to a user or to another machine or computing device.
[0080] Storage subsystem 624 stores programming and data structures that provide the functionality of some or all of the modules described herein. For example, storage subsystem 624 may include logic for performing selected aspects of the methods disclosed herein, as well as for implementing the various components illustrated in FIGS. 1A-1D.
[0081] These software modules are generally executed by the processor 614 alone or in combination with other processors. The memory 625 used within the storage subsystem 624 may include several memories including a main random access memory (RAM) 630 for storing instructions and data during program execution, and a read-only memory (ROM) 632 in which fixed instructions are stored. The file storage subsystem 626 may provide persistent storage for program and data files and may include a hard disk drive, a floppy disk drive with associated removable media, a CD-ROM drive, an optical drive, or a removable media cartridge. Modules implementing the functionality of a particular implementation may be stored by the file storage subsystem 626 within the storage subsystem 624 or within other machines accessible by the processor 614.
[0082] The bus subsystem 612 provides a mechanism for allowing the various components and subsystems of the computing device 610 to communicate with each other as intended. Although the bus subsystem 612 is shown diagrammatically as a single bus, alternative implementations of the bus subsystem may use multiple buses.
[0083] The computing device 610 may be of various types, including a workstation, a server, a computing cluster, a blade server, a server farm, or any other data processing system or computing device. Due to the ever-changing nature of computers and networks, the description of the computing device 610 shown in FIG. 6 is intended only as a specific example for purposes of illustrating some implementations. Many other configurations of the computing device 610 may have more or fewer components than the computing device shown in FIG.
[0084] In situations where the systems described herein may collect or otherwise monitor personal information about a user or utilize personal information and / or monitoring information, the user may be provided with an opportunity to control whether a program or feature collects user information (e.g., information about the user's social network, social actions or activities, occupation, user preferences, or the user's current geographic location) or whether and / or how to receive content from a content server that may be more relevant to the user. Also, certain data may be processed in one or more ways before it is stored or used, such that personally identifiable information is removed. For example, the user's identity may be processed such that personally identifiable information cannot be determined about the user, or the user's geographic location may be generalized where the geographic location information is obtained (such as to the city, zip code, or state level) such that the user's specific geographic location cannot be identified. Thus, the user may have control over how information is collected and / or used about the user.
[0085] In some implementations, a method is provided that is executed by one or more processors of a client device, the method including receiving a plurality of client gradients from a plurality of corresponding client devices. Each of the plurality of client gradients is generated locally at a given one of the plurality of corresponding client devices based on processing corresponding audio data capturing at least a portion of a corresponding speech of a given one of the plurality of corresponding client devices. The method further includes generating a plurality of remote gradients. Generating each of the plurality of remote gradients includes obtaining additional audio data capturing at least a portion of an additional speech of an additional user, using a remotely stored global machine learning (ML) model at the remote system to process the additional audio data to generate a predicted output, and generating an additional gradient for inclusion in the plurality of remote gradients based on comparing the additional predicted output to a ground truth output corresponding to the additional audio data. The method further includes selecting a set of client gradients from among the plurality of client gradients, selecting an additional set of remote gradients from among the plurality of remote gradients, and utilizing the set of client gradients and the additional set of remote gradients to update weights of the global ML model.
[0086] These and other implementations of the technology may include one or more of the following features.
[0087] In some implementations, utilizing the set of client gradients and the additional set of remote gradients to update the weights of the global ML model may include utilizing the set of client gradients to update the weights of the global ML model, and after utilizing the set of client gradients to update the weights of the global ML model, utilizing the additional set of remote gradients to further update the weights of the global ML model.
[0088] In some implementations, utilizing the set of client gradients and the additional set of remote gradients to update the weights of the global ML model may include utilizing the additional set of remote gradients to update the weights of the global ML model, and utilizing the set of client gradients to further update the weights of the global ML model after utilizing the additional set of remote gradients to update the weights of the global ML model.
[0089] In some implementations, utilizing the set of client gradients and the additional set of remote gradients to update the weights of the global ML model can include utilizing the set of client gradients to update a first weight of a first instance of the global ML model, and in parallel utilizing the additional set of remote gradients to update a second weight of a second instance of the global ML model, and utilizing the updated first weight of the first instance of the global ML model and the updated second weight of the second instance of the global ML model to update the weights of the global ML model. In some versions of those implementations, utilizing the updated first weight of the first instance of the global ML model and the updated second weight of the second instance of the global ML model to update the weights of the global ML model can include determining an average of the updated first weight of the first instance of the global ML model and the updated second weight of the second instance of the global ML model, and utilizing the average of the updated first weight and the updated second weight to update the weights of the global ML model.
[0090] In some implementations, the threshold amount of additional gradients can be based on the amount of gradients received from multiple corresponding client devices.
[0091] In some implementations, selecting the set of client gradients can include selecting one or more of the plurality of client gradients for inclusion in the set of client gradients based on one or more of the plurality of client gradients being a particular type of gradient. In some versions of those implementations, selecting the additional set of remote gradients can include selecting one or more of the plurality of remote gradients for inclusion in the additional set of remote gradients based on one or more of the plurality of remote gradients being a particular type of gradient.
[0092] In some implementations, selecting the set of client gradients can include selecting one or more of the plurality of client gradients for inclusion in the set of client gradients based on one or more of the plurality of client gradients being a particular type of gradient. In some versions of those implementations, selecting the additional set of remote gradients can include selecting one or more of the plurality of remote gradients for inclusion in the additional set of remote gradients based on one or more of the plurality of remote gradients being a particular type of gradient.
[0093] In some implementations, the method may further include analyzing a distribution of remote gradients stored in one or more databases accessible by the remote system to identify a particular type of gradient. The generated multiple remote gradients may conform to a particular type of gradient. In some versions of those implementations, identifying a particular type of gradient may include determining, based on analyzing the distribution of remote gradients, that the distribution of remote gradients does not include a threshold amount of remote gradients of the particular type of gradient.
[0094] In some implementations, the method may further include transmitting the updated global ML model or the updated global weights of the global ML model to the client device. The transmitting the global ML model or the updated global weights may be after the remote system updates the global weights of the global ML model based on the set of client gradients and the additional set of remote gradients. Furthermore, the transmitting the updated global ML model or the updated global weights to the client device may cause the client device to replace the on-device ML model with the updated global ML model or replace the local weights of the on-device ML model with the updated global weights of the global ML model in the local storage of the client device.
[0095] In some implementations, the ground truth output corresponding to the additional audio data can be based on additional speech captured within the additional audio data. In some versions of those implementations, the additional speech captured within the additional audio data can include a particular word or phrase, and the ground truth output corresponding to the additional audio data can include an indication of whether the additional speech captures the particular word or phrase. In additional or alternative versions of those implementations, the additional speech captured within the additional audio data can include one or more terms, and the ground truth output corresponding to the additional audio data can include a transcription of the one or more terms.
[0096] In some implementations, a method is provided that is executed by one or more processors of a client device, the method including: detecting, by the one or more client processors of the client device, audio data capturing at least a portion of speech of a user of the client device via one or more microphones of the client device, processing the audio data to generate a predicted output using an on-device machine learning (ML) model stored locally at the client device, generating client gradients based on the predicted output, and transmitting the client gradients from the client device to a remote system. The method further includes obtaining, by one or more remote processors of the remote system, additional audio data capturing at least a portion of additional speech of an additional user, processing the additional audio data to generate an additional predicted output using a global ML model stored remotely at the remote system, generating remote gradients based on the additional predicted output, and utilizing the client gradients and the remote gradients to update weights of the global ML model.
[0097] These and other implementations of the technology may include one or more of the following features.
[0098] In some implementations, utilizing the client gradients and the remote gradients to update the weights of the global ML model may include utilizing the client gradients and additional client gradients received from corresponding additional client devices to update the weights of the global ML model, and after utilizing the client gradients and the additional client gradients to update the weights of the global ML model, utilizing the remote gradients and additional remote gradients generated at the remote system to further update the weights of the global ML model.
[0099] In some implementations, the step of utilizing the client gradients and the remote gradients to update the weights of the global ML model may include the steps of utilizing the remote gradients and additional remote gradients generated at the remote system to update the weights of the global ML model, and after the step of utilizing the remote gradients and the additional remote gradients to update the weights of the global ML model, utilizing the client gradients and additional client gradients received from corresponding additional client devices to further update the weights of the global ML model.
[0100] In some implementations, the step of utilizing the client gradients and the remote gradients to update the weights of the global ML model may include the steps of utilizing the client gradients and additional client gradients received from a corresponding additional client device to update a first weight of a first instance of the global ML model, and in parallel, utilizing the remote gradients and additional remote gradients generated at the remote system to update a second weight of a second instance of the global ML model, and utilizing the updated first weight of the first instance of the global ML model and the updated second weight of the second instance of the global ML model to update the weights of the global ML model.
[0101] In some implementations, the remote gradients generated based on processing the additional audio data by one or more of the processors of the remote system may be the same type of gradients that correspond to the client gradients generated based on processing the audio data by one or more of the processors of the client device. In some versions of those implementations, the type of gradient may include one of hot word gradients, automatic speech recognition (ASR) gradients, voice activity detection (VAD) gradients, sustained speech gradients, or speech discrimination gradients.
[0102] In some implementations, the remote gradients generated based on processing the additional audio data by one or more of the processors of the remote system may be a different type of gradient that corresponds to the client gradients generated based on processing the audio data by one or more of the processors of the client device.
[0103] In some implementations, generating client gradients based on the predicted outputs can include comparing the predicted outputs to ground truth outputs corresponding to the audio data, and generating remote gradients based on the additional predicted outputs can include comparing the additional predicted outputs to additional ground truth outputs corresponding to the additional audio data.
[0104] In some implementations, transmitting the client gradients can occur over a network and can include transmitting the gradients without transmitting any of the audio data and the predicted output.
[0105] In some implementations, the method further includes transmitting, by one or more remote processors of the remote system, the updated global ML model or the updated global weights of the global ML model to the client device. The transmitting of the global ML model or the updated global weights may be after the remote system updates the global weights of the global ML model based on the client gradients and the remote gradients. In some versions of those implementations, the method may further include receiving, by one or more of the processors of the client device, the updated global ML model or the updated global weights of the global ML model from the remote system, and causing the client device to replace, in the client device's local storage, the on-device ML model with the updated global ML model or replace the local weights of the on-device ML model with the updated global weights of the global ML model.
[0106] In some implementations, a method is provided that is executed by one or more processors of a client device, the method including: identifying, by the one or more client processors of the client device, a text segment stored locally at a user's client device; processing the text segment using an on-device text-to-speech (TTS) model stored locally at the client device to generate synthetic speech audio data including synthetic speech corresponding to the text segment; processing the synthetic speech audio data using a local machine learning (ML) model stored locally at the client device to generate a predicted output; generating gradients based on comparing the predicted output to a ground truth output corresponding to the text segment; and transmitting the generated gradients from the client device to a remote system. The method further includes obtaining, by one or more remote processors of the remote system, additional text segments accessible by the remote system; processing the additional text segments using a global TTS model remotely stored at the remote system to generate additional synthetic speech audio data including additional synthetic speech corresponding to the additional text segment; processing the additional synthetic speech audio data using the global ML model remotely stored at the remote system to generate additional predicted outputs; generating additional gradients based on comparing the additional predicted outputs to additional ground truth outputs corresponding to the additional text segments; and utilizing at least the gradients received from the client device and the additional gradients generated at the remote system to update weights of the global TTS model.
[0107] In some implementations, a method is provided that is executed by one or more processors of a client device, the method including receiving a plurality of client gradients from a plurality of corresponding client devices. Each of the plurality of client gradients is generated locally at a given one of the plurality of corresponding client devices based on processing corresponding image data capturing at least a portion of a corresponding environment of a given one of the plurality of corresponding client devices. The method further includes generating a plurality of remote gradients. Generating each of the plurality of remote gradients includes obtaining additional image data capturing at least a portion of an additional environment of an additional user, processing the additional image data using a remotely stored global machine learning (ML) model at the remote system to generate predicted outputs, and generating additional gradients for inclusion in the plurality of remote gradients based on comparing the additional predicted outputs to ground truth outputs corresponding to the additional image data. The method further includes selecting a set of client gradients from among the plurality of client gradients, selecting an additional set of remote gradients from among the plurality of remote gradients, and utilizing the set of client gradients and the additional set of remote gradients to update weights of the global ML model.
[0108] Various implementations can include a non-transitory computer-readable storage medium storing instructions executable by one or more processors (e.g., a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), and / or a tensor processing unit (TPU)) to perform methods such as one or more of the methods described herein. Other implementations can include an automated assistant client device (e.g., a client device including at least an automated assistant interface for interfacing with a cloud-based automated assistant component) including a processor operable to execute stored instructions to perform methods such as one or more of the methods described herein. Still other implementations can include a system of one or more servers including one or more processors operable to execute stored instructions to perform methods such as one or more of the methods described herein. [Explanation of symbols]
[0109] 101A Client Data 101B Ground Truth Output 102 Prediction Output 103 Client gradient, gradient 104A Remote Data 104B Remote data, ground truth output 105 Prediction Output 106 Remote Gradient, Gradient 107 Additional gradients, gradients 108 Updated ML Model, Updated ML Model 109A Audio Data 109B Ground Truth Output 110 Prediction output, actual text segment for "Ron Smith" 111 Client Gradient 112 Prediction Output 112A Audio data, text segment 112B Ground Truth Output 113 Prediction Output 114 Remote Gradient 115A Text Segment 115B Ground Truth Output 116 Synthetic speech audio data, predicted output 117 Prediction Output 118 Text-based client gradients, ASR client gradients, client gradients 119A Text Segment 119B Ground Truth Output 120 Synthetic Voice Audio Data 121 Prediction Output 122 Remote Gradient 124A Image data 124B Ground Truth Output 125 Prediction Output 126 Client Gradient 127A Image data 127B Ground Truth Output 128 Prediction Output 129 Remote Gradient 132A On-device Machine Learning (ML) Engine, On-device ML Engine 132A1 On-device TTS engine, Global TTS engine 132A2 On-device ASR engine, Global ASR engine 132B Global ML Engine 134A Gradient Engine 134B Gradient Engine 136 Remote Training Engine, Remote Training 138 Update Distribution Engine 150 client devices 152A Client Data Database, Client Device Database 152B Remote data database, remote system data database 154A On-device ML model database 154B Global ML Model Database 160 Remote Systems 170 additional client devices 185 Gradient Database 211 Microphone 212 Speaker 213 Visual Components 214 Display 216 Voice Capture Engine 218 Visual Capture Engine 222 Hotwords Detection Engine 222A Hotword Detection Model 224 Hotword-free calling engine 224A Hotword-free call model 226 Continuous Conversation Engine 226A Continuous Conversation Model 228 ASR engine 228A ASR model 230 Object Detection Engine 230A Object Detection Model 232 Object Classification Engine 232A Object Classification Model 234 Voice Recognition Engine 234A Voice Recognition Model 236 Face Recognition Engine 238 Natural Language Understanding (NLU) Engine, NLU Engine 238A NLU model 240 Automated Assistant Client, Fulfillment Engine 240A On-Device Fulfillment Model 250 client devices 270 Cloud-Based Automated Assistant Components 280 Cloud-Based Automated Assistant Components 295 Automated Assistants 610 Computing Devices 612 Bus Subsystem 614 processor 616 Network Interface Subsystem 620 User Interface Output Device 622 User Interface Input Devices 624 Memory Subsystem 625 Memory Subsystem, Memory 626 File Storage Subsystem 630 Main Random Access Memory (RAM) 632 Read-Only Memory (ROM)
Claims
1. 1. A method implemented by one or more processors, the method comprising: receiving a plurality of client gradients from a plurality of corresponding client devices, each of the plurality of client gradients being generated locally at the given one of the plurality of corresponding client devices based on processing corresponding audio data capturing at least a portion of a corresponding speech of a corresponding user of the given one of the plurality of corresponding client devices; Generating a plurality of remote gradients, each of the plurality of remote gradients comprising: obtaining additional audio data capturing at least a portion of additional utterances of additional users; processing the additional audio data using a remotely stored global machine learning (ML) model at a remote system to generate a predicted output; generating additional gradients for inclusion in the plurality of remote gradients based on comparing the additional predicted outputs to ground truth outputs corresponding to the additional audio data; and selecting a set of client gradients from among the plurality of client gradients; selecting an additional set of remote gradients from among the plurality of remote gradients; utilizing the set of client gradients and an additional set of remote gradients to update weights of the global ML model; Including, method.
2. utilizing the set of client gradients and an additional set of remote gradients to update the weights of the global ML model; utilizing the set of client gradients to update the weights of the global ML model; after the step of utilizing the set of client gradients to update the weights of the global ML model, utilizing an additional set of the remote gradients to further update the weights of the global ML model; Including, The method of claim 1.
3. utilizing the set of client gradients and an additional set of remote gradients to update the weights of the global ML model; utilizing the additional set of remote gradients to update the weights of the global ML model; after the step of utilizing the additional set of remote gradients to update the weights of the global ML model, utilizing the set of client gradients to further update the weights of the global ML model; Including, The method of claim 1.
4. utilizing the set of client gradients and an additional set of remote gradients to update the weights of the global ML model; utilizing the set of client gradients to update a first weight of a first instance of the global ML model; In parallel, using an additional set of the remote gradients to update a second weight of a second instance of the global ML model; and using the updated first weights of the first instance of the global ML model and the updated second weights of the second instance of the global ML model to update the weights of the global ML model; Including, The method of claim 1.
5. using the updated first weights of the first instance of the global ML model and the updated second weights of the second instance of the global ML model to update the weights of the global ML model, determining an average of the updated first weights of the first instance of the global ML model and the updated second weights of the second instance of the global ML model; using the average of the updated first weights and the updated second weights to update the weights of the global ML model; Including, The method of claim 4.
6. The method of claim 1 , wherein a threshold amount of additional gradients is based on an amount of the plurality of remote gradients received from the plurality of corresponding client devices.
7. The step of selecting a set of client gradients comprises: selecting one or more of the plurality of client gradients for inclusion within the set of client gradients based on the one or more of the plurality of client gradients being a particular type of gradient; 7. The method according to any one of claims 1 to 6.
8. selecting an additional set of remote gradients, selecting one or more of the plurality of remote gradients for inclusion in an additional set of remote gradients based on the one or more of the plurality of remote gradients being gradients of the particular type. The method of claim 7.
9. The step of selecting a set of client gradients comprises: selecting one or more of the plurality of client gradients for inclusion within the set of client gradients based on the one or more of the plurality of client gradients being a particular type of gradient; 7. The method according to any one of claims 1 to 6.
10. selecting an additional set of remote gradients, selecting one or more of the plurality of remote gradients for inclusion in an additional set of remote gradients based on the one or more of the plurality of remote gradients being gradients of the particular type. The method of claim 9.
11. analyzing a distribution of remote gradients stored in one or more databases accessible by the remote system to identify a particular type of gradient; the plurality of remote gradients generated conform to the particular type of gradient; 11. The method according to any one of claims 1 to 10.
12. The step of identifying a particular type of gradient comprises: determining, based on analyzing the distribution of remote gradients, that the distribution of remote gradients does not include a threshold amount of remote gradients of the particular type of gradient. The method of claim 11.
13. transmitting the updated global ML model or the updated global weights of the global ML model to the client device, the transmitting of the global ML model or the updated global weights being after the remote system has updated the global weights of the global ML model based on the set of client gradients and the additional set of remote gradients; transmitting the updated global ML model or the updated global weights to the client device causes the client device to replace an on-device ML model with the updated global ML model or replace local weights of the on-device ML model with the updated global weights of the global ML model in a local storage of the client device; 13. The method according to any one of claims 1 to 12.
14. 14. The method of claim 1, wherein the ground truth output corresponding to the additional audio data is based on the additional speech captured within the additional audio data.
15. 15. The method of claim 14, wherein the additional speech captured in the additional audio data includes a particular word or phrase, and the ground truth output corresponding to the additional audio data includes an indication of whether the additional speech captures the particular word or phrase.
16. 15. The method of claim 14, wherein the additional speech captured in the additional audio data includes one or more terms, and the ground truth output corresponding to the additional audio data includes a transcription of the one or more terms.
17. by one or more client processors of the client device, detecting, via one or more microphones of the client device, audio data capturing at least a portion of speech of a user of the client device; processing the audio data using an on-device machine learning (ML) model stored locally at the client device to generate a predicted output; generating client gradients based on the predicted output; transmitting the client gradient from the client device to a remote system; by one or more remote processors of said remote system; obtaining additional audio data capturing at least a portion of additional utterances of additional users; processing the additional audio data to generate additional predicted outputs using a remotely stored global ML model at the remote system; generating a remote gradient based on the additional predicted output; utilizing the client gradients and the remote gradients to update weights of the global ML model; The method includes:
18. utilizing the client gradients and the remote gradients to update the weights of the global ML model; utilizing the client gradients and additional client gradients received from corresponding additional client devices to update the weights of the global ML model; after the step of utilizing the client gradients and the additional client gradients to update the weights of the global ML model; utilizing the remote gradients and additional remote gradients generated at the remote system to further update the weights of the global ML model.
20. The method of claim 17, comprising:
19. utilizing the client gradients and the remote gradients to update the weights of the global ML model; utilizing the remote gradients and additional remote gradients generated at the remote system to update the weights of the global ML model; after the step of utilizing the remote gradients and the additional remote gradients to update the weights of the global ML model, utilizing the client gradients and additional client gradients received from corresponding additional client devices to further update the weights of the global ML model.
20. The method of claim 17, comprising:
20. utilizing the client gradients and the remote gradients to update the weights of the global ML model; utilizing the client gradients and additional client gradients received from corresponding additional client devices to update first weights of a first instance of the global ML model; In parallel, using the remote gradients and additional remote gradients generated at the remote system to update second weights of a second instance of the global ML model; using the updated first weights of the first instance of the global ML model and the updated second weights of the second instance of the global ML model to update the weights of the global ML model; Including, The method of claim 17.
21. 21. The method of claim 17, wherein the remote gradients generated based on processing the additional audio data by one or more of the remote processors of the remote system are of the same type of gradients that correspond to the client gradients generated based on processing the audio data by one or more of the client processors of the client device.
22. 22. The method of claim 21, wherein the gradient type includes one of a hot word gradient, an automatic speech recognition (ASR) gradient, a voice activity detection (VAD) gradient, a sustained speech gradient, or a speech discrimination gradient.
23. 21. The method of claim 17, wherein the remote gradients generated based on processing the additional audio data by one or more of the remote processors of the remote system are a different type of gradient corresponding to the client gradients generated based on processing the audio data by one or more of the client processors of the client device.
24. 24. The method of claim 17, wherein generating the client gradients based on the predicted output comprises comparing the predicted output to a ground truth output corresponding to the audio data, and generating the remote gradients based on the additional predicted output comprises comparing the additional predicted output to an additional ground truth output corresponding to the additional audio data.
25. 25. The method of claim 17, wherein transmitting the client gradients over a network comprises transmitting the client gradients without transmitting any of the audio data and the predicted output.
26. by one or more remote processors of said remote system; transmitting the updated global ML model or the updated global weights of the global ML model to the client device, the transmitting of the global ML model or the updated global weights being after the remote system has updated the global weights of the global ML model based on the client gradients and the remote gradients.
26. The method of any one of claims 17 to 25, further comprising:
27. by one or more of the client processors of the client device, receiving the updated global ML model or the updated global weights of the global ML model from the remote system; causing the client device to replace the on-device ML model with the updated global ML model or replace local weights of the on-device ML model with the updated global weights of the global ML model in a local storage of the client device; Further comprising:
27. The method of claim 26.
28. by one or more client processors of the client device, identifying a text segment stored locally at the client device of a user; processing the text segment using an on-device text-to-speech (TTS) model stored locally at the client device to generate synthetic speech audio data including synthetic speech corresponding to the text segment; processing the synthetic speech audio data using a local machine learning (ML) model stored locally at the client device to generate a predicted output; generating gradients based on comparing the predicted outputs to ground truth outputs corresponding to the text segments; transmitting the generated gradients from the client device to a remote system; by one or more remote processors of said remote system; obtaining an additional text segment accessible by the remote system; processing the additional text segment using a remotely stored global TTS model at the remote system to generate additional synthetic speech audio data including additional synthetic speech corresponding to the additional text segment; processing the additional synthetic speech audio data to generate additional predicted outputs using a remotely stored global ML model at the remote system; generating additional gradients based on comparing the additional prediction outputs to additional ground truth outputs corresponding to the additional text segments; utilizing at least the gradients received from the client device and the additional gradients generated at the remote system to update weights of the global TTS model; The method includes:
29. A method executed by one or more processors, the method comprising: receiving a plurality of client gradients from a plurality of corresponding client devices, each of the plurality of client gradients being generated locally at a given one of the plurality of corresponding client devices based on processing corresponding image data capturing at least a portion of a corresponding environment of a corresponding user of a given one of the plurality of corresponding client devices; Generating a plurality of remote gradients, each of the plurality of remote gradients comprising: acquiring additional image data capturing at least a portion of an additional environment of an additional user; processing the additional image data using a remotely stored global machine learning (ML) model at a remote system to generate a predicted output; generating additional gradients for inclusion in the plurality of remote gradients based on comparing the additional predicted outputs to ground truth outputs corresponding to the additional image data; and selecting a set of client gradients from among the plurality of client gradients; selecting an additional set of remote gradients from among the plurality of remote gradients; utilizing the set of client gradients and an additional set of remote gradients to update weights of the global ML model; Including, method.
30. At least one processor; a memory storing instructions that, when executed, cause said at least one processor to perform operations corresponding to any one of claims 1 to 29; A system comprising:
31. 30. A computer-readable storage medium storing instructions that, when executed, cause at least one processor to perform operations corresponding to any one of claims 1 to 29.
Citation Information
Patent Citations
Federation learning model training method and device and federation learning system
CN112232528A
Machine learning method, device and system of distributed system, equipment and storage medium
CN112347500A
A method for training a neural network
EP3648015A2
