Patent Description:
<CIT> describes systems and methods for using existing data ontologies for generating machine learning solutions for a search of relevant services to compose pipelines. It further describes using data ontologies to create a combination of non-logic based and logic-based sematic services. Quality of Service (QoS) and product Key Performance Indicator (KPI) constraints are used as part of architecture selection in developing, training, validating, and improving machine learning models. For data sets without existing ontologies, one or more ontologies are generated and stored for future use.

Notably, these federate learning techniques can be device independent. For example, a first client device having a first set of device characteristics (e.g., memory consumption, CPU usage, latency, etc.) and a second client device having a distinct, second set of device characteristics may share corresponding instances of the same on-device ML model(s) based on the first client device and the second client device participating in federated learning of the on-device ML model(s). However, a given instance of an on-device ML model that is best suited for the first client device may not be best suited for the second client device based at least in part of the different sets of device characteristics. As a result, the given instance of the on-device ML model may perform sub-optimally and unnecessarily waste computational resources of the second client device. This problem is compounded due to different client devices having different device characteristics being introduced by different manufacturers at an increasingly rapid pace.

Implementations disclosed herein are directed to evaluating one or more on-device machine learning (ML) models based on a plurality of performance measures of a corresponding client device and/or one or more of the on-device ML models. Each of the corresponding client devices can include on-device memory that stores one or more of the on-device ML models and a plurality of testing instances for one or more of the on-device ML models. Further, the corresponding client devices can process, using one or more of the on-device ML models, the plurality of testing instances to generate the plurality of performance measures for each of the plurality of testing instances. The plurality of performance measures, for a given testing instance of the plurality of testing instances, can include device-specific performance measures and/or model-specific performance measures. The device-specific performance measures can include, for example, a latency measure, a memory consumption measure, a CPU usage measure, and/or other device-specific measures. The model-specific performance measures can include one or more ML model measures that are based on a type of one or more of the ML models that are utilized to process the plurality of testing instances. In some implementations, one or more of the on-device ML models can be activated (or kept active) for use locally at the corresponding client devices based on the plurality of performance measures. In other implementations, one or more of the on-device ML models can be sparsified based on the plurality of performance measures.

For example, assume a given client device has on-device memory storing an on-device automatic speech recognition (ASR) model, and a plurality of testing instances for the ASR model. In this example, testing instance input for each of the plurality of testing instances can include a segment of audio data, and testing instance output for each of the plurality of testing instances can include a ground truth transcription corresponding to a spoken utterance captured in the segment of the audio data. Further, the given client device can process, using the on-device ARS model, the segment of the audio data for a first testing instance to generate one or more speech hypotheses as predicted output. In generating the device-specific measures for the first testing instance, the given client device can determine a latency measure associated with the processing of the segment of the audio data, a memory consumption measure associated with the processing of the segment of the audio data, a CPU usage measure associated with the processing of the segment of the audio data, and/or other device-specific measures associated with the processing of the segment of the audio data. Further, in generating the model-specific measures the given client device can determine an ASR accuracy measure associated with comparing one or more of the speech hypotheses for the segment of the audio data to the ground truth transcription for the segment of the audio data, an ASR stability measure associated with a streaming transcription for the segment of the audio data in implementations where the given client device streams the transcription to a display, and/or other ASR performance measures. The given client device can process the remaining testing instances in the same or similar manner to generate corresponding performance measures for those testing instances. Although the above working example is described with respect to the on-device ASR model, it should be understood that is for the sake of example and is not meant to be limiting and that the techniques described herein can be utilized to evaluate any on-device ML model.

In some implementations, the given client device can determine whether to activate (or keep active) a given ML model based on comparing each of the plurality of performance measures for each of the testing instances to a corresponding performance measure threshold. Continuing with the above working example, the latency measure for the first testing instance can compared to a corresponding latency threshold, the memory consumption measure for the first testing instance can compared to a corresponding memory consumption threshold, the CPU usage measure for the first testing instance can compared to a corresponding CPU usage threshold, the ASR accuracy measure for the first testing instance can compared to a corresponding ASR accuracy threshold, the ASR stability measure for the first testing instance can compared to a corresponding ASR stability threshold, and/or other performance measures for the first testing instance can be compared to corresponding performance thresholds. The given client device can process the remaining performance measures for the remaining testing instances in the same or similar manner. In additional or alternative implementations, the given client device can determine whether to activate (or keep active) a given ML model based on comparing some statistical measure for the plurality of performance measures for each of the testing instances to a corresponding performance measure threshold. Continuing with the above working example, an average latency measure for the plurality of testing instance can compared to a corresponding latency threshold, an average memory consumption measure for the plurality of testing instance can compared to a corresponding latency threshold, and so on for the remaining performance measures generated based on processing the plurality of testing instances. In additional or alternative implementations, the given client device can transmit the plurality of training instances to a remote system, and the remote system can determine whether to activate (or keep active) a given ML model based on based on comparing each of the plurality of performance measures for each of the testing instances to a corresponding performance measure threshold.

In some implementations, the given client device or the remote system can determine to activate (or keep active) a given ML model in response to determining that the plurality of performance measures satisfy the corresponding performance measures thresholds. In additional or alternative implementations, the given client device or the remote system can determine to sparsify a given ML model in response to determining that one or more of the plurality of performance measures fail to satisfy the corresponding performance measures thresholds. The given ML model can be sparsified by removing connections, layers, parameters, and/or other features of the given ML model, thereby effectively reducing the size of the given ML model. In sparsifying the given ML model, the device-specific performance measures can be reduced (e.g., less latency, less memory consumption, less CPU usage, etc.). However, the model-specific performance measures may be reduced (e.g., less accuracy in precision and/or recall). Notably, the given ML model can be sparsified with varying degrees of sparsity. For example, in response to determining one or more of the plurality of performance measures do not satisfy corresponding performance measure thresholds for the given ML model, the given ML model can be sparsified with a first degree of sparsity by removing first connections, first layers, and/or first parameters. Further, in response to subsequently determining one or more of a plurality of additional performance measures for the sparsified instance of the given ML model do not satisfy corresponding performance measure thresholds, the given ML model can be sparsified with a second degree of sparsity by further removing second connections, second layers, and/or second parameters. Moreover, in response to subsequently determining one or more of a plurality of further additional performance measures for the further sparsified instance of the given ML model do not satisfy corresponding performance measure thresholds, the given ML model can be further sparsified with a third degree of sparsity by yet further removing third connections, third layers, and/or third parameters. Accordingly, in sparsifying the given ML model, the given client device and/or the remote system seek to balance performance and sparsity of the given ML model for the given client device until the given ML model performs optimally at the given client device.

In some implementations, the given client device processes the plurality of testing instances in response to determining one or more client device conditions are satisfied. The one or more client device conditions can include, for example, one or more of a time of day, a day of week, that the given client device is charging, that the given client device has at least a threshold state of charge, that a temperature of the given client device is less than a temperature threshold, or that the given client device is not being held by a user. In other words, the given client device may not generate the plurality of performance measures while a user of the given client device is actively using the given client device. In some versions of those implementations, the given client device processes the plurality of testing instances the first time the one or more client device conditions are satisfied subsequent to the given client device being configured by a user of the given client device (e.g., after the user purchases the given client device).

In additional or alternative implementations, the given client device processes the plurality of testing instances in response to determining one or more of the client device conditions are satisfied and one or more evaluation conditions are satisfied. The one or more evaluation conditions can include, for example, one or more of a threshold quantity of system updates that have been performed at the given client device, a threshold quantity of memory that has been utilized or consumed by the given client device, a threshold duration of time since a plurality of performance measures for the given ML model that is active were generated at the given client device, and/or other evaluation conditions. In other words, subsequent to initially activating the given ML model at the given client device, the given ML model can be periodically evaluated to ensure the balance between performance and sparsity of the given ML model for the given client device is maintained.

