Large model co-pilot training for machine-learned model
By employing a larger teacher model as a co-pilot, the method effectively addresses the issues of overfitting and limited robustness in machine-learned models, enhancing their generalization and enabling efficient deployment on edge devices.
Patent Information
- Application Number
- PCT/US2023/076092
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-10-05
- Publication Date
- 2025-04-10
AI Technical Summary
Machine-learned models, especially object identification models, suffer from overfitting and discard irrelevant information during training, leading to limited robustness and poor performance outside the scope of training data.
A computer-implemented method using a larger, pre-trained teacher model as a co-pilot to train a student model by providing training data to both models, evaluating a loss function based on their outputs, and updating the student model's parameters to minimize the loss, thereby enhancing generalization and reducing overfitting.
The approach enables more robust training of machine-learned models, reducing the risk of overfitting and improving the model's ability to handle use cases outside the training dataset, while also allowing for deployment on edge computing devices with limited resources.
Smart Images

Figure US2023076092_10042025_PF_FP_ABST
Abstract
Description
LARGE MODEL CO-PILOT TRAINING FOR MACHINE-LEARNED MODELFIELD
[0001] The present disclosure relates generally to training a machine-learned model. More particularly, the present disclosure relates to training a machine-learned model using a larger, general-purpose model as a co-pilot for more robust training of the machine-learned model.BACKGROUND
[0002] Typically, machine-learned models, especially object identification models and other classification models, are trained by providing training data to a pre-initialized or partially trained backbone model, which in turn provides an output that is compared to ground truth data to determine how accurate the output of the machine-learned model was. Based on this comparison, parameters of the machine-learned model can be updated to enable a more accurate output.
[0003] However, training machine-learned models can suffer from a number of problems. For instance, in order to minimize the loss, or difference, between the output of the machine-learned model and the ground truth data, the machine-learned model may attempt to extract every possible bit of information in the input. This causes overfitting, or limited robustness in the output of the machine-learned model. Additionally, the machine- learned model may discard information that is irrelevant to identifying a particular object, which poses a challenge in representing visualizations of desired objects to be identified outside of how these objects are visualized in the training data. This is undesirable because the forgotten features may have been useful in identifying other visualizations of the object.SUMMARY
[0004] Aspects and advantages of embodiments of the present disclosure will be set forth in part in the following description, or can be learned from the description, or can be learned through practice of the embodiments.
[0005] One example aspect of the present disclosure is directed to a computer- implemented method for training a machine-learned model to perform a first task. The method can include receiving, by a processor, one or more training data items that demonstrate performance of the first task, providing, by the processor, at least a portion of the one or more training data items to a teacher model and a student model, wherein the teachermodel is a pre-trained model that has been trained to perform one or more second tasks that are different from the first task, and receiving, by the processor, a teacher model output as an output of the teacher model resulting from processing at least the portion of the one or more training data items. The method can also include receiving, by the processor, a student model output as an output of the student model resulting from processing at least the portion of the one or more training data items, evaluating, by the processor, a loss function that compares the teacher model output and the student model output, and training, by the processor, the student model based at least in part on the loss function that compares the teacher model output and the student model output.
[0006] Another example aspect of the present disclosure is directed to a computing system for training a machine-learned model to perform a first task. The computing system can include a processor and a non-transitory, computer-readable medium comprising one or more instructions that, when executed by the processor, cause the processor to perform operations. The operations can include receiving one or more training data items that demonstrate performance of the first task, providing at least a portion of the one or more training data items to a teacher model and a student model, wherein the teacher model is a pre-trained model that has been trained to perform one or more second tasks that are different from the first task, and receiving a teacher model output as an output of the teacher model resulting from processing at least the portion of the one or more training data items. The operations can also include receiving a student model output as an output of the student model resulting from processing at least the portion of the one or more training data items, evaluating a loss function that compares the teacher model output and the student model output, and training the student model based at least in part on the loss function that compares the teacher model output and the student model output.
[0007] Another example aspect of the present disclosure is directed to a non-transitory, computer-readable medium comprising one or more instructions that, when executed by a processor, cause the processor to perform operations. The operations can include receiving one or more training data items that demonstrate performance of the first task, providing at least a portion of the one or more training data items to a teacher model and a student model, wherein the teacher model is a pre-trained model that has been trained to perform one or more second tasks that are different from the first task, and receiving a teacher model output as an output of the teacher model resulting from processing at least the portion of the one or more training data items. The operations can also include receiving a student model output as an output of the student model resulting from processing at least the portion of the one ormore training data items, evaluating a loss function that compares the teacher model output and the student model output, and training the student model based at least in part on the loss function that compares the teacher model output and the student model output.
[0008] Other aspects of the present disclosure are directed to various systems, apparatuses, non-transitory computer-readable media, user interfaces, and electronic devices.
[0009] These and other features, aspects, and advantages of various embodiments of the present disclosure will become better understood with reference to the following description and appended claims. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate example embodiments of the present disclosure and, together with the description, serve to explain the related principles.BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Detailed discussion of embodiments directed to one of ordinary skill in the art is set forth in the specification, which makes reference to the appended figures, in which:
[0011] Figure 1 depicts a block diagram of an example pair a of teacher model and a student model according to example embodiments of the present disclosure.
[0012] Figure 2 depicts a block diagram of an example pair of a teacher model and a student model according to example embodiments of the present disclosure.
[0013] Figure 3 depicts a chart illustrating co-pilot training results for a machine-learned model using warm start according to example embodiments of the present disclosure.
[0014] Figure 4 depicts a flow chart diagram of an example method to perform co-pilot model training according to example embodiments of the present disclosure.
[0015] Figure 5 A depicts a block diagram of an example computing system according to example embodiments of the present disclosure.
[0016] Figure 5B depicts a block diagram of an example computing device according to example embodiments of the present disclosure.
[0017] Figure 5C depicts a block diagram of an example computing device according to example embodiments of the present disclosure.
[0018] Reference numerals that are repeated across plural figures are intended to identify the same features in various implementations.DETAILED DESCRIPTIONOverview
[0019] Generally, the present disclosure is directed to the use of a larger, general- purpose model as a co-pilot for more robust training of the machine-learned model.
[0020] Machine-learned models, especially classification models like object identification models, can be trained on datasets that are often limited in both scope and depth of training data examples. The use of this dataset can cause both overfitting of the machine- learned model to the dataset and the discarding of certain features in the dataset by the machine-learned model that may be useful in classification, but that are not relevant to classifying the dataset. The use of this dataset can also utilize a common classification loss function for training the machine-learned model.
[0021] Knowledge distillation is a process of transferring knowledge from a larger, more refined model to a smaller one. It is especially useful in situations where creators and / or users of machine-learned models wish to deploy smaller models in edge computing situations (e.g., with limited computing resources, such as on mobile devices or devices with limited network connectivity). Typically, the smaller, or student model, is handling the same task that the larger model, or teacher model), such as the same type of classification (e g., object classification from image data). Know ledge can be “distilled,” or learned, by providing the same inputs to both the student model and the teacher model and comparing the output of the student model with the output of the teacher model.
[0022] As mentioned, in typical knowledge distillation, the student model is trained to perform the same task as the task on w hich the teacher model w as trained. However, according to an aspect of the present disclosure, a teacher model can be used that has been trained to perform a different task than the task on which the student model is trained. In particular, using a teacher model trained to perform a different task than the task of the student model helps to further generalize features of input data and thus have a more robustly trained student model. The more robustly trained the student model, the less likely the student model is to overfit itself to the chosen training dataset, and the more likely it is that the student model will be able to handle use cases outside the scope of examples in the training dataset.
[0023] In some instances, the respective outputs of the teacher model and the student model may have different formats such as different dimensions. For example, this may occur because the two models are trained to perform different tasks. In order to compare outputs between the teacher model and the student model when possible outputs are in differentformats, a different ty pe of loss can be computed. Because the two outputs are not of the same ty pe, simple comparison and common classification loss (or other suitable loss function for other types of machine-learned models) may not be possible. Instead, other types of loss functions can be implemented to determine a loss between the output of the teacher model and the student model, such as a cosine loss, an LI loss, an L2 loss, or a KL divergence loss. Based on one or both of the losses between the teacher model output and the student model output and a loss determined between the student model output and a ground truth label for the training data, the student model can be trained (e g., by updating weights in various layers of the student model based on the loss function(s)).
[0024] During calculation of the loss between the student model output and the teacher model output, it can be advantageous to use an output from a layer of the student model that comes before any softmax layers in the student model. Softmax layers utilize a softmax function that converts an output vector into a probability distribution of possible outcomes for classification or other tasks for other ty pes of machine-learned models. Softmax functions are often used as a last activation function in a machine-learned model and can be used to normalize the output of the network into the probability distribution. It can be advantageous to take the non-normalized output (or “raw output”) of the student model for use in determining a loss because this “raw output” indicates the “actual” output of the model, while the use of the softmax function converts this “raw output” into a task-specific output, such as classifying whether an object present in an image matches a particular type or classification of obj ect.
[0025] In some embodiments, it can be advantageous that the larger model has undergone multi-task learning. Multi-task learning involves training a foundational (or backbone) model on various data inputs for performing a wide variety of general tasks instead of one specific task. It can be especially advantageous for very large, general models that can utilize commonalities and differences across the various tasks it can be trained to perform. This can result in better efficiency w hen learning and better prediction accuracy for individual tasks because the model is so robust. In some embodiments, the set of tasks the model can perform can all be related to one overall task. For example, a model can be trained to perform object recognition, object tracking, object classification, and other tasks related to overall object identification and monitoring.
[0026] A draw back of multi-task learning is the sheer volume of labeled or annotated training data needed to create the robust multi-task model. Having the larger, more robust teacher model be the multi-task model allows the teacher model to be continuously trainedand reinforced on various tasks with different datasets, while still distilling information for the specific task of the student model and various other student models directed to other specific tasks.
[0027] Because the teacher model can be a larger, more generalized model, the teacher model can have a number of parameters greater than the number of parameters of the student model. In some embodiments, that number of parameters for the teacher model can be one or more orders of magnitude greater than the number of parameters of the student model (e.g., the teacher model may have millions or even billions of parameters to the thousands of parameters of the student model).
[0028] Additionally, an output dimension of the teacher model may be larger than an output dimension of the student model (e.g.. the teacher model having an output dimension size of 2048 and the student model having an output dimension size of 1280 or any other combination of output dimension sizes). To more efficiently train the student model, it can be advantageous to have the output dimension of the output from the student model be the same size as the output dimension of the teacher model. Therefore, the output of the student model can be processed using at least one of batch normalization and linear mapping. Linear mapping is an operation by which a set of input values are transformed from one vector space to another. Batch normalization normalizes inputs by re-centering and / or rescaling. Both techniques enable the output of the student model to be scaled in size to match the output dimension size of the teacher model. This modified student output can then be compared to the output of the teacher model to determine a loss between the two outputs.
[0029] Training the student model with the assistance of the teacher model can be performed with the parameters of the teacher frozen. Freezing parameters in a model during training means processing inputs using the model with the current parameters and then not allowing those parameters to be changed based on any loss between the output of the model and a ground truth label for the output. It can be advantageous to train the student model with the parameters of the teacher model frozen because the teacher model is not being concurrently trained with the student model; rather, the teacher model is being used only as a guide or co-pilot to train and improve the student model. By freezing the parameters of the teacher model, the teacher model is unaffected by the training of the student model.
[0030] Thus, aspects of the present invention provide improvements in training machine- learned models. Using the larger teacher model as a co-pilot for training a student model using knowledge distillation, the student model can be trained for a specific task using any available training data set while minimizing or eliminating the risk of overfitting the studentmodel to the dataset and ignoring certain features of the input data that may later be important in performing the task the student model is trained to perform.
[0031] Aspects of the present invention provide a number of technical benefits. First, the use of knowledge distillation enables machine-learned models to be trained using more limited datasets, thus reducing the number of training cycles required to train the student model and reducing the amount of memory needed to store datasets for training the student model while making the student model more efficient and versatile in performing its trained task, thus increasing the processing efficiency of devices implementing the trained student model. Second, the trained student model, which is much smaller than the teacher model, can be deployed onto edge computing devices that may have less processing power, less network bandwidth, and less memory than larger, server-style computing devices, thus providing the services of a robustly-trained model for functionality on the edge computing device, which may have limited or no access to other models with similar functionality.
[0032] With reference now to the Figures, example embodiments of the present disclosure will be discussed in further detail.Example Model Arrangements
[0033] Figure 1 depicts a block diagram of an example pair 100 of teacher model 105 and student model 110 according to example embodiments of the present disclosure.
[0034] The teacher model 105 can be a large-scale, general machine-learned model trained on one or more large, robust datasets. This enables features identified from the teacher model 105 to be more generalizable in performing classifications or other tasks, because the features identified by the teacher model 105 have more include rich representations of high-level semantics and context. Additionally, the teacher model 105 includes auxiliary and more generic feature representations of data to be classified, which may not be useful for a specific training data set but may be useful for classification examples outside the scope of the specific training data set. In particular, for classification models where training data may be sparse in extractable features, the use of feature representation from the larger teacher model 105 allows features extracted from training data to be less sparse while still having semantic meaning for classification.
[0035] In some embodiments, the teacher model 105 can have undergone multi-task learning. Multi-task learning involves training a foundational model on various data inputs for performing a set of tasks instead of one specific task. It can be especially advantageous for very large, general models like the teacher model 105 that can utilize commonalities anddifferences across the various tasks it can be trained to perform. In some embodiments, the set of tasks the teacher model 105 can perform can all be related to one overall task. For example, the teacher model 105 can be trained to perform object recognition, object tracking, object classification, and other tasks related to overall object identification and monitoring.
[0036] In some embodiments, the teacher model 105 can be a generative sequence processing model, such as a model that predicts the next word in a given sequence.
[0037] The student model 1 10 can be a machine-learned model for a specific task, such as object recognition or object classification. The student model 110 can be a machine- learned model that specifically is useful for implementation in edge computing cases, such as on a mobile computing device (a smartphone, a tablet computer, a laptop computer, and similar devices). In one example, the student model 110 can be a convolutional neural network based on an inverted residual structure, where the residual connections are between bottleneck layers of the network, such as a network similar to the MobileNetV2 architecture.
[0038] In some embodiments, the teacher model 105 can have a number of parameters at least an order of magnitude higher than a number of parameters included in the student model 110 (e.g.. having millions of parameters to the hundreds of thousands or less parameters of the student model 110). Because the teacher model 105 is a much larger, more general model designed primarily to be deployed on computing systems with large amounts of processing power (such as backend servers), and possibly trained to perform multiple tasks, the teacher model 105 can support having a much larger number of parameters. In contrast, the student model 1 10 can be designed for a singular task and can be designed to be deployed in edge computing scenarios, where processing power and memory can be limited, which can limit how many parameters the student model 110 can support.
[0039] In some embodiments, the teacher model 105 has an output dimension size greater than the output dimension size of the student model 110. Because the teacher model 105 is a much larger, more general model that may be performing multiple tasks, the teacher model 105 can have a larger number of output features for creating a more robust output, thus necessitating the larger output dimension size. For example, the teacher model 105 can have an output dimension size of 2048. In contrast, the student model 110 only requires outputs for a singular task and can therefore have a smaller output dimension size. In one example, the student model can have an output dimension size of 1280.
[0040] To train the student model 110 using knowledge distillation from the teacher model 105. training data 115 is provided as input to both the teacher model 105 and thestudent model 105. Both the teacher model 105 and the student model 110 process the training data 115 and respectively produce teacher output 120 and student output 125.
[0041] In some embodiments, the student output 125 can be processed by a softmax layer 130 to generate a softmax output 135, which is then compared to a ground truth label 140 for the input portion of the training data 115. The softmax layer 130 processes the student output 125 using a softmax function to transform the student output 125 into a probability distribution of possible outcomes for the task of the student model 110. Softmax functions are often used as a last activation function in a machine-learned model and can be used to normalize the output of the network into the probability distribution. The softmax output 135 can then compared to the ground truth label 140 to establish a loss 145, such as a common classification loss, between the softmax output 135 and the ground truth label 140. This loss 145 can be used to train the student model 110.
[0042] To perform knowledge distillation using the teacher model 105, the teacher output 120 and the student output 125 can be compared. In some embodiments, the student output 125 can occur in a layer or step before the softmax layer 130. It can be advantageous to take the non-normahzed student output 125 for use in determining a loss in comparison to the teacher output 120 because this ‘Taw output” indicates the “actual” output of the student model 120, while the use of the softmax function converts this “raw output” into a taskspecific output, such as classifying whether an object present in an image matches a particular type or classification of object.
[0043] The student output 125 is provided as co-pilot student input 150 to a co-pilot loss function 155 along with the teacher output 120, and the co-pilot loss function 155 determines a loss between the co-pilot student input 150 and the teacher output 120. This determined loss can then be used to train the student model 110. In some embodiments, additional processing can be performed on the co-pilot student input 150 in order to prepare the co-pilot student input 150 for comparison with the teacher output 120.
[0044] For example, Figure 2 illustrates a similar pair 200 of teacher model 205 and student model 210 to the pair 100 illustrated in Figure 1. Teacher model 205 and student model 210 receiving training data 215 and generate teacher output 220 and student output 225, respectively. As in Figure 1, the student output 225 can then undergo evaluation by a softmax function to create a probability distribution, such as distribution 230 (illustrated with 2 possible outputs, although the output dimension of distribution 230 could be of a different size), which can then be used to obtain a task-specific output 235. This task-specific output 235 can be compared to a ground truth label to determine a loss for the student model 210.
[0045] As illustrated in Figure 2, in some embodiments, the teacher output 220 can have an output dimension size of 2048 and the student output can have an output dimension size of 1280. In order to perform a better comparison using loss function 240 between the teacher output 220 and the student output 225, it can be advantageous that the student output 225 be processed to have the same output dimension size as the output dimension size of the teacher output 220.
[0046] The student output 225 can undergo various processes to bring the output dimension of the student output 225 to the same size as the output dimension of the teacher output 220 (e.g., create modified student output 240). For example, the student output 225 can be processed using at least one of batch normalization and linear mapping. Linear mapping is an operation by which a set of input values are transformed from one vector space to another. Batch normalization normalizes inputs by re-centering and / or rescaling. Both techniques enable the student output 225 to be scaled in size to match the output dimension size of the teacher output 220, thus generating modified student output 240 with an output dimension size matching the output dimension size of the teacher output 220 (in this case, 2048). It is to be understood that the student output 225 can be processed by other processing techniques to match the size of the output dimension of the student output 225 to the size of the output dimension of the teacher output 220 other than linear mapping and batch normalization.
[0047] The modified student output 240 can then be compared using a co-pilot loss function 245 to the teacher output 220, which generates a loss between the modified student output 240 and the teacher output 220. In some embodiments, the co-pilot loss function can be a cosine similarity loss function, an LI loss function, an L2 loss function, a KL divergence loss function, or another suitable loss function. This loss generated by the co-pilot loss function can then be used to train the student model 210.
[0048] It is to be understood that each of the teacher output 220 and the student output 225 can have other output dimension sizes. It can be advantageous that the output dimension size of the teacher output 220 is larger than the output dimension size of the student output 225, but it is not required.
[0049] In some embodiments, it can be advantageous that any parameters and weights associated with the teacher model 205 are held frozen during the training of the student model 210. The teacher model 205 is trained on various datasets at various times, but is not intended to be further trained based on any loss coming from training the student model 210. Therefore, in order to prevent any alteration to the teacher model 205 based on any loss fromthe student model 210, weights and parameters of the teacher model 205 can be frozen during the training process.
[0050] Figure 3 depicts a chart 300 illustrating co-pilot training results for a machine- learned model using warm start according to example embodiments of the present disclosure.
[0051] The goal of training a machine-learning model is to minimize the model loss until the model loss is within a desired threshold. The faster the loss is minimized, the less training cycles are required, and therefore the less processing power, bandwidth time, and energy is needed to train the model.
[0052] Baseline curve 305 illustrates the training of a student model without any teacher model providing any knowledge distillation to the student model. First round knowledge distillation curve 310 illustrates the use of a teacher model with knowledge distillation to a student model during training. As shown, the use of the teacher model with knowledge distillation helps to more rapidly minimize the loss for the student model.
[0053] It can be advantageous to use warm-start training for training the student model, as illustrated by warm start curve 315. Warm-start training is a training or retraining method for a machine-learned model where a new model is trained with weights and biases initialized to existing values from a previous iteration of the model. Normally, warm-start training produces poorer results, but using the teacher model and the knowledge distillation technique, the student model can be trained using warm-start training and converges to minimal loss at a faster pace than with traditional cold-start training.Example Methods
[0054] Figure 4 depicts a flow chart diagram of an example method 400 to perform copilot model training according to example embodiments of the present disclosure. Although Figure 4 depicts steps performed in a particular order for purposes of illustration and discussion, the methods of the present disclosure are not limited to the particularly illustrated order or arrangement. The various steps of the method 400 can be omitted, rearranged, combined, and / or adapted in various ways without deviating from the scope of the present disclosure.
[0055] At 402, a computing system can receive or more training data items that demonstrate performance of the first task. The first task can be a specific task for a student model to perform, such as object classification, object recognition, object tracking, and the like. The one or more training data items can include task-specific training items for the firsttask, such as including a ground truth label of an object in an image to be identified and the associated image, which is input into the computing system for processing.
[0056] At 404, the computing system can provide at least a portion of the one or more training data items to a teacher model and a student model, wherein the teacher model is a pre-trained model that has been trained to perform one or more second tasks that are different from the first task. The teacher model can be a larger, general model than the student model, which can be focused on a singular task that is different than the second task that the teacher model is trained to perform. In some embodiments, the one or more second tasks comprise a plurality of second tasks that are different from the first task. For example, the teacher model may be trained to perform two or more tasks associated with object detection and classification, while the student model may be being prepared to be trained to track objects in different images.
[0057] In some embodiments, the teacher model can be a foundation model that has been trained to perform a wide variety of tasks and produce a variety of outputs. In order to be trained to perform these different tasks, the teacher model can be previously trained on a plurality of different datasets, each dataset being associated with its respective task, such as a dataset for object classification being used to train the teacher model to perform object classification.
[0058] In some embodiments, the student model can have a first number of parameters that is smaller than a second number of parameters associated with the teacher model. In some embodiments, the first number of parameters can be at least one order of magnitude smaller than the second number of parameters.
[0059] In some embodiments, an output dimension size of the teacher model is greater than an output dimension size of the student model.
[0060] In some embodiments, the teacher model can be a generative sequence processing model that can produce a novel output based on input.
[0001] At 406, the computing system can receive a teacher model output as an output of the teacher model resulting from processing at least the portion of the one or more training data items. The teacher model analyzes the input and produces an output of a teacher output dimension size, and then provides the output back to the computing system.
[0062] At 408, the computing system can receive a student model output as an output the student model resulting from processing at least the portion of the one or more training data items. The student model analyzes the input and produces an output of a student output dimension size, and then provides the output back to the computing system.
[0063] In some embodiments, the computing system can process the student output using at least one of linear mapping and batch normalization and can obtain a modified student output based on this processing. The modified student output can have, due to the processing, an output dimension size matching the output dimension size of the teacher model.
[0064] At 410, the computing system can evaluate a loss function that compares the teacher model output and the student model output. In some embodiments, evaluating the loss function can include utilizing a cosine similarity loss function to determine a cosine similarity between the teacher output and the student output and / or any modified student output should the student output have undergone any processing to match the sizes of output dimensions of the teacher model and the student model. In other embodiments, other loss functions, such as LI loss, L2 loss, and KL divergence loss can be evaluated to determine a loss between the teacher output and the student output or modified student output.
[0065] At 412, the computing system can train the student model based at least in part on the loss function that compares the teacher model output and the student model output. Parameters and / or weights of the student model can be adjusted based on the loss between the teacher output and the student output or modified student output. In some embodiments, during training of the student model, parameters of the teacher model are held frozen to prevent any undesired changes to any weights or parameters of the teacher model.
[0066] In some embodiments, the student output comprises an output of a layer in the student model that precedes a softmax layer of the student model. In addition to training the student model based on the evaluation of the loss function that compares the student output and the teacher output, the student model can also be trained in other ways. For example, the computing system can process the student output using the softmax layer of the student model (in addition to providing the student model to the first loss function for comparison to the teacher output) to obtain a predicted output. This predicted output can then be provided to a second loss function, such as a comparison or classification loss function, that compares the predicted output to a ground truth label. The loss between the predicted output and the ground truth label can then be further used to train the student model.Example Devices and Systems
[0067] Figure 5A depicts a block diagram of an example computing system 500 that performs co-pilot model training according to example embodiments of the present disclosure. The system 500 includes a user computing device 502, a server computing system530, and a training computing system 550 that are communicatively coupled over a network580.
[0068] The user computing device 502 can be any type of computing device, such as, for example, a personal computing device (e.g., laptop or desktop), a mobile computing device (e.g., smartphone or tablet), a gaming console or controller, a wearable computing device, an embedded computing device, or any other type of computing device.
[0069] The user computing device 502 includes one or more processors 512 and a memory 514. The one or more processors 512 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 514 can include one or more non-transitory computer-readable storage media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 514 can store data 516 and instructions 518 which are executed by the processor 512 to cause the user computing device 502 to perform operations.
[0070] In some implementations, the user computing device 502 can store or include one or more teacher and / or student models 520. For example, the teacher and / or student models 520 can be or can otherwise include various machine-learned models such as neural networks (e.g., deep neural networks) or other types of machine-learned models, including non-linear models and / or linear models. Neural networks can include feed-forward neural networks, recurrent neural networks (e.g., long short-term memory recurrent neural networks), convolutional neural networks or other forms of neural networks. Some example machine- learned models can leverage an attention mechanism such as self-attention. For example, some example machine-learned models can include multi-headed self-attention models (e.g., transformer models). Example teacher and / or student models 520 are discussed with reference to Figures 1 and 2.
[0071] In some implementations, the one or more teacher and / or student models 520 can be received from the server computing system 530 over network 580, stored in the user computing device memory 514, and then used or otherwise implemented by the one or more processors 512. In some implementations, the user computing device 502 can implement multiple parallel instances of a single teacher and / or student model 520 (e g., to perform parallel model training across multiple instances of teacher and / or student models).
[0072] More particularly, the teacher and / or student models 520 can be models for one or more tasks, such as classification. Teacher models of the teacher and / or student models 520 are more general, larger models that have undergone extensive training over variousdatasets, while student models of the teacher and / or student models 520 are directed to a more specific task and have yet to undergo training.
[0073] Additionally or alternatively, one or more teacher and / or student models 540 can be included in or otherwise stored and implemented by the server computing system 530 that communicates with the user computing device 502 according to a client-server relationship. For example, the teacher and / or student models 540 can be implemented by the server computing system 530 as a portion of a web service (e.g., a model training service). Thus, one or more models 520 can be stored and implemented at the user computing device 502 and / or one or more models 540 can be stored and implemented at the server computing system 530.
[0074] The user computing device 502 can also include one or more user input components 522 that receives user input. For example, the user input component 522 can be a touch-sensitive component (e.g., a touch-sensitive display screen or a touch pad) that is sensitive to the touch of a user input object (e.g., a finger or a stylus). The touch-sensitive component can serve to implement a virtual keyboard. Other example user input components include a microphone, a traditional keyboard, or other means by which a user can provide user input.
[0075] The server computing system 530 includes one or more processors 532 and a memory 534. The one or more processors 532 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory' 534 can include one or more non -transitory' computer-readable storage media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 534 can store data 536 and instructions 538 which are executed by the processor 532 to cause the server computing system 530 to perform operations.
[0076] In some implementations, the server computing system 530 includes or is otherwise implemented by one or more server computing devices. In instances in which the server computing system 530 includes plural server computing devices, such server computing devices can operate according to sequential computing architectures, parallel computing architectures, or some combination thereof.
[0077] As described above, the server computing system 530 can store or otherwise include one or more trainer and / or student models 540. For example, the models 540 can be or can otherwise include various machine-learned models. Example machine-learned modelsinclude neural networks or other multi-layer non-linear models. Example neural networks include feed forward neural networks, deep neural networks, recurrent neural networks, and convolutional neural networks. Some example machine-learned models can leverage an attention mechanism such as self-attention. For example, some example machine-learned models can include multi-headed self-attention models (e.g., transformer models). Example models 540 are discussed with reference to Figures 1 and 2.
[0078] The user computing device 502 and / or the server computing system 530 can train the models 520 and / or 540 via interaction with the training computing system 550 that is communicatively coupled over the network 580. The training computing system 550 can be separate from the server computing system 530 or can be a portion of the server computing system 530.
[0079] The training computing system 550 includes one or more processors 552 and a memory 554. The one or more processors 552 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 554 can include one or more non -transitory computer-readable storage media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory' 554 can store data 556 and instructions 558 which are executed by the processor 552 to cause the training computing system 550 to perform operations. In some implementations, the training computing system 550 includes or is otherwise implemented by one or more server computing devices.
[0080] The training computing system 550 can include a model trainer 560 that trains the machine-learned models 520 and / or 540 stored at the user computing device 502 and / or the server computing system 530 using various training or learning techniques, such as, for example, backwards propagation of errors. For example, a loss function can be backpropagated through the model(s) to update one or more parameters of the model(s) (e.g., based on a gradient of the loss function). Various loss functions can be used such as mean squared error, likelihood loss, cross entropy loss, hinge loss, and / or various other loss functions. Gradient descent techniques can be used to iteratively update the parameters over a number of training iterations.
[0081] In some implementations, performing backwards propagation of errors can include performing truncated backpropagation through time. The model trainer 560 can perform a number of generalization techniques (e.g., weight decays, dropouts, etc.) to improve the generalization capability of the models being trained.
[0082] In particular, the model trainer 560 can train the teacher and / or student models 520 and / or 540 based on a set of training data 562. The training data 562 can include, for example, data associated with one or more specific tasks for the student models and / or various tasks the teacher models are configured to perform.
[0083] In some implementations, if the user has provided consent, the training examples can be provided by the user computing device 502. Thus, in such implementations, the model 520 provided to the user computing device 502 can be trained by the training computing system 550 on user-specific data received from the user computing device 502. In some instances, this process can be referred to as personalizing the model.
[0084] The model trainer 560 includes computer logic utilized to provide desired functionality. The model trainer 560 can be implemented in hardware, firmware, and / or software controlling a general purpose processor. For example, in some implementations, the model trainer 560 includes program files stored on a storage device, loaded into a memory and executed by one or more processors. In other implementations, the model trainer 560 includes one or more sets of computer-executable instructions that are stored in a tangible computer-readable storage medium such as RAM, hard disk, or optical or magnetic media.
[0085] The network 580 can be any type of communications network, such as a local area network (e.g., intranet), wide area network (e.g., Internet), or some combination thereof and can include any number of wired or wireless links. In general, communication over the network 580 can be carried via any type of wired and / or wireless connection, using a wide variety of communication protocols (e.g., TCP / IP, HTTP, SMTP, FTP), encodings or formats (e.g., HTML, XML), and / or protection schemes (e.g., VPN, secure HTTP, SSL).
[0086] The machine-learned models described in this specification may be used in a variety of tasks, applications, and / or use cases.
[0087] In some implementations, the input to the machine-learned model(s) of the present disclosure can be image data. The machine-learned model(s) can process the image data to generate an output. As an example, the machine-learned model(s) can process the image data to generate an image recognition output (e.g., a recognition of the image data, a latent embedding of the image data, an encoded representation of the image data, a hash of the image data, etc ). As another example, the machine-learned model(s) can process the image data to generate an image segmentation output. As another example, the machine- learned model(s) can process the image data to generate an image classification output. As another example, the machine-learned model(s) can process the image data to generate an image data modification output (e.g., an alteration of the image data, etc.). As anotherexample, the machine-learned model(s) can process the image data to generate an encoded image data output (e.g., an encoded and / or compressed representation of the image data, etc.). As another example, the machine-learned model(s) can process the image data to generate an upscaled image data output. As another example, the machine-learned model(s) can process the image data to generate a prediction output.
[0088] In some implementations, the input to the machine-learned model(s) of the present disclosure can be text or natural language data. The machine-learned model(s) can process the text or natural language data to generate an output. As an example, the machine- learned model(s) can process the natural language data to generate a language encoding output. As another example, the machine-learned model(s) can process the text or natural language data to generate a latent text embedding output. As another example, the machine- learned model(s) can process the text or natural language data to generate a translation output. As another example, the machine-learned model(s) can process the text or natural language data to generate a classification output. As another example, the machine-learned model(s) can process the text or natural language data to generate a textual segmentation output. As another example, the machine-learned model(s) can process the text or natural language data to generate a semantic intent output. As another example, the machine-learned model(s) can process the text or natural language data to generate an upscaled text or natural language output (e g., text or natural language data that is higher quality than the input text or natural language, etc.). As another example, the machine-learned model(s) can process the text or natural language data to generate a prediction output.
[0089] In some implementations, the input to the machine-learned model(s) of the present disclosure can be speech data. The machine-learned model(s) can process the speech data to generate an output. As an example, the machine-learned model(s) can process the speech data to generate a speech recognition output. As another example, the machine- learned model(s) can process the speech data to generate a speech translation output. As another example, the machine-learned model(s) can process the speech data to generate a latent embedding output. As another example, the machine-learned model(s) can process the speech data to generate an encoded speech output (e.g., an encoded and / or compressed representation of the speech data, etc ). As another example, the machine-learned model(s) can process the speech data to generate an upscaled speech output (e.g., speech data that is higher quality than the input speech data, etc.). As another example, the machine-learned model(s) can process the speech data to generate a textual representation output (e.g., atextual representation of the input speech data, etc.). As another example, the machine- learned model(s) can process the speech data to generate a prediction output.
[0090] In some implementations, the input to the machine-learned model(s) of the present disclosure can be latent encoding data (e.g., a latent space representation of an input, etc.). The machine-learned model(s) can process the latent encoding data to generate an output. As an example, the machine-learned model(s) can process the latent encoding data to generate a recognition output. As another example, the machine-learned model(s) can process the latent encoding data to generate a reconstruction output. As another example, the machine-learned model(s) can process the latent encoding data to generate a search output. As another example, the machine-learned model(s) can process the latent encoding data to generate a reclustering output. As another example, the machine-learned model(s) can process the latent encoding data to generate a prediction output.
[0091] In some implementations, the input to the machine-learned model(s) of the present disclosure can be statistical data. Statistical data can be, represent, or otherwise include data computed and / or calculated from some other data source. The machine-learned model(s) can process the statistical data to generate an output. As an example, the machine- learned model(s) can process the statistical data to generate a recognition output. As another example, the machine-learned model(s) can process the statistical data to generate a prediction output. As another example, the machine-learned model(s) can process the statistical data to generate a classification output. As another example, the machine-learned model(s) can process the statistical data to generate a segmentation output. As another example, the machine-learned model(s) can process the statistical data to generate a visualization output. As another example, the machine-learned model(s) can process the statistical data to generate a diagnostic output.
[0092] In some implementations, the input to the machine-learned model(s) of the present disclosure can be sensor data. The machine-learned model(s) can process the sensor data to generate an output. As an example, the machine-learned model(s) can process the sensor data to generate a recognition output. As another example, the machine-learned model(s) can process the sensor data to generate a prediction output. As another example, the machine-learned model(s) can process the sensor data to generate a classification output. As another example, the machine-learned model(s) can process the sensor data to generate a segmentation output. As another example, the machine-learned model(s) can process the sensor data to generate a visualization output. As another example, the machine-learnedmodel(s) can process the sensor data to generate a diagnostic output. As another example, the machine-learned model(s) can process the sensor data to generate a detection output.
[0093] In some cases, the machine-learned model(s) can be configured to perform a task that includes encoding input data for reliable and / or efficient transmission or storage (and / or corresponding decoding). For example, the task may be an audio compression task. The input may include audio data and the output may comprise compressed audio data. In another example, the input includes visual data (e.g. one or more images or videos), the output comprises compressed visual data, and the task is a visual data compression task. In another example, the task may comprise generating an embedding for input data (e.g. input audio or visual data).
[0094] In some cases, the input includes visual data and the task is a computer vision task. In some cases, the input includes pixel data for one or more images and the task is an image processing task. For example, the image processing task can be image classification, where the output is a set of scores, each score corresponding to a different object class and representing the likelihood that the one or more images depict an object belonging to the object class. The image processing task may be object detection, where the image processing output identifies one or more regions in the one or more images and, for each region, a likelihood that region depicts an object of interest. As another example, the image processing task can be image segmentation, where the image processing output defines, for each pixel in the one or more images, a respective likelihood for each category in a predetermined set of categories. For example, the set of categories can be foreground and background. As another example, the set of categories can be object classes. As another example, the image processing task can be depth estimation, where the image processing output defines, for each pixel in the one or more images, a respective depth value. As another example, the image processing task can be motion estimation, w here the network input includes multiple images, and the image processing output defines, for each pixel of one of the input images, a motion of the scene depicted at the pixel between the images in the network input.
[0095] In some cases, the input includes audio data representing a spoken utterance and the task is a speech recognition task. The output may comprise a text output which is mapped to the spoken utterance. In some cases, the task comprises encrypting or decrypting input data. In some cases, the task comprises a microprocessor performance task, such as branch prediction or memory address translation.
[0096] Figure 5A illustrates one example computing system that can be used to implement the present disclosure. Other computing systems can be used as well. Forexample, in some implementations, the user computing device 502 can include the model trainer 560 and the training dataset 562. In such implementations, the models 520 can be both trained and used locally at the user computing device 502. In some of such implementations, the user computing device 502 can implement the model trainer 560 to personalize the models 520 based on user-specific data.
[0097] Figure 5B depicts a block diagram of an example computing device 600 that performs according to example embodiments of the present disclosure. The computing device 600 can be a user computing device or a server computing device.
[0098] The computing device 600 includes a number of applications (e.g., applications 1 through N). Each application contains its own machine learning library and machine-learned model(s). For example, each application can include a machine-learned model. Example applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc.
[0099] As illustrated in Figure 5B, each application can communicate with a number of other components of the computing device, such as. for example, one or more sensors, a context manager, a device state component, and / or additional components. In some implementations, each application can communicate with each device component using an API (e.g., a public API). In some implementations, the API used by each application is specific to that application.
[0100] Figure 5C depicts a block diagram of an example computing device 700 that performs according to example embodiments of the present disclosure. The computing device 700 can be a user computing device or a server computing device.
[0101] The computing device 700 includes a number of applications (e.g., applications 1 through N). Each application is in communication with a central intelligence layer. Example applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc. In some implementations, each application can communicate with the central intelligence layer (and model(s) stored therein) using an API (e.g., a common API across all applications).
[0102] The central intelligence layer includes a number of machine-learned models. For example, as illustrated in Figure 5C, a respective machine-learned model can be provided for each application and managed by the central intelligence layer. In other implementations, two or more applications can share a single machine-learned model. For example, in some implementations, the central intelligence layer can provide a single model for all of theapplications. In some implementations, the central intelligence layer is included within or otherwise implemented by an operating system of the computing device 700.
[0103] The central intelligence layer can communicate with a central device data layer. The central device data layer can be a centralized repository of data for the computing device 700. As illustrated in Figure 5C, the central device data layer can communicate with a number of other components of the computing device, such as, for example, one or more sensors, a context manager, a device state component, and / or additional components. In some implementations, the central device data layer can communicate with each device component using an API (e.g., a private API).Additional Disclosure
[0104] The technology discussed herein makes reference to servers, databases, software applications, and other computer-based systems, as well as actions taken and information sent to and from such systems. The inherent flexibility of computer-based systems allows for a great variety of possible configurations, combinations, and divisions of tasks and functionality between and among components. For instance, processes discussed herein can be implemented using a single device or component or multiple devices or components working in combination. Databases and applications can be implemented on a single system or distributed across multiple systems. Distributed components can operate sequentially or in parallel.
[0105] While the present subject matter has been described in detail with respect to various specific example embodiments thereof, each example is provided by way of explanation, not limitation of the disclosure. Those skilled in the art, upon attaining an understanding of the foregoing, can readily produce alterations to, variations of, and equivalents to such embodiments. Accordingly, the subject disclosure does not preclude inclusion of such modifications, variations and / or additions to the present subject matter as would be readily apparent to one of ordinary skill in the art. For instance, features illustrated or described as part of one embodiment can be used with another embodiment to yield a still further embodiment. Thus, it is intended that the present disclosure cover such alterations, variations, and equivalents.
Claims
WHAT IS CLAIMED IS:
1. A computer-implemented method for training a machine-learned model to perform a first task, the method comprising: receiving, by a processor, one or more training data items that demonstrate performance of the first task; providing, by the processor, at least a portion of the one or more training data items to a teacher model and a student model, wherein the teacher model is a pretrained model that has been trained to perform one or more second tasks that are different from the first task; receiving, by the processor, a teacher model output as an output of the teacher model resulting from processing at least the portion of the one or more training data items; receiving, by the processor, a student model output as an output of the student model resulting from processing at least the portion of the one or more training data items; evaluating, by the processor, a loss function that compares the teacher model output and the student model output; and training, by the processor, the student model based at least in part on the loss function that compares the teacher model output and the student model output.
2. The computer-implemented method of claim 1, wherein the one or more second tasks comprise a plurality of second tasks that are different from the first task.
3. The computer-implemented method of claim 1, wherein the teacher model comprises a foundation model that has been trained on a plurality of different datasets respectively associated with the plurality of second tasks.
4. The computer-implemented method of claim 1, wherein the student model comprises a first number of parameters and the teacher model comprises a second number of parameters, and wherein the second number of parameters is at least one order of magnitude greater than the first number of parameters.
5. The computer-implemented method of claim 1, wherein the teacher model comprises a generative sequence processing model.
6. The computer-implemented method of claim 1, wherein training, by the processor, the student model comprises holding parameters of the teacher model frozen.
7. The computer-implemented method of claim 1, wherein an output dimension of the teacher model is larger than an output dimension of the student model.
8. The computer-implemented method of claim 7, further comprising: processing, by the processor, the student output using at least one of linear mapping and batch normalization; and obtaining, by the processor, a modified student output based on the processing of the student output, wherein the modified student output has an output dimension matching the output dimension of the teacher model.
9. The computer-implemented method of claim 8, wherein evaluating the loss function comprises determining, by the processor, a cosine similarity between the teacher output and the modified student output.
10. The computer-implemented method of claim 1, wherein evaluating the loss function comprises determining, by the processor, a cosine similarity between the teacher output and the student output.
12. The computer-implemented method of claim 1, wherein evaluating the loss function comprises determining, by the processor, at least one loss from the group of losses consisting of LI loss, L2 loss, and KL divergence loss.
13. The computer-implemented method of claim 1, wherein the student output comprises an output of a layer of the student model that precedes a softmax layer of the student model.
14. The computer-implemented method of claim 13, further comprising: processing, by the processor, the student output using the softmax layer to obtain a predicted output; andtraining, by the processor, the student model based at least in part by evaluating a second loss function that compares the predicted output to a ground truth label.
15. A computing system for training a machine-learned model to perform a first task, the computing system comprising: a processor; and a non-transi lory, computer-readable medium comprising one or more instructions that, when executed by the processor, cause the processor to perform operations, the operations comprising: receiving one or more training data items that demonstrate performance of the first task; providing at least a portion of the one or more training data items to a teacher model and a student model, wherein the teacher model is a pre-trained model that has been trained to perform one or more second tasks that are different from the first task; receiving a teacher model output as an output of the teacher model resulting from processing at least the portion of the one or more training data items; receiving a student model output as an output of the student model resulting from processing at least the portion of the one or more training data items; evaluating a loss function that compares the teacher model output and the student model output: and training the student model based at least in part on the loss function that compares the teacher model output and the student model output.
16. The computing system of claim 15, wherein the student model comprises a first number of parameters and the teacher model comprises a second number of parameters, and whereinthe second number of parameters is at least one order of magnitude greater than the first number of parameters.
17. The computing system of claim 15, wherein training the student model comprises holding parameters of the teacher model frozen.
18. The computing system of claim 15, wherein evaluating the loss function comprises determining, by the processor, a cosine similarity between the teacher output and the student output.
19. The computing system of claim 15, wherein the student output comprises an output of a layer of the student model that precedes a softmax layer of the student model.
20. A non-transitory, computer-readable medium comprising one or more instructions that, when executed by a processor, cause the processor to perform operations, the operations comprising: receiving one or more training data items that demonstrate performance of the first task; providing at least a portion of the one or more training data items to a teacher model and a student model, wherein the teacher model is a pre-trained model that has been trained to perform one or more second tasks that are different from the first task; receiving a teacher model output as an output of the teacher model resulting from processing at least the portion of the one or more training data items; receiving a student model output as an output of the student model resulting from processing at least the portion of the one or more training data items; evaluating a loss function that compares the teacher model output and the student model output; and training the student model based at least in part on the loss function that compares the teacher model output and the student model output.