Multi-task transfer learning using weight divergence constraints
Certain aspects of the present disclosure provide techniques and apparatus for training a machine learning model based on transfer learning and weight divergence constraints. The method generally includes receiving weight information associated with a machine learning model, wherein the machine learning model comprises a model trained to perform a first task; updating the machine learning model to perform a second task based on the received weight information and a weight divergence constraint between weights defined for the first task and weights updated for the second task; and deploying the updated machine learning model.
1 . A processing system, comprising:
at least one memory having executable instructions stored thereon; and
one or more processors configured to execute the executable instructions in order to cause the processing system to:
receive weight information associated with a machine learning model, wherein the machine learning model comprises a model trained to perform a first task;
update the machine learning model to perform a second task based on the received weight information and a weight divergence constraint between weights defined for the first task and weights updated for the second task; and
deploy the updated machine learning model;
wherein to update the machine learning model, the one or more processors are configured to cause the processing system to minimize a sum of a first loss function and a second loss function, wherein the first loss function comprises a task-specific loss for the second task, and wherein the second loss function comprises a similarity loss between the weights defined for the first task and the weights updated for the second task;
wherein the similarity loss comprises a loss function measuring a normalized loss based on the weights updated for the second task and the received weight information; and
wherein the loss function is based on a sum of a difference between the weights updated for the second task and the received weight information calculated over each layer in a portion of the machine learning model.
2 . The processing system of claim 1 , wherein the machine learning model comprises an encoder-decoder model including an encoder trained to map an input into a latent space and a decoder trained to make predictions based on a latent space representation of the input.
3 . The processing system of claim 1 , wherein the portion of the machine learning model comprises an encoder portion of an encoder-decoder model.
4 . The processing system of claim 1 , wherein the normalized loss is normalized based on a sum of the received weight information.
5 . The processing system of claim 1 , wherein:
the first task comprises a semantic segmentation task for performing on image data, and
the second task comprises an object detection task for performing on the image data.
6 . The processing system of claim 1 , wherein:
the first task comprises an object detection task for performing on image data, and
the second task comprises a semantic segmentation task for performing on the image data.
7 . The processing system of claim 1 , wherein the weight divergence constraint comprises a product of a similarity loss and a task-specific constant.
8 . A processor-implemented method, comprising:
receiving weight information associated with a machine learning model, wherein the machine learning model comprises a model trained to perform a first task;
updating the machine learning model to perform a second task based on the received weight information and a weight divergence constraint between weights defined for the first task and weights updated for the second task; and
deploying the updated machine learning model;
wherein updating the machine learning model comprises minimizing a sum of a first loss function and a second loss function, wherein the first loss function comprises a task-specific loss for the second task, and wherein the second loss function comprises a similarity loss between the weights defined for the first task and the weights updated for the second task;
wherein the similarity loss comprises a loss function measuring a normalized loss based on the weights updated for the second task and the received weight information; and
wherein the loss function is based on a sum of a difference between the weights updated for the second task and the received weight information calculated over each layer in a portion of the machine learning model.
9 . The method of claim 8 , wherein the machine learning model comprises an encoder-decoder model including an encoder trained to map an input into a latent space and a decoder trained to make predictions based on a latent space representation of the input.
10 . The method of claim 8 , wherein the portion of the machine learning model comprises an encoder portion of an encoder-decoder model.
11 . The method of claim 8 , wherein the normalized loss is normalized based on a sum of the received weight information.
12 . The method of claim 8 , wherein:
the first task comprises a semantic segmentation task for performing on image data, and
the second task comprises an object detection task for performing on the image data.
13 . The method of claim 8 , wherein:
the first task comprises an object detection task for performing on image data, and
the second task comprises a semantic segmentation task for performing on the image data.
14 . The method of claim 8 , wherein the weight divergence constraint comprises a product of a similarity loss and a task-specific constant.
15 . A processing system, comprising:
means for receiving weight information associated with a machine learning model, wherein the machine learning model comprises a model trained to perform a first task;
means for updating the machine learning model to perform a second task based on the received weight information and a weight divergence constraint between weights defined for the first task and weights updated for the second task; and
means for deploying the updated machine learning model;
wherein the means for updating the machine learning model comprises minimizing a sum of a first loss function and a second loss function, wherein the first loss function comprises a task-specific loss for the second task, and wherein the second loss function comprises a similarity loss between the weights defined for the first task and the weights updated for the second task;
wherein the similarity loss comprises a loss function measuring a normalized loss based on the weights updated for the second task and the received weight information; and
wherein the loss function is based on a sum of a difference between the weights updated for the second task and the received weight information calculated over each layer in a portion of the machine learning model.
16 . The processing system of claim 15 , wherein the machine learning model comprises an encoder-decoder model including an encoder trained to map an input into a latent space and a decoder trained to make predictions based on a latent space representation of the input.
17 . The processing system of claim 15 , wherein the portion of the machine learning model comprises an encoder portion of an encoder-decoder model.
18 . The processing system of claim 15 , wherein the normalized loss is normalized based on a sum of the received weight information.
19 . The processing system of claim 15 , wherein:
the first task comprises a semantic segmentation task for performing on image data, and
the second task comprises an object detection task for performing on the image data.
20 . The processing system of claim 15 , wherein the weight divergence constraint comprises a product of a similarity loss and a task-specific constant.
21 . A non-transitory computer-readable medium having executable instructions stored thereon which, when executed by one or more processors, perform an operation comprising:
receiving weight information associated with a machine learning model, wherein the machine learning model comprises a model trained to perform a first task;
updating the machine learning model to perform a second task based on the received weight information and a weight divergence constraint between weights defined for the first task and weights updated for the second task; and
deploying the updated machine learning model;
wherein to update the machine learning model, the one or more processors are configured to cause the processing system to minimize a sum of a first loss function and a second loss function, wherein the first loss function comprises a task-specific loss for the second task, and wherein the second loss function comprises a similarity loss between the weights defined for the first task and the weights updated for the second task;
wherein the similarity loss comprises a loss function measuring a normalized loss based on the weights updated for the second task and the received weight information; and
wherein the loss function is based on a sum of a difference between the weights updated for the second task and the received weight information calculated over each layer in a portion of the machine learning model.