The given client device can have a set of device characteristics. The set of device characteristics can include hardware characteristics (e.g., a type of memory available, a quantity of memory available, a type of processors, a quantity of processors, etc.), software characteristics (e.g., firmware, operating system, etc.), a manufacturer characteristic (e.g., an indication of a manufacturer of the given client device), and/or other device characteristics. The plurality of performance measures generated by the given client device influences whether to activate (or keep active) a given ML model at additional client devices that share the same set of device characteristics, but may not influence whether to activate (or keep active) the given ML model at other client devices that do not share the same set of device characteristics. Additionally, or alternatively, the plurality of performance measures generated by the additional client devices that share the same set of device characteristics with the given client device may influence whether to activate (or keep active) the given ML model at the given client device. For example, the plurality of performance measures generated by a group of client devices that each have the same set of device characteristics can be transmitted to a remote system, and the remote system can determine whether to activate (or keep active) or sparsify a corresponding given ML model stored on-device at each of the client devices of the group. Notably, even if a given client device is not in the group that generates the plurality of performance characteristics but shares the same set of device characteristics as the client devices of the group, the remote system can determine whether to activate (or keep active) or sparsify the corresponding given ML model stored on-device at the given client device.

By using the techniques described herein, various technical advantages can be achieved. As one non-limiting example, by storing the ML model(s) and the plurality of testing instances for the ML model(s) in on-device memory of the client device(s), consumption of network resources can be reduced by obviating the need to transmit the ML model(s) and the plurality of testing instances to the client device(s). For instance, the client device(s) can already have the ML model(s) and the plurality of training instances stored in the on-device memory when the client device is purchased. As another non-limiting example, by activating (or keeping active) or sparsifying the ML model(s) based on the processing of the plurality of testing instances at the client device(s), consumption of computational resources can be reduced by balancing the performance and the sparsity of the ML model(s). For instance, the ML model(s) can be the optimal ML model(s) for use at the client device(s) based on the device characteristics of the client device(s). As yet another non-limiting example, by activating (or keeping active) or sparsifying the ML model(s) based on the processing of the plurality of testing instances at other client device(s), consumption of computational resources can be reduced by leveraging the plurality of performance measures generated by the other client device(s) that share the same device characteristics. Accordingly, the client device(s) are improved and consumption of computational and/or network resources reduced.

<FIG> depicts a block diagram of an example environment that demonstrates various aspects of the present disclosure. A client device <NUM>, a remote system <NUM>, a first group of additional client devices <NUM>, and a second group of additional client devices <NUM> are illustrated in <FIG>. The client device <NUM>, each of the client devices in the first group of additional client devices <NUM>, and each of the client devices in the second group of additional client devices <NUM> can be communicatively coupled with the remote system <NUM> over one or more networks <NUM> as depicted in <FIG>. The one or more networks <NUM> can include, for example, any combination of local area networks (LANs), wide area networks (WANs), and/or any other type of networks.

The client device <NUM> can include, in various implementations, an on-device conditions engine <NUM>, an on-device machine learning (ML) engine <NUM>, an on-device performance measure engine <NUM>, an on-device activation engine <NUM>, an on-device sparsification engine <NUM>, and/or other on-device engines. Further, the client device <NUM> can include on-device memory storing one or more on-device ML models (e.g., in on-device ML model(s) database 112A), a plurality of testing instances (e.g., in testing instances 112B), and/or other on-device data. The remote system <NUM> can include, for example, a remote performance measure engine <NUM>, a remote activation engine <NUM>, and a remote sparsification engine <NUM>. Further, the remote system <NUM> can include remote memory storing one or more remote ML models (e.g., in remote ML model(s) database 130A). Moreover, and although not depicted in <FIG> for the sake of simplicity, each of the client devices of the first group of additional client devices <NUM> and the second group of additional client devices <NUM> can include one or more corresponding instances of the on-device engines and corresponding on-device memory described with respect to the client device <NUM> of <FIG> (e.g., as described with respect to <FIG>).

The client device <NUM> and the additional client devices <NUM> and <NUM> can be, for example: a desktop computing device, a laptop computing device, a tablet computing device, a mobile phone computing device, a computing device of a vehicle of the user (e.g., an in-vehicle communications system, an in-vehicle entertainment system, an in-vehicle navigation system), a standalone interactive speaker, a smart appliance such as a smart television (or a standard television equipped with a networked dongle with automated assistant capabilities), and/or a wearable apparatus of the user that includes a computing device (e.g., a watch of the user having a computing device, glasses of the user having a computing device, a virtual or augmented reality computing device). Additional and/or alternative client devices may be provided.

In various implementations, the client device <NUM> can generate a plurality of performance measures for a given on-device ML model stored in the on-device model(s) database 112A based on the plurality of testing instances stored in the testing instances database 112B. In some implementations, and as described herein, the given on-device ML model may be dormant at the client device <NUM> (i.e., not available for use locally at the client device <NUM>), and activated or sparsified based on the plurality of performance measures generated based on the plurality of testing instances. In additional or alternative implementations, and as also described herein, the given on-device ML Model may be active at the client device <NUM> (i.e., available for use locally at the client device <NUM>), and deactivated or sparsified based on the plurality of performance measures generated based on the plurality of testing instances.

In some implementations, the plurality of performance measures for the given on-device ML model can include device-specific performance measures and model-specific performance measures. For example, the device-specific performance measures can include a corresponding latency measure (e.g., in seconds or milliseconds), a corresponding memory consumption measure (e.g., a percentage of memory consumed overall or consumed based on processing the testing instances), a corresponding CPU usage measure (e.g., a percentage of CPU usage overall or used in processing the testing instances), and/or other corresponding performance measures associated with performance of the client device <NUM> in using the given on-device ML model to process each of the plurality of testing instances. Also, for example, the model-specific performance measures can include one or more corresponding measures associated with performance of the given on-device ML model that can be based on a type of the given on-device ML model. For instance, in implementations where the given on-device ML model is an on-device automatic speech recognition (ASR) model, the model-specific performance measures can include a corresponding ASR accuracy measure that is indicative of how accurate one or more speech hypotheses are for corresponding testing instances as described herein, a corresponding ASR stability measure that is indicative of how a stable a corresponding transcription is for one or more of the speech hypotheses are for the corresponding testing instances as described herein, and/or other corresponding ASR performance measures. Although the model-specific performance measures described above are described with respect to a given on-device ASR model, it should be understood that is for the sake of example and is not meant to be limiting. For instance, the techniques described herein can be utilized to generate model-specific performance measures for various disparate on-device ML models (e.g., described with respect to <FIG> and <FIG>). In other implementations, the plurality of performance measures for the given on-device ML model can include one of the device-specific performance measures or the model-specific performance measures.

Each of the plurality of testing instances stored in the testing instances database 112B can include testing instance input and testing instance output. Further, each of the plurality of testing instances stored in the testing instances database 112B can be one of multiple disparate types of testing instances that are associated with disparate types of ML models. For example, the plurality of testing instances can be audio-based testing instances that can be processed by a given audio-based on-device ML model to generate performance measures for the given audio-based on-device ML model, vision-based testing instances that can be processed by a given vision-based on-device ML model to generate performance measures for the given vision-based on-device ML model, text-based testing instances that can be processed by a given text-based on-device ML model to generate performance measures for the given text-based on-device ML model, and/or other types of testing instances for testing other types of on-device ML models. The testing instances and processing of the testing instances to generate the plurality of performance measures is described in more detail herein (e.g., with respect to the on-device performance measure engine <NUM> of <FIG> and <FIG>).

In some implementations, the client device <NUM> can generate the plurality of performance measures for the given on-device ML model in response to the on-device condition(s) engine <NUM> determining one or more client device conditions are satisfied. The one or more client device conditions can include, for example, one or more of a time of day, a day of week, that the client device <NUM> is charging, that the client device <NUM> has at least a threshold state of charge, that a temperature of the client device <NUM> is less than a temperature threshold, or that the client device <NUM> is not being held by a user. In other words, the client device <NUM> may not generate the plurality of performance measures while a user of the client device <NUM> is actively using the client device <NUM>.

