Learning method of model and computer-readable recoding medium for storing program for performing the learning method
A method for training a model using a meta-learning includes training a base learning model; training a loss meta-learning model used as a loss function of the base learning model for each task; and training a meta-learning model used to optimize a parameter of the loss meta-learning model.
1 . A method for training a model using a meta-learning, the method comprising:
training a base learning model;
training a loss meta-learning model used as a loss function of the base learning model for each task; and
training a meta-learning model used to optimize a parameter of the loss meta-learning model,
wherein the loss meta-learning model includes multi-layer perceptron.
2 . The method of claim 1 , wherein the training the base learning model includes training the base learning model by use of the loss meta-learning model trained for each task as the loss function.
3 . The method of claim 1 , wherein the training the base learning model includes:
generating output data of the base learning model by inputting input data of a support set to the base learning model; and
defining a task state based on the output data of the base learning model and target output data of the support set.
4 . The method of claim 3 , wherein the training the loss meta-learning model for each task includes:
generating output data of the meta-learning model by inputting the task state to the meta-learning model;
updating the parameter of the loss meta-learning model by use of the output data of the meta-learning model.
5 . The method of claim 4 , wherein the training the base learning model includes:
determining a loss value by inputting the task state to the loss meta-learning model in which the parameter is updated; and
updating a parameter of the base learning model in a direction of minimizing the determined loss value.
6 . The method of claim 4 , wherein the updating the loss meta-learning model includes using an affine transformation, and the output data of the meta-learning model includes affine transformation parameters.
7 . The method of claim 1 , wherein the training the base learning model and the training the loss meta-learning model for each task are included in an internal loop, and the training the meta learning model is included in an external loop.
8 . The method of claim 7 , wherein the internal loop is configured to:
generate the output data of the base learning model by inputting input data of a query dataset to the base learning model for each task in response to a parameter of the base learning model being updated a predetermined number of times;
determine an elementary loss value based on the output data of the base learning model for each task; and
sum the elementary loss value determined for each task.
9 . The method of claim 8 , wherein the external loop is configured to:
update the parameter of the base learning model, the parameter of the loss meta-learning model, and a parameter of the meta-learning model in a direction of minimizing the summed elementary loss value.
10 . A non-transitory computer-readable recording medium in which a program for executing a method for training a model using a meta-learning is stored, wherein the method comprises:
training a base learning model;
training a loss meta-learning model used as a loss function of the base learning model for each task;
training a meta-learning model used to optimize a parameter of the loss meta-learning model,
wherein the loss meta-learning model includes multi-layer perceptron.
11 . The non-transitory computer-readable recording medium of claim 10 , wherein the training the base learning model includes training the base learning model by use of the loss meta-learning model trained for each task as the loss function.
12 . The non-transitory computer-readable recording medium of claim 11 , wherein the training the base learning model includes:
generating output data of the base learning model by inputting input data of a support set to the base learning model; and
defining a task state based on the output data of the base learning model and target output data of the support set.
13 . The non-transitory computer-readable recording medium of claim 12 , wherein the training the loss meta-learning model for each task includes:
generating output data of the meta-learning model by inputting the task state to the meta-learning model;
updating the parameter of the loss meta-learning model by use of the output data of the meta-learning model.
14 . The non-transitory computer-readable recording medium of claim 13 , wherein the training the base learning model includes:
determining a loss value by inputting the task state to the loss meta-learning model in which the parameter is updated; and
updating a parameter of the base learning model in a direction of minimizing the determined loss value.
15 . The non-transitory computer-readable recording medium of claim 13 , wherein the updating the loss meta-learning model includes using an affine transformation, and the output data of the meta-learning model includes affine transformation parameters.
16 . The non-transitory computer-readable recording medium of claim 10 , wherein the training the base learning model and the training the loss meta-learning model for each task are included in an internal loop, and the training the meta learning model is included in an external loop.
17 . The non-transitory computer-readable recording medium of claim 16 , wherein the training the meta-learning model includes:
generating the output data of the base learning model by inputting input data of a query dataset to the base learning model for each task in response to a parameter of the base learning model being updated a predetermined number of times; and
determining an elementary loss value based on the output data of the base learning model for each task.
18 . The non-transitory computer-readable recording medium of claim 17 , wherein the training the meta-learning model further includes summing the elementary loss value determined for each task, and updating the parameter of the base learning model, the parameter of the loss meta-learning model, and a parameter of the meta-learning model in a direction of minimizing the summed elementary loss value.