In some versions of those implementations, a given ML model stored in the ML model(s) database 112A can be dormant, and the client device <NUM> can initially generate the plurality of performance measures to determine whether to activate or sparsify the given ML model based on the plurality of performance measures (e.g., described with respect to <FIG>). In other words, the given ML model and the plurality of testing instances can already be stored in the on-device memory of the client device <NUM> when the client device <NUM> is acquired by a user (e.g., purchased), and the client device <NUM> can generate the plurality of performance measures the first time the one or more client device conditions are satisfied to determine whether to activate or sparsify the given ML model that is dormant in the on-device memory. In additional or alternative implementations, a given ML model stored in the ML model(s) database 112A can be active, and the client device <NUM> can subsequently generate a plurality of additional performance measures to determine whether to keep the given ML model active based on the plurality of additional performance measures or to sparsify the given ML model that is active at the client device <NUM> (e.g., as also described with respect to <FIG>). In these implementations, the client device <NUM> can generate the plurality of additional performance measures in response to determining one or more evaluation conditions are satisfied. The one or more evaluation conditions can include, for example, one or more of a threshold quantity of system updates that have been performed at the client device <NUM>, a threshold quantity of memory that has been utilized by the client device <NUM>, a threshold duration of time since a plurality of performance measures for the ML model that is active were generated at the client device <NUM>, and/or other evaluation conditions.

In generating the plurality of performance measures based on a given testing instance, the on-device ML engine <NUM> can process, using a given ML model, testing instance input for the given testing instance to generate predicted output, and the on-device performance measure engine <NUM> can generate the plurality of performance measures, for the given testing instance, based on the processing of the testing instance input. For example, and referring briefly to <FIG>, the client device <NUM> can obtain a given testing instance from the testing instances database 112B. The given testing instance can include one or more testing instance inputs 101A and one or more testing instance outputs 101B. The on-device ML engine <NUM> can process, using a given ML model stored in the on-device ML model(s) database 112A, the one or more testing instance inputs 101A to generate one or more predicted outputs <NUM>. Further, the on-device performance measure engine <NUM> can generate a plurality of performance measures <NUM>. For example, the on-device performance measure engine <NUM> can generate model-specific performance measures based on comparing the one or more testing instance outputs 101B to the one or more predicted outputs 101B, and can generate device-specific performance measures based on the processing of the one or more testing instance inputs 101A. Further, the on-device performance measure engine <NUM> can transmit the plurality of performance measures to one or more of the on-device activation engine <NUM>, the on-device sparsification engine <NUM>, and/or the remote system <NUM> based on the plurality of performance measures <NUM>.

For example, assume that the given ML model stored locally at the client device <NUM> is an audio-based ML model. In this example, testing instant input for each of the plurality of testing instances can include a corresponding segment of audio data. Further, testing instance output for each of the plurality of testing instances may be based on a type of the audio-based ML model. For instance, the testing instance output can include: a ground truth transcription corresponding to the segment of the audio data of the testing instance input when the given ML model is an ASR model; an indication of whether the segment of the audio data of the testing instance input includes one or more particular words or phrases when the given ML model is a hotword detection model; an indication of whether the segment of the audio data of the testing instance input includes a user speaking when the given ML model is a voice activity detection (VAD) model; an indication of whether to keep one or more components of the client device <NUM> active based on the segment of the audio data of the testing instance input when the given ML model is continued conversation model; and/or other testing input output for any other audio-based ML model.

Also, for example, additionally or alternatively assume that the given ML model stored locally at the client device <NUM> is a vision-based ML model. In this example, testing instant input for each of the plurality of testing instances can include a corresponding instance of vision data. Further, testing instance output for each of the plurality of testing instances may be based on a type of the vision-based ML model. For instance, the testing instance output can include: one or more ground truth bounding boxes corresponding to one or more objects captured in the instance of the vision data when the given ML model is an object detection model; one or more ground truth labels corresponding to one or more classifications of object captured in the instance of the vision data when the given ML model is an object classification model; an indication of whether a gesture (e.g., lip movement, hand movement, etc.) captured in the instance of the vision data includes one or more particular gestures when the given ML model is a hotword free invocation model; and/or other testing input output for any other vision-based ML model.

Also, for example, additionally or alternatively assume that the given ML model stored locally at the client device <NUM> is a text-based ML model. In this example, testing instant input for each of the plurality of testing instances can include one or more textual segments. Further, testing instance output for each of the plurality of testing instances may be based on a type of the text-based ML model. For instance, the testing instance output can include ground truth audio data corresponding to the one or more textual segments of the testing instance input when the given ML model is a text-to-speech (TTS) model. Moreover, in implementations where the client device <NUM> includes an on-device TTS model, these testing instances can additionally or alternatively be utilized as testing instances for any of the audio-based ML models that are stored locally at the client device <NUM>. For instance, the client device <NUM> can process, using the on-device TTS model, one or more of the textual segments to generate synthesized speech audio data that includes synthesized speech corresponding to the one or more textual segments. The synthesized speech audio data can be utilized as testing instance input, and the testing instance output can be determined based on the one or more textual segments corresponding to the synthesized speech (e.g., the ground truth transcription, the indication of whether the synthesized speech includes one or more of the particular words or phrases, and so on).

In these examples, the on-device performance measure engine <NUM> can generate the device-specific performance measures (e.g., corresponding latency measures, corresponding memory consumption measures, corresponding CPU measures, and/or other device-specific performance measures) in the same or similar manner based on the processing of the testing instance input. However, the on-device performance measure engine <NUM> can generate the device-specific performance measures in different manners based on the given ML model that is being evaluated. For example, in implementations where the given ML model is a hotword detection model, the one or more predicted outputs <NUM> can correspond to a predicted value (e.g., a binary value, a probability, a log likelihood, etc.) that is indicative of whether the audio data of the testing instance input includes one or more particular words or phrases. In this example, the on-device performance measure engine <NUM> can generate a hotword measure based on comparing the predicted value to a ground truth value indicative of whether the audio data includes one or more of the particular words or phrases included in the one or more testing instance outputs 101B. As another example, in implementations where the given ML model is a TTS model, the one or more predicted outputs <NUM> can correspond to predicted audio data (or representations of the predicted audio data, such as Mel-filterbank features thereof, Fourier transforms thereof, Mel-cepstral frequency coefficients thereof, and/or other representations of the predicted audio data). In this example, the on-device performance measure engine <NUM> can generate TTS measure based on comparing the predicted audio data (or representations thereof) to ground truth audio data (or representations thereof) included in the one or more testing instance outputs 101B. Generating the plurality of performance measures based on the plurality of testing instances is described with respect to <FIG>.

Referring back to <FIG>, and as noted above, the on-device performance measure engine <NUM> can transmit the plurality of performance measures to one or more of the on-device activation engine <NUM>, the on-device sparsification engine <NUM>, and/or the remote system <NUM> based on the plurality of performance measures <NUM>. In some implementations, the on-device performance measure engine <NUM> can transmit an indication to the on-device activation engine <NUM> in response to determining the plurality of performance measures satisfy corresponding performance measure thresholds that indicates a given ML model should be activated or remain active (e.g., as described with respect to <FIG>). For example, assume that a given ML model being evaluated is a dormant ML model stored locally at the client device <NUM> (e.g., in the ML model(s) database 112B). Further assume that the on-device performance measure engine <NUM> determines that the plurality of performance measures satisfy corresponding performance measure thresholds. In this example, the on-device activation engine <NUM> can activate the dormant ML model for use locally at the client device <NUM>. As another example, assume that a given ML model being evaluated is an active ML model stored locally at the client device <NUM> (e.g., in the ML model(s) database 112B). Further assume that the on-device performance measure engine <NUM> determines that the plurality of performance measures satisfy corresponding performance measure thresholds. In this example, the on-device activation engine <NUM> can keep the active ML model active for use locally at the client device <NUM>.

In additional or alternative implementations, the on-device performance measure engine <NUM> can transmit the plurality of performance measures to the remote system <NUM> over the one or more networks <NUM>, and the remote performance measure engine <NUM> can determine whether a given ML model should be activated or remain active at the client device <NUM> based on determining whether the plurality of performance measures transmitted to the remote system <NUM> satisfy the corresponding performance measure thresholds. The remote activation engine <NUM> can generate and transmit an indication back to the client device <NUM> over the one or more networks <NUM> that indicates the given ML should be activated or remain active at the client device <NUM> (assuming the plurality of performance measures satisfy the corresponding performance measure thresholds). The remote performance measure engine <NUM> can also consider a plurality of corresponding performance measures generated by additional client devices that share the same set of device characteristics in determining whether the given ML should be activated or remain active at the client device <NUM> (e.g., one of the groups of additional client devices <NUM> or <NUM>) as described with respect to <FIG> and <FIG>.

In some implementations, the on-device performance measure engine <NUM> can transmit an indication the on-device sparsification engine <NUM> in response to determining one or more of the plurality of performance measures do not satisfy corresponding performance measure thresholds that indicates a given ML model should be sparsified (e.g., as also described with respect to <FIG>). The on-device sparsification engine <NUM> can sparsify a given ML model by removing connections, layers, parameters, and/or other features of the given ML model, thereby effectively reducing the size of the given ML model. In sparsifying the dormant ML model, the device-specific performance measures can be reduced (e.g., less latency, less memory consumption, less CPU usage, etc.). However, the model-specific performance measures may be reduced (e.g., less accuracy in precision and/or recall). Notably, the on-device sparsification engine <NUM> can sparsify a given ML model with varying degrees of sparsity. For example, in response to determining one or more of the plurality of performance measures do not satisfy corresponding performance measure thresholds for a given ML model, the on-device sparsification engine <NUM> can sparsify the given ML model with a first degree of sparsity by removing first connections, first layers, and/or first parameters. Further, in response to subsequently determining one or more of a plurality of additional performance measures do not satisfy corresponding performance measure thresholds for the sparsified ML model, the on-device sparsification engine <NUM> can sparsify the given ML model with a second degree of sparsity by further removing second connections, second layers, and/or second parameters. Moreover, in response to subsequently determining one or more of a plurality of further additional performance measures do not satisfy corresponding performance measure thresholds for the further sparsified ML model, the on-device sparsification engine <NUM> can sparsify the given ML model with a third degree of sparsity by yet further removing third connections, third layers, and/or third parameters. Accordingly, in sparsifying the given ML model, the on-device sparsification engine <NUM> seeks to balance performance and sparsity of the given ML model for the client device <NUM>.

In additional or alternative implementations, the on-device performance measure engine <NUM> can transmit an indication to the remote system <NUM> that requests a sparsified instance of a given ML model in response to determining one or more of the plurality of performance measures do not satisfy corresponding performance measure thresholds. In these implementations, the remote sparsification engine <NUM> can sparsify the given ML model or obtain a sparsified instance of the given ML model from the remote ML model(s) database 130A. The remote system <NUM> can transmit the sparsified ML model back to the client device <NUM>, and the client device <NUM> can further evaluate the sparsified ML model. In additional or alternative implementations, such as when the plurality of performance measures are processed by the remote system <NUM> as described above, the remote system can determine that the given ML should be sparsified and transmit an indication back to the client device <NUM> to sparsify the given ML model locally at the client device <NUM>, or transmit a sparsified instance of the given ML model back to the client device <NUM>.

As noted above, in implementations where the remote system <NUM> is utilized in determining whether to activate to keep active a given ML model, the remote system <NUM> can also consider a plurality of corresponding performance measures generated by other client devices that have the same set of device characteristics as the client device <NUM>. For example, assume the client device <NUM> and the first set of additional client devices <NUM> each have a first set of device characteristics. The first set of device characteristics can include, for example, a first set of hardware characteristics (e.g., a first type of memory available, a first quantity of memory available, a first type of processors, a first quantity of processors, etc.), a first set of software characteristics (e.g., a first firmware, a first operating system, etc.), a first manufacturer characteristic (e.g., an indication of a first manufacturer of the client devices of the group), and/or other device characteristics. Further assume that the second set of additional client devices <NUM> each have a second set of device characteristics, such that one or more of the first set of hardware characteristics, the first set of software characteristics, or the first manufacturer characteristic differ from that of the client device <NUM> and the first set of additional client devices <NUM>. In this example, the plurality of corresponding performance measures generated by the first set of additional client devices <NUM> may influence whether to activate a given ML model at the client device <NUM>, but the plurality of corresponding performance measures generated by the second set of additional client devices <NUM> may not influence whether to activate the given ML model at the client device <NUM> based at least in part on the differences in the device characteristics.

Turning now to <FIG>, a client device <NUM> is illustrated in an implementation where various on-device ML engines are included as part of (or in communication with) an automated assistant client <NUM> is depicted. The respective on-device ML models are also illustrated interfacing with the various on-device ML engines. Other components of the client device <NUM> are not illustrated in <FIG> for simplicity. <FIG> illustrates one example of how the various on-device ML engines of and their respective ML models can be utilized by the automated assistant client <NUM> in performing various actions. For example, the ML engines and their respective ML models can correspond to those that are activated, deactivated, and/or sparsified as described herein (e.g., with respect to <FIG>, <FIG>, <FIG>, and <FIG>).

The client device <NUM> in <FIG> is illustrated with one or more microphones <NUM>, one or more speakers <NUM>, one or more vision components <NUM>, and display(s) <NUM> (e.g., a touch-sensitive display). The client device <NUM> may further include pressure sensor(s), proximity sensor(s), accelerometer(s), magnetometer(s), and/or other sensor(s) that are used to generate other sensor data that is in addition to audio data captured by the one or more microphones <NUM>. The client device <NUM> at least selectively executes the automated assistant client <NUM>. The automated assistant client <NUM> includes, in the example of <FIG>, hotword detection engine <NUM>, hotword free invocation engine <NUM>, continued conversation engine <NUM>, ASR engine <NUM>, object detection engine <NUM>, object classification engine <NUM>, voice identification engine <NUM>, and face identification engine <NUM>. The automated assistant client <NUM> further includes speech capture engine <NUM>, and visual capture engine <NUM>. It should be understood that the on-device ML engines and on-device ML models depicted in <FIG> are provided for the sake of example, and are not meant to be limiting. For example, the automated assistant client <NUM> can further include additional and/or alternative engines, such as an 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 movement engine and a r, and/or other engine(s) along with associated ML model(s). Moreover, 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.

One or more cloud-based automated assistant components <NUM> can optionally be implemented on one or more computing systems (collectively referred to as a "cloud" computing system) that are communicatively coupled to client device <NUM> via one or more of networks <NUM> (e.g., any combination of LANs, WANs, and/or other networks). The cloud-based automated assistant components <NUM> can be implemented, for example, via a cluster of high-performance servers. In various implementations, an instance of an automated assistant client <NUM>, by way of its interactions with one or more cloud-based automated assistant components <NUM>, may form what appears to be, from a user's perspective, a logical instance of an automated assistant as indicated generally by <NUM> with which the user may engage in a human-to-computer interactions (e.g., spoken interactions, gesture-based interactions, and/or touch-based interactions).

The client device <NUM> can be, for example: a desktop computing device, a laptop computing device, a tablet computing device, a mobile phone computing device, a computing device of a vehicle of the user (e.g., an in-vehicle communications system, an in-vehicle entertainment system, an in-vehicle navigation system), a standalone interactive speaker, a smart appliance such as a smart television (or a standard television equipped with a networked dongle with automated assistant capabilities), and/or a wearable apparatus of the user that includes a computing device (e.g., a watch of the user having a computing device, glasses of the user having a computing device, a virtual or augmented reality computing device). Additional and/or alternative client devices may be provided.

The one or more vision components <NUM> can take various forms, such as monographic cameras, stereographic cameras, a LIDAR component (or other laser-based component(s)), a radar component, etc. The one or more vision components <NUM> may be used, e.g., by the visual capture engine <NUM>, to capture vision data corresponding to vision frames (e.g., image frames, laser-based vision frames) of an environment in which the client device <NUM> is deployed. In some implementations, such vision frame(s) can be utilized to determine whether a user is present near the client device <NUM> and/or a distance of the user (e.g., the user's face) relative to the client device <NUM>. Such determination(s) can be utilized, for example, in determining whether to activate the various on-device ML engines depicted in <FIG> and/or other on-device ML engine(s). Further, the speech capture engine <NUM> can be configured to capture a user's spoken utterance(s) and/or other audio data captured via the one or more of the microphones <NUM>.

As described herein, such audio data and other non-microphone sensor data (also referred to as client data) can be processed by the various on-device engines depicted in <FIG> to make predictions at the client device <NUM> using corresponding on-device ML models that are activated, deactivated, and/or sparsified in the manner described above with respect to <FIG>, <FIG>, <FIG>, and <FIG>.

As some non-limiting example, the hotword detection engine <NUM> can utilize a hotword detection model 222A to predict whether audio data includes one or more particular words or phrases to invoke the automated assistant <NUM> (e.g., "Ok Google", "Hey Google", "What is the weather Google?", etc.) or certain functions of the automated assistant <NUM>; the hotword free invocation engine <NUM> can utilize a hotword free invocation model 224A to predict whether non-microphone sensor data (e.g., vision data) includes a gesture or signal to invoke the automated assistant <NUM> (e.g., based on a gaze of the user and optionally further based on mouth movement of the user); the continued conversation engine <NUM> can utilize a continued conversation model 226A to predict whether further audio data is directed to the automated assistant <NUM> (e.g., or directed to an additional user in the environment of the client device <NUM>); the ASR engine <NUM> can utilize an ASR model 228A to generate recognized text, or predict phoneme(s) and/or token(s) that correspond to audio data detected at the client device <NUM> and generate the recognized text based on the phoneme(s) and/or token(s); the object detection engine <NUM> can utilize an object detection model 230A to predict object location(s) included in vision data captured at the client device <NUM>; the object classification engine <NUM> can utilize an object classification model 232A to predict object classification(s) of object(s) included in vision data captured at the client device <NUM>; the voice identification engine <NUM> can utilize a voice identification model <NUM> to predict whether audio data captures a spoken utterance of one or more users of the client device <NUM> (e.g., by generating a speaker embedding, or other representation, that can be compared to a corresponding actual embeddings for one or more of the user of the client device <NUM>); and the face identification engine <NUM> can utilize a face identification model to predict whether vision data captures one or more of the users in an environment of the client device <NUM> (e.g., by generating an image embedding, or other representation, that can be compared to a corresponding image embeddings for one or more of the user of the client device <NUM>).

In some implementations, the client device <NUM> may further include natural language understanding (NLU) engine <NUM> and fulfillment engine <NUM>. The NLU engine <NUM> may perform on-device natural language understanding, using NLU model 238A, on recognized text, predicted phoneme(s), and/or predicted token(s) generated by the ASR engine <NUM> to generate NLU data. The NLU data can include, for example, intent(s) that correspond to the spoken utterance and optionally slot value(s) for parameter(s) for the intent(s). Further, the fulfillment engine <NUM> can generate fulfillment data, using on-device fulfillment model 240A, and based on processing the NLU data. This fulfillment data can define local and/or remote responses (e.g., answers) to spoken utterances provided by a user of the client device <NUM>, interaction(s) to perform with locally installed application(s) based on the spoken utterances, command(s) to transmit to Internet-of-things (IoT) device(s) (directly or via corresponding remote system(s)) based on the spoken utterance, and/or other resolution action(s) to perform based on the spoken utterance. The fulfillment data is then provided for local and/or remote performance/execution of the determined action(s) to resolve the spoken utterance. Execution can include, for example, rendering local and/or remote responses (e.g., visually and/or audibly), interacting with locally installed applications, transmitting command(s) to loT device(s), and/or other action(s). In other implementations, the NLU engine <NUM> and the fulfillment engine <NUM> may be omitted, and the ASR engine <NUM> can generate the fulfillment data directly based on the audio data. For example, assume the ASR engine <NUM> processes, using the ASR model 228A, a spoken utterance of "turn on the lights. " In this example, the ASR engine <NUM> can generate a semantic output that is then transmitted to a software application associated with the lights and/or directly to the lights that indicates that they should be turned on.

Notably, the cloud-based automated assistant component(s) <NUM> include cloud-based engines <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, and <NUM> that are counterparts to the on-device engines and respective cloud-based models 272A, 274A, 276A, 278A, 280A, 282A, 284A, 286A, 288A, and 290A that are cloud-based counterparts to the on-device models described herein with respect to <FIG>. However, in various implementations, these cloud-based engines and cloud-based models may not be invoked since the on-device engines and on-device models may be executed locally at the client device <NUM>. Nonetheless, a remote execution module can also optionally be included that performs remote execution based on local or remotely generated NLU data and/or fulfillment data. Additional and/or alternative remote engines can 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 can be used exclusively or prioritized at least due to the latency and/or network usage reductions they provide when resolving a spoken utterance or other user input (due to no client-server roundtrip(s) being needed to resolve the spoken utterance or the other user input). However, one or more cloud-based automated assistant component(s) <NUM> can be utilized at least selectively. For example, such component(s) can be utilized in parallel with on-device component(s) and output from such component(s) utilized when local component(s) fail. For example, if any of the on-device engines and/or models fail (e.g., due to relatively limited resources of client device <NUM>), then the more robust resources of the cloud may be utilized to leverage the virtually limitless resources of the cloud.

Turning now to <FIG>, a flowchart illustrating an example method <NUM> of causing performance measures to be generated by a client device for activating and/or evaluating on-device machine learning (ML) model(s) is depicted. For convenience, the operations of the method <NUM> are described with reference to a system that performs the operations. The system of method <NUM> includes one or more processors and/or other component(s) of a computing device (e.g., client device <NUM> of <FIG>, client device <NUM> of <FIG>, computing device <NUM> of FIG. <NUM>, and/or other client devices). Moreover, while operations of the method <NUM> are shown in a particular order, this is not meant to be limiting. One or more operations may be reordered, omitted, or added.

At block <NUM>, the system determines whether one or more client device conditions are satisfied. The one or more client device conditions can include, for example, one or more of a time of day, a day of week, that the client device is charging, that the client device has at least a threshold state of charge, that a temperature of the client device is less than a temperature threshold, or that the client device is not being held by a user. In other words, the client device may not generate the plurality of performance measures while a user of the client device is actively using the client device. If, at an iteration of block <NUM>, the system determines the one or more client device conditions are not satisfied, then the system continues monitoring for satisfaction of the one or more client device conditions at block <NUM>. If, at an iteration of block <NUM>, the system determines the one or more client device conditions are satisfied, then the system proceeds to block <NUM>. Although block <NUM> is depicted as occurring at the beginning of the method <NUM>, it should be understood that is for the sake of example and is not meant to be limiting. For example, multiple instances of the operations of block <NUM> can be utilized before each block to ensure a user of the client device is not actively using the client device.

At block <NUM>, the system causes a client device to generate a plurality of performance measures for a dormant ML model stored locally at the client device, and based on a plurality of testing instances for the dormant ML model that are also stored locally at the client device. The plurality of performance measures can include device-specific performance measures and/or model-specific performance measures. For example, the device-specific performance measures can include a corresponding latency measure (e.g., in seconds or milliseconds), a corresponding memory consumption measure (e.g., a percentage of memory consumed overall or consumed based on processing the testing instances), a corresponding CPU usage measure (e.g., a percentage of CPU usage overall or used in processing the testing instances), and/or other corresponding performance measures associated with performance of the client device in using the dormant ML model to process each of the plurality of testing instances. Also, for example, the model-specific performance measures can include one or more corresponding measures associated with performance of the dormant ML model that can be based on a type of the dormant ML model.

For example, and as indicated at sub-block 354A, the system causes the client device to process, using the dormant ML model, testing instance input for a given testing instance of the plurality of testing instances to generate output. Further, and as indicated at sub-block 354B, the system causes the client device to generate the plurality of performance measures for the given testing instance based on the processing of the testing instance input of the given testing instance. For instance, assume the dormant ML model is a dormant ASR model stored locally on the client device along with a plurality of testing instances for testing the formant ASR model on the client device. Further assume the plurality of testing instances include at least <NUM> audio-based testing instances that each include a corresponding segment of audio data as testing instance input and a corresponding ground truth transcription for the corresponding segment of the audio data as testing instance output. The system can cause the client device to process, using the dormant ASR model, the corresponding audio segment of the audio data for the first testing instance to generate a plurality of speech hypotheses as predicted output. Further, the system can cause the client device to generate the plurality of performance measure for the first testing instance based on the processing of the testing instance input of the first testing instance. In this instance, the plurality of performance measures can include device-specific performance measures of a corresponding latency measure of the client device in generating the plurality of speech hypotheses based on the first testing instance input, a corresponding memory consumption measure of the client device in generating the plurality of speech hypotheses based on the first testing instance input, a corresponding CPU usage measure of the client device in generating the plurality of speech hypotheses based on the first testing instance input, and/or other device-specific measures. Further, the plurality of performance measures can include model-specific performance measures of a corresponding ASR accuracy measure determined based on comparing one or more of the speech hypotheses to the corresponding ground truth transcription of the testing instance output, a corresponding ASR stability measure that is indicative of how a stable a transcription is for one or more of the speech hypotheses (e.g., how frequently a transcription being visually rendered in a streaming manner at the client device changes), and/or other model-specific performance measures. The system can continue the operations of sub-blocks 354A and 354B to generate the plurality of performance measures for each of the remaining <NUM> testing instances for the dormant ML model.

At block <NUM>, the system determines, based on the plurality of performance measures, whether to activate the dormant ML model at the client device. In some implementations, the system can cause the client device to determine whether to activate the dormant ML model. In additional or alternative implementations, the system can cause the client device to transmit the transmit the plurality of performance measures for each of the plurality of testing instances to a remote system (e.g., over one or more of the networks <NUM> of <FIG>), and the remote system can determine whether the dormant ML model should be activated for use locally at the client device based on the plurality of performance measures. The remote system can transmit an indication back to the client device of whether to activate the dormant ML model at the client device.

The system can determine whether to activate the dormant ML model based on the plurality of performance measures for each of the plurality of testing instances. In some implementations, the system can determine whether to activate the dormant ML model if each of the plurality of performance measures, for each of the plurality of testing instances, satisfies a corresponding performance threshold. For example, and continuing with the above example described with respect to block <NUM>, the system can determine whether to active the dormant ML model based on whether each of the <NUM> corresponding latency measures satisfy a corresponding latency threshold, whether each of the <NUM> corresponding memory consumption measures satisfy a corresponding memory consumption threshold, whether each of the <NUM> corresponding CPU usage measures satisfy a corresponding CPU usage threshold, whether each of the <NUM> (and optionally more if there are multiple speech hypotheses) corresponding ASR accuracy measures satisfy a corresponding ASR accuracy threshold, whether each of the <NUM> corresponding ASR stability measures satisfy a corresponding ASR stability threshold, and/or whether other performance measure measures satisfy corresponding performance measures. In additional or alternative implementations, the system can determine whether to activate the dormant ML model based on a statistical analysis of the plurality of performance measures for each of the plurality of testing instances. For example, and continuing with the above example described with respect to block <NUM>, the system can determine whether to active the dormant ML model based on whether an average of the plurality of performance measures satisfy the corresponding performance thresholds (e.g., an average of the corresponding latency measures satisfies the corresponding latency threshold).

If, at an iteration of block <NUM>, the system determines not to activate the dormant ML model, the system proceeds to block <NUM>. At block <NUM>, the system causes the dormant ML model to be sparsified. In some implementations, the dormant ML model can be sparsified locally at the client device or a sparsified instance of the dormant ML model that is also stored locally at the client device can be obtained (e.g., from the ML model(s) database 112B of <FIG>). The sparsified dormant ML model can be the same ML model as the dormant ML model utilized by the client device at block <NUM>, but can be of a reduced size. The client device can sparsify the dormant ML model by removing some connections, layers, parameters, and/or other features of the dormant ML model. In sparsifying the dormant ML model, the device-specific performance measures can be reduced (e.g., less latency, less memory consumption, less CPU usage, etc.), but the model-specific performance measures may consequently be reduced (e.g., less accuracy in precision and/or recall). In additional or alternative implementations, the system can cause the client device to transmit a request to a remote system to obtain the sparsified instance of the dormant ML model, and the remote system can transmit the sparsified instance of the dormant ML to the client device.

The system returns to block <NUM> to perform a subsequent iteration of the method <NUM>. For this subsequent iteration of the method <NUM>, the system can determine whether the one or more client device conditions are still satisfied at a subsequent iteration of block <NUM>. Further, and assuming the one or more client device conditions are satisfied, the system can cause the client device to generate a plurality of additional performance measures for the sparsified dormant ML model based on the same plurality of testing instances. The system can cause the client device to generate the plurality of additional performance measures in the same or similar manner described above with respect to block <NUM>, but using the sparsified dormant ML model rather than dormant ML model at a subsequent iteration of block <NUM>. Moreover, the system can determine whether to activate the sparsified ML model based on the plurality of additional performance measures or determine whether to further sparsify the dormant ML model in the same or similar manner described above with respect to block <NUM>. In other words, the system can cause the client device to iteratively sparsify the dormant ML model (or obtain a sparsified instance of the dormant ML model) in response to determining that the dormant ML model does not perform optimally on the client device, and can continue sparsifying the dormant ML model until an optimal version ML model for the client device is activated.

If, at an iteration of block <NUM>, the system determines to activate the dormant ML model, the system proceeds to block <NUM>. At block <NUM>, the system causes the dormant ML model to be activated for use locally at the client device. The system can use the activated ML model to make one or more predictions locally at the client device based on user input received at the client device (e.g., as described with respect to <FIG>).

At block <NUM>, the system causes corresponding dormant ML models to be activated for use locally at corresponding additional client devices, each of the corresponding additional client devices having the same device characteristics at the client device. The device characteristics can include, for example, hardware characteristics (e.g., a type of memory available, a quantity of memory available, a type of processors, a quantity of processors, etc.), software characteristics (e.g., firmware, operating system, etc.), a manufacturer characteristic (e.g., an indication of a manufacturer of the client device). In other words, the system can cause other client devices that are substantially the same as the client device to also activate the dormant ML model (or a sparsified instance of the dormant ML model) based on determining to activate the dormant ML model at the client device.

Additionally, or alternatively, the system can skip to operations of block <NUM> and proceed directly to block <NUM>. At block <NUM>, the system determines whether one or more evaluation conditions are satisfied. The one or more evaluation conditions can include, for example, one or more of a threshold quantity of system updates that have been performed at the client device, a threshold quantity of memory that has been utilized by the client device, a threshold duration of time since a plurality of performance measures for the ML model that is active were generated at the client device, and/or other evaluation conditions. If, at an iteration of block <NUM>, the system determines the one or more evaluation conditions are not satisfied, the system continues to monitor for satisfaction of the one or more evaluation conditions at block <NUM>. If, at an iteration of block <NUM>, the system determines the one or more evaluation conditions are satisfied, the system returns to block <NUM> to perform a subsequent iteration of the method <NUM>. In other words, the system can periodically evaluate the active ML model (whether the active ML model is the original dormant ML model or a sparsified instance of the original dormant ML model) to ensure the active ML model is still the optimal ML model for the client device.

Turning now to <FIG>, a flowchart illustrating an example method <NUM> of causing performance measures to be generated by a group of client devices for activating and/or evaluating corresponding on-device machine learning (ML) model(s) at corresponding additional client devices is depicted. For convenience, the operations of the method <NUM> are described with reference to a system that performs the operations. The system of method <NUM> includes one or more processors and/or other component(s) of a computing device (e.g., client device <NUM> of <FIG>, client device <NUM> of <FIG>, computing device <NUM> of FIG. <NUM>, and/or other computing devices). Moreover, while operations of the method <NUM> are shown in a particular order, this is not meant to be limiting. One or more operations may be reordered, omitted, or added.

At block <NUM>, the system causes a group of client devices to generate a plurality of corresponding performance measures for a corresponding ML model stored locally at each of the client devices of the group, and based on a plurality of testing instances for the corresponding ML model that are also stored locally at each of the client devices of the group, each of the client devices of the group having a first set of device characteristics. The corresponding ML model stored locally at each of the client devices of the group may be a corresponding dormant ML model or a corresponding active ML model. Further, the plurality of testing instances can be uniform across the client devices of the group. Moreover, the first set of device characteristics can include, for example, a first set of hardware characteristics (e.g., a first type of memory available, a first quantity of memory available, a first type of processors, a first quantity of processors, etc.), a first set of software characteristics (e.g., a first firmware, a first operating system, etc.), a first manufacturer characteristic (e.g., an indication of a first manufacturer of the client devices of the group).

In various implementations, the system causes each of the client devices of the group to generate the plurality of corresponding performance measures in response to determining corresponding client device conditions (e.g., described with respect to block <NUM> of <FIG>) are satisfied at each of the client devices. Notably, the one or more client device conditions for a first client device of the group can be satisfied, while the one or more client device conditions for a second client device of the group may not be satisfied. Accordingly, the system can cause each of the client devices of the group to generate the plurality of corresponding performance measures in an asynchronous manner.

For example, and as indicated at sub-block 452A, the system causes a given client device of the group to process, using the corresponding ML model, testing instance input for a given testing instance of the plurality of testing instances to generate corresponding output. Further, and as indicated at sub-block 452B, the system causes the given client device of the group to generate the plurality of corresponding performance measures for the given testing instance based on the processing of the testing instance input of the given testing instance. The system can continue the operations of sub-blocks 452A and 452B to generate the plurality of corresponding performance measures for each of the plurality of testing instances for the corresponding ML model at the given client device. The operations of sub-blocks 452A and 452B can be performed in the same or similar manner described with respect to the operations sub-blocks 354A and 354B of <FIG>. However, and in contrast with the operations of sub-blocks 354A and 354B of <FIG>, the operations of sub-blocks 452A and 452B can be performed at each of the client devices of the group.

At block <NUM>, the system transmits the plurality of corresponding performance measures, from each of the client devices of the group, to a remote system. At block <NUM>, the system determines, based on the plurality of corresponding performance measures for each of the client devices of the group, whether to activate the corresponding ML model stored locally at corresponding additional client devices that each also have the first set of device characteristics. In other words, the system can transmit the corresponding plurality of performance measures from each of the client devices to the remote system, and the remote system can determine, based on the corresponding plurality of performance measures received from each of the client devices, whether the corresponding ML models should be activated at other client devices that also have the same device characteristics as those client devices in the group.

In some implementations, each of the client devices of the group can process the corresponding plurality of performance measure locally to determine whether the corresponding ML model satisfies corresponding performance thresholds, and can simply transmit an indication to the remote system of whether the corresponding ML model should be active. In these implementations, the remote system can determine whether to activate the corresponding ML model at the corresponding additional client devices based on a threshold quantity of the client devices in the group (e.g., all of the client devices of the group or a sub-set of the client devices of the group) transmitting an indication to the remote system that indicates the corresponding ML model should be activated. In additional or alternative implementations, the corresponding plurality of performance measures for each of the testing instances at each of the client devices in the group can be transmitted to the remote system, and the remote system can process the corresponding plurality of performance measures for each of the testing instances to determine whether to activate the corresponding ML model at the corresponding additional client devices.

If, at an iteration of block <NUM>, the system determines not to activate the corresponding ML model at the corresponding additional client devices that also have the first set of device characteristics, the system proceeds to block <NUM>. At block <NUM>, the system causes the corresponding ML model to be sparsified for each of the client devices of the group. In some implementations, the remote system can simply transmit an indication to each of the client devices of the group to sparsify the corresponding ML model locally at each of the client devices of the group. In additional or alternative implementations, the remote system can transmit a corresponding sparsified instance of the corresponding ML model to each of the client devices of the group. The system returns to block <NUM> to perform a subsequent iteration of the method <NUM> using the corresponding sparsified instance of the corresponding ML model.

If, at an iteration of block <NUM>, the system determines to activate the corresponding ML model at the corresponding additional client devices that also have the first set of device characteristics, the system proceeds to block <NUM>. At block <NUM>, the system causes the corresponding ML model to be activated for use locally at the corresponding additional client devices. In other words, the system can use the client devices included in the group as a proxy for all other client devices having the first set of device characteristics in determining whether and/or when to activate various ML models.

At block <NUM>, the system selects a group of further additional client devices to generate a plurality of additional performance measures for the corresponding ML model stored locally at each of the further additional client devices of the group, each of the further additional client devices of the group having a distinct, second set of device characteristics. In other words, the system can determine the optimal ML model for the client devices having the first set of device characteristics, and then determine the optimal ML model further additional client devices having the second, distinct set of device characteristics, where one or more of the second hardware characteristics, one or more of the second software characteristics, or a second manufacturer characteristic differ from those of the first set of device characteristics. The system can continue performing iterations of the method <NUM> for various groups of client devices having different sets of device characteristics to ensure the client devices execute the optimal ML models for those client devices. Further, the system can perform iterations of the method <NUM> of <FIG> when one or more evaluation conditions are satisfied at the client devices of the various groups to ensure each of the client devices are executing optimal ML models.

Although <FIG> is depicted as determining optimal ML models for the group of client devices having the first set of device characteristics, and subsequently determining optimal ML models for the group of client devices having the distinct, second set of device characteristics, it should be understood that is for the sake of example and is not meant to be limiting. For example, multiple iterations of the method <NUM> of <FIG> can be performed in a parallel manner for multiple groups of client devices having the same sets of device characteristics (e.g., to generate performance measures for different ML models at the multiple groups of client devices having the same set of device characteristics) or distinct sets of device characteristics (e.g., to generate performance measures for the same ML model at the multiple groups of client devices having different sets of device characteristics). For instance, a first group of client devices having a first set of device characteristics can process a first set of testing instances using a first ML model, a second group of client devices having the first set of device characteristics can process a second set of testing instances using a second ML model, a third group of client devices having a distinct, second set of device characteristics can process the first set of testing instances using the first ML model, a fourth group of client devices having the distinct, second set of device characteristics can process the second set of testing instances using the second ML model, and so on.

Turning now to <FIG>, a block diagram of an example computing device <NUM> that may optionally be utilized to perform one or more aspects of techniques described herein is depicted. In some implementations, one or more of a client device, cloud-based automated assistant component(s), and/or other component(s) may comprise one or more components of the example computing device <NUM>.

Storage subsystem <NUM> stores programming and data constructs that provide the functionality of some or all of the modules described herein. For example, the storage subsystem <NUM> may include the logic to perform selected aspects of the methods disclosed herein, as well as to implement various components depicted in <FIG> and <FIG>.

In situations in which the systems described herein collect or otherwise monitor personal information about users, or may make use of personal and/or monitored information), the users may be provided with an opportunity to control whether programs or features collect user information (e.g., information about a user's social network, social actions or activities, profession, a user's preferences, or a user's current geographic location), or to control whether and/or how to receive content from the content server that may be more relevant to the user.

In some implementations, a method performed by one or more processors of a client device is provided and includes causing a client device to generate a plurality of performance measures for a dormant machine learning (ML) model based on a plurality of testing instances for the dormant ML model. the client device has on-device memory storing the dormant ML model and the plurality of testing instances for the dormant ML model. Further, causing the client device to generate the plurality of performance measures based on a given testing instance, of the plurality of testing instance includes causing the client device to process, using the dormant ML model, testing instance input for the given testing instance to generate output, and causing the client device to generate the plurality of performance measures based on the processing of the testing instance input of the given testing instance. The method further includes determining, based on the plurality of performance measures, whether to activate the dormant ML model at the client device, and in response to determining to activate the dormant ML model at the client device, causing the dormant ML model to be activated for use locally at the client device.

These and other implementations of the technology can include one or more of the following features.

In some implementations, the plurality of performance measures can include, for each of the plurality of testing instances, at least one or more of: a corresponding latency measure, a corresponding memory consumption measure, or a corresponding CPU usage measure.

In some implementations, the method can further include determining whether one or more client device conditions are satisfied. Causing the client device to generate the plurality of performance measures can be in response to determining the one or more client device conditions are satisfied. In some versions of those implementations, the one or more client device conditions can include one or more of: a time of day, a day of week, that the client device is charging, that the client device has at least a threshold state of charge, that a temperature of the client device is less than a temperature threshold, or that the client device is not being held by a user.

In some implementations, the method further includes determining whether one or more evaluation conditions are satisfied, and in response to determining the one or more evaluation conditions are satisfied, causing the client device to generate a plurality of additional performance measures for the active ML model based on the plurality of testing instances. The method can further include determining, based on the plurality of additional performance measures, whether to sparsify the active ML model, and in response to determining to sparsify the active ML model, causing the ML model stored in the on-device memory of the client device to be replaced with a sparsified instance of the ML model. In some versions of those implementations, the one or more evaluation conditions can include one or more of: a threshold quantity of the on-device memory has been consumed by the client device, a threshold quantity of the CPU usage has been exceeded, or a threshold quantity of system updates have been performed.

In some implementations, causing the dormant ML model to be activated for use locally at the client device can include causing the client device to automatically activate the dormant ML model for use locally at the client device.

In some implementations, causing the dormant ML model to be activated for use locally at the client device can include causing the client device to render a notification that indicates the dormant ML model is ready to be activated for use locally at the client device, and causing the dormant ML model to be activated for use locally at the client device in response to receiving user confirmation, responsive to the notification, to activate the dormant ML model.

In some implementations, the client device can have a first set of device characteristics. In some versions of those implementations, the first set of device characteristics can include one or more: a first set of hardware characteristics, a first set of software characteristics, or a first manufacturer. In some additional or alternative versions of those implementations, the method can further include causing one or more additional client devices that also have the first set of device characteristics to activate a corresponding instance of the dormant ML model in response to determining to activate the dormant ML model at the client device.

In some implementations, the method can further include, in response to determining not to activate the dormant ML model at the client device, causing the ML model stored in the on-device memory of the client device to be replaced with a sparsified instance of the ML model, causing the client device to generate a plurality of additional performance measures for the sparsified instance of the ML model based on the plurality of testing instances, and determining, based on the plurality of additional performance measures, whether to activate the sparsified instance of the active model.

In some implementations, the dormant ML model can be a dormant automatic speech recognition (ASR) model, the testing instance input for each of the plurality of testing instances can include a segment of audio data, and testing input output for each of the plurality of testing instances can include a ground truth transcription corresponding to the segment of the audio data. In some versions of those implementations, causing the client device to process, using the dormant ML model, the testing instance input of the given testing instance to generate the output can include causing the client device to process, using the dormant ASR model, the segment of audio data for the given testing instance to generate the output corresponding to one or more speech hypotheses that are predicted to correspond to the segment of the audio data. In some further versions of those implementations, the plurality of performance measures can include, for the given testing instance, at least a corresponding ASR measure determined based on comparing one or more of the speech hypotheses to the ground truth transcription.

In some implementations, the dormant ML model can be a dormant hotword recognition model, the testing instance input for each of the plurality of testing instances can include a segment of audio data, and testing input output for each of the plurality of testing instances can include a ground truth measure of whether the segment of audio data includes one or more particular words or phrases. In some versions of those implementations, causing the client device to process, using the dormant ML model, the testing instance input of the given testing instance to generate the output can include causing the client device to process, using the dormant hotword model, the segment of audio data for the given testing instance to generate the output corresponding to a predicted measure that predicts whether the segment of the audio data includes one or more of the particular words or phrases. In some further versions of those implementations, the plurality of performance measures can include, for the given testing instance, at least a hotword measure determined based on comparing the predicted measure to the ground truth measure.

In some implementations, the dormant ML model can be a dormant text-to-speech (TTS) model, the testing instance input for each of the plurality of testing instances can include a textual segment, and testing input output for each of the plurality of testing instances can include ground truth audio data for the textual segment. In some versions of those implementations, causing the client device to process, using the dormant ML model, the testing instance input of the given testing instance to generate the output can include causing the client device to process, using the dormant TTS model, the textual segment for the given testing instance to generate the output corresponding to predicted audio data that is predicted to correspond to the textual segment. In some further versions of those implementations, the plurality of performance measures can include, for the given testing instance, at least a TTS measure determined based on comparing the predicted audio data to the ground truth audio data.

In some implementations, a method performed by one or more processors of a client device is provided and includes causing a client device to generate a plurality of performance measures for a dormant machine learning (ML) model based on a plurality of testing instances for the dormant ML model. The client device has on-device memory storing the dormant ML model and the plurality of testing instances for the dormant ML model. Further, causing the client device to generate the plurality of performance measures based on a given testing instance, of the plurality of testing instance, can include causing the client device to process, using the dormant ML model, testing instance input for the given testing instance to generate output, and causing the client device to generate the plurality of performance measures based on the processing of the testing instance input of the given testing instance. The method further includes determining, based on the plurality of performance measures, whether to activate the dormant ML model at the client device, and in response to determining not to activate the dormant ML model at the client device, causing the ML model stored in the on-device memory of the client device to be sparsified; and causing the client device to generate a plurality of additional performance measures for the sparsified ML model based on the plurality of testing instances.

In some implementations, a method performed by one or more processors of a client device is provided and includes causing a group client devices to generate a plurality of corresponding performance measures for a corresponding instance of a machine learning (ML) model based on a plurality of testing instances for the ML model. Each client device, in the group of client devices, has corresponding on-device memory storing the corresponding instance of the ML model and the plurality of testing instances for the ML model. Further, each client device, in the group of client devices, has a first set of device characteristics. Moreover, causing a given client device, included in the group of client devices, to generate the plurality of corresponding performance measures based on a given testing instance, of the plurality of testing instance, include causing the given client device to process, using the corresponding instance of the ML model, testing instance input for the given testing instance to generate corresponding output, and causing the given client device to generate the plurality of corresponding performance measures based on the processing of the testing instance input of the given testing instance. The method further includes determining, based on the plurality of corresponding performance measures, whether to activate additional instances the ML model at a plurality of additional client devices that also have the first set of device characteristics, and in response to determining to activate the additional instances of the ML model at the plurality of additional client devices, causing the additional instances of the ML model to be activated for use locally at each of the additional client devices.

Claim 1:
A method implemented by one or more processors, the method comprising:
causing a client device to generate a plurality of performance measures for a machine learning (ML) model based on a plurality of testing instances for the ML model,
wherein the client device has a first set of device characteristics and on-device memory storing the ML model and the plurality of testing instances for the ML model, and
wherein causing the client device to generate the plurality of performance measures based on a given testing instance, of the plurality of testing instances, comprises:
causing the client device to process, using the ML model, testing instance input for the given testing instance to generate output; and
causing the client device to generate the plurality of performance measures based on the processing of the testing instance input of the given testing instance;
determining, based on the plurality of performance measures, whether to activate or keep active the ML model at the client device; and
in response to determining to activate or keep active the ML model at the client device:
causing the ML model to be activated or kept active for use locally at the client device;
causing one or more additional client devices that also have the first set of device characteristics to activate or keep active a corresponding instance of the ML model.